:root {
    --ga-auth-bg: #f6f3ee;
    --ga-auth-surface: rgba(255, 255, 255, 0.88);
    --ga-auth-surface-strong: #ffffff;
    --ga-auth-border: rgba(25, 30, 45, 0.08);
    --ga-auth-text: #1b2330;
    --ga-auth-muted: #667085;
    --ga-auth-accent: #b68a35;
    --ga-auth-accent-dark: #8f6a22;
    --ga-auth-danger: #d92d20;
    --ga-auth-success: #067647;
    --ga-auth-shadow: 0 20px 60px rgba(17, 24, 39, 0.12);
    --ga-auth-radius-xl: 28px;
    --ga-auth-radius-lg: 18px;
    --ga-auth-radius-md: 14px;
    --ga-auth-input-h: 52px;
    --ga-auth-maxw: 1120px;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

body.ga-auth-body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--ga-auth-text);
    background:
        radial-gradient(circle at top left, rgba(182, 138, 53, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(137, 82, 180, 0.10), transparent 24%),
        linear-gradient(180deg, #faf8f4 0%, #f2eee8 100%);
}

.ga-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}

.ga-auth-wrap {
    width: 100%;
    max-width: var(--ga-auth-maxw);
}

.ga-auth-card {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    background: var(--ga-auth-surface);
    border: 1px solid var(--ga-auth-border);
    border-radius: var(--ga-auth-radius-xl);
    box-shadow: var(--ga-auth-shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.ga-auth-brand-block {
    position: relative;
    padding: 52px 48px;
    background:
        linear-gradient(135deg, rgba(182, 138, 53, 0.10), rgba(255, 255, 255, 0.92)),
        linear-gradient(180deg, #fcfbf8 0%, #f6f1ea 100%);
    border-right: 1px solid var(--ga-auth-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
}

.ga-auth-brand-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.ga-auth-brand-logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ga-auth-brand-logo-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: linear-gradient(135deg, #1f2937, #4b5563);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ga-auth-brand-logo-placeholder.alt {
    background: linear-gradient(135deg, #6d4aff, #8d67ff);
}

.ga-auth-brand-name {
    font-size: 0.98rem;
    font-weight: 700;
    text-align: center;
    color: var(--ga-auth-text);
}

.ga-auth-brand-divider {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--ga-auth-border);
    display: grid;
    place-items: center;
    color: var(--ga-auth-accent-dark);
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.06);
}

.ga-auth-brand-copy h1 {
    margin: 0 0 12px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.08;
    color: #1a1c22;
}

.ga-auth-brand-copy p {
    margin: 0;
    max-width: 540px;
    color: var(--ga-auth-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.ga-auth-notice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--ga-auth-border);
    color: var(--ga-auth-text);
    font-size: 0.92rem;
    font-weight: 600;
}

.ga-auth-form-block {
    padding: 52px 42px;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ga-auth-form {
    width: 100%;
    max-width: 420px;
}

.ga-auth-form-header {
    margin-bottom: 24px;
}

.ga-auth-form-header h2 {
    margin: 0 0 8px;
    font-size: 1.7rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--ga-auth-text);
}

.ga-auth-form-header p {
    margin: 0;
    color: var(--ga-auth-muted);
    font-size: 0.96rem;
}

.ga-auth-field {
    margin-bottom: 18px;
}

.ga-auth-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ga-auth-text);
}

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

.ga-auth-input-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 1rem;
}

.ga-auth-input-wrap input {
    width: 100%;
    height: var(--ga-auth-input-h);
    padding: 0 16px 0 46px;
    border: 1px solid #d9dee7;
    border-radius: var(--ga-auth-radius-md);
    background: #fff;
    color: var(--ga-auth-text);
    font-size: 0.98rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ga-auth-input-wrap input:focus {
    outline: none;
    border-color: rgba(182, 138, 53, 0.75);
    box-shadow: 0 0 0 4px rgba(182, 138, 53, 0.14);
}

.ga-auth-input-wrap input::placeholder {
    color: #98a2b3;
}

.ga-auth-row {
    margin-top: 2px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ga-auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.93rem;
    color: var(--ga-auth-text);
    cursor: pointer;
    user-select: none;
}

.ga-auth-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--ga-auth-accent);
}

