/* ============================================================
   VLE PC — the sign-in / sign-up family of pages: login.php,
   register.php, otp-login.php, forgot-password.php. One shared
   visual language, styled like a native app's auth screen.
   ============================================================ */

.auth-page {
    background:
        radial-gradient(120% 100% at 15% 0%, rgba(124, 58, 237, .10), transparent 55%),
        radial-gradient(100% 90% at 100% 10%, rgba(139, 92, 246, .08), transparent 50%),
        var(--bg-primary, #fff);
    padding-block: var(--space-10) var(--space-12);
    min-height: calc(100vh - var(--header-height, 64px));
    display: flex;
}

.auth-shell {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.auth-wrap {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    align-self: center;
}

/* The brand/feature panel — hidden below 1100px on purpose (not just on a
   phone): on a phone this would be a wall of text above the form nobody
   scrolls past to reach, the form itself is what people came for. See
   app/layout/auth-side.php. The threshold sits well above 980/1024px on
   purpose — some Android browsers report an effective viewport around
   there (a phone with "Request desktop site" on, some OEM browsers'
   default zoom, etc.). Confirmed by a real user screenshot: a phone
   reporting a ~980px layout viewport showed both panels half-squeezed with
   a large empty gap above, not the clean single-column mobile view. */
.auth-side { display: none; }

@media (min-width: 1100px) {
    /* True edge-to-edge split — not a small centered card floating on a big
       empty background. Each half runs the full page height and half the
       page width; the previous version capped .auth-shell at 1120px and
       centered it, which left huge empty gutters on any wider screen. */
    .auth-page { padding-block: 0; }
    .auth-shell { min-height: calc(100vh - var(--header-height, 64px)); }
    .auth-wrap {
        flex: 1 1 50%;
        max-width: none;
        margin: 0;
        align-self: stretch;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: var(--space-10) var(--space-8);
        position: relative;
        overflow: hidden;
    }
    /* The right half stretches to fill whatever room is left (a very wide
       monitor makes this a lot of room) — a fixed-width card alone would
       leave a stark, empty-looking gap around it, so this soft background
       texture plus the feature strip below the card are what actually fill
       that space, not just a wider card (a login FORM getting wider than
       ~480px stops looking like a form). */
    .auth-wrap::before, .auth-wrap::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
    }
    .auth-wrap::before { width: 420px; height: 420px; top: -140px; right: -140px; background: radial-gradient(circle, rgba(124, 58, 237, .07), transparent 70%); }
    .auth-wrap::after { width: 320px; height: 320px; bottom: -120px; left: -100px; background: radial-gradient(circle, rgba(255, 122, 0, .05), transparent 70%); }
    .auth-card { width: 100%; max-width: 460px; position: relative; z-index: 1; }
    .auth-side {
        display: flex;
        flex-direction: column;
        flex: 1 1 50%;
        background: linear-gradient(160deg, #1e1b4b 0%, #4c1d95 45%, #7c3aed 100%);
        padding: var(--space-10) clamp(var(--space-8), 6vw, 5rem);
        color: #fff;
        position: relative;
        overflow: hidden;
    }
    /* A quiet dot-grid, top-right — purely decorative, matches the reference
       mockup's texture without needing an actual illustration asset. */
    .auth-side::before {
        content: '';
        position: absolute;
        top: 48px; right: 48px;
        width: 130px; height: 130px;
        background-image: radial-gradient(circle, rgba(255, 255, 255, .22) 1.5px, transparent 1.5px);
        background-size: 18px 18px;
        pointer-events: none;
    }
    /* Logo pins to the top (a direct child of .auth-side, above this); the
       rest of the panel's content centers in whatever space is left below
       it, rather than the logo getting swept into the same centered block
       and ending up stranded a third of the way down a tall screen. */
    .auth-side__inner {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: 480px;
        margin-inline: auto;
        width: 100%;
    }
}

.auth-side__logo {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
    margin-bottom: var(--space-8); text-decoration: none; position: relative; z-index: 1;
}
.auth-side__logo-mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: #fff; color: var(--primary-700);
    display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.auth-side__logo-text { font-size: 1.25rem; font-weight: 800; color: #fff; }
.auth-side__logo-text em { font-style: normal; color: #fbbf24; }
.auth-side__logo-tag { flex-basis: 100%; font-size: var(--text-xs); color: rgba(255, 255, 255, .65); }

.auth-side__headline { font-size: 1.85rem; font-weight: 800; line-height: 1.2; margin: 0 0 var(--space-3); color: #fff; }
.auth-side__sub { font-size: var(--text-sm); color: rgba(255, 255, 255, .78); margin: 0 0 var(--space-7); max-width: 34ch; }

.auth-side__features { list-style: none; margin: 0 0 var(--space-7); padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.auth-side__features li { display: flex; gap: var(--space-4); align-items: center; }
.auth-side__feature-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    display: grid; place-items: center;
}
.auth-side__feature-icon svg { width: 21px; height: 21px; color: #fbbf24; }
.auth-side__features strong { display: block; font-size: var(--text-sm); font-weight: 700; color: #fff; }
.auth-side__features span { display: block; font-size: var(--text-xs); color: rgba(255, 255, 255, .7); margin-top: 2px; }

.auth-side__pill {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: var(--space-8);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, .85);
    position: relative; z-index: 1;
    align-self: flex-start;
}

.auth-side__updates { margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid rgba(255, 255, 255, .15); }
.auth-side__updates h3 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .6); margin: 0 0 var(--space-3); font-weight: 700; }
.auth-side__update { margin-bottom: var(--space-3); }
.auth-side__update strong { display: block; font-size: var(--text-sm); color: #fff; }
.auth-side__update span { display: block; font-size: var(--text-xs); color: rgba(255, 255, 255, .65); margin-top: 2px; }

.auth-card {
    background: var(--bg-secondary, #fff);
    border: 1px solid rgba(124, 58, 237, .08);
    border-radius: 1.5rem;
    /* A deliberately richer, brand-tinted "floating card" shadow rather than
       the generic neutral --shadow-xl — this is the form people are here to
       fill in, it should read as the thing sitting on top of the page. */
    box-shadow:
        0 30px 60px -15px rgba(76, 29, 149, .25),
        0 12px 24px -8px rgba(76, 29, 149, .18),
        0 2px 6px rgba(76, 29, 149, .06);
    padding: var(--space-8) var(--space-7) var(--space-7);
    position: relative;
}

.auth-badge {
    width: 60px; height: 60px;
    border-radius: var(--radius-xl);
    background: var(--gradient-button);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 10px 20px -6px rgba(124, 58, 237, .5);
    margin: 0 auto var(--space-5);
}
.auth-badge svg { width: 28px; height: 28px; }
.auth-badge--whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: 0 10px 20px -6px rgba(37, 211, 102, .5); }

/* The site's own wordmark, small, at the very top of the card — separate
   from .auth-badge, which is the per-page action icon underneath it. */
.auth-card__logo { display: flex; justify-content: center; margin-bottom: var(--space-5); }
.auth-card__logo img { height: 30px; }
.auth-card__logo-mark {
    width: 30px; height: 30px; border-radius: 9px;
    background: var(--gradient-button); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 12px;
    margin-right: 8px;
}
.auth-card__logo-text { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); display: inline-flex; align-items: center; }
.auth-card__logo-text em { font-style: normal; color: var(--primary-600); }

/* A bigger, standalone hero badge for whichever single method is the star
   of this particular screen (Google, today) — distinct from the smaller
   .auth-badge used on every other auth-family page. */
.auth-hero-badge {
    width: 92px; height: 92px;
    margin: 0 auto var(--space-6);
    border-radius: 50%;
    background: #fff;
    display: grid; place-items: center;
    box-shadow: 0 16px 32px -10px rgba(76, 29, 149, .35), 0 4px 10px rgba(76, 29, 149, .1);
}
.auth-hero-badge svg { width: 44px; height: 44px; }

.auth-head { text-align: center; margin-bottom: var(--space-7); }
.auth-title { font-size: var(--text-2xl); font-weight: 700; margin: 0 0 var(--space-2); }
.auth-subtitle { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; }
.auth-subtitle strong { color: var(--text-primary); }

.auth-divider {
    display: flex; align-items: center; gap: var(--space-3);
    margin: var(--space-6) 0;
    color: var(--text-tertiary); font-size: var(--text-xs); font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.auth-cta {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: none; cursor: pointer;
    font-size: var(--text-base); font-weight: 600;
    color: #fff;
    background: var(--gradient-button);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.auth-cta:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.auth-cta:active { transform: translateY(0); }
.auth-cta__icon { width: 22px; height: 22px; flex-shrink: 0; }
.auth-cta--whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.auth-cta--ghost {
    background: var(--bg-secondary); color: var(--text-primary);
    border: 1.5px solid var(--gray-200); box-shadow: none;
}
.auth-cta--ghost:hover { color: var(--text-primary); border-color: var(--primary-300); background: var(--primary-50); box-shadow: none; }

/* Google's own sign-in button guidelines call for a plain white/light
   button with the real multicolour "G" mark — not the site's usual
   purple-gradient treatment, which would read as VLE PC's own branding
   sitting on top of Google's. */
.auth-cta--google {
    background: #fff; color: #1f1f1f;
    border: 1.5px solid var(--gray-200); box-shadow: var(--shadow-sm);
    border-radius: 999px;
    justify-content: space-between;
}
.auth-cta--google:hover { color: #1f1f1f; border-color: var(--gray-300); background: var(--gray-50); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.auth-cta--google:disabled { opacity: .6; cursor: default; transform: none; }
.auth-cta--google .auth-cta__group { display: flex; align-items: center; gap: var(--space-3); }
.auth-cta--google .auth-cta__chevron { width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; }

/* "Safe • Fast • Secure" — a short reassurance line under the primary CTA,
   dividers on both sides so it reads as a quiet aside, not another button. */
.auth-trust-line {
    display: flex; align-items: center; gap: var(--space-3);
    margin: var(--space-5) 0;
    color: var(--text-tertiary); font-size: var(--text-xs); font-weight: 600;
}
.auth-trust-line::before, .auth-trust-line::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.auth-trust-line span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.auth-trust-line svg { width: 14px; height: 14px; color: var(--success, #10b981); }

.auth-highlight {
    display: flex; align-items: flex-start; gap: var(--space-3);
    margin-top: var(--space-6);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--success-light, #d1fae5);
}
.auth-highlight__icon { font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.auth-highlight strong { display: block; font-size: var(--text-sm); color: var(--text-primary); }
.auth-highlight span { display: block; font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px; }

/* A row of feature call-outs BELOW the card — what actually fills the extra
   room a fixed-width card leaves on a wide screen, and puts real feature
   copy directly next to the form itself, not only on the left panel. */
.auth-features-strip {
    width: 100%; max-width: 460px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-8);
    position: relative; z-index: 1;
}
@media (min-width: 1300px) { .auth-features-strip { grid-template-columns: repeat(4, 1fr); max-width: 640px; } }
.auth-features-strip__item {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-3);
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(124, 58, 237, .1);
    border-radius: var(--radius-lg);
}
.auth-features-strip__icon {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--primary-50);
    color: var(--primary-600);
}
.auth-features-strip__icon svg { width: 17px; height: 17px; }
.auth-features-strip__item strong { display: block; font-size: var(--text-xs); font-weight: 700; color: var(--text-primary); }
.auth-features-strip__item span { display: block; font-size: 11px; color: var(--text-tertiary); }

.auth-phone-field {
    display: flex; align-items: stretch;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.auth-phone-field:focus-within { border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-100, rgba(124,58,237,.15)); }
.auth-phone-field__prefix {
    display: flex; align-items: center; padding: 0 var(--space-4);
    font-size: var(--text-base); font-weight: 600; color: var(--text-secondary);
    background: var(--gray-50); border-right: 1.5px solid var(--gray-200);
}
.auth-phone-field input {
    border: none; outline: none; background: transparent;
    padding: var(--space-4); font-size: var(--text-lg); letter-spacing: .03em;
    flex: 1; min-width: 0; color: var(--text-primary);
}

.auth-otp-boxes { display: flex; gap: var(--space-2); justify-content: center; }
.auth-otp-box {
    width: 46px; height: 56px;
    text-align: center;
    font-size: var(--text-2xl); font-weight: 700;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.auth-otp-box:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-100, rgba(124,58,237,.15)); }

.auth-back {
    display: inline-flex; align-items: center; gap: var(--space-2);
    font-size: var(--text-sm); color: var(--text-secondary); font-weight: 600;
    margin-bottom: var(--space-5);
}
.auth-back:hover { color: var(--primary-600); }
.auth-back svg { width: 16px; height: 16px; }

.auth-foot { text-align: center; font-size: var(--text-sm); margin-top: var(--space-6); color: var(--text-secondary); }
.auth-foot a { font-weight: 600; }
.auth-terms { text-align: center; font-size: var(--text-xs); color: var(--text-tertiary); margin-top: var(--space-3); }

/* Self-contained email/mobile method switch — used by forgot-password.php.
   Not the same component as tool.css's .chip-row (that one is not loaded on
   auth pages), kept local so this page has no cross-file styling dependency. */
.auth-toggle { display: flex; gap: var(--space-2); background: var(--gray-50); padding: 4px; border-radius: var(--radius-lg); margin-bottom: var(--space-6); }
.auth-toggle a {
    flex: 1; text-align: center;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm); font-weight: 600;
    color: var(--text-secondary);
}
.auth-toggle a.active { background: var(--bg-secondary); color: var(--primary-700); box-shadow: var(--shadow-sm); }

@media (max-width: 480px) {
    .auth-card { padding: var(--space-6) var(--space-5) var(--space-5); border-radius: var(--radius-xl); }
    .auth-page { padding-block: var(--space-6) var(--space-8); }
    .auth-otp-box { width: 40px; height: 50px; font-size: var(--text-xl); }
}
