:root {
  color-scheme: light;
  --background: #f8fafc;
  --card: #fff;
  --foreground: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --accent: #f1f5f9;
  --ring: #94a3b8;
  --danger: #b91c1c;
  --radius: .75rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--foreground); font-size: 14px; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin-top: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px 16px; background: #fff; border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-weight: 750; font-size: 16px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #18181b; font-weight: 800; }
.site-picker { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px rgb(15 23 42 / .04); }
.site-avatar, .user-avatar { flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: #f1f5f9; font-weight: 700; }
.site-avatar { width: 34px; height: 34px; }
.site-picker-copy, .user-card > span:last-child { min-width: 0; display: grid; flex: 1; }
.site-picker-copy strong, .site-picker-copy small, .user-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-picker small, .user-card small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.site-list { display: grid; gap: 2px; margin-top: -14px; padding: 4px 10px 0 54px; }
.site-list a { color: var(--muted); font-size: 12px; }
.site-list a:hover { color: var(--foreground); }
.main-nav { display: grid; gap: 4px; }
.main-nav a { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 11px; color: #475569; border-radius: 8px; font-weight: 520; }
.main-nav a span { width: 18px; color: #64748b; font-size: 17px; text-align: center; }
.main-nav a:hover { background: #f8fafc; color: #0f172a; }
.main-nav a.active { color: #0f172a; background: #f1f5f9; font-weight: 650; }
.nav-count { min-width: 20px; margin-left: auto; padding: 2px 6px; border-radius: 999px; background: #18181b; color: #fff; font-size: 10px; text-align: center; }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; }
.user-avatar { width: 32px; height: 32px; background: #18181b; color: #fff; }
.logout { width: 100%; padding: 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.logout:hover { color: var(--foreground); background: var(--accent); }
.guest-portal .status-strip form { margin-left: auto; }
.workspace { min-width: 0; }
.mobile-header, .mobile-nav { display: none; }
.page { width: min(1040px, calc(100% - 64px)); margin: 0 auto; padding: 56px 0 100px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin-bottom: 8px; font-size: clamp(27px, 3vw, 36px); line-height: 1.15; letter-spacing: -.04em; }
.page-heading p { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.eyebrow { display: block; margin-bottom: 8px; color: #64748b; font-size: 11px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.button:focus-visible, .ui-input:focus { outline: none; box-shadow: 0 0 0 3px rgb(148 163 184 / .25); }
.button.primary { background: var(--primary); color: var(--primary-foreground); }
.button.primary:hover { background: #27272a; }
.button.secondary { background: #fff; border-color: var(--border); box-shadow: 0 1px 2px rgb(15 23 42 / .04); }
.button.secondary:hover { background: var(--accent); }
.wide { width: 100%; }
.status-strip { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 11px 14px; border: 1px solid #dbeafe; border-radius: 9px; background: #eff6ff; color: #334155; font-size: 13px; }
.status-strip span:last-child { color: #64748b; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / .14); }
.section-jumps { display: flex; gap: 6px; padding-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.section-jumps::-webkit-scrollbar { display: none; }
.section-jumps a { flex: 0 0 auto; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; }
.section-jumps a:hover { color: var(--foreground); border-color: #cbd5e1; }
.block-list { display: grid; gap: 12px; }
.block-card { scroll-margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: 0 1px 2px rgb(15 23 42 / .025); overflow: clip; }
.block-card[open] { box-shadow: 0 6px 24px rgb(15 23 42 / .055); }
.block-card.has-errors { border-color: #fecaca; }
.block-card summary { min-height: 78px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 24px; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; list-style: none; }
.block-card summary::-webkit-details-marker { display: none; }
.block-number { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: #64748b; background: #f8fafc; font-size: 12px; font-variant-numeric: tabular-nums; }
.block-title { display: grid; gap: 4px; }
.block-title strong { font-size: 15px; }
.block-title small { color: var(--muted); line-height: 1.35; }
.badge { display: inline-flex; align-items: center; width: max-content; padding: 3px 8px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 11px; font-weight: 650; }
.badge.muted { margin-top: 6px; }
.chevron { color: #94a3b8; font-size: 17px; transition: transform .2s; }
.block-card[open] .chevron { transform: rotate(180deg); }
.block-form { border-top: 1px solid var(--border); }
.block-toolbar { padding: 18px 22px; background: #fafafa; border-bottom: 1px solid var(--border); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.switch-row > span:first-child { display: grid; gap: 3px; }
.switch-row small { color: var(--muted); }
.switch { position: relative; flex: 0 0 auto; width: 42px; height: 24px; }
.ui-switch-input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .18s; }
.switch > span::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(15 23 42 / .25); content: ""; transition: transform .18s; }
.ui-switch-input:checked + span { background: #18181b; }
.ui-switch-input:checked + span::after { transform: translateX(18px); }
.ui-switch-input:focus-visible + span { box-shadow: 0 0 0 3px rgb(148 163 184 / .35); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; padding: 22px; }
.field-grid.compact { padding: 0; }
.field { display: grid; align-content: start; gap: 7px; color: #334155; font-size: 13px; font-weight: 600; }
.field:has(textarea), .field:has(input[type=file]) { grid-column: 1 / -1; }
.field small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
.field em, .field-error { margin: 0; color: var(--danger); font-size: 12px; font-style: normal; font-weight: 500; }
.ui-input { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #0f172a; transition: border-color .15s, box-shadow .15s; }
.ui-input:hover { border-color: #94a3b8; }
textarea.ui-input { resize: vertical; line-height: 1.5; }
input[type=file].ui-input { padding: 7px; background: #f8fafc; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 5px 9px; border: 0; border-radius: 5px; background: #e2e8f0; color: #334155; font-weight: 600; }
.checkbox-field { grid-template-columns: auto 1fr; align-items: center; }
.checkbox-field > span { grid-column: 2; }
.checkbox-field input { grid-column: 1; grid-row: 1; width: 16px; height: 16px; }
.item-list { display: grid; gap: 12px; padding: 22px; border-top: 1px solid #f1f5f9; }
.item-card { padding: 17px; border: 1px solid var(--border); border-radius: 10px; background: #fbfdff; }
.item-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.item-heading strong { color: #475569; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.item-heading img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.delete-field { display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: 12px; }
.form-actions { display: flex; align-items: center; gap: 13px; padding: 17px 22px; border-top: 1px solid var(--border); }
.form-actions span { color: var(--muted); font-size: 12px; }
.form-alert { margin: 15px 22px 0; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 7px; background: #fef2f2; color: #991b1b; font-size: 12px; }
.form-alert ul { margin: 0; padding-left: 18px; }
.info-panel { margin: 22px; padding: 17px; border: 1px dashed #cbd5e1; border-radius: 9px; background: #f8fafc; }
.info-panel p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.toast-stack { position: fixed; z-index: 10; top: 18px; right: 22px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; box-shadow: 0 10px 30px rgb(15 23 42 / .12); }
.toast.success { border-color: #bbf7d0; }
.toast.error { border-color: #fecaca; }
.empty-card, .empty-page { text-align: center; }
.empty-card { min-height: 360px; display: grid; place-items: center; align-content: center; padding: 48px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #fff; }
.empty-card h2, .empty-page h1 { margin: 14px 0 8px; letter-spacing: -.025em; }
.empty-card p, .empty-page p { max-width: 440px; margin-bottom: 8px; color: var(--muted); line-height: 1.6; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #18181b; color: #fff; font-size: 20px; font-weight: 750; }
.empty-page { min-height: 80vh; display: grid; place-items: center; align-content: center; }
.narrow { max-width: 700px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0, #fff 0, #f8fafc 44%, #f1f5f9 100%); }
.login-card { width: min(430px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgb(15 23 42 / .09); }
.login-brand { padding: 0; margin-bottom: 36px; }
.login-copy h1 { margin-bottom: 8px; font-size: 28px; letter-spacing: -.04em; }
.login-copy p { margin-bottom: 24px; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 7px; color: #334155; font-size: 13px; font-weight: 600; }
.login-form input { min-height: 42px; padding: 8px 11px; border: 1px solid #cbd5e1; border-radius: 7px; }
.login-form input:focus { outline: none; border-color: #64748b; box-shadow: 0 0 0 3px rgb(148 163 184 / .22); }
.login-form .form-alert { margin: 0; }
.login-help { margin: 20px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.login-help a, .consent-copy a { text-decoration: underline; }
.login-form small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.login-form em { color: var(--danger); font-size: 12px; font-style: normal; }
.login-form label:has(.auth-checkbox) { grid-template-columns: auto 1fr; align-items: center; }
.login-form label:has(.auth-checkbox) .auth-checkbox { grid-column: 1; grid-row: 1; width: 18px; height: 18px; min-height: 0; }
.consent-copy { margin: -4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.onboarding-page { min-height: 100vh; background: #f8fafc; }
.onboarding-header { min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 28px; border-bottom: 1px solid var(--border); background: #fff; }
.onboarding-header > span { color: var(--muted); font-size: 12px; }
.onboarding-header form { justify-self: end; }
.onboarding-header .logout { width: auto; }
.onboarding-shell { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 45px 0 90px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 26px; }
.stepper span { position: relative; display: grid; justify-items: center; gap: 7px; color: #94a3b8; }
.stepper span::before { position: absolute; z-index: -1; top: 15px; left: -50%; width: 100%; height: 1px; background: #cbd5e1; content: ""; }
.stepper span:first-child::before { display: none; }
.stepper b { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #cbd5e1; border-radius: 50%; background: #f8fafc; font-size: 12px; }
.stepper small { font-size: 11px; }
.stepper .current, .stepper .done { color: #111827; }
.stepper .current b, .stepper .done b { border-color: #111827; background: #111827; color: #fff; }
.onboarding-card { border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgb(15 23 42 / .06); overflow: hidden; }
.onboarding-copy { padding: 32px 36px 24px; border-bottom: 1px solid var(--border); }
.onboarding-copy h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.045em; }
.onboarding-copy p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.6; }
.onboarding-form { padding: 28px 36px 34px; }
.compact-onboarding { padding: 0; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.wizard-service-list { display: grid; gap: 14px; }
.wizard-service { padding: 20px; border: 1px solid var(--border); border-radius: 11px; background: #fbfdff; }
.wizard-service > strong { display: block; margin-bottom: 16px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.block-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.block-choice-grid label { display: flex; align-items: flex-start; gap: 11px; min-height: 76px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.block-choice-grid label:has(input:checked) { border-color: #94a3b8; background: #f8fafc; box-shadow: inset 0 0 0 1px #cbd5e1; }
.block-choice-grid input { width: 17px; height: 17px; margin-top: 2px; }
.block-choice-grid span { display: grid; gap: 4px; }
.block-choice-grid small { color: var(--muted); font-size: 10px; }
.draft-notice { margin-top: 22px; padding: 16px 18px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.draft-notice p { margin: 5px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }

.analytics-page { width: min(1180px, calc(100% - 64px)); }
.analytics-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 8px; }
.analytics-header .eyebrow { margin-bottom: 8px; color: #64748b; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.analytics-header h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.05em; }
.analytics-header p:not(.eyebrow) { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.55; }
.period-picker { display: flex; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.period-picker a { padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.period-picker a.active { background: #18181b; color: #fff; }
.report-range { margin: 0 0 24px; color: #94a3b8; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.metric-card, .analytics-card { border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgb(15 23 42 / .035); }
.metric-card { display: grid; gap: 5px; padding: 20px; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-card strong { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.05em; }
.metric-card small { color: #94a3b8; font-size: 11px; }
.analytics-card { padding: 22px; }
.trend-card { margin-bottom: 12px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.card-heading h2 { margin-bottom: 5px; font-size: 16px; letter-spacing: -.02em; }
.card-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.bar-chart { min-height: 220px; display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding: 12px 2px 0; border-bottom: 1px solid var(--border); }
.bar-column { min-width: 8px; flex: 1 0 8px; display: grid; grid-template-rows: 18px 160px 24px; align-items: end; justify-items: center; }
.bar-value { color: #64748b; font-size: 9px; }
.bar { width: min(70%, 22px); min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #334155, #0f172a); transition: opacity .15s ease; }
.bar-column:hover .bar { opacity: .7; }
.bar-column small { align-self: center; color: #94a3b8; font-size: 9px; white-space: nowrap; }
.empty-analytics { min-height: 190px; display: grid; place-items: center; align-content: center; padding: 24px; border: 1px dashed #cbd5e1; border-radius: 10px; text-align: center; }
.empty-analytics p { max-width: 480px; margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.analytics-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.action-list { display: grid; gap: 0; margin: 0; }
.action-list div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #f1f5f9; }
.action-list div:first-child { border-top: 0; }
.action-list dt { display: flex; align-items: center; gap: 9px; color: #475569; }
.action-list dd { margin: 0; font-size: 18px; font-weight: 750; }
.action-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.messenger-dot { background: #0ea5e9; }
.form-dot { background: #22c55e; }
.funnel-list { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.funnel-list li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px 12px; }
.funnel-list li > div:first-child { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; color: #475569; }
.funnel-list li > div:first-child strong { color: var(--foreground); }
.funnel-track { height: 7px; overflow: hidden; border-radius: 20px; background: #e2e8f0; }
.funnel-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: #18181b; }
.funnel-list small { align-self: center; color: var(--muted); text-align: right; }
.analytics-table-wrap { overflow-x: auto; }
.analytics-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.analytics-table th, .analytics-table td { padding: 11px 8px; border-top: 1px solid #f1f5f9; text-align: right; }
.analytics-table th { color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.analytics-table th:first-child, .analytics-table td:first-child { padding-left: 0; text-align: left; }
.analytics-table td:first-child { max-width: 240px; overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.table-empty { margin: 0; padding: 24px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.table-empty code { padding: 2px 5px; border-radius: 4px; background: #f1f5f9; }
.analytics-note { padding: 18px 20px; border: 1px solid #bfdbfe; border-radius: 11px; background: #eff6ff; }
.analytics-note strong { font-size: 12px; }
.analytics-note p { margin: 5px 0 0; color: #475569; font-size: 11px; line-height: 1.6; }

.leads-page { width: min(1040px, calc(100% - 64px)); }
.lead-filters { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.lead-filters a { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 650; }
.lead-filters a span { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #f1f5f9; color: #475569; text-align: center; }
.lead-filters a.active { border-color: #18181b; background: #18181b; color: #fff; }
.lead-filters a.active span { background: #3f3f46; color: #fff; }
.lead-list { display: grid; gap: 12px; }
.lead-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 22px; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: 0 4px 18px rgb(15 23 42 / .035); }
.lead-card.completed { background: #fafafa; }
.lead-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.lead-heading h2 { margin-bottom: 4px; font-size: 18px; letter-spacing: -.025em; }
.lead-heading a, .lead-details a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.lead-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.lead-badge { padding: 4px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.lead-badge.test { background: #fef3c7; color: #92400e; }
.lead-details { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 18px 0 0; }
.lead-details div { display: grid; gap: 3px; }
.lead-details dt { color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.lead-details dd { margin: 0; color: #334155; font-size: 12px; }
.lead-comment { margin-top: 18px; padding: 13px 15px; border-radius: 8px; background: #f8fafc; }
.lead-comment strong { color: #64748b; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.lead-comment p { margin: 5px 0 0; color: #334155; line-height: 1.55; }
.lead-actions { display: flex; align-items: flex-start; gap: 8px; }
.lead-actions form { margin: 0; }
.button.danger { border-color: #fecaca; background: #fff; color: var(--danger); }
.button.danger:hover { background: #fef2f2; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.pagination span { color: var(--muted); font-size: 12px; }

.payment-page { width: min(1120px, calc(100% - 64px)); }
.offer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.offer-card { position: relative; min-height: 148px; display: grid; align-content: start; gap: 8px; padding: 20px; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgb(15 23 42 / .035); }
.offer-card span { color: var(--muted); font-size: 12px; font-weight: 650; }
.offer-card strong { font-size: 27px; letter-spacing: -.045em; }
.offer-card strong s { margin-right: 5px; color: #94a3b8; font-size: 18px; font-weight: 600; text-decoration-thickness: 2px; }
.offer-card small { margin-top: auto; color: #64748b; line-height: 1.45; }
.offer-card.featured { border-color: #bfdbfe; background: #eff6ff; }
.offer-card.annual { border-color: #bbf7d0; background: #f0fdf4; }
.offer-card.promo { border-color: #fed7aa; background: #fff7ed; }
.billing-form { display: grid; gap: 14px; }
.payment-card { min-width: 0; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgb(15 23 42 / .04); }
.form-section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.form-section-heading > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #18181b; color: #fff; font-size: 11px; font-weight: 750; }
.form-section-heading h2, .payment-card h2 { margin-bottom: 5px; font-size: 18px; letter-spacing: -.025em; }
.form-section-heading p, .status-card > p, .domain-progress p { margin: 0; color: var(--muted); line-height: 1.55; }
.choice-fieldset { margin: 0 0 20px; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: 9px; color: #334155; font-size: 13px; font-weight: 700; }
.billing-radio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.billing-radio label { min-height: 56px; display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; color: #334155; cursor: pointer; line-height: 1.35; }
.billing-radio label:has(input:checked) { border-color: #18181b; background: #f8fafc; box-shadow: inset 0 0 0 1px #18181b; }
.billing-radio input, .billing-checkbox { width: 17px; height: 17px; flex: 0 0 auto; accent-color: #18181b; }
.choice-fieldset .errorlist, .field .errorlist, .form-section > .errorlist { margin: 7px 0 0; padding: 0; color: var(--danger); font-size: 12px; list-style: none; }
.domain-price-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; margin-bottom: 17px; padding: 14px 16px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.domain-price-note strong { overflow: hidden; text-overflow: ellipsis; }
.domain-price-note span { color: #166534; font-weight: 750; }
.domain-price-note small { grid-column: 1 / -1; color: #475569; line-height: 1.5; }
.domain-input-wrap { display: flex; align-items: stretch; }
.domain-input-wrap .ui-input { min-width: 0; border-radius: 8px 0 0 8px; }
.domain-input-wrap .ui-input:only-child { border-radius: 8px; }
.domain-suffix { display: flex; align-items: center; padding: 0 12px; border: 1px solid #cbd5e1; border-left: 0; border-radius: 0 8px 8px 0; background: #f8fafc; color: #475569; font-size: 13px; white-space: nowrap; }
.domain-suffix[hidden] { display: none; }
.domain-input-wrap:has(.domain-suffix[hidden]) .ui-input { border-radius: 8px; }
.billing-form:has([name="order-domain_option"][value="own"]:checked) .domain-suffix,
.billing-form:has([name="order-domain_option"][value="managed"]:checked) .domain-suffix { display: none; }
.billing-noscript { margin: -6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.billing-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.billing-field-grid .field:has(input[name$="legal_name"]), .billing-field-grid .field:has(input[name$="legal_address"]), .billing-field-grid .field:has(input[name$="postal_address"]) { grid-column: 1 / -1; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: #334155; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.45; }
.check-row input { margin-top: 1px; }
.registrant-details { margin: 18px 0; border: 1px solid var(--border); border-radius: 10px; }
.registrant-details summary { padding: 13px 15px; color: #475569; cursor: pointer; font-weight: 650; }
.registrant-details .billing-field-grid { padding: 4px 15px 17px; }
.consent-row { padding-top: 18px; border-top: 1px solid var(--border); }
.submit-order { position: sticky; z-index: 3; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border: 1px solid #d4d4d8; border-radius: 12px; background: rgb(255 255 255 / .96); box-shadow: 0 16px 42px rgb(15 23 42 / .14); backdrop-filter: blur(12px); }
.submit-order > div { display: grid; gap: 3px; }
.submit-order span { color: var(--muted); font-size: 11px; }
.payment-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.status-card { min-height: 285px; }
.payment-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.status-pill { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.status-pill.paid, .status-pill.completed, .status-pill.active { background: #dcfce7; color: #166534; }
.status-pill.provisioning, .status-pill.issued { background: #dbeafe; color: #1d4ed8; }
.status-pill.cancelled { background: #fee2e2; color: #991b1b; }
.summary-list { display: grid; gap: 0; margin: 18px 0 0; }
.summary-list div { min-width: 0; display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid #f1f5f9; }
.summary-list dt { color: #64748b; }
.summary-list dd { margin: 0; font-weight: 700; text-align: right; }
.summary-list .gift-line dd { color: #166534; }
.summary-list .summary-total { padding-top: 14px; color: #111827; font-size: 16px; }
.summary-list .summary-total dt { color: inherit; font-weight: 750; }
.compact-summary { margin-bottom: 18px; font-size: 12px; }
.domain-progress, .subscription-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: 30px; margin-bottom: 14px; }
.domain-progress h2 { overflow-wrap: anywhere; }
.domain-note, .dns-instructions { display: grid; align-content: start; gap: 6px; padding: 15px; border-radius: 10px; background: #f8fafc; color: #475569; }
.domain-note span, .dns-instructions span { font-size: 12px; line-height: 1.5; }
.dns-instructions code { overflow-x: auto; padding: 7px 9px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; color: #0f172a; font-size: 11px; }

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-header { position: sticky; z-index: 8; top: 0; min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / .94); backdrop-filter: blur(12px); }
  .mobile-header .brand { padding: 0; }
  .mobile-site { max-width: 45vw; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .page { width: min(100% - 32px, 680px); padding: 30px 0 96px; }
  .mobile-nav { position: fixed; z-index: 9; right: 12px; bottom: 12px; left: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; border: 1px solid var(--border); border-radius: 13px; background: rgb(255 255 255 / .96); box-shadow: 0 12px 36px rgb(15 23 42 / .16); backdrop-filter: blur(12px); }
  .mobile-nav a { display: grid; place-items: center; gap: 2px; min-height: 48px; border-radius: 9px; color: var(--muted); font-size: 11px; }
  .mobile-nav a span { font-size: 17px; }
  .mobile-nav a.active { background: #f1f5f9; color: #111827; font-weight: 650; }
  .mobile-nav.guest-nav { grid-template-columns: repeat(3, 1fr); }
  .mobile-nav.guest-nav form { display: grid; }
  .mobile-nav.guest-nav button { display: grid; place-items: center; gap: 2px; min-height: 48px; padding: 0; border: 0; border-radius: 9px; background: #18181b; color: #fff; font-size: 11px; cursor: pointer; }
  .mobile-nav.guest-nav button span { font-size: 17px; }
  .toast-stack { top: 68px; right: 16px; left: 16px; }
  .toast { max-width: none; }
  .onboarding-header { grid-template-columns: 1fr auto; padding: 0 16px; }
  .onboarding-header > span { display: none; }
  .block-choice-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-page { width: min(100% - 32px, 680px); }
  .analytics-header { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-columns { grid-template-columns: 1fr; }
  .leads-page { width: min(100% - 32px, 680px); }
  .payment-page { width: min(100% - 32px, 680px); }
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-status-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-card { grid-template-columns: 1fr; gap: 18px; }
  .lead-actions { padding-top: 16px; border-top: 1px solid var(--border); }
}

@media (max-width: 560px) {
  .page-heading { display: grid; }
  .page-heading .button { width: 100%; }
  .status-strip { align-items: flex-start; flex-wrap: wrap; }
  .status-strip span:last-child { flex-basis: 100%; padding-left: 17px; }
  .block-card summary { grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 10px; padding: 13px; }
  .block-card summary .badge { display: none; }
  .block-title small { font-size: 11px; }
  .field-grid { grid-template-columns: 1fr; padding: 17px; }
  .field:has(textarea), .field:has(input[type=file]) { grid-column: auto; }
  .block-toolbar, .item-list { padding: 17px; }
  .switch-row { align-items: flex-start; }
  .switch-row small { max-width: 220px; }
  .form-actions { align-items: stretch; flex-direction: column; padding: 15px 17px; }
  .form-actions .button { width: 100%; }
  .login-card { padding: 24px; }
  .onboarding-shell { width: min(100% - 24px, 680px); padding-top: 24px; }
  .onboarding-copy, .onboarding-form { padding: 22px 18px; }
  .stepper small { display: none; }
  .block-choice-grid { grid-template-columns: 1fr; }
  .wizard-actions { align-items: stretch; flex-direction: column-reverse; }
  .wizard-actions .button { width: 100%; }
  .period-picker { width: 100%; }
  .period-picker a { flex: 1; text-align: center; }
  .metric-card { padding: 16px; }
  .analytics-card { padding: 17px; }
  .lead-heading { align-items: flex-start; flex-direction: column; }
  .lead-badges { justify-content: flex-start; }
  .lead-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-actions { align-items: stretch; flex-direction: column; }
  .lead-actions .button, .lead-actions form { width: 100%; }
  .pagination { flex-wrap: wrap; }
  .offer-grid, .billing-radio, .billing-field-grid { grid-template-columns: 1fr; }
  .billing-field-grid .field:has(input[name$="legal_name"]), .billing-field-grid .field:has(input[name$="legal_address"]), .billing-field-grid .field:has(input[name$="postal_address"]) { grid-column: auto; }
  .payment-card { padding: 18px; }
  .payment-card-heading { flex-wrap: wrap; }
  .summary-list dt { min-width: 0; overflow-wrap: anywhere; }
  .domain-progress, .subscription-card { grid-template-columns: 1fr; gap: 16px; }
  .submit-order { align-items: stretch; flex-direction: column; }
  .submit-order .button { width: 100%; }
}