.ga-auth-help-text {
    font-size: 0.9rem;
    color: var(--ga-auth-muted);
    text-align: right;
}

.ga-auth-submit {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: var(--ga-auth-radius-md);
    background: linear-gradient(135deg, var(--ga-auth-accent), var(--ga-auth-accent-dark));
    color: #fff;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 28px rgba(182, 138, 53, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.ga-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(182, 138, 53, 0.28);
}

.ga-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ga-auth-footnote {
    margin-top: 18px;
    text-align: center;
    color: var(--ga-auth-muted);
    font-size: 0.89rem;
    line-height: 1.6;
}

.ga-auth-error {
    margin-top: 8px;
    color: var(--ga-auth-danger);
    font-size: 0.88rem;
    font-weight: 600;
}

.ga-auth-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
}

.ga-auth-alert-success {
    color: var(--ga-auth-success);
    background: rgba(6, 118, 71, 0.08);
    border: 1px solid rgba(6, 118, 71, 0.14);
}

@media (max-width: 991.98px) {
    .ga-auth-card {
        grid-template-columns: 1fr;
    }

    .ga-auth-brand-block {
        border-right: 0;
        border-bottom: 1px solid var(--ga-auth-border);
        padding: 36px 26px 30px;
    }

    .ga-auth-form-block {
        padding: 34px 22px 36px;
    }
}

@media (max-width: 575.98px) {
    .ga-auth-shell {
        padding: 16px;
    }

    .ga-auth-brand-copy h1 {
        font-size: 1.75rem;
    }

    .ga-auth-brand-copy p {
        font-size: 0.94rem;
    }

    .ga-auth-help-text {
        text-align: left;
    }

    .ga-auth-brand-logos {
        gap: 14px;
    }

    .ga-auth-brand-logo-placeholder {
        width: 74px;
        height: 74px;
        border-radius: 20px;
    }
}


/* ============================================================================
   ADMIN AUTH — v2.0 ADDITIONS  (Aug 7 2026)
   ============================================================================
   Everything below is APPENDED. Nothing above this line was modified, so the
   existing login layout renders byte-identically.

   WHY THIS EXISTS:
   The brand-landing component shipped using .ga-brand-choice-* classes that
   were defined in NO stylesheet — `grep -c brand-choice admin-auth.css`
   returned 0. The "/" portal chooser has therefore been rendering as raw
   unstyled HTML since March. This block defines those classes plus the new
   password-change and no-access screens.

   Breakpoints follow §7.4: 991.98 / 640 / 400 / 320 (Samsung Fold).
   ============================================================================ */

:root {
    --ga-auth-warning:      #B54708;
    --ga-auth-warning-bg:   rgba(247, 144, 9, 0.10);
    --ga-auth-teal:         #3ECDC6;
    --ga-auth-gold:         #C5A44E;
    --ga-choice-accent:     #C5A44E;
}


/* ────────────────────────────────────────────────────────────────────────────
   1. NARROW / SINGLE-COLUMN CARD  (password change, chooser, no-access)
   ──────────────────────────────────────────────────────────────────────────── */

.ga-auth-wrap-narrow {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.ga-auth-card-single {
    grid-template-columns: 1fr;
    display: block;
}

.ga-auth-form-block-full {
    width: 100%;
    padding: 40px 38px 34px;
    flex-direction: column;
    align-items: center;
}

.ga-auth-form-header-center {
    text-align: center;
}

.ga-auth-form-header-center h2 {
    margin-bottom: 6px;
}


/* ────────────────────────────────────────────────────────────────────────────
   2. PORTAL CHOOSER CARDS  (.ga-brand-choice-*)
   ────────────────────────────────────────────────────────────────────────────
   --ga-choice-accent is set inline per card from the portal's primary_color
   in config/portals.php, so Jhaena renders gold and Sossymo turquoise with no
   per-brand CSS. A new portal needs zero stylesheet changes.
   ──────────────────────────────────────────────────────────────────────────── */

.ga-brand-choice-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 6px 0 20px;
}

