:root {
    --qfs-bg: #020202;
    --qfs-surface-1: rgba(18, 18, 18, 0.72);
    --qfs-surface-2: rgba(5, 5, 5, 0.88);
    --qfs-text-strong: #ffffff;
    --qfs-text-muted: #a7a7a7;
    --qfs-accent: #d4af37;
    --qfs-accent-strong: #fde08b;
    --qfs-border: rgba(212, 175, 55, 0.24);
    --qfs-border-strong: rgba(212, 175, 55, 0.68);
    --qfs-error-bg: rgba(78, 11, 11, 0.75);
    --qfs-error-text: #ffd8d8;
    --qfs-radius-alert: 12px;
    --qfs-radius-input: 12px;
    --qfs-radius-card: 24px;
    --qfs-radius-button: 16px;
    --qfs-space-4: 4px;
    --qfs-space-8: 8px;
    --qfs-space-12: 12px;
    --qfs-space-16: 16px;
    --qfs-space-24: 24px;
    --qfs-space-32: 32px;
    --qfs-space-40: 40px;
    --qfs-space-48: 48px;
    --qfs-shadow-card:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(212, 175, 55, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    --qfs-shadow-button: 0 18px 34px rgba(0, 0, 0, 0.34);
    --qfs-shadow-focus: 0 0 20px rgba(212, 175, 55, 0.35);
    --qfs-font-body: "Inter", sans-serif;
    --qfs-font-label: "Inter", sans-serif;
    --qfs-font-display: "Inter", sans-serif;
    --qfs-auth-font-body: "Rajdhani", sans-serif;
    --qfs-auth-font-display: "Cinzel", serif;
    --qfs-auth-page-bg: #ffffff;
    --qfs-auth-card-bg: #ffffff;
    --qfs-auth-text: #1a1408;
    --qfs-auth-text-muted: #5a5146;
    --qfs-auth-accent-ink: #8a6d12;
    --qfs-auth-pin-bg: #fffdf6;
    --qfs-auth-error-bg: #fff1f1;
    --qfs-auth-error-text: #8a1f1f;
    --qfs-auth-error-border: #e0a3a3;
    --qfs-font-size-h1: 32px;
    --qfs-font-size-h2: 24px;
    --qfs-font-size-body: 16px;
    --qfs-font-size-body-compact: 14px;
    --qfs-font-size-caption: 12px;
    --qfs-font-size-input-min: 16px;
    --qfs-line-height-heading: 1.2;
    --qfs-line-height-body: 1.5;
    --qfs-line-height-body-compact: 1.5;
    --qfs-v2-page-bg: #131313;
    --qfs-v2-page-text: #e5e2e1;
    --qfs-v2-shell-bg: #131313;
}

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

.qfs-v2-page {
    background-color: var(--qfs-v2-page-bg);
    color: var(--qfs-v2-page-text);
    font-family: var(--qfs-font-body);
}

.qfs-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    speak: never;
}

.qfs-v2-mobile-footer {
    background: var(--qfs-v2-shell-bg);
}

.qfs-v2-mobile-nav-link-inactive {
    color: rgba(208, 197, 175, 0.88);
}

.qfs-v2-mobile-nav-link-inactive:hover {
    color: #e5e2e1;
    background: rgba(242, 202, 80, 0.09);
}

.qfs-v2-mobile-nav-link-active {
    color: #f2ca50;
    background: rgba(242, 202, 80, 0.14);
    box-shadow: inset 0 0 0 1px rgba(242, 202, 80, 0.22);
}

.qfs-v2-mobile-nav-link-featured {
    color: #f2ca50;
}

.qfs-v2-mobile-nav-featured-text {
    color: #f2ca50;
    text-shadow:
        0 0 8px rgba(242, 202, 80, 0.65),
        0 0 14px rgba(242, 202, 80, 0.35);
}

