/* ─────────────────────────────────────────
   Toppers Tutoring — Auth Page
   ───────────────────────────────────────── */

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

:root {
    --blue:          #070861;
    --blue-dark:     #05064a;
    --blue-mid:      #0b0d8c;
    --gold:          #c59a33;
    --gold-hover:    #d4aa4a;
    --white:         #ffffff;
    --off-white:     #f7f7fb;
    --text:          #0d0d1f;
    --text-sub:      #52527a;
    --text-muted:    #9393b8;
    --border:        #e3e3f0;
    --border-focus:  #0e8a9e;
    --input-bg:      #fafafd;
    --error-bg:      #fff2f2;
    --error-border:  #fecaca;
    --error-text:    #c0392b;
    --success-bg:    #f0faf5;
    --success-border:#b7e4cc;
    --success-text:  #1e7e50;
    --font:          'Albert Sans', system-ui, sans-serif;
    --radius:        9px;
    --shadow-card:   0 2px 16px rgba(7, 8, 97, 0.06);

    /* Brand panel cyan theme */
    --cyan-vivid:    #26C5D2;
    --cyan-dark:     #0e8a9e;
    --navy:          #0d4a5a;
    --navy-light:    #1a6878;
}

html, body {
    height: 100%;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--off-white);
    color: var(--text);
    overflow: hidden;
}


/* ══════════════════════════════════════════
   Layout
══════════════════════════════════════════ */

.auth-layout {
    display: grid;
    grid-template-columns: 55% 45%;
    height: 100vh;
}


/* ══════════════════════════════════════════
   Brand Panel (Left)
══════════════════════════════════════════ */

.brand-panel {
    background: linear-gradient(180deg,
        #1DBECF 0%,
        #3ECBD9 12%,
        #6BD8E4 30%,
        #9DE8F0 55%,
        #C5F2F7 78%,
        #E0F8FC 100%
    );
    position: relative;
    overflow: hidden;
    display: flex;
}

/* Subtle dot grid */
.deco--dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(14, 138, 158, 0.15) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
    animation: dotDrift 20s ease-in-out infinite alternate;
}

@keyframes dotDrift {
    from { background-position: 0 0; }
    to   { background-position: 18px 18px; }
}

/* Decorative rings */
.deco--ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(14, 138, 158, 0.18);
    pointer-events: none;
}
.deco--ring-1 {
    width: 520px;
    height: 520px;
    bottom: -180px;
    right: -130px;
    animation: ringRotate 50s linear infinite;
}
.deco--ring-2 {
    width: 760px;
    height: 760px;
    bottom: -300px;
    right: -260px;
    border-color: rgba(14, 138, 158, 0.1);
    animation: ringRotate 80s linear infinite reverse;
}
.deco--ring-3 {
    width: 1000px;
    height: 1000px;
    top: -220px;
    left: -320px;
    border-color: rgba(14, 138, 158, 0.06);
    animation: ringRotate 120s linear infinite;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Ambient glow blobs */
.deco--glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.deco--glow-1 {
    width: 420px;
    height: 420px;
    top: 5%;
    left: -80px;
    background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 65%);
    animation: glowPulse 6s ease-in-out infinite;
}
.deco--glow-2 {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: -40px;
    background: radial-gradient(circle, rgba(14,138,158,0.25) 0%, transparent 65%);
    animation: glowPulse 8s ease-in-out infinite 2s;
}

@keyframes glowPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.15); }
}

.brand-panel__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 52px 60px;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo__name {
    font-family: 'Montserrat', sans-serif;
    display: inline-block;
    background: #ffffff;
    color: var(--blue-dark);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
    padding: 7px 14px 8px;
    border-radius: 6px;
}

.brand-logo__name strong {
    font-weight: 900;
    color: #e5231b;
}


.mobile-logo .brand-logo__name {
    background: #ffffff;
    color: var(--blue-dark);
    box-shadow: 0 0 0 1.5px var(--border);
}

.mobile-logo .brand-logo__name strong {
    color: #e5231b;
}


/* ══════════════════════════════════════════
   Brand Main Logo — Animated
══════════════════════════════════════════ */

.brand-main-logo-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.brand-main-logo {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.brand-main-logo__prefix {
    font-family: 'Mistral', cursive;
    font-style: normal;
    font-weight: 400;
    font-size: clamp(72px, 7vw, 108px);
    color: var(--navy);
    display: inline-block;
    will-change: transform, opacity;
    line-height: 1;
}

.brand-main-logo__rest {
    font-family: 'Mistral', cursive;
    font-size: clamp(72px, 7vw, 108px);
    font-weight: 400;
    color: var(--navy);
    letter-spacing: 0;
    line-height: 1;
}

.brand-main-tagline {
    font-family: var(--font);
    font-size: 13.5px;
    color: rgba(13, 74, 90, 0.5);
    margin-top: 16px;
    letter-spacing: 0.1px;
}


/* ══════════════════════════════════════════
   Headline block
══════════════════════════════════════════ */

.brand-content {
    margin-top: 0;
    margin-bottom: 40px;
}

.brand-eyebrow {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--navy);
    opacity: 0.55;
    margin-bottom: 14px;
}

