        :root {
            --gold: #d99528;
            --gold-deep: #b0770f;
            --gold-dark: #7a5b1e;
            --cream: #faf6ee;
            --card: #fffdf8;
            --ink: #3a2b14;
            --muted: #8a7a5e;
            --line: #e6d9bd;
            --error: #c0392b;
            --ok: #177a4c;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        html, body { height: 100%; }

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: var(--ink);
            background: var(--cream);
        }

        .gk-split {
            display: grid;
            grid-template-columns: minmax(380px, 44%) 1fr;
            min-height: 100vh;
        }

        /* ------------------------------------------------------------
           Brand panel — deep gold, grain texture, floating badge
           ------------------------------------------------------------ */
        .gk-brand {
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1.75rem;
            padding: 3rem 2rem;
            background:
                radial-gradient(120% 90% at 15% 10%, rgba(255, 235, 200, 0.28) 0%, transparent 55%),
                radial-gradient(100% 80% at 85% 95%, rgba(74, 42, 5, 0.35) 0%, transparent 55%),
                linear-gradient(158deg, #e3a437 0%, #d18a1c 55%, #a86f11 100%);
        }

        /* Scattered wheat-grain texture */
        .gk-brand::before {
            content: '';
            position: absolute;
            inset: 0;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cellipse cx='24' cy='30' rx='4' ry='9' transform='rotate(24 24 30)'/%3E%3Cellipse cx='86' cy='18' rx='4' ry='9' transform='rotate(-18 86 18)'/%3E%3Cellipse cx='58' cy='72' rx='4' ry='9' transform='rotate(40 58 72)'/%3E%3Cellipse cx='102' cy='96' rx='4' ry='9' transform='rotate(12 102 96)'/%3E%3Cellipse cx='16' cy='98' rx='4' ry='9' transform='rotate(-32 16 98)'/%3E%3C/g%3E%3C/svg%3E");
            pointer-events: none;
        }

        /* Floating flour motes */
        .gk-mote {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 250, 238, 0.35);
            filter: blur(1px);
            animation: moteFloat 9s ease-in-out infinite;
            pointer-events: none;
        }

        .gk-mote:nth-child(1) { width: 10px; height: 10px; top: 18%; left: 22%; animation-delay: 0s; }
        .gk-mote:nth-child(2) { width: 6px;  height: 6px;  top: 64%; left: 14%; animation-delay: -3s; }
        .gk-mote:nth-child(3) { width: 8px;  height: 8px;  top: 30%; left: 78%; animation-delay: -5s; }
        .gk-mote:nth-child(4) { width: 5px;  height: 5px;  top: 78%; left: 70%; animation-delay: -7s; }

        @keyframes moteFloat {
            0%, 100% { transform: translateY(0); opacity: 0.7; }
            50%      { transform: translateY(-26px); opacity: 1; }
        }

        .gk-badge {
            position: relative;
            width: min(300px, 62%);
            aspect-ratio: 1;
            border-radius: 50%;
            display: grid;
            place-items: center;
            animation: badgeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both,
                       badgeFloat 7s ease-in-out 1s infinite;
            filter: drop-shadow(0 24px 40px rgba(74, 42, 5, 0.35));
        }

        .gk-badge img {
            width: 100%;
            height: auto;
            display: block;
        }

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

        @keyframes badgeFloat {
            0%, 100% { transform: translateY(0); }
            50%      { transform: translateY(-10px); }
        }

        /* ------------------------------------------------------------
           Form panel — cream canvas, warm card
           ------------------------------------------------------------ */
        .gk-form-side {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem 1.5rem 2rem;
            background:
                radial-gradient(90% 60% at 100% 0%, rgba(217, 149, 40, 0.07) 0%, transparent 60%),
                var(--cream);
        }

        .gk-card {
            width: 100%;
            max-width: 420px;
            background: var(--card);
            border: 1px solid var(--line);
            border-radius: 1.25rem;
            padding: 2.5rem 2.25rem 2.25rem;
            box-shadow: 0 22px 55px rgba(122, 91, 30, 0.12);
        }

        .gk-card > * { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
        .gk-card > *:nth-child(1) { animation-delay: 0.08s; }
        .gk-card > *:nth-child(2) { animation-delay: 0.14s; }
        .gk-card > *:nth-child(3) { animation-delay: 0.2s; }
        .gk-card > *:nth-child(4) { animation-delay: 0.26s; }

        @keyframes riseIn {
            from { opacity: 0; transform: translateY(14px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .gk-mobile-logo {
            display: none;
            margin: 0 auto 1.25rem;
            width: 92px;
        }

        /* Fluid type: scales down smoothly on tablet/small screens,
           capped at the original desktop sizes. */
        .gk-eyebrow {
            font-size: clamp(0.6rem, 0.54rem + 0.18vw, 0.7rem);
            font-weight: 800;
            letter-spacing: 0.3em;
            text-transform: uppercase;
            color: var(--gold-deep);
            margin-bottom: 0.6rem;
        }

        .gk-title {
            font-family: 'Fraunces', serif;
            font-weight: 600;
            font-size: clamp(1.45rem, 1.05rem + 1.05vw, 2rem);
            line-height: 1.15;
            margin-bottom: 0.4rem;
        }

        .gk-sub {
            color: var(--muted);
            font-size: clamp(0.82rem, 0.75rem + 0.2vw, 0.925rem);
            margin-bottom: 1.9rem;
        }

        .gk-status {
            background: #e2f4ec;
            color: var(--ok);
            font-size: clamp(0.78rem, 0.72rem + 0.15vw, 0.85rem);
            font-weight: 600;
            border-radius: 0.6rem;
            padding: 0.6rem 0.9rem;
            margin-bottom: 1.25rem;
        }

        .gk-field { margin-bottom: 1.25rem; }

        .gk-field label {
            display: block;
            font-size: clamp(0.74rem, 0.68rem + 0.14vw, 0.8rem);
            font-weight: 700;
            margin-bottom: 0.45rem;
            color: var(--gold-dark);
        }

        .gk-input-wrap { position: relative; }

        .gk-input {
            width: 100%;
            font-family: inherit;
            font-size: clamp(0.875rem, 0.8rem + 0.17vw, 0.95rem);
            color: var(--ink);
            background: #fff;
            border: 1.5px solid var(--line);
            border-radius: 0.7rem;
            padding: 0.78rem 0.95rem;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .gk-input::placeholder { color: #bcae90; }

        .gk-input:focus {
            outline: none;
            border-color: var(--gold);
            box-shadow: 0 0 0 4px rgba(217, 149, 40, 0.16);
        }

        .gk-input.is-invalid { border-color: var(--error); }

        .gk-input-wrap .gk-input { padding-right: 3rem; }
        .gk-field .gk-input:not(.gk-input-wrap .gk-input) { padding-right: 0.95rem; }

        .gk-eye {
            position: absolute;
            top: 50%;
            right: 0.65rem;
            transform: translateY(-50%);
            display: grid;
            place-items: center;
            width: 2rem;
            height: 2rem;
            border: none;
            border-radius: 0.5rem;
            background: transparent;
            color: var(--muted);
            cursor: pointer;
            transition: color 0.2s ease, background-color 0.2s ease;
        }

        .gk-eye:hover { color: var(--gold-deep); background: rgba(217, 149, 40, 0.1); }

        .gk-eye svg { width: 19px; height: 19px; }

        .gk-error {
            color: var(--error);
            font-size: clamp(0.74rem, 0.68rem + 0.14vw, 0.8rem);
            font-weight: 600;
            margin-top: 0.4rem;
        }

        .gk-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            margin-bottom: 1.6rem;
        }

        .gk-remember {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: clamp(0.79rem, 0.73rem + 0.15vw, 0.86rem);
            color: var(--muted);
            cursor: pointer;
            user-select: none;
        }

        .gk-remember input {
            appearance: none;
            width: 1.1rem;
            height: 1.1rem;
            border: 1.5px solid var(--line);
            border-radius: 0.3rem;
            background: #fff;
            cursor: pointer;
            display: grid;
            place-items: center;
            transition: background-color 0.15s ease, border-color 0.15s ease;
        }

        .gk-remember input:checked {
            background: var(--gold);
            border-color: var(--gold);
        }

        .gk-remember input:checked::after {
            content: '';
            width: 0.32rem;
            height: 0.6rem;
            border: solid #fff;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg) translateY(-1px);
        }

        .gk-forgot {
            font-size: clamp(0.78rem, 0.72rem + 0.15vw, 0.85rem);
            font-weight: 600;
            color: var(--gold-deep);
            text-decoration: none;
        }

        .gk-forgot:hover { color: var(--gold-dark); text-decoration: underline; }

        .gk-submit {
            width: 100%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            font-family: inherit;
            font-size: clamp(0.9rem, 0.82rem + 0.2vw, 1rem);
            font-weight: 700;
            color: #fff;
            background: linear-gradient(160deg, #e0a032 0%, var(--gold) 55%, #c4861f 100%);
            border: none;
            border-radius: 0.75rem;
            padding: 0.9rem 1.25rem;
            cursor: pointer;
            box-shadow: 0 10px 24px rgba(217, 149, 40, 0.35);
            transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
        }

        .gk-submit svg { width: 18px; height: 18px; transition: transform 0.18s ease; }

        .gk-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 30px rgba(217, 149, 40, 0.45);
            filter: saturate(1.05);
        }

        .gk-submit:hover svg { transform: translateX(4px); }

        .gk-submit:active { transform: translateY(0); }

        .gk-submit:focus-visible {
            outline: none;
            box-shadow: 0 0 0 4px rgba(217, 149, 40, 0.35);
        }

        .gk-foot {
            margin-top: 2rem;
            font-size: clamp(0.72rem, 0.66rem + 0.15vw, 0.8rem);
            color: var(--muted);
            text-align: center;
            animation: riseIn 0.7s 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
        }

        .gk-foot a { color: var(--gold-deep); text-decoration: none; font-weight: 600; }

        /* ------------------------------------------------------------
           Responsive: stack panels; brand becomes a compact banner
           ------------------------------------------------------------ */
        @media (max-width: 900px) {
            .gk-split { grid-template-columns: 1fr; }

            .gk-brand { display: none; }

            .gk-mobile-logo { display: block; }

            .gk-form-side { padding-top: 2.5rem; }

            .gk-card { padding: 2rem 1.5rem; text-align: center; }

            .gk-field, .gk-row { text-align: left; }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { animation: none !important; transition: none !important; }
        }

/* ------------------------------------------------------------
   Logout page — animated gold "signed out" check
   ------------------------------------------------------------ */
.gk-check {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.4rem;
}

.gk-check circle {
    stroke: var(--gold);
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: gkDraw 0.9s 0.25s ease-out forwards;
}

.gk-check polyline {
    stroke: var(--gold);
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: gkDraw 0.6s 0.95s ease-out forwards;
}

@keyframes gkDraw {
    to { stroke-dashoffset: 0; }
}

.gk-center { text-align: center; }

.gk-card .gk-submit-link {
    display: inline-flex;
    text-decoration: none;
    width: 100%;
}

/* ------------------------------------------------------------
   Button loading state (login submit / logout sign-back-in)
   ------------------------------------------------------------ */
.gk-submit.is-loading {
    pointer-events: none;
    filter: saturate(0.85) brightness(0.97);
    box-shadow: 0 6px 16px rgba(217, 149, 40, 0.28);
    transform: none;
}

.gk-submit.is-loading svg { display: none; }

.gk-submit.is-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: gkSpin 0.7s linear infinite;
}

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

/* The spinner communicates state, not decoration — keep it moving
   even when other animations are disabled for reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .gk-submit.is-loading::after {
        animation: gkSpin 0.7s linear infinite !important;
    }
}
