/* ============================================================================
   AUTH PAGES — split-screen layout: a brand/illustration panel on the
   left, the actual sign-in form on the right. Shared by every _AuthLayout
   page (Login, ActivateAccount, ChangePassword, etc).
   ============================================================================ */

.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    background: #f4f6fb;
    color: #0f172a;
}

.auth-split {
    display: flex;
    min-height: 100vh;
}

/* ---------- Brand panel ---------- */
.auth-brand-panel {
    flex: 1 1 50%;
    max-width: 560px;
    background: linear-gradient(165deg, #eef2ff 0%, #f5f3ff 55%, #ffffff 100%);
    border-right: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 3rem;
}

.auth-brand-panel-inner {
    max-width: 380px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2.5rem;
}
.auth-brand-logo i { color: #4f46e5; font-size: 1.5rem; }

.auth-brand-heading {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 0.6rem;
}

.auth-brand-sub {
    font-size: 1.02rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    max-width: 300px;
}

.auth-brand-illustration {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin-bottom: 2.5rem;
}
.auth-illus-glow { fill: #ede9fe; }
.auth-illus-dots circle { fill: #c7d2fe; }
.auth-illus-book { stroke: none; }
.auth-illus-book.book-blue { fill: #2563eb; }
.auth-illus-book.book-amber { fill: #f59e0b; }
.auth-illus-book.book-violet { fill: #4f46e5; }
.auth-illus-pot { fill: #ffffff; stroke: #cbd5e1; stroke-width: 1.5; }
.auth-illus-leaf { fill: #22c55e; }
.auth-illus-screen { fill: #1e293b; }
.auth-illus-display { fill: #ffffff; }
.auth-illus-avatar { fill: #c7d2fe; }
.auth-illus-line { fill: #e2e8f0; }
.auth-illus-bar { fill: #4f46e5; }
.auth-illus-base { fill: #334155; }

.auth-brand-trust {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.auth-brand-trust i {
    color: #4f46e5;
    font-size: 1.15rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.auth-brand-trust-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
    margin-bottom: 0.15rem;
}
.auth-brand-trust-sub {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

/* ---------- Form panel ---------- */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    flex: 1 1 50%;
    min-height: 100vh;
}
.auth-form-inner {
    width: 100%;
    max-width: 520px;
}

/* The card used by login/activate/etc views */
.auth-card {
    width: 100%;
}

/* Compact logo header above the form — this used to be mobile-only
   (paired with a two-column brand panel that showed on desktop); now it's
   the only logo, shown at every width. */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #4f46e5;
    margin-bottom: 1.75rem;
}
.auth-brand i { color: #4f46e5; font-size: 1.7rem; }

.auth-card h1 {
    font-size: 1.6rem !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

/* Bigger, friendlier inputs on auth */
.auth-form-inner .form-control {
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    border-radius: 10px;
}
.auth-form-inner .form-label {
    font-weight: 600;
    font-size: 0.85rem;
}
.auth-form-inner .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    border-radius: 10px;
    margin-top: 0.5rem;
}

/* ============================================================================
   UPPERCASE LABELS + ICON-IN-FIELD INPUTS — reusable across any
   _AuthLayout page (Login, ActivateAccount, ChangePassword, etc), not
   scoped to one page. Matches the reference design: small-caps labels,
   a leading icon inside the input, generous left padding so text doesn't
   overlap the icon.

   Usage:
   <label class="auth-label">Email Address</label>
   <div class="auth-input-icon-wrap">
     <i class="bi bi-envelope"></i>
     <input class="form-control" ... />
   </div>
   ============================================================================ */
.auth-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 0.4rem;
}

.auth-input-icon-wrap {
    position: relative;
}

.auth-input-icon-wrap > i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-input-icon-wrap .form-control {
    padding-left: 2.6rem;
}

/* When a trailing icon (e.g. the password show/hide toggle button) also
   sits in the same wrapper, the leading icon needs to yield the right
   side — .sb2-toggle-visibility (see dash-premium.css) already
   positions itself at the right edge, so no conflict, but the input
   still needs matching right padding for the toggle button not to
   overlap typed text. */
.auth-input-icon-wrap .form-control.has-trailing-icon {
    padding-right: 2.6rem;
}

/* Pill-shaped primary button variant, matching the reference's rounded
   "Sign In" button — opt-in via .auth-btn-pill rather than changing the
   base .auth-form-inner .btn-primary radius, since other _AuthLayout
   pages may still want the existing 10px-radius rectangular style. */
.auth-form-inner .btn-primary.auth-btn-pill {
    border-radius: 100px;
    font-weight: 700;
}

/* Plain, non-uppercase checkbox label used alongside .form-check —
   distinct from .auth-label (which is for field labels above an input),
   since a checkbox's own inline label reads better in sentence case. */
.auth-form-inner .form-check-label {
    font-size: 0.88rem;
    color: #334155;
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .auth-brand-panel { display: none; }
    .auth-form-panel { padding: 1.5rem; flex: 1 1 100%; }
}

/* ============================================================================
   PASSWORD FIELD — show/hide toggle + strength meter positioning.
   These .sb2-* rules originally lived in sb-admin-theme.css and were ported
   to dash-premium.css during theme consolidation — but auth pages load
   auth.css, NOT dash-premium.css, so _AuthLayout pages (Login,
   ChangePassword, ActivateAccount) never received them. Without these, the
   toggle <button> renders as a normal inline element (a bare bordered box
   dropping BELOW the input) and the leading lock icon sits unaligned. This
   is the auth-page copy of the same rules, using auth.css's own conventions.
   ============================================================================ */
.sb2-input-wrap {
    position: relative;
}

/* The show/hide button, pinned inside the input's right edge. */
.sb2-toggle-visibility {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color 0.15s;
}
.sb2-toggle-visibility:hover {
    color: #475569;
}
.sb2-toggle-visibility:focus,
.sb2-toggle-visibility:focus-visible {
    outline: none;
    color: #4f46e5;
}

/* Live password-strength meter (used on ChangePassword/ActivateAccount —
   harmless to include here so every _AuthLayout page has it available). */
.sb2-strength {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.sb2-strength-bar {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.2s;
}
.sb2-strength-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 4px;
    min-height: 1.2em;
}
