
        :root {
            color-scheme: light;
            --ink: #17122f;
            --muted: #6f6982;
            --violet: #7447ed;
            --violet-deep: #5627d7;
            --cyan: #15bce8;
            --success: #16865e;
            --danger: #c93b5e;
            --surface: rgba(255, 255, 255, 0.82);
            --surface-strong: rgba(255, 255, 255, 0.94);
            --line: rgba(91, 66, 161, 0.14);
            --shadow: 0 26px 80px rgba(58, 36, 119, 0.22),
                      0 8px 24px rgba(28, 22, 54, 0.10);
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            min-height: 100%;
        }

        body {
            margin: 0;
            min-height: 100vh;
            min-height: 100svh;
            overflow-x: hidden;
            color: var(--ink);
            background: #eae6f8;
            font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            -webkit-font-smoothing: antialiased;
        }

        button,
        input {
            font: inherit;
        }

        .backdrop,
        .backdrop::after {
            position: fixed;
            inset: 0;
            pointer-events: none;
        }

        .backdrop {
            z-index: -3;
            background-image: url("Images/IMG_Desktop.PNG");
            background-position: center;
            background-repeat: no-repeat;
            background-size: cover;
            transform: translateZ(0);
        }

        .backdrop::after {
            content: "";
            z-index: 0;
            background:
                radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.12) 0 18%, transparent 58%),
                linear-gradient(180deg, rgba(30, 12, 70, 0.06), rgba(23, 9, 52, 0.18));
        }

        .ambient-orb {
            position: fixed;
            z-index: -1;
            width: 260px;
            height: 260px;
            border-radius: 50%;
            filter: blur(64px);
            opacity: 0.25;
            pointer-events: none;
            backface-visibility: hidden;
            will-change: transform, opacity;
            animation: orbFloat 12s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
        }

        .ambient-orb--violet {
            top: 14%;
            left: 27%;
            background: #8c52ff;
        }

        .ambient-orb--cyan {
            right: 25%;
            bottom: 12%;
            background: #18c5ef;
            animation-delay: -4s;
        }

        .page-shell {
            min-height: 100vh;
            min-height: 100svh;
            display: grid;
            place-items: center;
            padding: clamp(20px, 4vw, 48px);
        }

        .auth-card {
            position: relative;
            width: min(100%, 410px);
            padding: clamp(24px, 5vw, 30px);
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.72);
            border-radius: 28px;
            background: var(--surface);
            box-shadow: var(--shadow);
            backdrop-filter: blur(22px) saturate(130%);
            -webkit-backdrop-filter: blur(22px) saturate(130%);
            animation: cardArrive 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
        }

        .auth-card::before {
            content: "";
            position: absolute;
            inset: 0 0 auto;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
            opacity: 0.78;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 12px;
        }

        .brand-mark {
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            width: 52px;
            height: 52px;
            color: #fff;
            border-radius: 17px;
            background: linear-gradient(145deg, #8e5aff, var(--violet-deep) 62%, #2c99eb);
            box-shadow: 0 12px 26px rgba(96, 50, 218, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.42);
            animation: markPulse 3.2s ease-in-out infinite;
        }

        .brand-mark svg {
            width: 27px;
            height: 27px;
        }

        .eyebrow {
            margin: 0 0 3px;
            color: var(--violet);
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.13em;
        }

        h1 {
            margin: 0;
            font-size: clamp(1.55rem, 5vw, 1.9rem);
            line-height: 1.1;
            letter-spacing: -0.035em;
        }

        .intro {
            margin: 0 0 24px;
            color: var(--muted);
            font-size: 0.96rem;
            line-height: 1.55;
        }

        .field-label {
            display: inline-block;
            margin: 0 0 8px 3px;
            color: #37304c;
            font-size: 0.88rem;
            font-weight: 700;
        }

        .input-wrap {
            position: relative;
        }

        .input-icon {
            position: absolute;
            top: 50%;
            left: 17px;
            width: 20px;
            height: 20px;
            color: #8c85a0;
            pointer-events: none;
            transform: translateY(-50%);
            transition: color 180ms ease;
        }

        .email-input {
            width: 100%;
            min-height: 54px;
            padding: 0 17px 0 48px;
            color: var(--ink);
            outline: none;
            border: 1px solid var(--line);
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.74);
            box-shadow: inset 0 1px 2px rgba(37, 22, 73, 0.04);
            transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
        }

        .email-input::placeholder {
            color: #aaa4b7;
        }

        .email-input:hover {
            border-color: rgba(116, 71, 237, 0.28);
            background: rgba(255, 255, 255, 0.9);
        }

        .email-input:focus {
            border-color: rgba(116, 71, 237, 0.66);
            background: #fff;
            box-shadow: 0 0 0 4px rgba(116, 71, 237, 0.11);
        }

        .input-wrap:focus-within .input-icon {
            color: var(--violet);
        }

        .generate-button {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            width: 100%;
            min-height: 54px;
            margin-top: 13px;
            overflow: hidden;
            color: #fff;
            cursor: pointer;
            border: 0;
            border-radius: 16px;
            background: linear-gradient(115deg, var(--violet-deep), var(--violet) 54%, #3f8fe8);
            box-shadow: 0 13px 25px rgba(92, 49, 207, 0.27);
            font-weight: 800;
            transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
        }

        .generate-button::before {
            content: "";
            position: absolute;
            top: -80%;
            left: -38%;
            width: 26%;
            height: 260%;
            background: rgba(255, 255, 255, 0.28);
            transform: rotate(24deg);
            transition: left 550ms ease;
        }

        .generate-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 17px 30px rgba(92, 49, 207, 0.32);
            filter: saturate(108%);
        }

        .generate-button:hover::before {
            left: 118%;
        }

        .generate-button:active {
            transform: translateY(0) scale(0.99);
        }

        .generate-button:focus-visible,
        .copy-button:focus-visible {
            outline: 3px solid rgba(20, 188, 232, 0.42);
            outline-offset: 3px;
        }

        .generate-button svg {
            width: 19px;
            height: 19px;
        }

        .divider {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 25px 0 17px;
            color: #8b849a;
            font-size: 0.7rem;
            font-weight: 800;
            letter-spacing: 0.12em;
        }

        .divider::before,
        .divider::after {
            content: "";
            flex: 1;
            height: 1px;
            background: var(--line);
        }

        .result-panel {
            position: relative;
            min-height: 150px;
            padding: 19px;
            overflow: hidden;
            border: 1px solid rgba(94, 65, 171, 0.1);
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.55);
        }

        .result-panel--success {
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(242, 237, 255, 0.82));
            animation: resultGlow 700ms ease 180ms both;
        }

        .result-panel--error {
            border-color: rgba(201, 59, 94, 0.18);
            background: rgba(255, 245, 248, 0.76);
            animation: softShake 420ms ease both;
        }

        .result-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-height: 28px;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: var(--muted);
            font-size: 0.78rem;
            font-weight: 750;
        }

        .status-badge::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #aaa4b8;
            box-shadow: 0 0 0 4px rgba(170, 164, 184, 0.13);
        }

        .result-panel--success .status-badge {
            color: var(--success);
        }

        .result-panel--success .status-badge::before {
            background: #20b880;
            box-shadow: 0 0 0 4px rgba(32, 184, 128, 0.13);
            animation: statusPulse 1.8s ease-in-out infinite;
        }

        .result-panel--error .status-badge {
            color: var(--danger);
        }

        .result-panel--error .status-badge::before {
            background: var(--danger);
            box-shadow: 0 0 0 4px rgba(201, 59, 94, 0.12);
        }

        .copy-button {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 32px;
            padding: 0 10px;
            color: #5b3fb1;
            cursor: pointer;
            border: 1px solid rgba(116, 71, 237, 0.14);
            border-radius: 10px;
            background: rgba(116, 71, 237, 0.07);
            font-size: 0.75rem;
            font-weight: 800;
            transition: background 160ms ease, transform 160ms ease;
        }

        .copy-button:hover {
            background: rgba(116, 71, 237, 0.13);
            transform: translateY(-1px);
        }

        .copy-button svg {
            width: 15px;
            height: 15px;
        }

        .code {
            display: flex;
            justify-content: center;
            gap: clamp(4px, 1.8vw, 8px);
            margin: 15px 0 13px;
            color: var(--violet-deep);
            font-size: clamp(2rem, 8.5vw, 2.7rem);
            font-variant-numeric: tabular-nums;
            font-weight: 850;
            letter-spacing: -0.035em;
            line-height: 1;
        }

        .code-digit {
            display: inline-block;
        }

        .result-panel--success .code-digit {
            animation: digitReveal 430ms cubic-bezier(0.2, 0.85, 0.25, 1.25) both;
            animation-delay: calc(210ms + (var(--digit-index) * 55ms));
        }

        .result-panel--error .code {
            display: block;
            color: var(--danger);
            font-size: 1.45rem;
            letter-spacing: -0.02em;
        }

        .result-panel--idle .code {
            color: #b1aabd;
        }

        .result-note {
            margin: 0;
            color: var(--muted);
            text-align: center;
            font-size: 0.83rem;
            line-height: 1.45;
        }

        .countdown {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            margin-top: 2px;
            color: var(--muted);
            font-size: 0.83rem;
        }

        .timer-ring {
            --progress: 360deg;
            position: relative;
            display: grid;
            place-items: center;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            background: conic-gradient(var(--violet) var(--progress), rgba(116, 71, 237, 0.12) 0);
            transition: background 280ms linear;
        }

        .timer-ring::after {
            content: "";
            width: 17px;
            height: 17px;
            border-radius: 50%;
            background: #faf8ff;
        }

        .timer-value {
            color: #42395a;
            font-weight: 850;
        }

        body.is-refreshing .generate-button svg {
            animation: spin 700ms linear infinite;
        }

        body.is-refreshing .generate-button {
            pointer-events: none;
            filter: saturate(70%);
        }

        @keyframes cardArrive {
            from { opacity: 0; transform: translateY(24px) scale(0.975); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes digitReveal {
            from { opacity: 0; transform: translateY(10px) scale(0.72); filter: blur(4px); }
            to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
        }

        @keyframes resultGlow {
            from { box-shadow: 0 0 0 rgba(116, 71, 237, 0); }
            to { box-shadow: 0 10px 30px rgba(116, 71, 237, 0.1); }
        }

        @keyframes markPulse {
            0%, 100% { transform: translateY(0) rotate(0); }
            50% { transform: translateY(-2px) rotate(-2deg); }
        }

        @keyframes statusPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.18); }
        }

        @keyframes softShake {
            0%, 100% { transform: translateX(0); }
            30% { transform: translateX(-4px); }
            60% { transform: translateX(3px); }
        }

        @keyframes orbFloat {
            from { transform: translate3d(-8px, -6px, 0); opacity: 0.21; }
            to { transform: translate3d(12px, 14px, 0); opacity: 0.29; }
        }

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

        @media (max-width: 700px) {
            .backdrop {
                background-image: url("Images/IMG_Mobile.jpg");
                background-position: center;
            }

            .page-shell {
                align-items: start;
                justify-items: center;
                padding: clamp(155px, 21vh, 190px) 16px 24px;
                padding: clamp(155px, 21svh, 190px) 16px 24px;
            }

            .auth-card {
                width: min(100%, 370px);
                padding: 22px;
                border-radius: 24px;
            }

            .brand {
                margin-bottom: 10px;
            }

            .brand-mark {
                width: 48px;
                height: 48px;
                border-radius: 15px;
            }

            .intro {
                margin-bottom: 18px;
            }

            .email-input,
            .generate-button {
                min-height: 50px;
            }

            .divider {
                margin: 19px 0 13px;
            }

            .result-panel {
                min-height: 136px;
                padding: 16px;
            }

            .ambient-orb--violet {
                left: -18%;
            }

            .ambient-orb--cyan {
                right: -22%;
            }
        }

        @media (max-width: 390px) {
            .auth-card {
                width: min(100%, 350px);
                padding: 19px 18px;
                border-radius: 21px;
            }

            .brand-mark {
                width: 47px;
                height: 47px;
                border-radius: 15px;
            }

            .intro {
                margin-bottom: 20px;
            }

            .result-panel {
                padding-inline: 14px;
            }
        }

        /* iOS WebKit: avoid costly live blur recomposition and viewport jumps. */
        @supports (-webkit-touch-callout: none) {
            body,
            .page-shell {
                min-height: 100svh;
            }

            .backdrop,
            .backdrop::after {
                position: absolute;
            }

            .backdrop {
                min-height: 100svh;
                transform: none;
            }

            .ambient-orb {
                animation: none;
                filter: blur(42px);
                opacity: 0.2;
                will-change: auto;
            }

            .auth-card {
                background: rgba(255, 255, 255, 0.91);
                backdrop-filter: blur(10px) saturate(112%);
                -webkit-backdrop-filter: blur(10px) saturate(112%);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                scroll-behavior: auto !important;
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

[hidden] { display: none !important; }
.small-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; font-size: .8rem; }
a { color: var(--violet-deep); }
.text-button { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.admin-card { width: min(100%, 760px); }
.admin-card .intro { margin-top: 14px; }
.admin-form { display: grid; gap: 14px; }
.admin-form .email-input { padding: 12px 15px; font-size: 16px; }
.admin-form label { display: grid; gap: 7px; line-height: 1.6; font-size: 15px; }
.admin-form small, .help { color: var(--muted); line-height: 1.7; font-size: 14px; }
.notice { padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.7); line-height: 1.7; overflow-wrap: anywhere; }
.notice.error { color: var(--danger); }
.account-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.account-row span { overflow-wrap: anywhere; }
.account-row button { cursor: pointer; }
.account-actions { display: flex; gap: 12px; }
details { margin-top: 24px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
summary { cursor: pointer; color: var(--violet-deep); font-weight: 700; }
details[open] summary { margin-bottom: 16px; }
code { overflow-wrap: anywhere; font-size: .9em; }
.result-note + .countdown { margin-top: 10px; }
.code { font-size: clamp(1.65rem, 7vw, 2.55rem); }
button:disabled { cursor: wait; opacity: .7; }
@media (max-width: 700px) { .admin-shell { padding-top: 30px; } }
