:root {
    --navy: #0a1e46;
    --navy-2: #102b5c;
    --ink: #142036;
    --cream: #f4f0e8;
    --paper: #fbfaf7;
    --gold: #c7a46a;
    --gold-light: #e5cfaa;
    --line: rgba(10, 30, 70, .15);
    --muted: #6f7682;
    --success: #226238;
    --error: #8b3025;
    --serif: "Playfair Display", Georgia, serif;
    --sans: "Manrope", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 var(--sans);
}

button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.demo-banner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 7px 20px;
    background: var(--gold);
    color: var(--navy);
    font-size: 11px;
    letter-spacing: .02em;
    text-align: center;
}

.demo-banner strong {
    text-transform: uppercase;
    letter-spacing: .12em;
}

.client-header {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 0 clamp(22px, 6vw, 86px);
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 20px; }
.brand img { width: 145px; }
.brand span {
    padding-left: 20px;
    border-left: 1px solid var(--line);
    color: var(--navy);
    font: 600 17px var(--serif);
}

.client-header nav { display: flex; align-items: center; gap: 30px; font-size: 12px; font-weight: 700; }
.client-header nav > a:first-child:hover { color: var(--gold); }
.app-link { padding: 12px 18px; background: var(--navy); color: #fff; }
.app-link span { margin-left: 7px; color: var(--gold); }

.client-shell {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: clamp(58px, 8vw, 105px) 0 90px;
}

.client-intro {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(38px, 9vw, 120px);
    align-items: end;
    margin-bottom: clamp(42px, 6vw, 75px);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .19em;
    text-transform: uppercase;
}

h1, h2 { color: var(--navy); font-family: var(--serif); }
h1 { margin: 0; font-size: clamp(45px, 6vw, 76px); line-height: 1.02; letter-spacing: -.035em; }
h1 em { color: var(--gold); font-weight: 600; }
h2 { margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; }
.client-intro > p { max-width: 520px; margin: 0 0 8px; color: var(--muted); font-size: 17px; }

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    box-shadow: 0 30px 80px rgba(10, 30, 70, .1);
}

