:root {
  color-scheme: dark;
  --navy: #111827;
  --navy-2: #1b2536;
  --red: #e54858;
  --red-dark: #c93647;
  --white: #f8fafc;
  --ink: #edf2f7;
  --muted: #91a0b5;
  --line: #273245;
  --surface: #080d15;
  --success: #3fc48d;
  --radius: 16px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 85% 0%, #172033 0, var(--surface) 32rem); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input { font: inherit; }
select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar { min-height: 78px; padding: 14px clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: rgba(8, 13, 21, .94); color: white; border-bottom: 1px solid rgba(229, 72, 88, .48); box-shadow: 0 8px 30px rgba(0,0,0,.22); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 14px; color: white; text-decoration: none; }
.brand-logo { display: block; width: auto; height: 49px; object-fit: contain; }
.brand-tagline { max-width: 160px; color: #bcccdc; font-size: .67rem; line-height: 1.35; letter-spacing: .03em; }

.auth-shell { min-height: calc(100vh - 78px); display: grid; grid-template-columns: 1fr minmax(340px, 470px); align-items: center; gap: clamp(40px, 9vw, 130px); padding: 60px clamp(24px, 9vw, 150px); background: radial-gradient(circle at 15% 30%, #1c2840 0, #0d1421 34%, var(--surface) 68%); }
.auth-copy { color: white; max-width: 560px; }
.auth-copy h1 { margin: 8px 0 18px; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: 1.03; letter-spacing: -.055em; }
.auth-copy > p:last-child { color: #bcccdc; font-size: 1.05rem; max-width: 430px; }
.eyebrow { margin: 0; color: var(--red); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.card { background: linear-gradient(145deg, #151e2d, #101722); border: 1px solid rgba(145, 160, 181, .18); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { padding: clamp(24px, 4vw, 42px); }
.auth-card h2 { margin: 0; font-size: 1.75rem; }
.muted, .section-heading p, .inline-confirm p { color: var(--muted); }
.auth-card label { margin-top: 20px; }

label { display: grid; gap: 7px; color: #cbd5e1; font-size: .82rem; font-weight: 750; }
input { width: 100%; min-height: 46px; padding: 10px 13px; color: var(--ink); background: #0a111d; border: 1px solid #344156; border-radius: 9px; outline: none; transition: border-color .15s, box-shadow .15s; }
select, textarea { width: 100%; padding: 10px 13px; color: var(--ink); background: #0a111d; border: 1px solid #344156; border-radius: 9px; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229, 72, 88, .15); outline: none; }
input:disabled, select:disabled { color: #64748b; background: #111827; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 62px; }
.password-toggle { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); padding: 7px; color: var(--navy); background: transparent; border: 0; font-size: .75rem; font-weight: 800; }
.hint { margin: 7px 0 0; color: var(--muted); font-size: .77rem; }
.button { min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.button-primary { color: white; background: linear-gradient(135deg, #ef5968, #c93647); box-shadow: 0 8px 22px rgba(229,72,88,.18); }
.button-primary:hover { background: linear-gradient(135deg, #fa6a77, #d64050); }
.button-secondary { color: #d8e0eb; background: #1a2433; border-color: #344156; }
.button-danger { color: white; background: #c84c59; }
.button-danger:hover { background: #ae3947; }
.button-outline-danger { color: #ff8d98; background: transparent; border-color: #b94a57; }
.button-quiet { color: inherit; background: transparent; border-color: currentColor; }
.button-full { width: 100%; margin-top: 26px; }
.notice { margin: 16px 0; padding: 11px 13px; color: #8a1c26; background: #fff0f1; border-left: 3px solid var(--red); border-radius: 5px; font-size: .85rem; }
.notice.success { color: #0e5f39; background: #e9f8f1; border-color: var(--success); }

.settings { display: grid; grid-template-columns: 260px minmax(0, 900px); gap: clamp(30px, 6vw, 90px); max-width: 1300px; margin: 0 auto; padding: 52px 28px 90px; }
.settings.account-dashboard { display: block; max-width: 1180px; }
.account-dashboard .settings-content { width: 100%; }
.sidebar { position: sticky; top: 34px; align-self: start; }
.sidebar h1 { margin: 6px 0 28px; font-size: 1.9rem; letter-spacing: -.035em; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { padding: 11px 13px; color: var(--muted); border-left: 3px solid transparent; text-decoration: none; font-size: .88rem; font-weight: 700; }
.sidebar nav a:hover, .sidebar nav a.active { color: var(--navy); background: white; border-left-color: var(--red); }
.page-intro { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.page-intro h2 { margin: 4px 0 0; max-width: 600px; font-size: clamp(1.55rem, 3vw, 2.4rem); letter-spacing: -.04em; }
.avatar { flex: none; width: 58px; height: 58px; display: grid; place-items: center; color: white; background: var(--navy); border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 2px var(--red); font-weight: 800; }
.section-card { margin-bottom: 22px; padding: clamp(22px, 4vw, 34px); scroll-margin-top: 18px; }
.section-heading { display: flex; gap: 14px; margin-bottom: 28px; }
.section-heading .icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 10px; font-size: .72rem; font-weight: 900; }
.section-heading h3 { margin: 0; color: var(--navy); font-size: 1.25rem; }
.section-heading p { margin: 3px 0 0; font-size: .87rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.actions { margin-top: 20px; display: flex; justify-content: flex-end; }
hr { margin: 28px 0; border: 0; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; margin: 0 -8px 28px; }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th, td { padding: 12px 9px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-weight: 800; text-transform: capitalize; }
.status::before { width: 6px; height: 6px; content: ""; background: currentColor; border-radius: 50%; }
.status.successful { color: var(--success); background: #e9f8f1; }
.status.failed { color: var(--red-dark); background: #fff0f1; }
.inline-confirm { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(200px, 270px) auto; align-items: end; gap: 16px; }
.inline-confirm strong { color: var(--navy); }
.inline-confirm p { margin: 3px 0 0; font-size: .8rem; }
.inline-confirm .notice { grid-column: 1 / -1; margin: 0; }
.warning-card { border-left: 4px solid #f0a202; }
.danger-card { border-left: 4px solid var(--red); }
.danger-card .icon { background: var(--red); }
.create-account-panel { margin-bottom: 26px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.create-account-panel summary { display: inline-flex; list-style: none; }
.create-account-panel summary::-webkit-details-marker { display: none; }
.create-account-panel form { margin-top: 22px; }
.account-list { display: grid; gap: 10px; }
.account-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) auto minmax(390px, auto); align-items: center; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.account-actions .button { min-height: 36px; padding: 7px 11px; font-size: .76rem; }
.account-row strong, .account-row small { display: block; overflow: hidden; text-overflow: ellipsis; }
.account-row small { color: var(--muted); }
.master-badge { color: var(--navy); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.dialog-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: var(--muted); font-size: 1.7rem; }
#manage-account-dialog { text-align: left; max-height: 90vh; overflow-y: auto; }
#manage-account-dialog label { margin-top: 14px; }
#account-action-dialog label { margin-top: 18px; text-align: left; }
.dashboard-tabs { display: flex; gap: 8px; margin: -8px 0 24px; }
.merchant-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; gap: 10px; margin-bottom: 22px; }
.merchant-table-wrap { margin-bottom: 0; }
.merchant-table { min-width: 1150px; }
.merchant-table td { vertical-align: middle; }
.merchant-table .button { min-height: 32px; padding: 5px 9px; font-size: .72rem; }
.merchant-actions { display: flex; gap: 5px; }
.wide-dialog { width: min(900px, calc(100% - 30px)); max-height: 92vh; overflow-y: auto; text-align: left; }
.step-indicator { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 0; margin: 24px 0; list-style: none; counter-reset: steps; }
.step-indicator li { color: var(--muted); border-top: 3px solid var(--line); padding-top: 7px; font-size: .72rem; font-weight: 800; }
.step-indicator li.active { color: var(--navy); border-color: var(--red); }
.merchant-step h3 { color: var(--navy); }
.merchant-step .span-2 { grid-column: 1 / -1; }
.generate-password { margin-top: 18px; }
.check-label { display: flex; align-items: center; align-self: end; min-height: 46px; }
.check-label input { width: auto; min-height: 0; }
.link-preview, .credential-box { margin-top: 18px; padding: 18px; background: var(--surface); border: 1px dashed #9fb3c8; border-radius: 10px; color: var(--navy); }
.slug-feedback { min-height: 24px; margin-top: 5px; font-size: .8rem; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-item { padding: 11px; background: var(--surface); border-radius: 8px; }
.review-item small, .review-item strong { display: block; }
.review-item small { color: var(--muted); }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 28px; }
.credential-box span, .credential-box strong { display: block; padding: 5px; overflow-wrap: anywhere; }
.public-business { min-height: calc(100vh - 78px); padding-bottom: 70px; }
.business-cover { height: min(38vw, 390px); min-height: 190px; background: linear-gradient(135deg, var(--navy), #486581); background-size: cover; background-position: center; }
.business-profile { position: relative; width: min(850px, calc(100% - 30px)); margin: -55px auto 0; padding: clamp(25px, 5vw, 48px); }
.business-profile h1 { margin: 7px 0; color: var(--navy); font-size: clamp(2rem, 5vw, 3.5rem); }
.business-logo { width: 100px; height: 100px; object-fit: cover; border: 5px solid white; border-radius: 20px; box-shadow: var(--shadow); }
.public-booking-panel { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.booking-success { margin-top: 18px; padding: 22px; color: #b7f5d7; background: rgba(63,196,141,.12); border: 1px solid rgba(63,196,141,.35); border-radius: 10px; font-weight: 750; text-align: center; }
.merchant-layout { min-height: calc(100vh - 78px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.merchant-sidebar { padding: 30px 18px; color: white; background: var(--navy); }
.merchant-identity { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; border-bottom: 1px solid rgba(255,255,255,.13); }
.merchant-identity .avatar { width: 44px; height: 44px; box-shadow: none; border: 0; background: var(--red); }
.merchant-identity strong, .merchant-identity small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-identity small { color: #bcccdc; font-size: .72rem; }
.merchant-sidebar nav { display: grid; gap: 6px; margin-top: 24px; }
.merchant-nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; color: #bcccdc; background: transparent; border: 0; border-radius: 9px; text-align: left; font-weight: 750; }
.merchant-nav-link span { width: 20px; color: var(--red); text-align: center; }
.merchant-nav-link:hover, .merchant-nav-link.active { color: white; background: rgba(255,255,255,.1); }
.merchant-main { min-width: 0; padding: clamp(25px, 5vw, 60px); }
.merchant-main .page-intro h1 { margin-bottom: 4px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.metric-card { display: flex; align-items: center; gap: 16px; min-height: 145px; padding: 24px; }
.metric-card p { margin: 0 0 7px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.metric-card strong { display: block; color: var(--navy); font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1; letter-spacing: -.04em; }
.metric-card small { display: block; margin-top: 10px; color: #829ab1; font-size: .69rem; }
.metric-icon { flex: none; width: 48px; height: 48px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 13px; font-size: 1.2rem; font-weight: 900; }
.metric-icon.sales { background: var(--success); }
.metric-icon.customers { background: var(--red); }
.heading-with-action { align-items: center; }
.heading-with-action > div:nth-child(2) { flex: 1; }
.service-create-form { margin: 0 0 24px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.required-label, .optional-label { margin-left: 5px; font-size: .65rem; font-weight: 700; }
.required-label { color: var(--red); }
.optional-label { color: var(--muted); }
.price-input { position: relative; }
.price-input > span { position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; font-weight: 800; }
.price-input input { padding-left: 42px; }
.service-list { display: grid; gap: 9px; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; }
.service-row strong, .service-row small { display: block; }
.service-row small { color: var(--muted); margin-top: 2px; }
.service-row-actions { display: flex; align-items: center; gap: 7px; }
.service-row-actions .button { min-height: 34px; padding: 6px 10px; font-size: .75rem; }
.working-hours { display: grid; gap: 8px; }
.calendar-integration { display: flex; align-items: center; gap: 10px; padding: 16px; background: rgba(8, 13, 21, .62); border: 1px solid var(--line); border-radius: 10px; }
.calendar-integration > div { flex: 1; }
.calendar-integration strong, .calendar-integration small { display: block; }
.calendar-integration small { margin-top: 3px; color: var(--muted); }
.hours-row { display: grid; grid-template-columns: 110px 110px 1fr 1fr; align-items: end; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.hours-row > strong { align-self: center; color: var(--navy); }
.hours-row .check-label { align-self: center; min-height: 0; }
.hours-row.closed label:not(.check-label) { opacity: .45; }
.map-preview-wrap { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; margin-top: 18px; }
.map-preview-wrap iframe { width: 100%; height: 230px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
#business-settings-form h4 { margin: 25px 0 13px; color: var(--navy); }
.calendar-controls { display: flex; gap: 5px; margin-left: auto; }
.calendar-range { color: var(--muted); font-size: .82rem; font-weight: 700; }
.booking-calendar { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.calendar-day { min-height: 270px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.calendar-day.closed { background: #edf1f5; opacity: .7; }
.calendar-day h4 { margin: 0; color: var(--navy); }
.calendar-day > small { color: var(--muted); }
.calendar-hours { display: block; margin: 8px 0; color: var(--success); font-size: .7rem; font-weight: 800; }
.calendar-booking { margin-top: 7px; padding: 8px; color: white; background: var(--navy); border-left: 3px solid var(--red); border-radius: 6px; font-size: .69rem; }
.calendar-booking strong, .calendar-booking span { display: block; }
.daily-booking-calendar { min-height: 520px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.daily-closed { padding: 80px 20px; color: var(--muted); background: var(--surface); text-align: center; }
.daily-slot { display: grid; grid-template-columns: 95px minmax(0, 1fr); min-height: 74px; border-bottom: 1px solid var(--line); }
.daily-slot:last-child { border-bottom: 0; }
.daily-slot-time { padding: 14px; color: var(--muted); background: var(--surface); border-right: 1px solid var(--line); font-size: .78rem; font-weight: 800; }
.daily-slot-content { padding: 8px 12px; }
.daily-slot.walk-in-available { cursor: pointer; transition: background .16s ease, box-shadow .16s ease; }
.daily-slot.walk-in-available .daily-slot-content { display: flex; align-items: center; color: var(--muted); font-size: .84rem; font-weight: 700; }
.daily-slot.walk-in-available:hover, .daily-slot.walk-in-available:focus { background: rgba(185, 28, 28, .08); box-shadow: inset 3px 0 var(--red); outline: none; }
.daily-appointment { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; color: white; background: var(--navy); border-left: 4px solid var(--red); border-radius: 8px; }
.daily-appointment.completed { background: var(--success); border-left-color: #9ae6b4; }
.daily-appointment strong, .daily-appointment small { display: block; }
.daily-appointment small { color: #d9e2ec; margin-top: 2px; }
.booking-actions { display: flex; gap: 6px; }
.booking-actions .button { min-height: 32px; padding: 5px 9px; font-size: .72rem; }
.booking-actions select { min-width: 125px; min-height: 36px; padding: 6px 9px; color: var(--navy); background: white; border: 0; border-radius: 7px; font-size: .75rem; font-weight: 750; }
.completed-label { display: inline-flex; align-items: center; padding: 7px 11px; color: #0b4d2e; background: #d9f5e7; border-radius: 999px; font-size: .74rem; font-weight: 850; }
.quick-ranges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.quick-ranges button { padding: 7px 10px; color: var(--navy); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: .73rem; font-weight: 750; }
.quick-ranges button.active { color: white; background: var(--navy); }
.report-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.report-actions, .report-view-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: 18px; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.report-summary-card { padding: 18px; }
.report-summary-card small, .report-summary-card strong, .report-summary-card span { display: block; }
.report-summary-card small { color: var(--muted); font-weight: 750; }
.report-summary-card strong { margin: 6px 0; color: var(--navy); font-size: 1.7rem; }
.report-change { color: var(--success); font-size: .72rem; font-weight: 800; }
.report-change.negative { color: var(--red); }
.report-chart { display: grid; gap: 8px; margin: 20px 0; }
.report-bar-row { display: grid; grid-template-columns: 130px 1fr 55px; align-items: center; gap: 9px; font-size: .75rem; }
.report-bar-track { height: 10px; overflow: hidden; background: var(--line); border-radius: 999px; }
.report-bar-fill { height: 100%; background: var(--navy); border-radius: inherit; }
.report-table { min-width: 760px; }
.report-empty { padding: 60px 20px; color: var(--muted); text-align: center; }
.report-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.report-directory a { display: block; padding: 20px; color: var(--navy); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; text-decoration: none; transition: transform .15s, border-color .15s; }
.report-directory a:hover { transform: translateY(-2px); border-color: var(--navy); }
.report-directory strong, .report-directory span { display: block; }
.report-directory span { margin-top: 5px; color: var(--muted); font-size: .8rem; }
.standalone-report { width: min(1180px, calc(100% - 30px)); margin: 0 auto; padding: 45px 0 80px; }
.booking-preview-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.booking-preview-brand { padding: 22px; color: white; background: var(--navy); }
.booking-preview-brand h3 { margin: 5px 0; font-size: 1.5rem; }
.booking-preview-brand .muted { color: #bcccdc; }
#test-booking-form { padding: 22px; }
.managed-status-actions { display: flex; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }

dialog { width: min(440px, calc(100% - 32px)); padding: 30px; border: 0; border-radius: var(--radius); box-shadow: 0 24px 70px rgba(16,42,67,.35); text-align: center; }
dialog::backdrop { background: rgba(16, 42, 67, .72); backdrop-filter: blur(2px); }
.dialog-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto; color: white; background: var(--red); border-radius: 50%; font-size: 1.4rem; font-weight: 900; }
dialog h2 { margin-bottom: 6px; color: var(--navy); }
dialog p { color: var(--muted); }
.dialog-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.dialog-actions .button-quiet { color: var(--navy); }

/* Dark premium finish */
.auth-copy > p:last-child, .brand-tagline, .merchant-identity small { color: #91a0b5; }
.auth-card h2, .page-intro h1, .page-intro h2, .sidebar h1,
.section-heading h3, .merchant-step h3, .business-profile h1,
.metric-card strong, .hours-row > strong, #business-settings-form h4,
.calendar-day h4, .report-summary-card strong, dialog h2,
.inline-confirm strong, .master-badge, .link-preview, .credential-box {
  color: var(--ink);
}
.eyebrow, .required-label { color: #ff6f7c; }
.sidebar nav a:hover, .sidebar nav a.active { color: var(--ink); background: #151e2d; }
.avatar { color: white; background: linear-gradient(135deg, #ef5968, #b92f40); border-color: #182131; box-shadow: 0 0 0 2px var(--red); }
.section-heading .icon, .metric-icon { color: white; background: linear-gradient(135deg, #ef5968, #b92f40); box-shadow: inset 0 1px rgba(255,255,255,.2); }
.merchant-sidebar { background: linear-gradient(180deg, #101827 0%, #080d15 100%); border-right: 1px solid var(--line); }
.merchant-identity { border-bottom-color: var(--line); }
.merchant-identity .avatar { color: white; background: linear-gradient(135deg, #ef5968, #b92f40); }
.merchant-nav-link { color: #8796ab; }
.merchant-nav-link span { color: #f06472; }
.merchant-nav-link:hover, .merchant-nav-link.active { color: #f8fafc; background: linear-gradient(90deg, rgba(229,72,88,.18), rgba(229,72,88,.04)); box-shadow: inset 2px 0 var(--red); }
.metric-icon.sales { color: #071a12; background: linear-gradient(135deg, #57d9a2, #248b64); }
.metric-icon.customers { color: #fff; background: linear-gradient(135deg, #8f6fbd, #58407d); }
.account-row, .service-create-form, .hours-row, .calendar-day,
.review-item, .report-directory a, .quick-ranges button, .daily-closed,
.daily-slot-time { background: rgba(8, 13, 21, .62); }
.calendar-day.closed { background: #0b111b; }
.service-row { background: rgba(8, 13, 21, .28); }
.link-preview, .credential-box { border-color: #56657b; background: #0a111d; }
.calendar-booking, .daily-appointment { background: linear-gradient(135deg, #24334a, #182235); border-left-color: var(--red); }
.daily-appointment.completed { background: linear-gradient(135deg, #176747, #124c37); border-left-color: #65d6a6; }
.daily-appointment small { color: #b7c3d3; }
.booking-actions select { color: var(--ink); background: #0a111d; border: 1px solid #3a475b; }
.completed-label { color: #b7f5d7; background: rgba(63,196,141,.16); }
.quick-ranges button { color: #cbd5e1; }
.quick-ranges button.active { color: white; background: var(--red); border-color: var(--red); }
.report-bar-track { background: #283448; }
.report-bar-fill { background: linear-gradient(90deg, #b92f40, #f06472); }
.report-directory a { color: var(--ink); }
.report-directory a:hover { border-color: var(--red); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.booking-preview-brand { background: linear-gradient(135deg, #202c40, #111827); border-bottom: 1px solid rgba(229,72,88,.32); }
.notice { color: #ffb4bb; background: rgba(174,57,71,.15); border-color: #d45c68; }
.notice.success { color: #91e6bd; background: rgba(63,196,141,.12); border-color: var(--success); }
.status.successful { color: #7ee2b8; background: rgba(63,196,141,.12); }
.status.failed { color: #ff929d; background: rgba(200,76,89,.14); }
.warning-card { border-left-color: var(--red); }
.danger-card { border-left-color: #c84c59; }
.danger-card .icon { color: white; background: #b53f4c; }
dialog { color: var(--ink); background: #121b29; border: 1px solid var(--line); }
dialog::backdrop { background: rgba(2, 6, 12, .82); backdrop-filter: blur(5px); }
.dialog-actions .button-quiet, .password-toggle { color: #ff6f7c; }
th { color: #8796ab; }
tbody tr:hover { background: rgba(229,72,88,.045); }
::selection { color: white; background: #c93647; }

@media (max-width: 850px) {
  .auth-shell { grid-template-columns: 1fr; background: radial-gradient(circle at 50% 0, #1c2840, var(--surface) 65%); padding-top: 50px; }
  .auth-copy h1 { font-size: 2.6rem; }
  .settings { grid-template-columns: 1fr; padding-top: 30px; }
  .sidebar { position: static; }
  .sidebar h1 { margin-bottom: 14px; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .sidebar nav a.active { border-bottom-color: var(--red); }
  .field-grid.three { grid-template-columns: 1fr; }
  .inline-confirm { grid-template-columns: 1fr; align-items: stretch; }
  .account-row { grid-template-columns: 1fr auto; }
  .account-row .account-email { grid-column: 1; }
  .account-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .merchant-toolbar { grid-template-columns: 1fr; }
  .step-indicator li { font-size: 0; }
  .review-grid { grid-template-columns: 1fr; }
  .merchant-layout { grid-template-columns: 1fr; }
  .merchant-sidebar { padding: 14px; }
  .merchant-identity { display: none; }
  .merchant-sidebar nav { grid-template-columns: repeat(5, 1fr); margin: 0; gap: 3px; }
  .merchant-nav-link { justify-content: center; padding: 10px 5px; font-size: .7rem; }
  .merchant-nav-link span { display: none; }
  .merchant-main { padding: 25px 14px; }
  .metric-grid { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: 1fr 1fr; }
  .calendar-integration { align-items: stretch; flex-direction: column; }
  .map-preview-wrap { grid-template-columns: 1fr; }
  .report-filter-grid, .report-summary-grid { grid-template-columns: 1fr 1fr; }
  .report-actions, .report-view-toolbar { align-items: stretch; flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .report-filter-grid, .report-summary-grid { grid-template-columns: 1fr; }
  .report-directory { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .topbar { padding-inline: 16px; }
  .brand-tagline { display: none; }
  .auth-shell { padding: 38px 16px; }
  .settings { padding-inline: 14px; }
  .page-intro { align-items: flex-start; }
  .field-grid { grid-template-columns: 1fr; }
  .section-card { border-radius: 12px; }
}

/* Public marketing site */
.landing-body { background: #080d15; overflow-x: hidden; }
.landing-header { width: min(1240px, calc(100% - 40px)); min-height: 84px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.landing-nav { display: flex; align-items: center; gap: 22px; }
.landing-nav > a:not(.button) { color: var(--muted); text-decoration: none; font-weight: 750; }
.landing-nav > a:not(.button):hover { color: var(--white); }
.landing-hero { width: min(1240px, calc(100% - 40px)); min-height: 720px; margin: 0 auto; padding: 90px 0 110px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, .9fr); align-items: center; gap: clamp(50px, 8vw, 110px); position: relative; }
.landing-hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; top: 60px; background: rgba(229, 72, 88, .16); filter: blur(110px); border-radius: 50%; pointer-events: none; }
.landing-hero-copy { position: relative; z-index: 1; }
.landing-hero h1 { max-width: 760px; margin: 12px 0 24px; font-size: clamp(3rem, 6vw, 5.8rem); line-height: .98; letter-spacing: -.065em; color: var(--white); }
.landing-lead { max-width: 680px; margin: 0; color: #aeb9c9; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.75; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.landing-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--muted); font-size: .84rem; font-weight: 800; }
.landing-trust span::before { content: "✓"; margin-right: 7px; color: var(--success); }
.landing-dashboard-preview { position: relative; z-index: 1; padding: 24px; border: 1px solid rgba(229, 72, 88, .35); border-radius: 24px; background: linear-gradient(145deg, rgba(27, 37, 54, .97), rgba(8, 13, 21, .98)); box-shadow: 0 35px 100px rgba(0, 0, 0, .46); transform: rotate(1.5deg); }
.landing-preview-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.landing-preview-top div { display: grid; gap: 3px; }
.landing-preview-top small, .landing-preview-metrics small, .landing-preview-calendar small { color: var(--muted); }
.status-pill { padding: 5px 10px; border-radius: 999px; color: #8ce7bc; background: rgba(63, 196, 141, .12); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.landing-preview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.landing-preview-metrics article { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(8, 13, 21, .55); display: grid; gap: 4px; }
.landing-preview-metrics strong { font-size: 1.3rem; }
.landing-preview-metrics span { color: var(--muted); font-size: .7rem; }
.landing-preview-calendar { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.landing-preview-calendar > div { min-height: 76px; padding: 12px 14px; display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.landing-preview-calendar > div:last-child { border-bottom: 0; }
.landing-preview-calendar time { color: var(--muted); font-size: .82rem; font-weight: 850; }
.landing-preview-calendar span { min-height: 48px; padding: 8px 11px; display: grid; border-left: 3px solid var(--red); border-radius: 8px; background: rgba(229, 72, 88, .08); }
.landing-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 100px 0; }
.landing-section-heading { max-width: 690px; margin-bottom: 42px; }
.landing-section-heading h2, .landing-cta h2 { margin: 8px 0 14px; color: var(--white); font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: 1.06; letter-spacing: -.045em; }
.landing-section-heading > p:last-child { color: var(--muted); font-size: 1.08rem; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.landing-feature-grid article { min-height: 250px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(27, 37, 54, .74), rgba(8, 13, 21, .7)); }
.landing-feature-grid article > span { color: var(--red); font-weight: 950; letter-spacing: .12em; }
.landing-feature-grid h3 { margin: 34px 0 10px; font-size: 1.28rem; }
.landing-feature-grid p, .landing-steps p { color: var(--muted); }
.landing-steps ol { padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; }
.landing-steps li { padding: 26px; display: flex; gap: 18px; border-top: 1px solid rgba(229, 72, 88, .55); background: rgba(27, 37, 54, .28); }
.landing-steps li > span { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--red-dark); font-weight: 900; }
.landing-steps h3 { margin: 4px 0 8px; }
.landing-steps p { margin: 0; }
.landing-cta { width: min(1180px, calc(100% - 40px)); margin: 40px auto 100px; padding: clamp(36px, 7vw, 72px); display: flex; align-items: end; justify-content: space-between; gap: 40px; border: 1px solid rgba(229, 72, 88, .5); border-radius: 24px; background: radial-gradient(circle at 90% 0, rgba(229, 72, 88, .2), transparent 45%), #111827; }
.landing-cta h2 { max-width: 720px; margin-bottom: 0; }
.landing-footer { min-height: 150px; padding: 32px max(20px, calc((100% - 1180px) / 2)); display: flex; align-items: center; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.landing-footer p:last-child { margin-left: auto; }

@media (max-width: 900px) {
  .landing-header { padding: 16px 0; align-items: flex-start; }
  .landing-nav > a:not(.button), .landing-nav .button-secondary { display: none; }
  .landing-hero { min-height: auto; padding-top: 70px; grid-template-columns: 1fr; }
  .landing-dashboard-preview { max-width: 650px; transform: none; }
  .landing-feature-grid, .landing-steps ol { grid-template-columns: 1fr 1fr; }
  .landing-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .landing-header .brand-tagline { display: none; }
  .landing-hero h1 { font-size: 3.25rem; }
  .landing-preview-metrics, .landing-feature-grid, .landing-steps ol { grid-template-columns: 1fr; }
  .landing-dashboard-preview { padding: 14px; }
  .landing-preview-calendar > div { grid-template-columns: 55px 1fr; }
  .landing-footer { align-items: flex-start; flex-direction: column; }
  .landing-footer p:last-child { margin-left: 0; }
}
