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

:root {
    --auth-btn: var(--orange-deep, var(--orange));
    --auth-ring: color-mix(in srgb, var(--orange) 28%, transparent);
}

html { -webkit-text-size-adjust: 100%; }
.auth-body {
    min-height: 100vh;
    background: radial-gradient(70% 380px at 50% 0, color-mix(in srgb, var(--orange) 9%, transparent), transparent), var(--wh-surface-2);
    color: var(--wh-text);
    font-family: var(--auth-font), system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══ PAGE ═══ */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-brand { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 28px; text-decoration: none; }
.auth-brand img { max-width: 200px; max-height: 40px; object-fit: contain; }
.auth-brand-name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--wh-ink); }

.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px 32px; }
.auth-card {
    width: 100%; max-width: 420px;
    padding: 36px 36px 32px;
    background: var(--wh-surface);
    border: 1px solid var(--wh-line);
    border-radius: 16px;
    box-shadow: 0 1px 2px var(--wh-shadow), 0 12px 32px -12px var(--wh-shadow);
}

.auth-card.is-wide { max-width: 640px; }
.auth-title { font-size: 30px; }

.auth-title { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; color: var(--wh-ink); }
.auth-sub { margin: 8px 0 28px; font-size: 14px; line-height: 1.6; color: var(--wh-muted); }

.auth-below { margin-top: 24px; font-size: 14px; color: var(--wh-muted); text-align: center; }
.auth-below a, .auth-link, .auth-link-button {
    color: var(--wh-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--wh-ink) 30%, transparent);
}
.auth-below a { display: inline-block; padding-block: 4px; }
.auth-below a:hover, .auth-link:hover, .auth-link-button:hover { text-decoration-color: currentColor; }
.auth-below a:focus-visible, .auth-link:focus-visible, .auth-link-button:focus-visible,
.auth-help a:focus-visible, .auth-legal a:focus-visible, .alert a:focus-visible { outline: 2px solid var(--auth-btn); outline-offset: 2px; border-radius: 3px; }
.auth-below i { margin-inline-end: 6px; font-size: 12px; }
[dir="rtl"] .auth-below i { transform: scaleX(-1); }
.auth-link { font-size: 13px; font-weight: 500; }
.auth-inline-form { display: inline; }
.auth-link-button { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }

.auth-help { padding: 0 16px 32px; text-align: center; font-size: 13px; color: var(--wh-faint); }
.auth-help a { color: var(--wh-muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ═══ FIELDS ═══ */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.frow-3col { grid-template-columns: 1fr 1fr 1fr; }
.frow-span2 { grid-column: 1 / -1; }
.fgrp, .frow > div { margin-bottom: 16px; }

.flabel { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--wh-ink); }
.flabel-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.flabel .req { color: var(--orange-text); margin-inline-start: 2px; }
.flabel .opt { margin-inline-start: 4px; font-size: 12px; font-weight: 400; color: var(--wh-faint); }

.finput-wrap { position: relative; }
.finput {
    width: 100%; height: 46px; padding: 0 14px;
    border: 1px solid var(--wh-line-strong); border-radius: 10px;
    background: var(--wh-surface); color: var(--wh-ink);
    font: 400 14px/1.2 var(--auth-font), system-ui, sans-serif;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.finput::placeholder { color: var(--wh-faint); }
.finput:hover { border-color: var(--wh-faint); }
.finput:focus { outline: none; border-color: var(--auth-btn); box-shadow: 0 0 0 3px var(--auth-ring); }
.finput:-webkit-autofill { -webkit-text-fill-color: var(--wh-ink); box-shadow: 0 0 0 100px var(--wh-surface) inset; }
.finput.has-toggle { padding-inline-end: 48px; }

.fselect { cursor: pointer; }

.password-toggle {
    position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; display: inline-grid; place-items: center;
    border: 0; border-radius: 8px; background: none; color: var(--wh-faint); font-size: 14px; cursor: pointer;
}
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--wh-ink); }
.password-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--auth-ring); }

/* Checkbox rows: the real checkbox, in the brand colour */
.auth-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--wh-text); cursor: pointer; }
.auth-check input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--auth-btn); cursor: pointer; }
.auth-check-title { display: block; font-weight: 600; color: var(--wh-ink); }
.auth-check-sub { display: block; margin-top: 2px; font-size: 13px; color: var(--wh-muted); }

/* ═══ BUTTON ═══ */
.btn-primary {
    width: 100%; height: 48px; margin-top: 24px; padding: 0 16px;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    border: 0; border-radius: 10px;
    background: var(--auth-btn); color: #fff; /* --auth-btn is the deepened accent (white reaches 4.5:1 on it), not the accent itself whose label may be dark */
    font: 600 15px/1 var(--auth-font), system-ui, sans-serif; text-decoration: none;
    cursor: pointer; transition: background-color .15s;
}
.btn-primary:hover { background: color-mix(in srgb, var(--auth-btn) 90%, #000); }
.btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--auth-ring); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; }