.auth-card { padding: clamp(28px, 5vw, 62px); background: #fff; }
.auth-tabs { display: flex; margin: -20px 0 42px; border-bottom: 1px solid var(--line); }
.auth-tab {
    position: relative;
    flex: 1;
    padding: 17px 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.auth-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: transparent;
}
.auth-tab.is-active { color: var(--navy); }
.auth-tab.is-active::after { background: var(--gold); }

.panel-heading { margin-bottom: 30px; }
.panel-heading h2 { font-size: clamp(34px, 4vw, 52px); }
.panel-heading > p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

form { display: grid; gap: 19px; }
label { display: flex; flex-direction: column; color: #566070; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
input, select {
    width: 100%;
    min-height: 50px;
    margin-top: 7px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 0;
    outline: none;
    background: #f7f5f0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}
input:focus { border-color: var(--gold); background: #fff; }
select:focus { border-color: var(--gold); background: #fff; }
input[aria-invalid="true"] { border-color: var(--error); background: #fff7f5; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.full-row { grid-column: 1 / -1; }

.button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 25px;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    font: 700 12px var(--sans);
    letter-spacing: .05em;
    text-transform: uppercase;
    transition: transform .2s, background .2s, color .2s;
}
.button:hover { transform: translateY(-2px); }
.button-gold { background: var(--gold); color: var(--navy); }
.button-gold:hover { background: #dbbc87; }
.button-outline { border-color: var(--navy); background: transparent; color: var(--navy); }
.button-outline:hover { background: var(--navy); color: #fff; }
.button-danger { border-color: #8b3025; background: #8b3025; color: #fff; }
.demo-note { margin: -6px 0 0; color: var(--muted); font-size: 10px; text-align: center; }

.form-status { margin-bottom: 25px; padding: 13px 16px; font-size: 12px; }
.form-status.success { background: #e9f5ec; color: var(--success); }
.form-status.error { background: #fff0ed; color: var(--error); }

fieldset { min-width: 0; margin: 5px 0 0; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 13px; color: var(--navy); font: 600 18px var(--serif); }
.card-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card-choice legend { grid-column: 1 / -1; }
.choice-card { position: relative; }
.choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-card span {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px;
    border: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
}
.choice-card small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.choice-card input:checked + span { border-color: var(--gold); background: #f5eee2; }
.choice-card input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

.departments-fieldset { margin-top: 8px; }
.marketing-fieldset { display: grid; gap: 11px; padding: 18px; border: 1px solid var(--line); }
.field-help, .settings-note { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 500; }
.department-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.department-grid label { position: relative; }
.department-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.department-grid span {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 9px;
    border: 1px solid var(--line);
    color: #4e596b;
    cursor: pointer;
    font-size: 10px;
    text-align: center;
}
.department-grid input:checked + span { border-color: var(--gold); background: #f5eee2; color: var(--navy); }
.department-grid input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

.demo-consent,.legal-consent { display: grid; grid-template-columns: 18px 1fr; gap: 11px; align-items: start; font-weight: 500; line-height: 1.5; }
.demo-consent input,.legal-consent input { width: 16px; min-height: 16px; margin: 2px 0 0; accent-color: var(--navy); }
.legal-consent a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.captcha-box { min-height: 65px; margin: 5px 0; }
.captcha-config-error { padding: 12px 14px; border-left: 3px solid #a83228; background: #fff0ed; color: #8b3025; font-size: 12px; line-height: 1.5; }

.benefits-card { padding: clamp(34px, 5vw, 62px); background: var(--navy); color: #fff; }
.benefits-card h2 { max-width: 380px; color: #fff; }
.benefits-card ul { display: grid; gap: 0; margin: 48px 0 40px; padding: 0; list-style: none; }
.benefits-card li { display: grid; grid-template-columns: 42px 1fr; gap: 15px; padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.benefits-card li > span { color: var(--gold); font-size: 10px; letter-spacing: .12em; }
.benefits-card strong { font: 600 20px var(--serif); }
.benefits-card p { margin: 5px 0 0; color: rgba(255, 255, 255, .58); font-size: 12px; }
.text-link { display: inline-block; padding-bottom: 5px; border-bottom: 1px solid rgba(255, 255, 255, .3); font-size: 12px; font-weight: 700; }
.text-link span { margin-left: 8px; color: var(--gold); }

.dashboard { animation: reveal .35s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 36px; }
.dashboard-head h2 { font-size: clamp(36px, 5vw, 58px); }
.text-button { padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--navy); cursor: pointer; font-size: 12px; font-weight: 700; }
.text-button:hover { color: var(--gold); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dashboard-grid article { min-width: 0; padding: clamp(25px, 4vw, 42px); }

.points-card { display: flex; flex-direction: column; min-height: 330px; background: var(--navy); color: #fff; }
.points-card p { margin: 0; color: rgba(255, 255, 255, .62); font-size: 13px; }
.points-card strong { margin-top: 16px; font: 700 clamp(70px, 10vw, 112px)/.9 var(--sans); }
.points-card > span { margin-top: 12px; color: var(--gold); font-weight: 700; }
.points-card small { margin-top: auto; color: rgba(255, 255, 255, .45); font-size: 10px; }

.loyalty-card { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; }
.card-title { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.card-title span { color: var(--navy); font: 600 22px var(--serif); }
.card-title small { padding: 5px 8px; background: #e9f5ec; color: var(--success); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.barcode { width: min(100%, 320px); height: 92px; background: #fff; }
.loyalty-card > strong { margin-top: 12px; color: var(--ink); font-size: 17px; letter-spacing: .18em; }
.loyalty-card > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.profile-card, .departments-card { background: var(--cream); }
.profile-card dl { display: grid; gap: 12px; margin: 25px 0; }
.profile-card dl > div { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.profile-card dt { color: var(--muted); font-size: 11px; }
.profile-card dd { margin: 0; color: var(--navy); font-size: 12px; font-weight: 700; text-align: right; }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.department-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.department-chip { padding: 10px 13px; border: 1px solid var(--gold); background: #f5eee2; color: var(--navy); font-size: 11px; font-weight: 600; }
.department-chip::before { content: "♥"; margin-right: 7px; color: var(--gold); }
.empty-state { color: var(--muted); font-size: 12px; }
.account-settings-card { border: 1px solid var(--line); background: #fff; }
.account-settings-card h3 { margin: 0 0 18px; color: var(--navy); font: 600 24px var(--serif); }
.account-settings-card form { gap: 12px; }
.account-settings-card .button { margin-top: 8px; }
.settings-note { margin-top: 18px; }
.settings-note a { color: var(--navy); font-weight: 700; text-decoration: underline; }
.account-closure-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; }
.closure-status { padding: 13px; background: #e9f5ec; color: var(--success) !important; font-weight: 700; }

.client-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: end;
    padding: 55px clamp(22px, 6vw, 86px);
    background: #071734;
    color: #fff;
}
.client-footer img { width: 145px; padding: 5px; background: #fff; }
.client-footer p { max-width: 540px; margin: 12px 0 0; color: rgba(255, 255, 255, .5); font-size: 11px; }
.client-footer > p { justify-self: end; text-align: right; }

@media (max-width: 900px) {
    .client-header nav > a:first-child { display: none; }
    .client-intro, .auth-layout { grid-template-columns: 1fr; }
    .client-intro { gap: 24px; }
    .benefits-card ul { grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 34px 0; }
    .benefits-card li { grid-template-columns: 1fr; align-content: start; border: 1px solid rgba(255, 255, 255, .14); padding: 18px; }
}

@media (max-width: 650px) {
    .demo-banner { align-items: flex-start; flex-direction: column; gap: 0; }
    .client-header { min-height: 72px; padding: 0 18px; }
    .brand { gap: 12px; }
    .brand img { width: 116px; }
    .brand span { padding-left: 12px; font-size: 14px; }
    .app-link { padding: 10px 12px; font-size: 10px; }
    .client-shell { width: min(100% - 32px, 560px); padding: 48px 0 65px; }
    .client-intro { margin-bottom: 35px; }
    .client-intro > p { font-size: 14px; }
    .benefits-card ul { grid-template-columns: 1fr; }
    .auth-tabs { margin: -10px 0 30px; }
    .form-grid, .card-choice, .department-grid, .dashboard-grid, .profile-actions { grid-template-columns: 1fr; }
    .full-row { grid-column: auto; }
    .dashboard-head { align-items: start; flex-direction: column; }
    .points-card, .loyalty-card { min-height: 290px; }
    .client-footer { grid-template-columns: 1fr; gap: 22px; }
    .client-footer > p { justify-self: start; text-align: left; }
}

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