/* ============================================
   OmniChat - Auth Pages CSS
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --primary-light: #8b84ff;
    --secondary: #ff6584;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f0e17;
    --dark-2: #1a1929;
    --dark-3: #252438;
    --surface: #1e1d2e;
    --border: rgba(255,255,255,0.08);
    --text: #e8e6ff;
    --text-muted: #9492b8;
    --font: 'Inter', system-ui, sans-serif;
    --radius: 16px;
    --shadow: 0 25px 50px rgba(0,0,0,0.5);
    --glow: 0 0 40px rgba(108,99,255,0.3);
}

body {
    font-family: var(--font);
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ── AUTH WRAPPER ── */
.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── LEFT PANEL ── */
.auth-left {
    flex: 1;
    background: linear-gradient(135deg, #0f0e17 0%, #1a1929 40%, #2d1b69 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,99,255,0.3) 0%, transparent 70%);
    top: -100px; left: -100px;
    animation: pulse 4s ease-in-out infinite;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,101,132,0.2) 0%, transparent 70%);
    bottom: -50px; right: -50px;
    animation: pulse 6s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.auth-brand {
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 60px;
}

.auth-logo {
    width: 90px; height: 90px;
    border-radius: 24px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(108,99,255,0.4);
    border: 2px solid rgba(255,255,255,0.1);
}

.auth-brand h1 {
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px 20px;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(108,99,255,0.15);
    border-color: rgba(108,99,255,0.3);
    color: var(--text);
    transform: translateX(6px);
}

.feature-icon {
    font-size: 1.3rem;
    min-width: 30px;
    text-align: center;
}

/* ── RIGHT PANEL ── */
.auth-right {
    width: 480px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-card-header {
    margin-bottom: 32px;
}

.auth-card-header h2 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.auth-card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ── ALERTS ── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    color: #86efac;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── FORM ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px; height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 46px 13px 44px;
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.input-wrapper input::placeholder { color: var(--text-muted); }

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-pass svg { width: 18px; height: 18px; }
.toggle-pass:hover { color: var(--primary); }

/* ── BUTTON ── */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(108,99,255,0.4);
    margin-top: 4px;
}

.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,99,255,0.5);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── DIVIDER ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── DEMO CREDS ── */
.demo-creds {
    background: rgba(108,99,255,0.08);
    border: 1px solid rgba(108,99,255,0.2);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.demo-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 3px 0;
}
.demo-item strong { color: var(--primary-light); }

/* ── FOOTER ── */
.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-footer a:hover { color: #fff; text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .auth-left { display: none; }
    .auth-right { width: 100%; }
}

@media (max-width: 480px) {
    .auth-right { padding: 30px 20px; }
    .auth-card-header h2 { font-size: 1.6rem; }
}