.ga-brand-choice-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--ga-auth-radius-lg);
    border: 1px solid var(--ga-auth-border);
    background: var(--ga-auth-surface-strong);
    text-decoration: none;
    color: var(--ga-auth-text);
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    position: relative;
    overflow: hidden;
}

.ga-brand-choice-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ga-choice-accent, #C5A44E);
}

.ga-brand-choice-card:hover,
.ga-brand-choice-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--ga-choice-accent, #C5A44E);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.10);
    text-decoration: none;
    color: var(--ga-auth-text);
    outline: none;
}

.ga-brand-choice-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--ga-choice-accent, #C5A44E) 12%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--ga-choice-accent, #C5A44E) 26%, transparent);
    overflow: hidden;
}

.ga-brand-choice-logo img {
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
    display: block;
}

.ga-brand-choice-content {
    flex: 1 1 auto;
    min-width: 0;
}

.ga-brand-choice-title {
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.25;
    margin-bottom: 3px;
}

.ga-brand-choice-subtitle {
    font-size: 0.8rem;
    color: var(--ga-auth-muted);
    line-height: 1.35;
}

.ga-brand-choice-arrow {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ga-choice-accent, #C5A44E);
    background: color-mix(in srgb, var(--ga-choice-accent, #C5A44E) 10%, transparent);
    transition: transform 180ms ease;
}

.ga-brand-choice-card:hover .ga-brand-choice-arrow {
    transform: translateX(3px);
}


/* ────────────────────────────────────────────────────────────────────────────
   3. LOGIN — BRAND UNIT LIST + PASSWORD EYE + SPINNER
   ──────────────────────────────────────────────────────────────────────────── */

.ga-auth-brand-units {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 18px 0 4px;
}

.ga-auth-brand-unit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--ga-auth-muted);
    line-height: 1.35;
}

.ga-auth-brand-unit strong {
    color: var(--ga-auth-text);
    font-weight: 600;
}

.ga-auth-brand-unit-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
}

.ga-auth-dot-gold { background: var(--ga-auth-gold); }
.ga-auth-dot-teal { background: var(--ga-auth-teal); }

.ga-auth-brand-logo-alt {
    background: rgba(62, 205, 198, 0.12) !important;
}

/* Password reveal toggle. Sits inside .ga-auth-input-wrap, which is already
   position:relative in the base sheet. Padding is added to the input so long
   passwords never run under the button. */
.ga-auth-input-wrap .ga-auth-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ga-auth-muted);
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: color 150ms ease, background 150ms ease;
}

.ga-auth-input-wrap .ga-auth-eye:hover {
    color: var(--ga-auth-accent);
    background: rgba(182, 138, 53, 0.08);
}

.ga-auth-input-wrap:has(.ga-auth-eye) input {
    padding-right: 46px;
}

.ga-auth-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ga-auth-spin 620ms linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}

@keyframes ga-auth-spin {
    to { transform: rotate(360deg); }
}


/* ────────────────────────────────────────────────────────────────────────────
   4. ALERTS — WARNING VARIANT
   ──────────────────────────────────────────────────────────────────────────── */

.ga-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.ga-auth-alert i {
    flex: 0 0 auto;
    margin-top: 1px;
}

.ga-auth-alert-warning {
    background: var(--ga-auth-warning-bg);
    color: var(--ga-auth-warning);
    border: 1px solid rgba(247, 144, 9, 0.25);
    border-radius: var(--ga-auth-radius-md);
    padding: 12px 14px;
    font-size: 0.86rem;
    margin-bottom: 18px;
}


/* ────────────────────────────────────────────────────────────────────────────
   5. PASSWORD CHANGE SCREEN
   ──────────────────────────────────────────────────────────────────────────── */

.ga-auth-pw-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    color: var(--ga-auth-accent);
    background: rgba(182, 138, 53, 0.12);
    border: 1px solid rgba(182, 138, 53, 0.22);
}

