        /* ---------- Variables ---------- */
        :root {
            --primary:    #002d5a;
            --primary-dk: #001d3d;
            --primary-lt: #003d7a;
            --accent:     #c59d5f;
            --accent-dk:  #a6844d;
            --accent-lt:  #f4ead8;
            --accent-bg:  #f4ead8;
            --bg:         #fdfdfd;
            --bg-alt:     #f9f9f9;
            --surface:    #ffffff;
            --text:       #1a1a1a;
            --text-muted: #555555;
            --text-soft:  #777777;
            --border:     #ececec;
            --border-lt:  #f0f0f0;
            --radius:     4px;
            --radius-lg:  8px;
            --shadow-sm:  0 2px 8px rgba(0,45,90,0.06);
            --shadow-md:  0 8px 24px rgba(0,45,90,0.09);
            --shadow-lg:  0 18px 48px rgba(0,45,90,0.12);
            --t-fast:     .25s ease;
            --t-med:      .4s cubic-bezier(.2,.8,.2,1);
            --t-slow:     .8s cubic-bezier(.2,.8,.2,1);
            --serif:      'Playfair Display', Georgia, 'Times New Roman', serif;
            --sans:       'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
            --container:  1260px;
        }

        /* ---------- Reset & Base ---------- */
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        html { scroll-behavior: smooth; }
        body {
            font-family: var(--sans);
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
            overflow-x: hidden;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        img, picture, svg { display: block; max-width: 100%; height: auto; }
        a { color: inherit; text-decoration: none; }
        button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
        input, select, textarea { font: inherit; color: inherit; }
        ::selection { background: var(--accent); color: #fff; }

        /* ---------- A11y ---------- */
        .sr-only {
            position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
            overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
        }
        .skip-link {
            position: absolute; top: -100px; left: 10px; z-index: 9999;
            background: var(--primary); color: #fff;
            padding: 12px 18px; border-radius: var(--radius);
            font-weight: 600; font-size: .82rem;
            transition: top var(--t-fast);
        }
        .skip-link:focus { top: 10px; outline: 2px solid var(--accent); outline-offset: 2px; }
        :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

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

        /* ============================================================
           BREADCRUMBS
        ============================================================ */
        .breadcrumbs {
            background: var(--bg-alt);
            border-bottom: 1px solid var(--border-lt);
            padding: 14px 5%;
        }
        .breadcrumbs-inner { max-width: var(--container); margin: 0 auto; }
        .breadcrumbs ol {
            list-style: none;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            font-size: .76rem;
            color: var(--text-soft);
        }
        .breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
        .breadcrumbs li + li::before { content: "/"; color: var(--border); }
        .breadcrumbs a { color: var(--text-muted); transition: color var(--t-fast); }
        .breadcrumbs a:hover { color: var(--accent-dk); }
        .breadcrumbs [aria-current="page"] { color: var(--primary); font-weight: 600; }

        /* ============================================================
           NOTICE BANNER (redirect from dashboard)
        ============================================================ */
        .notice {
            background: var(--accent-bg);
            border-bottom: 1px solid var(--accent-lt);
            padding: 14px 5%;
            display: none;
        }
        .notice.is-visible { display: block; }
        .notice-inner {
            max-width: var(--container);
            margin: 0 auto;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: .88rem;
            color: var(--primary);
        }
        .notice svg {
            width: 20px; height: 20px;
            color: var(--accent-dk);
            flex-shrink: 0;
        }

        /* ============================================================
           GATEWAY (split-screen)
        ============================================================ */
        .gateway {
            flex: 1;
            display: grid;
            grid-template-columns: 1fr 1fr;
            min-height: 720px;
        }

        /* ---- Left side: Brand ---- */
        .gateway-brand {
            background: var(--primary);
            color: #fff;
            position: relative;
            overflow: hidden;
            padding: 70px 8% 60px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            isolation: isolate;
        }
        .gateway-brand::before {
            content: "";
            position: absolute; inset: 0;
            background:
                radial-gradient(circle at 20% 18%, rgba(197, 157, 95,.28), transparent 45%),
                radial-gradient(circle at 85% 85%, rgba(197, 157, 95,.14), transparent 48%),
                linear-gradient(180deg, var(--primary) 0%, var(--primary-dk) 100%);
            z-index: -2;
        }
        .gateway-brand::after {
            content: "";
            position: absolute; inset: 0;
            background-image:
                linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
            background-size: 60px 60px;
            z-index: -1;
            opacity: .6;
            -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
            mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
        }
        .gateway-brand-inner { max-width: 520px; }
        .brand-eyebrow {
            display: inline-block;
            font-size: .7rem;
            letter-spacing: 4px;
            font-weight: 600;
            text-transform: uppercase;
            color: var(--accent);
            margin-bottom: 22px;
            padding: 6px 16px;
            border: 1px solid rgba(197, 157, 95,.5);
            border-radius: 40px;
        }
        .gateway-brand h1 {
            font-family: var(--serif);
            font-size: clamp(1.8rem, 3.2vw, 2.7rem);
            font-weight: 700;
            line-height: 1.15;
            letter-spacing: -0.3px;
            margin-bottom: 20px;
        }
        .gateway-brand h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
        .gateway-brand .lead {
            font-size: 1rem;
            font-weight: 300;
            color: rgba(255,255,255,.85);
            line-height: 1.75;
            margin-bottom: 36px;
            max-width: 460px;
        }
        .brand-benefits {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-bottom: 40px;
        }
        .brand-benefits li {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            font-size: .92rem;
            color: rgba(255,255,255,.92);
            line-height: 1.55;
        }
        .brand-benefits li svg {
            flex-shrink: 0;
            width: 20px; height: 20px;
            color: var(--accent);
            margin-top: 2px;
        }
        .brand-certs {
            border-top: 1px solid rgba(255,255,255,.12);
            padding-top: 28px;
        }
        .brand-certs-label {
            font-size: .66rem;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: rgba(255,255,255,.55);
            font-weight: 700;
            margin-bottom: 14px;
        }
        .brand-certs-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .brand-cert-badge {
            font-size: .6rem;
            padding: 5px 10px;
            border: 1px solid rgba(197, 157, 95,.3);
            color: var(--accent);
            border-radius: 40px;
            letter-spacing: 1px;
            text-transform: uppercase;
            font-weight: 600;
        }

        /* ---- Right side: Form ---- */
        .gateway-form {
            background: var(--bg);
            padding: 70px 6% 60px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .form-shell {
            width: 100%;
            max-width: 460px;
        }
        .form-head { margin-bottom: 26px; text-align: center; }
        .form-head h2 {
            font-family: var(--serif);
            color: var(--primary);
            font-size: clamp(1.4rem, 2.4vw, 1.85rem);
            line-height: 1.25;
            margin-bottom: 8px;
        }
        .form-head h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
        .form-head p {
            font-size: .88rem;
            color: var(--text-muted);
        }

        /* ---- Tabs ---- */
        .tabs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            background: var(--bg-alt);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 6px;
            margin-bottom: 30px;
            gap: 8px;
        }
        .tab-btn {
            padding: 13px 14px;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: .74rem;
            font-weight: 700;
            letter-spacing: 1.4px;
            text-transform: uppercase;
            color: var(--text-muted);
            background: transparent;
            border: 0;
            border-radius: calc(var(--radius) - 2px);
            cursor: pointer;
            transition: all var(--t-fast);
        }
        .tab-btn:hover { color: var(--primary); }
        .tab-btn[aria-selected="true"] {
            background: #fff;
            color: var(--primary);
            box-shadow: var(--shadow-sm);
        }

        /* ---- Forms ---- */
        .form-panel {
            display: none;
        }
        .form-panel.is-active { display: block; }

        .field {
            margin-bottom: 16px;
            position: relative;
        }
        .field label {
            display: block;
            font-size: .72rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            color: var(--primary);
            margin-bottom: 6px;
        }
        .field label .req { color: var(--accent); }
        .field input {
            width: 100%;
            padding: 13px 14px;
            min-height: 44px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background: #fff;
            font-size: .95rem;
            transition: border-color var(--t-fast), box-shadow var(--t-fast);
        }
        .field input[type="password"] { padding-right: 50px; }
        .field input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(197, 157, 95,.16);
        }
        .field input[aria-invalid="true"] {
            border-color: #c0392b;
            box-shadow: 0 0 0 3px rgba(192,57,43,.12);
        }
        .field-control {
            position: relative;
        }
        .field .err {
            font-size: .72rem;
            color: #c0392b;
            margin-top: 4px;
            display: none;
        }
        .field input[aria-invalid="true"] ~ .err { display: block; }
        .field .hint {
            font-size: .72rem;
            color: var(--text-soft);
            margin-top: 5px;
        }
        .pwd-toggle {
            position: absolute;
            right: 2px;
            top: 50%;
            transform: translateY(-50%);
            width: 44px; height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-soft);
            border-radius: var(--radius);
            transition: color var(--t-fast);
        }
        .pwd-toggle:hover { color: var(--accent-dk); }
        .pwd-toggle svg { width: 18px; height: 18px; }
        .pwd-toggle .ico-show { display: block; }
        .pwd-toggle .ico-hide { display: none; }
        .pwd-toggle[aria-pressed="true"] .ico-show { display: none; }
        .pwd-toggle[aria-pressed="true"] .ico-hide { display: block; }

        .field-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
        }

        /* ---- Auxiliary row (remember / forgot) ---- */
        .aux-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 16px 0 20px;
            font-size: .82rem;
            color: var(--text-muted);
            flex-wrap: wrap;
            gap: 12px;
        }
        .aux-row input[type="checkbox"] {
            display: none;
        }
        .remember {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            user-select: none;
        }
        .remember input {
            width: 18px; height: 18px;
            accent-color: var(--accent);
            min-height: 18px;
            min-width: 18px;
        }
        #remember-login:checked + .remember::before {
            content: "✓";
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px; height: 18px;
            background: var(--accent);
            color: #fff;
            font-size: .8rem;
            font-weight: 700;
            border-radius: 2px;
        }
        #remember-login + .remember::before {
            content: "";
            display: inline-block;
            width: 18px; height: 18px;
            border: 2px solid var(--border);
            border-radius: 2px;
            transition: all var(--t-fast);
        }
        #remember-login:focus-visible + .remember::before {
            box-shadow: 0 0 0 3px rgba(197, 157, 95,.3);
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }
        .aux-row .forgot {
            color: var(--primary);
            font-weight: 600;
            border-bottom: 1px solid var(--border);
            padding-bottom: 2px;
            transition: color var(--t-fast), border-color var(--t-fast);
        }
        .aux-row .forgot:hover { color: var(--accent-dk); border-color: var(--accent); }

        /* ---- Consent rows ---- */
        .consent {
            display: flex;
            gap: 10px;
            align-items: flex-start;
            font-size: .78rem;
            color: var(--text-muted);
            line-height: 1.55;
            margin: 16px 0;
            cursor: pointer;
            padding: 6px 0;
        }
        .consent input {
            margin-top: 2px;
            accent-color: var(--accent);
            width: 18px; height: 18px;
            min-height: 18px;
            min-width: 18px;
            flex-shrink: 0;
        }
        .consent a { color: var(--primary); text-decoration: underline; }
        .consent .req { color: var(--accent); }

        /* ---- Submit button ---- */
        .btn-submit {
            width: 100%;
            background: var(--primary);
            color: #fff;
            padding: 15px 20px;
            border-radius: var(--radius);
            font-weight: 700;
            font-size: .8rem;
            letter-spacing: 2px;
            text-transform: uppercase;
            margin-top: 16px;
            transition: background var(--t-fast), transform var(--t-fast);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .btn-submit:hover { background: var(--accent); }
        .btn-submit:disabled { opacity: .6; cursor: not-allowed; }
        .btn-submit svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            transform: translateY(-1px);
        }

        /* ---- Form message (success/error live region) ---- */
        .form-msg {
            margin-top: 16px;
            padding: 12px 14px;
            border-radius: var(--radius);
            font-size: .85rem;
            display: none;
        }
        .form-msg.ok   { background: #e8f5e9; color: #1b5e20; display: block; }
        .form-msg.err  { background: #fdecea; color: #8e2719; display: block; }

        /* ---- Helper link footer of form ---- */
        .form-foot {
            text-align: center;
            margin-top: 26px;
            font-size: .82rem;
            color: var(--text-muted);
        }
        .form-foot a {
            color: var(--primary);
            font-weight: 600;
            border-bottom: 1px solid var(--accent);
            padding-bottom: 2px;
        }
        .form-foot a:hover { color: var(--accent-dk); }

        /* ============================================================
           RESPONSIVE
        ============================================================ */
        @media (max-width: 1024px) {
            .gateway { grid-template-columns: 1fr; min-height: 0; }
            .gateway-brand { padding: 50px 6%; text-align: left; }
            .gateway-brand-inner { max-width: none; }
            .gateway-form { padding: 50px 6%; }
        }
        @media (max-width: 768px) {
            .field-row { grid-template-columns: 1fr; gap: 0; }
            .gateway-brand { padding: 40px 5%; }
            .gateway-form { padding: 40px 5%; }
            .footer-inner { flex-direction: column; text-align: center; }
            .footer-links-mini { justify-content: center; }
        }
        @media (max-width: 480px) {
            .aux-row { flex-direction: column; align-items: flex-start; gap: 12px; }
            .tab-btn { font-size: .68rem; letter-spacing: 1.2px; }
        }