/* ═══ ALERTS ═══ */
.alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; padding: 12px 14px; border: 1px solid; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.alert i { flex: none; margin-top: 3px; font-size: 13px; }
.alert a { font-weight: 600; text-decoration: underline; color: inherit; }
.alert-error { background: var(--tone-red-soft); border-color: var(--tone-red-bg); color: var(--tone-red-mid); }
.alert-success { background: var(--tone-green-soft); border-color: var(--tone-green-line); color: var(--tone-green-fg); }

/* ═══ REGISTRATION ═══ */
.rsec + .rsec { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--wh-line-soft); }
.rsec-hd { margin-bottom: 16px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--wh-ink); }
.rsec-body { margin-top: 16px; }
.rsec-body[hidden] { display: none; }

.pwd-strength { margin-top: 8px; }
.pwd-strength[hidden] { display: none; }
.pwd-strength-bar { height: 4px; overflow: hidden; border-radius: 4px; background: var(--wh-line); }
.pwd-strength-fill { width: 0; height: 100%; border-radius: 4px; transition: width .3s, background .3s; }
.pwd-strength-label { margin-top: 5px; font-size: 12px; font-weight: 600; }
.pwd-match { min-height: 18px; margin-top: 8px; font-size: 12px; font-weight: 600; }
.pwd-match[hidden] { display: none; }
.pwd-match i { margin-inline-end: 4px; }
.pwd-match.ok { color: var(--tone-green-mid); }
.pwd-match.bad { color: var(--tone-red-mid); }
.pwd-rules { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pwd-rule { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--wh-muted); transition: color .2s; }
.pwd-rule.pass { color: var(--tone-green-mid); }
.pwd-rule i { font-size: 7px; }

.auth-legal { margin-top: 16px; font-size: 12.5px; line-height: 1.6; color: var(--wh-muted); text-align: center; }
.auth-legal-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ═══ STEPS (application received) ═══ */
.auth-steps { list-style: none; counter-reset: step; margin-bottom: 4px; }
.auth-steps li {
    counter-increment: step; position: relative;
    padding: 0 0 20px; padding-inline-start: 40px; font-size: 14px; line-height: 1.5; color: var(--wh-muted);
}
.auth-steps li::before {
    content: counter(step); position: absolute; inset-inline-start: 0; top: 0;
    width: 26px; height: 26px; display: grid; place-items: center;
    border: 1px solid var(--wh-line-strong); border-radius: 50%; font-size: 12px; font-weight: 600; color: var(--wh-ink);
}
.auth-steps li:not(:last-child)::after {
    content: ''; position: absolute; inset-inline-start: 13px; top: 30px; bottom: 4px; width: 1px; background: var(--wh-line);
}
.auth-step-title { display: block; font-weight: 600; color: var(--wh-ink); }
.auth-steps p { margin: 2px 0 0; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
    .frow-3col { grid-template-columns: 1fr 1fr; }
    .frow-3col > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .auth-main { padding: 24px 16px 24px; }
    .auth-card { padding: 28px 20px 24px; }
    .frow, .frow-3col { grid-template-columns: 1fr; }
    .frow-3col > div:last-child { grid-column: auto; }
}

/* Toast notifications */
.wh-toast-wrap{position:fixed;top:20px;inset-inline-end:20px;z-index:9999;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.wh-toast{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:10px;font-size:13px;font-weight:600;box-shadow:0 4px 16px rgba(0,0,0,.12);pointer-events:all;animation:wh-toast-in .25s ease;max-width:320px;line-height:1.4}
.wh-toast.success{background:var(--tone-green-soft);border:1px solid var(--tone-green-line);color:var(--tone-green-fg)}
.wh-toast.error{background:var(--tone-red-soft);border:1px solid var(--tone-red-bg);color:var(--tone-red-mid)}
.wh-toast.info{background:var(--tone-blue-soft);border:1px solid var(--tone-blue-bg);color:var(--tone-blue-mid)}
.wh-toast.warning{background:var(--tone-amber-soft);border:1px solid var(--tone-amber-line);color:var(--tone-orange-mid)}
@keyframes wh-toast-in{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
@keyframes wh-toast-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(20px)}}

/* Customer page navigation loader */
.store-page-loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: start center;
    padding-top: 72px;
    background: rgba(255, 255, 255, .30);
    cursor: wait;
    pointer-events: auto;
}
.store-page-loader::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 38%;
    height: 3px;
    background: linear-gradient(90deg, var(--orange), color-mix(in srgb, var(--orange) 45%, #fff));
    box-shadow: 0 1px 8px color-mix(in srgb, var(--orange) 35%, transparent);
    animation: store-loader-progress 1s ease-in-out infinite;
}
.store-page-loader[hidden] { display: none; }
.store-loader-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: var(--ink);
    background: var(--wh-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(10, 22, 40, .12);
    font-size: 12px;
    font-weight: 600;
}
.store-loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--wh-line);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: store-loader-spin .7s linear infinite;
}
@keyframes store-loader-spin { to { transform: rotate(360deg); } }
@keyframes store-loader-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(370%); }
}
@media (prefers-reduced-motion: reduce) {
    .store-loader-spinner, .store-page-loader::before { animation-duration: 1.8s; }
}
@media (max-width: 480px) {
    .store-loader-card { padding: 14px 18px; font-size: 13px; }
}