.ga-auth-pw-icon-warning {
    color: var(--ga-auth-warning);
    background: var(--ga-auth-warning-bg);
    border-color: rgba(247, 144, 9, 0.25);
}

.ga-auth-divider {
    border: 0;
    border-top: 1px solid var(--ga-auth-border);
    margin: 22px 0 20px;
}

/* Strength meter */
.ga-auth-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
}

.ga-auth-strength-track {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 999px;
    background: rgba(25, 30, 45, 0.09);
    overflow: hidden;
}

.ga-auth-strength-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 260ms ease, background 260ms ease;
    background: var(--ga-auth-danger);
}

.ga-auth-strength-0,
.ga-auth-strength-1 { background: #D92D20; }
.ga-auth-strength-2 { background: #F79009; }
.ga-auth-strength-3 { background: #EAB308; }
.ga-auth-strength-4 { background: #16A34A; }
.ga-auth-strength-5 { background: #067647; }

.ga-auth-strength-label {
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ga-auth-muted);
    min-width: 66px;
    text-align: right;
}

/* Rule checklist */
.ga-auth-rules {
    list-style: none;
    margin: 4px 0 22px;
    padding: 14px 16px;
    border-radius: var(--ga-auth-radius-md);
    background: rgba(25, 30, 45, 0.03);
    border: 1px solid var(--ga-auth-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ga-auth-rules li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
    color: var(--ga-auth-muted);
    transition: color 180ms ease;
}

.ga-auth-rules li i {
    font-size: 0.95rem;
    flex: 0 0 auto;
}

.ga-auth-rules li.ok {
    color: var(--ga-auth-success);
    font-weight: 500;
}

.ga-auth-rules-plain {
    background: transparent;
    border: 0;
    padding: 0 0 8px;
}

.ga-auth-rules-plain li i {
    color: var(--ga-auth-accent);
}


/* ────────────────────────────────────────────────────────────────────────────
   6. INLINE FORM / LINK BUTTON  (sign-out inside a footnote)
   ──────────────────────────────────────────────────────────────────────────── */

.ga-auth-inline-form {
    margin: 0;
    display: inline;
}

.ga-auth-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--ga-auth-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 150ms ease;
}

.ga-auth-linkbtn:hover {
    color: var(--ga-auth-accent-dark);
}

.ga-auth-notice-inline {
    margin-top: 4px;
    font-size: 0.8rem;
}


/* ────────────────────────────────────────────────────────────────────────────
   7. RESPONSIVE  (§7.4 — incl. Samsung Fold, leadership/CFO devices)
   ──────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .ga-auth-form-block-full {
        padding: 30px 20px 26px;
    }

    .ga-brand-choice-card {
        padding: 14px;
        gap: 12px;
    }

    .ga-brand-choice-logo {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
    }

    .ga-brand-choice-subtitle {
        font-size: 0.75rem;
    }
}

/* Samsung Fold 7 inner (~344px) */
@media (max-width: 400px) {
    .ga-auth-form-block-full {
        padding: 24px 15px 22px;
    }

    .ga-auth-pw-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        margin-bottom: 14px;
    }

    .ga-brand-choice-arrow {
        display: none;
    }

    .ga-auth-strength-label {
        min-width: 56px;
        font-size: 0.7rem;
    }

    .ga-auth-rules {
        padding: 11px 12px;
    }

    .ga-auth-rules li {
        font-size: 0.77rem;
    }
}

/* Samsung Fold outer (~215px) — absolute minimum */
@media (max-width: 320px) {
    .ga-brand-choice-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .ga-auth-strength {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .ga-auth-strength-label {
        text-align: left;
    }
}


/* ────────────────────────────────────────────────────────────────────────────
   8. REDUCED MOTION
   ──────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ga-brand-choice-card,
    .ga-brand-choice-arrow,
    .ga-auth-strength-fill {
        transition: none;
    }

    .ga-auth-spinner {
        animation-duration: 1.6s;
    }
}