@media (min-width: 1024px) {
    .qfs-v2-side-nav-link-featured {
        color: #f2ca50 !important;
        border-color: transparent !important;
        background: transparent !important;
        box-shadow: none !important;
        text-shadow:
            0 0 8px rgba(242, 202, 80, 0.65),
            0 0 14px rgba(242, 202, 80, 0.35);
    }

    .qfs-v2-side-nav-link-featured:hover,
    .qfs-v2-side-nav-link-featured:focus-visible {
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    .qfs-v2-side-nav-link-featured .qfs-icon {
        color: #f2ca50 !important;
        text-shadow:
            0 0 8px rgba(242, 202, 80, 0.65),
            0 0 14px rgba(242, 202, 80, 0.35);
    }
}

/* User portal v2 — dark only: deeper page, sidebar/mobile chrome, darker header */
html[data-portal-theme="dark"] {
    --qfs-v2-page-bg: #0c0c0c;
    --qfs-v2-shell-bg: #080808;
}

html[data-portal-theme="dark"] .qfs-v2-page {
    background-color: var(--qfs-v2-page-bg);
}

html[data-portal-theme="dark"] .qfs-v2-mobile-footer {
    background: var(--qfs-v2-shell-bg);
}

html[data-portal-theme="dark"] .qfs-v2-header {
    background-color: rgba(11, 11, 11, 0.9) !important;
    background-image: none !important;
}

html[data-portal-theme="dark"] .qfs-v2-mobile-footer > div {
    background-color: rgba(12, 12, 12, 0.92) !important;
    background-image: none !important;
    border-top-color: rgba(153, 144, 124, 0.28) !important;
    box-shadow:
        0 -12px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(242, 202, 80, 0.06) !important;
}

/*
 * Mobile nav only: silver / platinum chrome. The rest of the portal stays
 * on the original dark / gold skin.
 */
.qfs-v2-mobile-footer--platinum,
html[data-portal-theme="dark"] .qfs-v2-mobile-footer--platinum,
html[data-portal-theme="light"] .qfs-v2-mobile-footer--platinum {
    background: linear-gradient(180deg, #f7f9fb 0%, #e8ecf0 100%) !important;
    box-shadow: 0 -10px 28px rgba(31, 41, 55, 0.18) !important;
}

.qfs-v2-mobile-footer--platinum > div,
html[data-portal-theme="dark"] .qfs-v2-mobile-footer--platinum > div,
html[data-portal-theme="light"] .qfs-v2-mobile-footer--platinum > div {
    background: linear-gradient(180deg, rgba(247, 249, 251, 0.97) 0%, rgba(228, 233, 238, 0.97) 100%) !important;
    border-top-color: rgba(22, 27, 34, 0.16) !important;
    box-shadow:
        0 -10px 28px rgba(31, 41, 55, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    color: #161b22;
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-inactive {
    color: #4a545f;
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-inactive:hover {
    color: #161b22;
    background: rgba(85, 96, 109, 0.12);
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-active {
    color: #2f3742;
    background: rgba(85, 96, 109, 0.16);
    box-shadow: inset 0 0 0 1px rgba(85, 96, 109, 0.28);
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-featured,
.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-featured-text {
    color: #3b444f;
    text-shadow: none;
}

html[data-portal-theme="light"] .qfs-v2-page {
    background-color: #f8f8f8;
    color: #111111;
}

html[data-portal-theme="light"] .qfs-v2-mobile-footer,
html[data-portal-theme="light"] .qfs-v2-header {
    background: #ffffff;
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(212, 175, 55, 0.08);
}

html[data-portal-theme="light"] .qfs-v2-mobile-footer > div {
    background: rgba(255, 255, 255, 0.97) !important;
    border-top-color: rgba(212, 175, 55, 0.28) !important;
    box-shadow:
        0 -10px 28px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(212, 175, 55, 0.08) !important;
}

html[data-portal-theme="light"] .qfs-v2-mobile-nav-link-inactive {
    color: rgba(71, 71, 71, 0.92);
}

html[data-portal-theme="light"] .qfs-v2-mobile-nav-link-inactive:hover {
    color: #1a1a1a;
    background: rgba(212, 175, 55, 0.11);
}

html[data-portal-theme="light"] .qfs-v2-mobile-nav-link-active {
    color: #7a5500;
    background: rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 0 0 1px rgba(138, 96, 0, 0.22);
}

html[data-portal-theme="light"] .qfs-v2-mobile-nav-link-featured {
    color: #7a5500;
}

html[data-portal-theme="light"] .qfs-v2-mobile-nav-featured-text {
    color: #7a5500;
    text-shadow:
        0 0 8px rgba(138, 96, 0, 0.3),
        0 0 12px rgba(138, 96, 0, 0.2);
}

@media (min-width: 1024px) {
    html[data-portal-theme="light"] .qfs-v2-side-nav-link-featured {
        color: #7a5500 !important;
        border-color: transparent !important;
        background: transparent !important;
        box-shadow: none !important;
        text-shadow:
            0 0 8px rgba(138, 96, 0, 0.3),
            0 0 12px rgba(138, 96, 0, 0.2);
    }

    html[data-portal-theme="light"] .qfs-v2-side-nav-link-featured:hover,
    html[data-portal-theme="light"] .qfs-v2-side-nav-link-featured:focus-visible {
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    html[data-portal-theme="light"] .qfs-v2-side-nav-link-featured .qfs-icon {
        color: #7a5500 !important;
        text-shadow:
            0 0 8px rgba(138, 96, 0, 0.3),
            0 0 12px rgba(138, 96, 0, 0.2);
    }
}

html[data-portal-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.88) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(212, 175, 55, 0.08) !important;
}

html[data-portal-theme="light"] .text-on-surface {
    color: #111111 !important;
}

html[data-portal-theme="light"] .text-on-surface-variant {
    color: #474747 !important;
}

html[data-portal-theme="light"] .bg-surface,
html[data-portal-theme="light"] .bg-surface-container,
html[data-portal-theme="light"] .bg-surface-container-high,
html[data-portal-theme="light"] .bg-surface-container-highest,
html[data-portal-theme="light"] .bg-surface-container-low,
html[data-portal-theme="light"] .bg-surface-container-lowest,
html[data-portal-theme="light"] .bg-surface-variant {
    background-color: #ffffff !important;
}

/*
 * Tailwind opacity modifiers are separate utilities (e.g. bg-surface-container-low/80).
 * Without light overrides they keep the dark palette hex colors, which breaks contrast
 * with html[data-portal-theme="light"] .text-on-surface (dark text on dark gray).
 */
html[data-portal-theme="light"] .bg-surface-container-low\/50 {
    background-color: rgba(255, 255, 255, 0.78) !important;
}

html[data-portal-theme="light"] .bg-surface-container-low\/60 {
    background-color: rgba(255, 255, 255, 0.82) !important;
}

html[data-portal-theme="light"] .bg-surface-container-low\/80 {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

html[data-portal-theme="light"] .bg-surface-container-low\/90 {
    background-color: rgba(255, 255, 255, 0.94) !important;
}

html[data-portal-theme="light"] .bg-surface-container-lowest\/40 {
    background-color: rgba(252, 252, 252, 0.92) !important;
}

html[data-portal-theme="light"] .bg-surface-container-lowest\/50 {
    background-color: rgba(250, 250, 250, 0.94) !important;
}

html[data-portal-theme="light"] .bg-surface-container\/40,
html[data-portal-theme="light"] .bg-surface-container\/50,
html[data-portal-theme="light"] .bg-surface-container\/60,
html[data-portal-theme="light"] .bg-surface-container\/70 {
    background-color: rgba(255, 255, 255, 0.86) !important;
}

html[data-portal-theme="light"] .bg-surface-container\/95 {
    background-color: rgba(255, 255, 255, 0.97) !important;
}

html[data-portal-theme="light"] .bg-surface-container-high\/50 {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

html[data-portal-theme="light"] .bg-surface-container-highest\/80 {
    background-color: rgba(255, 255, 255, 0.92) !important;
}

html[data-portal-theme="light"] .hover\:bg-surface-container\/70:hover,
html[data-portal-theme="light"] .hover\:bg-surface-container\/70:focus-visible {
    background-color: rgba(245, 245, 245, 0.98) !important;
}

html[data-portal-theme="light"] .border-outline,
html[data-portal-theme="light"] .border-outline-variant {
    border-color: rgba(17, 17, 17, 0.15) !important;
}

html[data-portal-theme="light"] .text-primary {
    color: #8a6000 !important;
}

html[data-portal-theme="light"] .text-amber-50\/90 {
    color: #5a4400 !important;
}

html[data-portal-theme="light"] .gold-glow {
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.14) !important;
}

html[data-portal-theme="light"] [class*="shadow-\\[0_0_"] {
    box-shadow: none !important;
}

html[data-portal-theme="light"] [data-notification-list] > div[aria-hidden="true"] {
    background: #f4f4f4 !important;
    border-color: rgba(17, 17, 17, 0.12) !important;
    box-shadow: none !important;
}

html[data-portal-theme="light"] .notification-row {
    background: #ffffff !important;
    border-color: rgba(17, 17, 17, 0.12) !important;
}

html[data-portal-theme="light"] .notification-row:hover {
    background: #f8f8f8 !important;
}

html[data-portal-theme="light"] [data-filter-empty-state] {
    background: #ffffff !important;
    border-color: rgba(17, 17, 17, 0.12) !important;
}

html[data-portal-theme="light"] .notification-filter {
    background: #ffffff !important;
    color: #1b1b1b !important;
    border-color: rgba(17, 17, 17, 0.18) !important;
    box-shadow: none !important;
}

html[data-portal-theme="light"] .notification-filter:hover {
    background: #f3f3f3 !important;
    color: #111111 !important;
    border-color: rgba(17, 17, 17, 0.28) !important;
}

html[data-portal-theme="light"] .notification-filter.bg-primary {
    background: #e5bf49 !important;
    color: #2f2200 !important;
    border-color: #c8a231 !important;
}

html[data-portal-theme="light"] .notification-filter.text-on-primary {
    color: #2f2200 !important;
}

html[data-portal-theme="light"] .text-rose-200,
html[data-portal-theme="light"] .text-rose-300 {
    color: #9f1239 !important;
}

html[data-portal-theme="light"] .text-emerald-200,
html[data-portal-theme="light"] .text-emerald-300 {
    color: #065f46 !important;
}

html[data-portal-theme="light"] .text-amber-100,
html[data-portal-theme="light"] .text-amber-200 {
    color: #92400e !important;
}

html[data-portal-theme="light"] .bg-rose-500\/10 {
    background: rgba(225, 29, 72, 0.12) !important;
}

html[data-portal-theme="light"] .border-rose-500\/20 {
    border-color: rgba(190, 24, 93, 0.3) !important;
}

html[data-portal-theme="light"] .bg-emerald-500\/10 {
    background: rgba(16, 185, 129, 0.14) !important;
}

html[data-portal-theme="light"] .border-emerald-500\/20 {
    border-color: rgba(5, 150, 105, 0.32) !important;
}

html[data-portal-theme="light"] .bg-primary\/10,
html[data-portal-theme="light"] .bg-primary\/15 {
    background: rgba(212, 175, 55, 0.14) !important;
}

html[data-portal-theme="light"] .border-primary\/20,
html[data-portal-theme="light"] .border-primary\/30,
html[data-portal-theme="light"] .border-primary\/40 {
    border-color: rgba(138, 96, 0, 0.3) !important;
}

html[data-portal-theme="light"] [data-status-badge],
html[data-portal-theme="light"] [data-status-badge-mobile] {
    font-weight: 700 !important;
}

html[data-portal-theme="light"] .text-on-surface-variant\/40 {
    color: #5f5f5f !important;
}

html[data-portal-theme="light"] .text-on-surface-variant\/70 {
    color: #4b4b4b !important;
}

html[data-portal-theme="light"] .text-on-surface-variant\/90 {
    color: #343434 !important;
}

html[data-portal-theme="light"] .text-primary\/90 {
    color: #7a5500 !important;
}

html[data-portal-theme="light"] .border-outline-variant\/60 {
    border-color: rgba(17, 17, 17, 0.28) !important;
}

html[data-portal-theme="light"] .border-primary\/25 {
    border-color: rgba(138, 96, 0, 0.38) !important;
}

html[data-portal-theme="light"] [data-code-digit] {
    color: #1f1f1f !important;
    background-color: #ffffff !important;
}

.qfs-auth-page {
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow: hidden;
    background: var(--qfs-auth-page-bg);
    color: var(--qfs-auth-text);
    font-family: var(--qfs-auth-font-body);
}

.qfs-auth-canvas,
.qfs-auth-mesh,
.qfs-auth-texture {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.qfs-auth-canvas {
    z-index: 0;
}

.qfs-auth-mesh {
    inset: -50%;
    z-index: 1;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(1000px) rotateX(64deg) translateZ(-100px);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 80%);
    mask-image: radial-gradient(circle at 50% 50%, #000, transparent 80%);
    opacity: 0.8;
    animation: qfs-mesh-drift 18s linear infinite;
}

.qfs-auth-texture {
    z-index: 2;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.qfs-auth-main {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(20px, env(safe-area-inset-top))
        24px
        max(24px, env(safe-area-inset-bottom))
        24px;
}

.qfs-auth-shell {
    width: 100%;
    max-width: 420px;
}

.qfs-auth-brand {
    margin-bottom: var(--qfs-space-32);
    text-align: center;
}

.qfs-eyebrow {
    margin: 0;
    color: var(--qfs-auth-accent-ink);
    font-family: var(--qfs-auth-font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
}

.qfs-auth-brand-eyebrow {
    margin-bottom: 12px;
}

.qfs-eyebrow-left {
    margin-bottom: var(--qfs-space-8);
}

.qfs-auth-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.qfs-auth-brand-line {
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--qfs-accent));
}

.qfs-auth-brand-line:last-child {
    background: linear-gradient(270deg, transparent, var(--qfs-accent));
}

.qfs-display-title {
    margin: 0;
    font-family: var(--qfs-auth-font-display);
    font-size: clamp(30px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: transparent;
    background: linear-gradient(180deg, #1a1a1a 0%, var(--qfs-accent-strong) 58%, var(--qfs-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 18px rgba(212, 175, 55, 0.2);
}

.qfs-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-radius: var(--qfs-radius-card);
    background: var(--qfs-auth-card-bg);
    box-shadow:
        0 24px 48px rgba(26, 20, 8, 0.08),
        0 0 0 1px rgba(212, 175, 55, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.qfs-card::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, transparent 66%);
    pointer-events: none;
}

.qfs-card::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 18px;
    pointer-events: none;
}

.qfs-auth-card {
    padding: 20px 32px 32px;
}

.qfs-auth-card-inner {
    position: relative;
    z-index: 1;
}

.qfs-auth-bracket {
    position: absolute;
    width: 58px;
    height: 58px;
    border: 2px solid var(--qfs-accent);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.28));
}

.qfs-auth-bracket-tl {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
    border-top-left-radius: 24px;
}

.qfs-auth-bracket-br {
    right: -2px;
    bottom: -2px;
    border-top: 0;
    border-left: 0;
    border-bottom-right-radius: 24px;
}

.qfs-auth-topline {
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--qfs-accent), transparent);
    opacity: 0.72;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}

.qfs-auth-emblem {
    position: relative;
    width: min(272px, 70vw);
    height: min(272px, 70vw);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qfs-auth-emblem-ring,
.qfs-auth-emblem-glow {
    position: absolute;
    border-radius: 999px;
}

.qfs-auth-emblem-ring {
    display: none;
}

.qfs-auth-emblem-ring-outer {
    animation: qfs-spin 10s linear infinite;
}

.qfs-auth-emblem-ring-inner {
    inset: 16px;
    border-color: rgba(212, 175, 55, 0.14);
    animation: qfs-spin-reverse 15s linear infinite;
}

.qfs-auth-emblem-glow {
    inset: 4px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.08) 40%, rgba(212, 175, 55, 0) 72%);
    filter: blur(28px);
}

.qfs-auth-emblem-picture {
    position: relative;
    z-index: 1;
    display: block;
    width: 106%;
    height: 106%;
}

.qfs-auth-emblem-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1);
    filter: drop-shadow(0 8px 18px rgba(26, 20, 8, 0.08));
}

.qfs-stack-24 > * + * {
    margin-top: var(--qfs-space-24);
}

.qfs-stack-16 > * + * {
    margin-top: var(--qfs-space-16);
}

.qfs-panel-title {
    margin: 0;
    color: var(--qfs-auth-text);
    font-family: var(--qfs-auth-font-body);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.qfs-panel-copy {
    margin: 0;
    color: var(--qfs-auth-text-muted);
    font-family: var(--qfs-auth-font-body);
    font-size: 16px;
    line-height: 1.5;
}

.qfs-panel-copy-hero {
    display: block;
    width: 100%;
    max-width: none;
    color: var(--qfs-auth-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    text-wrap: pretty;
}

.qfs-field-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qfs-pin-row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.qfs-pin-input {
    width: 100%;
    min-width: 0;
    height: 56px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: var(--qfs-radius-input);
    background: var(--qfs-auth-pin-bg);
    color: var(--qfs-auth-text);
    font-family: var(--qfs-auth-font-body);
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    caret-color: var(--qfs-auth-accent-ink);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
}

.qfs-pin-input:focus,
.qfs-pin-input:active,
.qfs-pin-input.is-filled {
    outline: 0;
    border-color: var(--qfs-accent);
    background: #ffffff;
    box-shadow:
        0 0 0 3px rgba(212, 175, 55, 0.22),
        0 8px 18px rgba(138, 109, 18, 0.12);
    transform: scale(1.05);
}

.qfs-pin-input:-webkit-autofill,
.qfs-pin-input:-webkit-autofill:hover,
.qfs-pin-input:-webkit-autofill:focus,
.qfs-pin-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--qfs-auth-pin-bg) inset !important;
    -webkit-text-fill-color: var(--qfs-auth-text) !important;
    caret-color: var(--qfs-auth-accent-ink);
    transition: background-color 9999s ease-out 0s;
}

.qfs-alert {
    border: 1px solid var(--qfs-auth-error-border);
    border-radius: var(--qfs-radius-alert);
    background: var(--qfs-auth-error-bg);
    color: var(--qfs-auth-error-text);
    padding: 12px 16px;
    font-family: var(--qfs-auth-font-body);
    font-size: 15px;
    line-height: 1.4;
}

.qfs-auth-support-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.qfs-check-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.qfs-check-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qfs-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qfs-check-box {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(138, 109, 18, 0.55);
    border-radius: 6px;
    background: #ffffff;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.qfs-check-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.qfs-check-icon svg {
    width: 13px;
    height: 13px;
    stroke: var(--qfs-auth-text);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.qfs-check-input:checked + .qfs-check-box {
    border-color: var(--qfs-accent);
    background: var(--qfs-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.qfs-check-input:checked ~ .qfs-check-icon {
    opacity: 1;
}

.qfs-check-label {
    color: var(--qfs-auth-text);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.qfs-button-primary {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #b8962e;
    border-radius: 14px;
    padding: 16px 24px;
    background: linear-gradient(180deg, #f2ca50 0%, var(--qfs-accent) 55%, #b8962e 100%);
    color: var(--qfs-auth-text);
    box-shadow:
        0 12px 24px rgba(138, 109, 18, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.qfs-button-primary::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: left 0.5s ease;
}

.qfs-button-primary:hover::after {
    left: 100%;
}

.qfs-button-primary:active {
    transform: scale(0.985);
}

.qfs-button-primary.is-loading {
    filter: brightness(1.02);
}

.qfs-button-primary[disabled] {
    cursor: wait;
}

.qfs-button-content,
.qfs-button-loader {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.qfs-button-copy {
    font-family: var(--qfs-auth-font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.qfs-button-arrow {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.qfs-button-primary:hover .qfs-button-arrow {
    transform: translateX(4px);
}

.qfs-button-loader {
    display: none;
}

.qfs-button-loading-copy {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.qfs-button-loading-title {
    font-family: var(--qfs-auth-font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--qfs-auth-text);
}

.qfs-button-loading-subtitle {
    font-family: var(--qfs-auth-font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--qfs-auth-text-muted);
}

.qfs-button-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 2px solid rgba(26, 20, 8, 0.22);
    border-top-color: var(--qfs-auth-text);
    border-radius: 999px;
    animation: qfs-loader-spin 0.85s linear infinite;
}

.qfs-button-primary.is-loading .qfs-button-content {
    display: none;
}

.qfs-button-primary.is-loading .qfs-button-loader {
    display: inline-flex;
}

.qfs-auth-footer {
    margin: 24px 0 0;
    text-align: center;
    color: #5b5b5b;
    font-family: var(--qfs-auth-font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

@keyframes qfs-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes qfs-spin-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes qfs-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes qfs-mesh-drift {
    0% {
        transform: perspective(1000px) rotateX(64deg) translate3d(-1.5%, 0, -100px);
    }

    50% {
        transform: perspective(1000px) rotateX(64deg) translate3d(1.5%, -1.5%, -100px);
    }

    100% {
        transform: perspective(1000px) rotateX(64deg) translate3d(-1.5%, 0, -100px);
    }
}

@media (max-width: 575.98px) {
    .qfs-auth-page {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .qfs-auth-main {
        align-items: center;
        min-height: auto;
        padding:
            max(12px, env(safe-area-inset-top))
            14px
            max(18px, env(safe-area-inset-bottom))
            14px;
    }

    .qfs-auth-shell {
        max-width: none;
    }

    .qfs-auth-card {
        padding: 14px 16px 20px;
        border-radius: 22px;
    }

    .qfs-auth-brand {
        margin-bottom: 18px;
    }

    .qfs-auth-brand-row {
        gap: 10px;
    }

    .qfs-auth-brand-line {
        width: 20px;
    }

    .qfs-display-title {
        font-size: 28px;
    }

    .qfs-panel-title {
        font-size: 24px;
    }

    .qfs-panel-copy {
        font-size: 15px;
    }

    .qfs-panel-copy-hero {
        font-size: 20px;
        line-height: 1.25;
    }

    .qfs-pin-row {
        gap: 6px;
    }

    .qfs-pin-input {
        height: 50px;
        font-size: 26px;
        border-radius: 10px;
    }

    .qfs-auth-emblem {
        width: min(248px, 76vw);
        height: min(248px, 76vw);
        margin-bottom: 10px;
    }

    .qfs-button-primary {
        min-height: 54px;
        padding: 14px 18px;
    }

    .qfs-button-copy {
        font-size: 14px;
        letter-spacing: 0.12em;
    }

    .qfs-button-loading-title {
        font-size: 12px;
        letter-spacing: 0.1em;
    }

    .qfs-button-loading-subtitle {
        font-size: 10px;
    }

    .qfs-check-label {
        font-size: 14px;
    }
}

@media (max-width: 389.98px) {
    .qfs-auth-main {
        padding:
            max(10px, env(safe-area-inset-top))
            10px
            max(16px, env(safe-area-inset-bottom))
            10px;
    }

    .qfs-auth-card {
        padding: 12px 12px 18px;
    }

    .qfs-eyebrow {
        letter-spacing: 0.28em;
    }

    .qfs-display-title {
        font-size: 24px;
    }

    .qfs-panel-copy-hero {
        font-size: 18px;
    }

    .qfs-pin-row {
        gap: 5px;
    }

    .qfs-pin-input {
        height: 46px;
        font-size: 22px;
    }

    .qfs-auth-emblem {
        width: min(224px, 78vw);
        height: min(224px, 78vw);
    }

    .qfs-button-copy {
        font-size: 13px;
    }
}

/* QFS card panel — static front face, shared by home and /cards */
.qfs-card-panel .qfs-connect-card {
    background-color: transparent;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1.586 / 1;
    margin: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.qfs-card-panel .qfs-connect-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qfs-card-panel .card-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Cardholder name sits on the embossed band above the holographic strip */
.qfs-card-panel .overlay-text {
    position: absolute;
    top: auto;
    bottom: 33%;
    left: 7.5%;
    right: auto;
    transform: none;
    font-size: clamp(11px, 2.15vw, 16px);
    font-weight: 700;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #1a222c;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.55),
        0 1px 2px rgba(0, 0, 0, 0.18);
    padding: 0;
    -webkit-font-smoothing: antialiased;
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    line-height: 1.15;
}

@media (max-width: 768px) {
    .qfs-card-panel .overlay-text {
        font-size: 11px;
        bottom: 32%;
        left: 7.5%;
        max-width: 64%;
        transform: none;
        text-align: left;
    }
}

/* Inactive account status — red blink (home welcome badge) */
@keyframes qfsInactiveBlink {
    0%,
    40% {
        color: #ff1f1f;
        border-color: rgba(255, 31, 31, 0.9);
        background: rgba(255, 31, 31, 0.22);
        box-shadow: 0 0 18px rgba(255, 31, 31, 0.45);
        opacity: 1;
    }

    60%,
    100% {
        color: rgba(255, 31, 31, 0.28);
        border-color: rgba(255, 31, 31, 0.22);
        background: rgba(255, 31, 31, 0.05);
        box-shadow: 0 0 0 rgba(255, 31, 31, 0);
        opacity: 0.55;
    }
}

.qfs-status-inactive-badge {
    border: 1px solid rgba(255, 31, 31, 0.9) !important;
    background: rgba(255, 31, 31, 0.18) !important;
    color: #ff1f1f !important;
    animation: qfsInactiveBlink 1s ease-in-out infinite;
}

.qfs-status-inactive-badge .qfs-icon,
.qfs-status-inactive-text {
    color: inherit !important;
}

.qfs-status-inactive-text {
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    .qfs-status-inactive-badge {
        animation: none;
        opacity: 1;
        background: rgba(255, 31, 31, 0.16) !important;
    }
}

/* Mobile nav: opaque platinum bar */
.qfs-v2-mobile-footer--platinum {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 50 !important;
    width: 100% !important;
    background: #e8ecf0 !important;
    background-image: linear-gradient(180deg, #f7f9fb 0%, #d8dee5 100%) !important;
    border-top: 1px solid rgba(22, 27, 34, 0.18) !important;
    box-shadow: 0 -8px 24px rgba(31, 41, 55, 0.18) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@media (min-width: 1024px) {
    .qfs-v2-mobile-footer--platinum {
        display: none !important;
    }
}

.qfs-v2-mobile-nav-bar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
    width: 100%;
    padding: 8px 4px calc(12px + env(safe-area-inset-bottom, 0px));
    color: #161b22;
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none !important;
    color: #4a545f !important;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.15;
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-icon,
.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-label {
    color: inherit !important;
    text-shadow: none !important;
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-active,
.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-featured,
.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-featured-text {
    color: #1c242c !important;
    text-shadow: none !important;
}

.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-active {
    background: rgba(85, 96, 109, 0.18) !important;
}

/* Activation Guideline accent — green highlight in place of the gold treatment.
   Theme-scoped so it outranks the html[data-portal-theme] colour overrides above. */
.qfs-activation-cta,
html[data-portal-theme="light"] .qfs-activation-cta {
    border-color: rgba(15, 122, 77, 0.45) !important;
    background: rgba(16, 185, 129, 0.14) !important;
    color: #0f7a4d !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.22) !important;
    --tw-ring-color: rgba(16, 185, 129, 0.22) !important;
}

.qfs-activation-cta:hover,
.qfs-activation-cta:focus-visible,
html[data-portal-theme="light"] .qfs-activation-cta:hover,
html[data-portal-theme="light"] .qfs-activation-cta:focus-visible {
    background: #0f9d63 !important;
    border-color: #0f9d63 !important;
    color: #ffffff !important;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.35) !important;
}

html[data-portal-theme="dark"] .qfs-activation-cta {
    border-color: rgba(52, 211, 153, 0.32) !important;
    background: rgba(52, 211, 153, 0.1) !important;
    color: #34d399 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

html[data-portal-theme="dark"] .qfs-activation-cta:hover,
html[data-portal-theme="dark"] .qfs-activation-cta:focus-visible {
    background: #34d399 !important;
    border-color: #34d399 !important;
    color: #04140d !important;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.42) !important;
}

/* The mobile footer is always the light platinum face, so it keeps the deep green in both themes */
.qfs-v2-mobile-nav-link-featured,
.qfs-v2-mobile-nav-featured-text,
.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-featured,
.qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-featured-text,
html[data-portal-theme="dark"] .qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-link-featured,
html[data-portal-theme="dark"] .qfs-v2-mobile-footer--platinum .qfs-v2-mobile-nav-featured-text,
html[data-portal-theme="light"] .qfs-v2-mobile-nav-link-featured,
html[data-portal-theme="light"] .qfs-v2-mobile-nav-featured-text {
    color: #0f7a4d !important;
    text-shadow: none !important;
}

@media (min-width: 1024px) {
    .qfs-v2-side-nav-link-featured,
    .qfs-v2-side-nav-link-featured .qfs-icon,
    html[data-portal-theme="light"] .qfs-v2-side-nav-link-featured,
    html[data-portal-theme="light"] .qfs-v2-side-nav-link-featured .qfs-icon {
        color: #0f7a4d !important;
        text-shadow: none !important;
    }

    html[data-portal-theme="dark"] .qfs-v2-side-nav-link-featured,
    html[data-portal-theme="dark"] .qfs-v2-side-nav-link-featured .qfs-icon {
        color: #34d399 !important;
        text-shadow:
            0 0 8px rgba(52, 211, 153, 0.5),
            0 0 14px rgba(52, 211, 153, 0.28) !important;
    }
}
