/* ============================================================
   Auth Page — Professional Redesign
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.auth-body {
    min-height: 100vh;
    display: flex;
    background: #0F172A;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Left branding panel ── */
.auth-brand {
    flex: 1;
    background: linear-gradient(145deg, #0F172A 0%, #1E293B 40%, #0F172A 100%);
    color: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

/* Glowing orbs background */
.auth-brand::before {
    content: '';
    position: absolute;
    top: 15%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 65%);
    pointer-events: none;
}
.auth-brand::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 65%);
    pointer-events: none;
}

.auth-brand-inner {
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 52px;
}
.auth-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(37,99,235,0.4);
}
.auth-logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #F1F5F9;
    letter-spacing: -0.02em;
}

.auth-tagline {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: #F8FAFC;
    margin-bottom: 18px;
    letter-spacing: -0.03em;
}
.auth-tagline span {
    background: linear-gradient(135deg, #60A5FA, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-sub {
    font-size: 1rem;
    color: #94A3B8;
    line-height: 1.7;
    margin-bottom: 48px;
}

.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.auth-features li strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #E2E8F0;
    margin-bottom: 3px;
}
.auth-features li span {
    font-size: 0.8125rem;
    color: #64748B;
    line-height: 1.5;
}

/* Stats row */
.auth-stats {
    display: flex;
    gap: 32px;
    margin-top: 52px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.auth-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #F1F5F9;
    letter-spacing: -0.02em;
}
.auth-stat span {
    font-size: 0.8rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ── Right form panel ── */
.auth-form-panel {
    width: 520px;
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 52px;
    position: relative;
}

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

/* ── Tabs ── */
.auth-tabs {
    display: flex;
    background: #F1F5F9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 32px;
    gap: 4px;
}
.auth-tab {
    flex: 1;
    padding: 9px 16px;
    border: none;
    background: none;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.auth-tab.active {
    background: #ffffff;
    color: #0F172A;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}
.auth-tab:hover:not(.active) {
    color: #374151;
    background: rgba(255,255,255,0.5);
}

/* ── Tab content ── */
.auth-tab-content { display: none; }
.auth-tab-content.active { display: block; }

.auth-tab-content h2 {
    font-size: 1.625rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 6px;
    letter-spacing: -0.025em;
}
.auth-desc {
    font-size: 0.9rem;
    color: #64748B;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Form groups ── */
.form-group {
    margin-bottom: 18px;
    position: relative;
}
.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #0F172A;
    background: #FAFAFA;
    transition: all 0.18s ease;
    outline: none;
    font-family: inherit;
}
.form-group input::placeholder {
    color: #B0BACC;
    font-size: 0.9rem;
}
.form-group input:hover {
    border-color: #CBD5E1;
    background: #fff;
}
.form-group input:focus {
    border-color: #2563EB;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Password wrapper with show/hide toggle */
.input-password-wrap {
    position: relative;
}
.input-password-wrap input {
    padding-right: 44px;
}
.btn-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}
.btn-toggle-pw:hover { color: #475569; }

/* ── Google button ── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    background: #ffffff;
    color: #0F172A;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
    margin-bottom: 20px;
    font-family: inherit;
}
.btn-google:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transform: translateY(-1px);
}
.btn-google:active { transform: translateY(0); }

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: #B0BACC;
    font-size: 0.8125rem;
    font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #F1F5F9;
}

/* ── Submit button ── */
.btn-auth-submit {
    width: 100%;
    padding: 13px 16px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
    font-family: inherit;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.btn-auth-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.08), transparent);
}
.btn-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.45);
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
}
.btn-auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

/* Loading state */
.btn-auth-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}
.btn-auth-submit.loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Switch link ── */
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: #64748B;
    margin-top: 20px;
}
.auth-switch a {
    color: #2563EB;
    font-weight: 600;
    text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Alerts ── */
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}
.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}
.alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
}

/* Terms note */
.auth-terms {
    font-size: 0.75rem;
    color: #94A3B8;
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}
.auth-terms a { color: #64748B; text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .auth-brand { display: none; }
    .auth-form-panel {
        width: 100%;
        padding: 40px 32px;
        background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    }
    .auth-form-inner {
        background: #fff;
        padding: 36px 32px;
        border-radius: 16px;
        box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    }
}
@media (max-width: 480px) {
    .auth-form-panel { padding: 20px 16px; }
    .auth-form-inner { padding: 28px 20px; }
    .auth-tagline { font-size: 1.875rem; }
}
