        :root {
            --navy: #16213e;
            --navy-2: #223361;
            --gold: #c89b3c;
            --gold-light: #e8c773;
            --cream: #faf8f4;
            --ink: #1f2430;
            --muted: #6b7280;
            --line: #e6e2d8;
            --error: #d64545;
            --success: #2f9e6e;
            --radius: 14px;
        }

        * {
            box-sizing: border-box;
        }

        html, body {
            margin: 0;
            padding: 0;
            height: 100%;
        }

        body {
            font-family: 'Inter', Arial, sans-serif;
            color: var(--ink);
            background: var(--cream);
        }

        .screen {
            min-height: 100vh;
            display: grid;
            grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        }

        /* ---------- Left brand panel ---------- */
        .brand {
            position: relative;
            overflow: hidden;
            background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 62%, #2c3f78 100%);
            color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 48px 52px;
        }

        .brand-top {
            display: flex;
            align-items: center;
            gap: 14px;
            position: relative;
            z-index: 2;
        }

        .brand-logo {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            flex-shrink: 0;
        }

        .brand-logo img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .brand-name {
            font-family: 'Fraunces', serif;
            font-size: 15px;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            opacity: 0.85;
        }

        .brand-mid {
            position: relative;
            z-index: 2;
            max-width: 430px;
        }

        .brand-eyebrow {
            font-size: 13px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--gold-light);
            margin-bottom: 18px;
            font-weight: 600;
        }

        .brand-headline {
            font-family: 'Fraunces', serif;
            font-weight: 600;
            font-size: clamp(28px, 3.2vw, 40px);
            line-height: 1.2;
            margin: 0 0 16px;
        }

        .brand-sub {
            font-size: 15px;
            line-height: 1.6;
            color: rgba(255, 255, 255, 0.7);
        }

        .brand-bottom {
            position: relative;
            z-index: 2;
            font-size: 12.5px;
            color: rgba(255, 255, 255, 0.5);
            letter-spacing: 0.02em;
        }

        .arches {
            position: absolute;
            left: 0;
            right: 0;
            bottom: -2px;
            height: 46%;
            z-index: 1;
            display: flex;
            opacity: 0.9;
        }

        .arch {
            flex: 1;
            background: rgba(255, 255, 255, 0.045);
            border-top: 1px solid rgba(232, 199, 115, 0.28);
            border-radius: 70px 70px 0 0;
            margin: 0 -1px;
        }

        .arch:nth-child(3n+1) { background: rgba(255, 255, 255, 0.07); }

        .arch-line {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 46%;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
            background-size: 220% 100%;
            animation: shimmer 6.5s ease-in-out infinite;
            z-index: 1;
        }

        @keyframes shimmer {
            0%   { background-position: 130% 0; opacity: 0; }
            15%  { opacity: 1; }
            50%  { background-position: -30% 0; opacity: 1; }
            70%  { opacity: 0; }
            100% { background-position: -30% 0; opacity: 0; }
        }

        @media (prefers-reduced-motion: reduce) {
            .arch-line { animation: none; opacity: 0.5; background-position: 50% 0; }
        }

        /* ---------- Right form panel ---------- */
        .form-side {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 24px;
            overflow-y: auto;
        }

        .form-wrap {
            width: 100%;
            max-width: 420px;
            padding: 24px 0;
        }

        .form-eyebrow {
            font-size: 12.5px;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--gold);
            font-weight: 600;
            margin: 0 0 10px;
        }

        h2.title {
            font-family: 'Fraunces', serif;
            font-weight: 600;
            font-size: 28px;
            margin: 0 0 6px;
        }

        .form-desc {
            font-size: 14.5px;
            color: var(--muted);
            margin: 0 0 28px;
        }

        .label {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 7px;
            margin-top: 0 !important;
            display: block;
            color: var(--ink);
        }

        .required {
            color: var(--error);
            font-weight: 700;
        }

        .row-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .field {
            position: relative;
        }

        .field-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            stroke: var(--muted);
            pointer-events: none;
        }

        .input {
            width: 100%;
            padding: 13px 14px 13px 42px;
            border-radius: 10px;
            border: 1.5px solid var(--line);
            font-size: 15px;
            font-family: inherit;
            background: #fff;
            color: var(--ink);
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .input::placeholder {
            color: #a3a7b3;
        }

        .input:focus {
            outline: none;
            border-color: var(--gold);
            box-shadow: 0 0 0 4px rgba(200, 155, 60, 0.15);
        }

        .has-error .input {
            border-color: var(--error) !important;
        }

        .has-error .password-wrapper {
            border-color: var(--error) !important;
        }

        .has-success .input {
            border-color: var(--success) !important;
        }

        .help-block {
            color: var(--error);
            font-size: 12.5px;
            margin-top: 6px;
            margin-bottom: 0;
            display: block;
        }

        .password-wrapper {
            position: relative;
        }

        .password-wrapper .input {
            padding-right: 44px;
        }

        .eye-btn {
            position: absolute;
            right: 4px;
            top: 4px;
            bottom: 4px;
            width: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 8px;
            background: transparent;
            transition: background 0.15s ease;
        }

        .eye-btn:hover {
            background: #f2f0ea;
        }

        .eye-btn svg {
            width: 19px;
            height: 19px;
            stroke: var(--muted);
        }

        /* Terms checkbox */
        .terms-group {
            margin: 6px 0 20px;
        }

        .checkbox {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 13.5px;
            color: var(--ink);
            line-height: 1.5;
        }

        .checkbox input[type="checkbox"] {
            margin-top: 3px;
            width: 16px;
            height: 16px;
            accent-color: var(--navy);
            flex-shrink: 0;
        }

        .checkbox label {
            display: inline;
            line-height: 1.5;
            font-weight: 400;
        }

        .terms-group .help-block {
            margin-left: 26px;
            margin-top: 6px !important;
        }

        .terms-link {
            color: var(--navy);
            font-weight: 600;
            cursor: pointer;
        }

        .terms-link:hover {
            color: var(--gold);
        }

        button#btn-register {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 10px;
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
            color: #fff;
            font-size: 15.5px;
            font-family: inherit;
            font-weight: 600;
            letter-spacing: 0.01em;
            cursor: pointer;
            transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
            box-shadow: 0 8px 20px rgba(22, 33, 62, 0.25);
        }

        button#btn-register:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 10px 24px rgba(22, 33, 62, 0.32);
        }

        button#btn-register:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        button#btn-register:focus-visible {
            outline: 3px solid var(--gold);
            outline-offset: 2px;
        }

        .login-link {
            margin-top: 22px;
            text-align: center;
            font-size: 14px;
            color: var(--muted);
        }

        .login-link a {
            color: var(--navy);
            font-weight: 600;
            text-decoration: none;
        }

        .login-link a:hover {
            color: var(--gold);
            text-decoration: underline;
        }

        /* ---------- Terms modal ---------- */
        #termsModal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(22, 33, 62, 0.55);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            padding: 24px;
        }

        .modal-card {
            width: 100%;
            max-width: 640px;
            max-height: 85vh;
            background: #fff;
            border-radius: var(--radius);
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .modal-head {
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
            color: #fff;
            padding: 22px 24px;
            text-align: center;
            flex-shrink: 0;
        }

        .modal-head h2 {
            font-family: 'Fraunces', serif;
            font-weight: 600;
            font-size: 21px;
            margin: 0;
        }

        .modal-head p {
            margin: 6px 0 0;
            font-size: 13px;
            color: var(--gold-light);
            letter-spacing: 0.04em;
        }

        .modal-body {
            padding: 22px 24px;
            overflow-y: auto;
            line-height: 1.75;
            color: var(--ink);
            font-size: 14.5px;
        }

        .modal-body h4 {
            color: var(--navy);
            font-size: 15px;
            margin: 0 0 14px;
        }

        .modal-body ol {
            padding-left: 20px;
            margin: 0;
        }

        .modal-body ol > li {
            margin-bottom: 10px;
        }

        .modal-body ul {
            padding-left: 18px;
            margin: 8px 0 0;
        }

        .modal-body ul > li {
            margin-bottom: 6px;
        }

        .modal-note {
            margin-top: 20px;
            background: #faf6ea;
            padding: 14px 16px;
            border-left: 4px solid var(--gold);
            border-radius: 8px;
            font-size: 13.5px;
        }

        .modal-note b {
            color: var(--navy);
        }

        .modal-foot {
            padding: 16px 24px 20px;
            text-align: center;
            border-top: 1px solid var(--line);
            display: flex;
            gap: 10px;
            flex-shrink: 0;
        }

        .modal-foot button {
            flex: 1;
            padding: 12px;
            font-size: 14px;
            font-family: inherit;
            font-weight: 600;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: opacity 0.15s ease;
        }

        .modal-foot button:hover {
            opacity: 0.9;
        }

        .btn-agree {
            background: var(--success);
            color: #fff;
        }

        .btn-cancel {
            background: #fff;
            color: var(--ink);
            border: 1.5px solid var(--line) !important;
        }

        /* ---------- Responsive ---------- */
        @media (max-width: 860px) {
            .screen {
                grid-template-columns: 1fr;
            }

            .brand {
                padding: 28px 28px 60px;
                min-height: 200px;
            }

            .brand-mid {
                max-width: 100%;
            }

            .brand-headline {
                font-size: 24px;
            }

            .brand-sub,
            .brand-bottom {
                display: none;
            }

            .arches {
                height: 60%;
            }

            .form-side {
                padding: 32px 20px 48px;
            }

            .row-2 {
                grid-template-columns: 1fr;
                gap: 0;
            }
        }
