: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-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-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 .material-symbols-outlined {
        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;
}

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 .material-symbols-outlined {
        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:
        radial-gradient(circle at 50% 18%, rgba(212, 175, 55, 0.18), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(97, 76, 22, 0.16), transparent 42%),
        linear-gradient(180deg, #090909 0%, #030303 52%, #010101 100%);
    color: var(--qfs-text-strong);
    font-family: var(--qfs-auth-font-body);
}

.qfs-auth-canvas,
.qfs-auth-mesh,
.qfs-auth-texture {
    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: rgba(212, 175, 55, 0.6);
    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, #ffffff 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.22);
    border-radius: var(--qfs-radius-card);
    background:
        linear-gradient(145deg, rgba(30, 30, 30, 0.88), rgba(6, 6, 6, 0.94) 62%, rgba(20, 14, 4, 0.86) 100%);
    box-shadow:
        0 28px 72px rgba(0, 0, 0, 0.56),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(212, 175, 55, 0.06);
    backdrop-filter: blur(18px) saturate(165%);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
}

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

.qfs-card::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 18px;
    pointer-events: none;
    box-shadow:
        inset 0 0 18px rgba(212, 175, 55, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.02);
}

.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 10px rgba(212, 175, 55, 0.55));
}

.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.26) 0%, rgba(212, 175, 55, 0.11) 40%, rgba(212, 175, 55, 0) 72%);
    filter: blur(28px);
}

.qfs-auth-emblem-image {
    position: relative;
    z-index: 1;
    width: 126%;
    height: 132%;
    object-fit: contain;
    transform: scale(1);
    filter: drop-shadow(0 0 26px rgba(212, 175, 55, 0.22));
}

.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-text-strong);
    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-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: #fbf6ea;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    text-wrap: pretty;
    text-shadow: 0 0 14px rgba(212, 175, 55, 0.08);
}

.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.3);
    border-radius: var(--qfs-radius-input);
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-family: var(--qfs-auth-font-body);
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    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);
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.4),
        inset 0 0 10px rgba(212, 175, 55, 0.1);
    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 rgba(0, 0, 0, 0.4) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    transition: background-color 9999s ease-out 0s;
}

.qfs-alert {
    border: 1px solid rgba(255, 179, 179, 0.35);
    border-radius: var(--qfs-radius-alert);
    background: var(--qfs-error-bg);
    color: var(--qfs-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(212, 175, 55, 0.45);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.32);
    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-accent-strong);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

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

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

.qfs-check-label {
    color: rgba(255, 255, 255, 0.76);
    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 rgba(212, 175, 55, 0.5);
    border-radius: 14px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0f0f0f 0%, #2a2208 50%, #d4af37 100%);
    color: var(--qfs-text-strong);
    box-shadow: var(--qfs-shadow-button);
    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-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    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-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 flip card panel (3D) — shared by home and /cards */
.qfs-card-panel .flip-card {
    background-color: transparent;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16 / 9;
    perspective: 1000px;
    margin: 0;
}

.qfs-card-panel .flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.qfs-card-panel .flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.qfs-card-panel .flip-card-front,
.qfs-card-panel .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

.qfs-card-panel .flip-card-front img,
.qfs-card-panel .flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qfs-card-panel .flip-card-back {
    transform: rotateY(180deg);
}

.qfs-card-panel .overlay-text {
    position: absolute;
    top: 54%;
    left: 34%;
    transform: translateX(-50%);
    font-size: 17px;
    font-weight: 600;
    font-family: "Times New Roman", Georgia, serif;
    color: #e7c67f;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    padding: 4px 8px;
    -webkit-font-smoothing: antialiased;
    max-width: calc(100% - 72px);
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .qfs-card-panel .overlay-text {
        font-size: 11px;
        bottom: 9%;
        left: 36%;
        transform: translateX(-50%);
        text-align: center;
        max-width: calc(100% - 56px);
    }
}