.brand-headline {
    font-size: clamp(28px, 2.6vw, 38px);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.12;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.brand-headline em {
    font-style: normal;
    color: var(--cyan-dark);
}

.brand-subtext {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(13, 74, 90, 0.6);
    max-width: 340px;
}

/* Stats row */
.brand-footer {
    display: flex;
    align-items: center;
    gap: 0;
    padding-top: 36px;
    border-top: 1px solid rgba(14, 138, 158, 0.2);
}

.brand-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 32px;
}

.brand-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(14, 138, 158, 0.2);
    margin-right: 32px;
    flex-shrink: 0;
}

.brand-stat__number {
    font-size: 17px;
    font-weight: 700;
    color: var(--cyan-dark);
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-stat__label {
    font-size: 11.5px;
    color: rgba(13, 74, 90, 0.55);
    letter-spacing: 0.1px;
}


/* ══════════════════════════════════════════
   Form Panel (Right)
══════════════════════════════════════════ */

.form-panel {
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 48px 40px;
    border-left: 1px solid var(--border);
}

.form-panel__inner {
    width: 100%;
    max-width: 390px;
}

/* Mobile logo (hidden on desktop) */
.mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.mobile-logo .brand-logo__name {
    color: var(--text);
}


/* ══════════════════════════════════════════
   Tabs
══════════════════════════════════════════ */

.auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1.5px solid var(--border);
    margin-bottom: 36px;
}

.auth-tab {
    background: none;
    border: none;
    padding: 10px 0;
    margin-right: 28px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.18s ease;
    white-space: nowrap;
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--cyan-dark);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.auth-tab.active {
    color: var(--text);
}

.auth-tab.active::after {
    transform: scaleX(1);
}

.auth-tab:hover:not(.active) {
    color: var(--text-sub);
}


/* ══════════════════════════════════════════
   Form Header
══════════════════════════════════════════ */

.form-header {
    margin-bottom: 28px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.7px;
    margin-bottom: 5px;
    line-height: 1.2;
}

.form-header p {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.5;
}


/* ══════════════════════════════════════════
   Fields
══════════════════════════════════════════ */

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--text);
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    -webkit-appearance: none;
}

.field input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.field input:focus {
    border-color: var(--border-focus);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(14, 138, 158, 0.1);
}

/* Side-by-side fields */
.field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Inline row: checkbox + forgot link */
.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    margin-top: -4px;
}

/* Password input wrapper */
.input-wrap {
    position: relative;
}

.input-wrap input {
    padding-right: 44px;
}

.btn-eye {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    line-height: 0;
}

.btn-eye:hover {
    color: var(--text-sub);
}


/* ══════════════════════════════════════════
   Password Strength Indicator
══════════════════════════════════════════ */

.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.visible {
    display: block;
}

.pw-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 5px;
}

.pw-bar span {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.25s;
}

.pw-bar.strength-1 span:nth-child(1)                              { background: #e55; }
.pw-bar.strength-2 span:nth-child(-n+2)                           { background: #e8952a; }
.pw-bar.strength-3 span:nth-child(-n+3)                           { background: var(--gold); }
.pw-bar.strength-4 span                                           { background: var(--success-text); }

.pw-label {
    font-size: 11.5px;
    color: var(--text-muted);
}


/* ══════════════════════════════════════════
   Checkbox
══════════════════════════════════════════ */

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-sub);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--blue);
    cursor: pointer;
    flex-shrink: 0;
}


/* ══════════════════════════════════════════
   Links
══════════════════════════════════════════ */

.link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--blue);
    text-decoration: none;
    transition: color 0.15s;
}

.link:hover {
    color: var(--gold);
}


/* ══════════════════════════════════════════
   Primary Button
══════════════════════════════════════════ */

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.1px;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    margin-top: 4px;
}

.btn-primary:hover {
    background: var(--cyan-dark);
    box-shadow: 0 4px 14px rgba(14, 138, 158, 0.3);
}

.btn-primary:active {
    transform: scale(0.985);
    box-shadow: none;
}

.btn-primary svg {
    opacity: 0.7;
    flex-shrink: 0;
}


/* ══════════════════════════════════════════
   Terms note
══════════════════════════════════════════ */

.terms-note {
    font-size: 11.5px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 14px;
    line-height: 1.65;
}

.terms-note .link {
    font-size: 11.5px;
}


/* ══════════════════════════════════════════
   Alerts
══════════════════════════════════════════ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 20px;
    border: 1px solid transparent;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.alert--error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.alert--success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}


/* ══════════════════════════════════════════
   Form footer
══════════════════════════════════════════ */

.form-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 36px;
}

.form-footer strong {
    font-weight: 600;
    color: var(--text-sub);
}


/* ══════════════════════════════════════════
   Utility
══════════════════════════════════════════ */

.hidden {
    display: none !important;
}


/* ══════════════════════════════════════════
   Responsive
══════════════════════════════════════════ */

@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        border-left: none;
        padding: 40px 24px 60px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 52px;
    }

    .mobile-logo {
        display: flex;
    }
}

@media (max-width: 420px) {
    .field-group {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
