.auth-page { min-height: 100vh; background: #f7f9fd; }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, .92fr) minmax(520px, 1.08fr); }
.auth-showcase { position: relative; display: flex; min-height: 100vh; padding: 40px clamp(38px,5vw,76px); overflow: hidden; flex-direction: column; color: #fff; background: #0f172a; }
.auth-showcase::before { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 15% 20%,rgba(37,99,235,.5),transparent 34%),radial-gradient(circle at 82% 78%,rgba(96,165,250,.2),transparent 30%),linear-gradient(145deg,rgba(255,255,255,.035),transparent 55%); }
.auth-showcase::after { position: absolute; right: -110px; bottom: -140px; width: 410px; height: 410px; content: ""; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025),0 0 0 140px rgba(255,255,255,.018); }
.auth-brand { position: relative; z-index: 1; color: #fff; }
.auth-brand .brand__name span { color: #60a5fa; }
.auth-showcase__content { position: relative; z-index: 1; width: min(570px,100%); margin: auto 0; padding: 52px 0; }
.auth-kicker { display: inline-flex; padding: 7px 12px; align-items: center; gap: 8px; color: #bfdbfe; border: 1px solid rgba(147,197,253,.2); background: rgba(37,99,235,.14); border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-kicker i { width: 6px; height: 6px; background: #60a5fa; border-radius: 50%; box-shadow: 0 0 0 4px rgba(96,165,250,.14); }
.auth-showcase h1 { max-width: 560px; margin: 22px 0 18px; font-size: clamp(37px,4.1vw,59px); line-height: 1.12; letter-spacing: -2.3px; }
.auth-showcase h1 span { color: #60a5fa; }
.auth-showcase__content > p { max-width: 520px; margin: 0; color: #cbd5e1; font-size: 14px; line-height: 1.8; }
.auth-benefits { display: grid; margin-top: 40px; gap: 22px; }
.auth-benefits > div { display: flex; align-items: flex-start; gap: 15px; }
.auth-benefits > div > span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; color: #93c5fd; border: 1px solid rgba(147,197,253,.24); background: rgba(15,23,42,.28); border-radius: 11px; font-size: 9px; font-weight: 700; }
.auth-benefits p { display: grid; margin: 0; gap: 3px; }
.auth-benefits strong { font-size: 12px; }
.auth-benefits small { color: #94a3b8; font-size: 10px; }
.auth-showcase__footer { position: relative; z-index: 1; margin: 0; color: #64748b; font-size: 9px; }
.auth-panel { display: grid; min-height: 100vh; padding: 42px clamp(30px,7vw,105px); place-items: center; background: #fff; }
.auth-panel__inner { width: min(470px,100%); }
.auth-heading { margin-bottom: 30px; }
.auth-heading--compact { margin-bottom: 22px; }
.auth-heading h2 { margin: 0 0 8px; font-size: clamp(26px,3vw,34px); line-height: 1.25; letter-spacing: -1.15px; }
.auth-heading p { margin: 0; color: var(--ink-500); font-size: 12px; }
.auth-mobile-brand { display: none; margin-bottom: 18px; color: var(--primary); font-size: 18px; font-weight: 700; }
.auth-form { display: grid; gap: 18px; }
.auth-form--register { gap: 13px; }
.auth-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field { display: grid; gap: 7px; }
.auth-field > label,.goal-fieldset legend { color: var(--ink-700); font-size: 10px; font-weight: 650; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; }
.field-label-row label { color: var(--ink-700); font-size: 10px; font-weight: 650; }
.field-label-row a { color: var(--primary); font-size: 9px; font-weight: 600; }
.auth-control { position: relative; display: flex; min-height: 48px; align-items: center; border: 1px solid var(--border); background: #fff; border-radius: 12px; transition: border-color .18s,box-shadow .18s,background .18s; }
.auth-control:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(37,99,235,.09); }
.auth-field.has-error .auth-control { border-color: #fca5a5; background: #fffafa; }
.auth-control input,.auth-control select { width: 100%; height: 46px; padding: 0 14px; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 11px; }
.auth-control--icon input { padding-left: 43px; }
.auth-control--icon > svg { position: absolute; left: 14px; width: 17px; color: #94a3b8; pointer-events: none; }
.auth-control--select { padding-right: 6px; }
.password-toggle { display: grid; width: 40px; height: 40px; margin-right: 4px; flex: 0 0 40px; place-items: center; color: #94a3b8; border: 0; background: transparent; border-radius: 9px; cursor: pointer; }
.password-toggle:hover { color: var(--ink); background: #f8fafc; }
.password-toggle svg { width: 17px; }
.field-error { color: #dc2626; font-size: 9px; }
.form-alert { padding: 11px 13px; color: #b91c1c; border: 1px solid #fecaca; background: #fef2f2; border-radius: 11px; font-size: 10px; }
.form-alert p { margin: 0; }
.form-alert--warning { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.auth-submit { display: flex; min-height: 49px; padding: 0 18px; align-items: center; justify-content: center; gap: 10px; color: #fff; border: 0; background: var(--primary-gradient); border-radius: 12px; box-shadow: 0 11px 24px rgba(37,99,235,.2); cursor: pointer; font-size: 11px; font-weight: 700; transition: transform .18s,box-shadow .18s,filter .18s; }
.auth-submit:hover { box-shadow: 0 14px 30px rgba(37,99,235,.28); filter: saturate(1.08); transform: translateY(-1px); }
.auth-submit:disabled { cursor: not-allowed; box-shadow: none; filter: grayscale(.2); opacity: .52; transform: none; }
.auth-submit svg { width: 17px; }
.auth-switch { margin: 22px 0 0; color: var(--ink-500); font-size: 10px; text-align: center; }
.auth-switch a,.auth-secondary-link { color: var(--primary); font-weight: 650; }
.auth-trust { display: flex; margin-top: 32px; align-items: center; justify-content: center; gap: 7px; color: #94a3b8; font-size: 8px; }
.auth-trust svg { width: 14px; color: var(--success); }
.check-field { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-500); cursor: pointer; font-size: 9px; }
.check-field input { width: 16px; height: 16px; margin: 1px 0 0; flex: 0 0 16px; accent-color: var(--primary); }
.check-field a { color: var(--primary); font-weight: 600; }
.check-field span { display: grid; gap: 2px; }
.check-field strong { color: var(--ink); font-size: 10px; }
.check-field small { color: var(--ink-500); font-size: 8px; }
.login-remember { margin-top: -4px; }
.auth-messages { display: grid; margin-bottom: 18px; gap: 8px; }
.auth-messages:empty { display: none; }
.auth-message { padding: 10px 12px; color: #1e40af; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 10px; font-size: 9px; }
.auth-message--success { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.auth-message--warning,.auth-message--error { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.onboarding-step { display: inline-flex; margin-bottom: 13px; padding: 5px 9px; color: var(--primary); background: var(--primary-50); border-radius: 99px; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.onboarding-form { gap: 16px; }
.goal-fieldset { min-width: 0; padding: 0; border: 0; }
.goal-fieldset legend { margin-bottom: 9px; }
.goal-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.goal-option { cursor: pointer; }
.goal-option input { position: absolute; opacity: 0; }
.goal-option > span { display: flex; min-height: 45px; padding: 10px 11px; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 11px; transition: border .18s,background .18s; }
.goal-option i { width: 14px; height: 14px; flex: 0 0 14px; border: 1px solid #cbd5e1; border-radius: 50%; box-shadow: inset 0 0 0 3px #fff; }
.goal-option strong { font-size: 9px; font-weight: 600; }
.goal-option input:checked + span { color: var(--primary-700); border-color: #93c5fd; background: var(--primary-50); }
.goal-option input:checked + span i { border-color: var(--primary); background: var(--primary); }
.onboarding-preferences { display: grid; padding: 12px; gap: 10px; background: #f8fafc; border-radius: 11px; }
.auth-state { text-align: center; }
.auth-state__icon { display: grid; width: 62px; height: 62px; margin: 0 auto 22px; place-items: center; color: var(--primary); background: var(--primary-50); border-radius: 19px; box-shadow: 0 0 0 8px rgba(239,246,255,.7); font-size: 23px; font-weight: 700; }
.auth-state__icon svg { width: 28px; }
.auth-state h2 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.8px; }
.auth-state p { margin: 0 auto 25px; color: var(--ink-500); font-size: 11px; line-height: 1.8; }
.auth-state form { margin-bottom: 16px; }
.auth-state--danger .auth-state__icon { color: #dc2626; background: #fef2f2; box-shadow: 0 0 0 8px rgba(254,242,242,.7); }

.settings-heading { display: flex; margin: 4px 0 24px; align-items: flex-end; justify-content: space-between; }
.settings-heading h2 { margin: 6px 0 5px; font-size: 28px; letter-spacing: -.8px; }
.settings-heading p { margin: 0; color: var(--ink-500); font-size: 11px; }
.settings-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 20px; align-items: start; }
.settings-nav { display: grid; padding: 12px; gap: 4px; }
.settings-user { display: flex; margin-bottom: 8px; padding: 10px; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.settings-user__avatar { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; color: #fff; background: var(--primary-gradient); border-radius: 11px; font-size: 10px; font-weight: 700; }
.settings-user > div { display: grid; min-width: 0; }
.settings-user strong { font-size: 10px; }
.settings-user small { overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; }
.settings-nav > a,.settings-nav button { display: flex; width: 100%; min-height: 44px; padding: 8px 10px; align-items: center; color: var(--ink-500); border: 0; background: transparent; border-radius: 9px; cursor: pointer; font-size: 9px; text-align: left; }
.settings-nav > a:hover,.settings-nav button:hover,.settings-nav > a.is-active { color: var(--primary-700); background: var(--primary-50); }
.settings-card { padding: 0; overflow: hidden; }
.settings-card__header { display: flex; padding: 21px 24px; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--border); }
.settings-card__header h3 { margin: 0 0 4px; font-size: 16px; }
.settings-card__header p { margin: 0; color: var(--ink-500); font-size: 9px; }
.settings-form { display: grid; padding: 24px; gap: 22px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-preferences { display: grid; padding-top: 20px; gap: 14px; border-top: 1px solid var(--border); }
.settings-preferences h4 { margin: 0; font-size: 11px; }
.settings-actions { display: flex; padding-top: 18px; align-items: center; gap: 10px; border-top: 1px solid var(--border); }
.settings-card--narrow { width: min(620px,100%); }
.password-done { margin: 70px auto; padding: 40px; text-align: center; }
.password-done > span { display: grid; width: 54px; height: 54px; margin: 0 auto 17px; place-items: center; color: #fff; background: var(--success); border-radius: 50%; font-size: 22px; }
.password-done h2 { margin: 0 0 8px; }
.password-done p { margin: 0 0 22px; color: var(--ink-500); }
.legal-content { max-height: min(760px,calc(100vh - 84px)); padding-right: 10px; overflow-y: auto; }
.legal-content h2 { margin: 20px 0 2px; font-size: 28px; letter-spacing: -.8px; }
.legal-updated { margin: 0 0 24px; color: var(--ink-500); font-size: 9px; }
.legal-content section { padding: 15px 0; border-top: 1px solid var(--border); }
.legal-content h3 { margin: 0 0 6px; font-size: 11px; }
.legal-content section p { margin: 0; color: var(--ink-500); font-size: 9px; line-height: 1.75; }

@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 360px minmax(0,1fr); }
    .auth-showcase { padding: 32px; }
    .auth-showcase h1 { font-size: 38px; }
    .auth-benefits { margin-top: 30px; }
    .auth-panel { padding: 34px; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { display: flex; overflow-x: auto; }
    .settings-user { min-width: 220px; margin: 0 8px 0 0; border: 0; border-right: 1px solid var(--border); }
    .settings-nav > a,.settings-nav form { min-width: max-content; }
}
@media (max-width: 720px) {
    .auth-shell { display: block; }
    .auth-showcase { display: none; }
    .auth-panel { min-height: 100vh; padding: 28px 20px; }
    .auth-mobile-brand { display: block; }
    .auth-heading { margin-bottom: 24px; }
    .auth-heading h2 { font-size: 27px; }
    .auth-form__grid,.settings-grid { grid-template-columns: 1fr; }
    .goal-options { grid-template-columns: 1fr; }
    .settings-heading h2 { font-size: 24px; }
    .settings-card__header { padding: 18px; }
    .settings-card__header .status-badge { display: none; }
    .settings-form { padding: 18px; }
    .settings-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; }
    .settings-user { min-width: 0; margin: 0; grid-column: 1/-1; border: 0; border-bottom: 1px solid var(--border); }
    .settings-nav > a,.settings-nav form { min-width: 0; }
}

/* Shared typography contract: 10px micro, 12px supporting, 14px default. */
.auth-kicker,
.auth-benefits > div > span,
.auth-showcase__footer,
.auth-trust,
.onboarding-step,
.settings-user small,
.legal-updated {
    font-size: var(--font-xs);
}

.auth-benefits small,
.auth-field > label,
.goal-fieldset legend,
.field-label-row label,
.field-label-row a,
.field-error,
.form-alert,
.check-field small,
.auth-message,
.settings-user strong,
.settings-card__header p {
    font-size: var(--font-sm);
}

.auth-showcase__content > p,
.auth-benefits strong,
.auth-heading p,
.auth-control input,
.auth-control select,
.auth-submit,
.auth-switch,
.check-field,
.check-field strong,
.goal-option strong,
.auth-state p,
.settings-heading p,
.settings-nav > a,
.settings-nav button,
.settings-preferences h4,
.legal-content section p {
    font-size: var(--font-base);
}
