/* Sonty - shared styles for the public site, auth pages and client portal.
   Palette and type match the dashboard design (Main.pdf). */

:root {
  --cream: #FAF7F2;
  --cream-deep: #F3EEE4;
  --card: #FFFFFF;
  --ink: #1C2420;
  --ink-dim: #4B544F;
  --muted: #69736D;
  --border: #E7E0D4;
  --sidebar: #12241F;
  --sidebar-text: #D9E6E0;
  --sidebar-muted: #8CA399;
  --teal-800: #0B4A3D;
  --teal-700: #0F5C4C;
  --teal-600: #157A64;
  --teal-100: #DCEFE7;
  --amber-700: #8A5E12;
  --amber-100: #FBF0D8;
  --red-700: #A93E29;
  --red-100: #FAE2DC;
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--teal-700); }
a:hover { color: var(--teal-800); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; color: var(--ink); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 2px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 8px;
  font: 600 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-800); color: #fff; }
.btn-secondary { background: var(--card); color: var(--teal-700); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--teal-600); color: var(--teal-800); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { color: var(--teal-700); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px;
  font-size: 12.5px; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.pill-confirmed, .pill-ok { background: var(--teal-100); color: var(--teal-700); }
.pill-pending, .pill-warn { background: var(--amber-100); color: var(--amber-700); }
.pill-cancelled, .pill-low { background: var(--red-100); color: var(--red-700); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700); }

/* ---------- Public site header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250, 247, 242, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .2px; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--ink-dim); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--teal-700); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu-panel { position: absolute; right: 0; top: 52px; width: 240px; padding: 10px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 12px 32px rgba(18, 36, 31, .12); }
.mobile-menu-panel a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.mobile-menu-panel a:hover { background: var(--cream); }
.mobile-menu-panel hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; width: 100%; }

@media (max-width: 860px) {
  .site-nav, .header-actions { display: none; }
  .mobile-menu { display: block; }
}

/* ---------- Public site sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--cream-deep); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--sidebar); color: var(--sidebar-text); }
.section-dark h2 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); margin-top: 10px; }
.section-head p { margin-top: 14px; color: var(--ink-dim); font-size: 18px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); letter-spacing: -.5px; }
.hero h1 em { font-style: italic; color: var(--teal-700); }
.hero-lede { margin-top: 20px; font-size: 19px; color: var(--ink-dim); max-width: 540px; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Hero product preview */
.preview { position: relative; }
.preview-window { padding: 18px; margin-right: 120px; box-shadow: 0 24px 60px rgba(18, 36, 31, .12); }
.preview-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.preview-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.preview-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.preview-kpi { border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.preview-kpi small { display: block; font-size: 11.5px; color: var(--muted); }
.preview-kpi strong { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 500; margin-top: 2px; }
.preview-rows { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.preview-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 13.5px; border-top: 1px solid var(--border); }
.preview-row:first-child { border-top: 0; }
.preview-row span:nth-child(2) { color: var(--muted); margin-left: auto; margin-right: 12px; }
.preview-phone {
  position: absolute; right: -18px; bottom: -40px; width: 230px; padding: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 18px 44px rgba(18, 36, 31, .16);
}
.preview-phone-head { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 10px; text-align: center; }
.bubble { padding: 9px 12px; border-radius: 16px; font-size: 13px; line-height: 1.4; margin-top: 6px; max-width: 88%; white-space: pre-line; }
.bubble-in { background: var(--cream); border: 1px solid var(--border); }
.bubble-out { background: var(--teal-600); color: #fff; margin-left: auto; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .preview { margin-bottom: 40px; }
  .preview-phone { right: 8px; }
}
@media (max-width: 520px) {
  .preview-phone { display: none; }
  .preview-window { margin-right: 0; }
  .preview-kpis { grid-template-columns: 1fr 1fr; }
  .preview-kpis .preview-kpi:last-child { display: none; }
}

/* Integrations strip */
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 36px; color: var(--muted); font-weight: 600; font-size: 15px; }
.logos-label { width: 100%; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; }
.feature-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--teal-100); color: var(--teal-700); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feature h3 { font-size: 21px; font-weight: 600; }
.feature p { margin-top: 8px; color: var(--ink-dim); font-size: 15px; }
@media (max-width: 960px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.step { border-top: 2px solid rgba(255, 255, 255, .16); padding-top: 22px; }
.step-num { font-family: var(--font-display); font-size: 40px; color: #8FD3BE; line-height: 1; }
.step h3 { color: #fff; font-size: 22px; margin-top: 14px; }
.step p { margin-top: 8px; color: var(--sidebar-text); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Split feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 88px; }
.split.reverse > :first-child { order: 2; }
.split h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 10px; }
.split p.lede { margin-top: 14px; color: var(--ink-dim); font-size: 17px; }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.check-list svg { flex: 0 0 auto; margin-top: 3px; color: var(--teal-600); }
.split-visual { padding: 22px; }
.bonus-head { margin-top: 120px; }

/* Savings calculators */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }
.calc { padding: 28px; }
.calc h3 { font-size: 22px; font-weight: 600; margin-top: 8px; }
.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; align-items: end; }
@media (max-width: 520px) { .calc-fields { grid-template-columns: 1fr; } }
.input-prefix, .input-suffix { position: relative; }
.input-prefix span, .input-suffix span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }
.input-prefix span { left: 14px; }
.input-prefix .input { padding-left: 28px; }
.input-suffix span { right: 14px; }
.input-suffix .input { padding-right: 32px; }
.calc-result { margin-top: 18px; padding: 16px 18px; border-radius: 10px; background: var(--teal-100); }
.calc-result small { display: block; font-size: 13px; color: var(--teal-700); font-weight: 600; }
.calc-result strong { display: block; font-family: var(--font-display); font-size: 36px; font-weight: 500; line-height: 1.15; color: var(--teal-700); font-variant-numeric: tabular-nums; }
.calc-result p { margin-top: 4px; font-size: 14.5px; color: var(--ink-dim); }
.calc-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.split .calc { margin-top: 0; }

/* Trust strip */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item .feature-icon { flex: 0 0 auto; margin-bottom: 0; }
.trust-item h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; }
.trust-item p { margin-top: 4px; font-size: 14.5px; color: var(--ink-dim); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse > :first-child { order: 0; }
}

/* Pricing */
.price-card { max-width: 520px; margin: 0 auto; padding: 36px; }
.price { font-family: var(--font-display); font-size: 56px; font-weight: 500; line-height: 1; margin-top: 14px; }
.price small { font-family: var(--font-body); font-size: 17px; color: var(--muted); font-weight: 400; }
.price-card .btn { margin-top: 28px; }
.price-bonus { margin-top: 24px; padding: 18px 20px; border-radius: 10px; background: var(--teal-100); }
.price-bonus .check-list { margin-top: 12px; gap: 8px; }
.price-bonus .check-list li { font-size: 15px; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--teal-700); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 10px; color: var(--ink-dim); }

/* CTA band */
.cta-band { padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.2vw, 36px); }
.cta-band p { color: var(--ink-dim); margin-top: 8px; }
@media (max-width: 620px) { .cta-band { padding: 28px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 36px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-family: var(--font-body); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--teal-700); }
.footer-grid a.btn-primary, .footer-grid a.btn-primary:hover { color: #fff; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (max-width: 620px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Privacy policy / terms */
.legal { max-width: 760px; margin: 0 auto; }
.legal-head { margin-bottom: 40px; }
.legal-head h1 { font-size: clamp(34px, 4.5vw, 48px); margin-top: 8px; }
.legal-head p { margin-top: 12px; color: var(--muted); font-size: 14.5px; }
.legal-summary { padding: 22px 24px; margin-bottom: 40px; }
.legal-summary h2 { font-family: var(--font-body); font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.legal-summary ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-dim); }
.legal h2 { font-size: 26px; margin: 40px 0 12px; scroll-margin-top: 90px; }
.legal h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink-dim); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14.5px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--ink-dim); }
.legal th { color: var(--ink); font-weight: 600; }
.legal-table-wrap { overflow-x: auto; }
.legal .caps { text-transform: uppercase; font-size: 14px; }
.legal mark { background: var(--amber-100); color: var(--amber-700); padding: 0 4px; border-radius: 4px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid #D6CDBE; background: var(--card); color: var(--ink);
  font: 400 15.5px/1.4 var(--font-body);
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(21, 122, 100, .18); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.alert { padding: 12px 14px; border-radius: 8px; font-size: 14.5px; }
.alert-error { background: var(--red-100); color: var(--red-700); }
.alert-ok { background: var(--teal-100); color: var(--teal-700); }
.alert-info { background: var(--amber-100); color: var(--amber-700); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-dim); }
.checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal-700); }

/* ---------- Auth pages ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { background: var(--sidebar); color: var(--sidebar-text); padding: 48px; display: flex; flex-direction: column; gap: 56px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.auth-aside-foot { margin-top: auto; }
.auth-aside .brand { color: #fff; }
.auth-aside h2 { color: #fff; font-size: clamp(28px, 3vw, 38px); }
.auth-aside p { margin-top: 14px; color: var(--sidebar-text); font-size: 16.5px; max-width: 440px; }
.auth-aside .check-list li { color: var(--sidebar-text); }
.auth-aside .check-list svg { color: #8FD3BE; }
.auth-aside-foot { font-size: 13px; color: var(--sidebar-muted); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 34px; }
.auth-card .sub { margin-top: 8px; color: var(--ink-dim); }
.auth-card form { margin-top: 28px; }
.auth-switch { margin-top: 24px; font-size: 14.5px; color: var(--ink-dim); text-align: center; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: block; }
  .auth-main { align-items: flex-start; padding-top: 40px; }
}

/* ---------- Client portal ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: 0 0 252px; background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; padding: 28px 20px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { color: #fff; font-size: 22px; }
.sidebar-practice { font-size: 12.5px; color: var(--sidebar-muted); margin-top: 2px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 36px; flex-grow: 1; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--sidebar-text); text-decoration: none; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.sidebar-nav a[aria-current="page"] { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 600; }
.sidebar-foot { padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 100px; background: var(--teal-600); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.sidebar-user { min-width: 0; flex: 1; }
.sidebar-user strong { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user span { font-size: 11.5px; color: var(--sidebar-muted); }
.logout-btn { background: none; border: 0; color: var(--sidebar-muted); cursor: pointer; padding: 8px; border-radius: 6px; display: flex; }
.logout-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.app-main { flex: 1 1 0; min-width: 0; padding: 32px 40px 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.topbar h1 { font-size: 30px; }
.topbar .date { font-size: 14px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sample-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--amber-100); color: var(--amber-700); font-size: 14px; margin-bottom: 24px; }
.sample-banner svg { flex: 0 0 auto; margin-top: 2px; }
.sample-banner strong { color: #6E4A0D; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { padding: 18px 20px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-family: var(--font-display); font-size: 34px; font-weight: 500; margin-top: 6px; line-height: 1.1; }
.kpi-note { font-size: 12.5px; margin-top: 6px; color: var(--muted); }
.kpi-note.warn { color: var(--amber-700); font-weight: 600; }
.kpi-note.good { color: var(--teal-700); font-weight: 600; }
.kpi-value.bad { color: var(--red-700); }

.content-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; }
.card-head h2 { font-size: 19px; font-weight: 600; }
.card-head a, .card-head .meta { font-size: 13px; font-weight: 600; text-decoration: none; }
.card-head .meta { color: var(--muted); font-weight: 400; }
.card-body { padding: 0 22px 20px; }
.table-wrap { overflow-x: auto; }
.data-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.data-table th { text-align: left; padding: 10px 12px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); color: var(--ink-dim); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 22px; }
.data-table td.strong { color: var(--ink); font-weight: 500; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr.selected td { background: var(--teal-100); }
.data-table a.row-link { color: var(--ink); text-decoration: none; font-weight: 500; }
.data-table a.row-link:hover { color: var(--teal-700); text-decoration: underline; }

.kv { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; }
.kv-row span:first-child { color: var(--ink-dim); }
.kv-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.kv-row.total { padding-top: 10px; border-top: 1px solid var(--border); font-size: 15.5px; }
.kv-row.total span:first-child { color: var(--ink); font-weight: 600; }
.kv-row.total span:last-child { color: var(--teal-700); }
.source-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--cream); border: 1px solid var(--border); font-size: 11.5px; font-weight: 600; color: var(--muted); vertical-align: 1px; }

.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-item + .list-item { margin-top: 12px; }
.list-item strong { display: block; font-size: 14px; font-weight: 500; }
.list-item small { font-size: 12px; color: var(--muted); }

.empty { padding: 18px 22px 22px; color: var(--muted); font-size: 14.5px; }

.review { padding: 16px 22px; border-top: 1px solid var(--border); }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-head strong { font-size: 14.5px; }
.stars { color: #A86F00; letter-spacing: 1px; font-size: 14px; }
.review p { margin-top: 6px; font-size: 14.5px; color: var(--ink-dim); }
.rating-big { font-family: var(--font-display); font-size: 48px; line-height: 1; }

.integration { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px; border-top: 1px solid var(--border); }
.integration h3 { font-family: var(--font-body); font-size: 15px; font-weight: 600; }
.integration p { font-size: 13.5px; color: var(--muted); margin-top: 4px; max-width: 460px; }
.integration-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: 0 0 auto; }

/* SMS demo */
.phone-demo { width: 100%; max-width: 390px; height: 640px; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 18px 44px rgba(18, 36, 31, .12); }
.phone-head { background: var(--teal-700); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.phone-head .avatar { background: rgba(255, 255, 255, .18); width: 34px; height: 34px; }
.phone-head strong { font-family: var(--font-display); font-size: 16px; display: block; }
.phone-head small { font-size: 11.5px; color: rgba(255, 255, 255, .78); }
.phone-messages { flex: 1; overflow-y: auto; background: var(--cream); padding: 16px 14px; display: flex; flex-direction: column; }
.phone-messages .bubble { font-size: 14.5px; max-width: 80%; }
.phone-messages .bubble-in { background: #fff; align-self: flex-start; }
.phone-messages .bubble-out { align-self: flex-end; }
.phone-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--card); }
.chip { padding: 7px 13px; border-radius: 100px; border: 1px solid var(--teal-600); background: var(--teal-100); color: var(--teal-700); font: 600 12.5px var(--font-body); cursor: pointer; min-height: 32px; }
.chip.muted { border-color: var(--border); background: var(--card); color: var(--muted); margin-left: auto; }
.phone-input { display: flex; gap: 8px; align-items: center; padding: 10px 14px 16px; background: var(--card); }
.phone-input input { flex: 1; min-width: 0; padding: 10px 16px; border-radius: 100px; border: 1px solid var(--border); background: var(--cream); font: 400 14.5px var(--font-body); }
.send-btn { width: 40px; height: 40px; border-radius: 100px; border: 0; background: var(--teal-700); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.demo-grid { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; }

.footnote { margin-top: 28px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .demo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; padding: 14px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
  .sidebar-brand { flex: 1; }
  .sidebar-nav { order: 3; width: 100%; flex-direction: row; margin-top: 0; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .sidebar-nav a { white-space: nowrap; }
  .sidebar-foot { border-top: 0; padding-top: 0; }
  .sidebar-user { display: none; }
  .app-main { padding: 24px 16px 48px; }
}
@media (max-width: 520px) {
  .kpi-row { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .integration { flex-direction: column; }
  .integration-side { align-items: flex-start; }
}

/* ---------- Inventory & fee check ---------- */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.subtabs a { padding: 10px 14px; font-size: 14px; font-weight: 500; color: var(--ink-dim); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a:hover { color: var(--teal-700); }
.subtabs a[aria-current="page"] { color: var(--teal-700); border-bottom-color: var(--teal-700); font-weight: 600; }
.inv-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 22px; border-top: 1px solid var(--border); }
.inv-alert .pill { flex: 0 0 auto; margin-top: 1px; min-width: 70px; justify-content: center; }
.inv-alert strong { display: block; font-size: 14.5px; font-weight: 600; }
.inv-alert p { margin-top: 3px; font-size: 13.5px; color: var(--ink-dim); }
.inv-alert.sev-critical { background: rgba(169, 62, 41, .04); }
.cell-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.how-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-dim); }
.how-list strong { color: var(--ink); }
.rule-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rule-form .select { min-height: 36px; padding: 6px 10px; font-size: 13.5px; width: auto; max-width: 220px; }
.rule-form .input { min-height: 36px; padding: 6px 10px; font-size: 13.5px; width: 80px; }
.count-input { min-height: 38px; padding: 6px 10px; width: 110px; }
.data-table td .pill + .pill { margin-left: 4px; }
@media (max-width: 520px) { .inv-alert { flex-direction: column; gap: 6px; padding: 14px 16px; } }
.review-table .input, .review-table .select { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.review-table td:nth-child(2) .input { min-width: 220px; }
.review-table td:nth-child(3) .select { min-width: 200px; }
.review-table td.num .input { width: 90px; text-align: right; }
.review-table td:nth-child(6) .input { width: 110px; }
.review-table input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--teal-700); }

/* Loss-prevention emphasis on the public site */
.feature-lead .feature-icon { background: var(--red-100); color: var(--red-700); }
.preview-alert { width: 250px; }
.preview-alert .preview-phone-head { text-align: left; margin-bottom: 8px; }
.preview-alert strong { display: block; font-size: 14px; line-height: 1.35; }
.preview-alert p { font-size: 13px; color: var(--ink-dim); margin-top: 6px; line-height: 1.45; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 100px; background: #C8553D; color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.redflag-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: 12px; background: var(--red-100); color: var(--red-700); margin-bottom: 24px; }
.redflag-banner > div { display: flex; gap: 12px; align-items: flex-start; }
.redflag-banner strong { display: block; font-size: 16px; color: #7E2C1C; }
.redflag-banner p { font-size: 14px; margin-top: 2px; }
.redflag-banner .btn { background: var(--red-700); color: #fff; }
.redflag-banner .btn:hover { background: #8A3020; color: #fff; }
.preview-window.full { margin-right: 0; }
.preview-alert { position: relative; right: auto; bottom: auto; margin: -14px 24px 0 auto; }
@media (max-width: 900px) {
  .sidebar-nav { scrollbar-width: none; -ms-overflow-style: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
}


/* Business Associate Agreement: text (public page, sign-up box, signed copy) and signing fields */
.baa-text h2 { font-size: 22px; margin: 28px 0 10px; }
.baa-text h2:first-child { margin-top: 0; }
.baa-text p, .baa-text li, .baa-text td { color: var(--ink-dim); font-size: 15px; }
.baa-text p + p { margin-top: 10px; }
.baa-text ul, .baa-text ol { padding-left: 22px; margin: 8px 0 10px; display: flex; flex-direction: column; gap: 5px; }
.baa-text table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14.5px; }
.baa-text th, .baa-text td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.baa-text th { color: var(--ink); font-weight: 600; }
.baa-text mark { background: var(--amber-100); color: var(--amber-700); padding: 0 4px; border-radius: 4px; }
.baa-text + .baa-text { margin-top: 32px; padding-top: 8px; border-top: 2px solid var(--border); }
.baa-sig, .baa-sig-input { font-family: var(--font-display); font-style: italic; font-size: 19px; }
.baa-meta { margin-top: 12px; font-size: 13px !important; color: var(--muted) !important; }
.baa-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 8px 0 0; min-width: 0; }
.baa-fieldset legend { font-weight: 600; padding: 0 6px; }
.baa-fieldset > .hint { display: block; margin-bottom: 12px; }
.baa-fieldset .form-grid { margin-top: 16px; }
.baa-box { max-height: 300px; overflow-y: auto; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); margin-bottom: 8px; }
.baa-box .baa-text h2 { font-size: 17px; margin-top: 18px; }
.baa-box .baa-text p, .baa-box .baa-text li, .baa-box .baa-text td { font-size: 13.5px; }
@media (max-width: 620px) { .baa-fieldset .form-grid { grid-template-columns: 1fr; } }
@media print {
  .sidebar, .no-print, .site-header, .site-footer, .topbar { display: none !important; }
  body, .card { background: #fff !important; border: 0 !important; }
}
/* ---------- Signup payment step ---------- */
.payment-step { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700); margin-bottom: 8px; }
.payment-body { margin-top: 28px; }
.payment-plan { border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.payment-plan-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.payment-plan-row + .payment-plan-row { border-top: 1px solid var(--border); }
.payment-plan-price { font-family: var(--font-display); font-size: 28px; font-weight: 500; white-space: nowrap; }
.payment-plan-price small { font-family: var(--font-body); font-size: 14px; color: var(--muted); }
.payment-plan-note { font-size: 14px; color: var(--muted); }
.payment-fine { font-size: 13px; color: var(--muted); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--teal-700); text-decoration: underline; cursor: pointer; }
.auth-card .payment-body form { margin-top: 0; }

/* Password fields with a Show / Hide button */
.password-field { position: relative; }
.password-field .input { padding-right: 76px; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 34px; min-width: 60px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--teal-700); font: 600 13.5px var(--font-body); cursor: pointer; }
.password-toggle:hover { background: var(--teal-100); }


/* On/off switch (Settings > Patient texting) */
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 100px; background: var(--border); position: relative; cursor: pointer; flex: 0 0 auto; margin: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(18, 36, 31, .25); transition: transform .15s; }
.switch:checked { background: var(--teal-700); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 3px solid rgba(21, 122, 100, .35); outline-offset: 2px; }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.integration .meta-line { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.integration .hint-warn { font-size: 13px; color: var(--amber-700); margin-top: 4px; }
.texting-rule { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.texting-rule label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.texting-rule .select { min-height: 36px; padding: 6px 10px; font-size: 13.5px; width: auto; }
/* Browse-before-paying prompts */
.sample-banner-cta { margin-left: auto; flex: 0 0 auto; align-self: center; }
.locked-note a { font-weight: 600; }
@media (max-width: 620px) { .sample-banner { flex-wrap: wrap; } .sample-banner-cta { margin-left: 30px; } }

/* ---------- Appointments calendar ---------- */
.pill-scheduled { background: #E6ECF5; color: #2F4A72; }
.pill-complete { background: var(--cream-deep); color: var(--ink-dim); }
.data-table .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.data-table .muted { color: var(--muted); }
.appt-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.appt-search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.appt-search .input { flex: 1; min-height: 38px; padding: 7px 12px; }
.appt-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .appt-layout { grid-template-columns: minmax(0, 1fr); } }

.mini-cal { padding: 16px; }
.mini-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-cal-head strong { font-size: 15px; font-weight: 600; }
.mini-cal-head a, .day-nav a { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 20px; color: var(--ink-dim); text-decoration: none; border: 1px solid var(--border); }
.mini-cal-head a:hover, .day-nav a:hover { background: var(--cream-deep); color: var(--ink); }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mini-cal-wd { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.mini-cal-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 40px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mini-cal-day small { font-size: 10px; line-height: 1; color: var(--teal-700); font-weight: 600; }
.mini-cal-day:hover { background: var(--cream-deep); }
.mini-cal-day.other, .mini-cal-day.other small { color: #B3ACA0; }
.mini-cal-day.today { box-shadow: inset 0 0 0 1.5px var(--teal-600); }
.mini-cal-day.selected { background: var(--teal-700); color: #fff; }
.mini-cal-day.selected small { color: #CFE8DE; }
.mini-cal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.mini-cal-foot a { font-weight: 600; font-size: 13px; text-decoration: none; }

.day-nav { display: flex; align-items: center; gap: 10px; }
.day-nav h2 { display: flex; align-items: center; gap: 8px; }
.day-grid-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
.day-grid { display: grid; min-width: 420px; padding: 0 12px 12px 0; }
.dg-chair { background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--border); }
.dg-corner { border-bottom: 1px solid var(--border); }
.dg-hour { font-size: 11.5px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.dg-line { border-top: 1px solid var(--border); pointer-events: none; }
.dg-appt, .dg-open { margin: 1px 3px; border-radius: 7px; padding: 3px 8px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; min-height: 0; z-index: 1; font-size: 12.5px; line-height: 1.3; }
.dg-appt strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-appt small, .dg-open small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.dg-appt { border-left: 3px solid; color: var(--ink); }
.dg-appt:hover { filter: brightness(.97); }
.dg-appt.is-selected { box-shadow: 0 0 0 2px var(--ink); }
.st-confirmed { background: var(--teal-100); border-color: var(--teal-600); }
.st-pending { background: var(--amber-100); border-color: #C99A3B; }
.st-scheduled { background: #E6ECF5; border-color: #5A77A3; }
.st-complete { background: var(--cream-deep); border-color: #B3ACA0; color: var(--ink-dim); }
.st-cancelled { background: repeating-linear-gradient(135deg, var(--red-100), var(--red-100) 6px, #fff 6px, #fff 10px); border-color: var(--red-700); color: var(--red-700); }
.st-cancelled strong { text-decoration: line-through; }
.dg-open { border: 1.5px dashed #CFC6B6; color: var(--muted); }
.dg-open span { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--teal-700); }
.dg-open:hover { border-color: var(--teal-600); background: var(--teal-100); }
.dg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 22px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
.dg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dg-legend .lg { width: 12px; height: 12px; border-radius: 3px; border-left: 3px solid; display: inline-block; }
.dg-legend .lg-open { border: 1.5px dashed #CFC6B6; }

/* New appointment */
.book-step.is-waiting { opacity: .6; }
.book-step-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 14px; }
.book-step-head h2 { font-size: 18px; font-weight: 600; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--teal-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 700; }
.book-picked { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 22px 18px; padding: 12px 14px; border-radius: 10px; background: var(--teal-100); }
.book-picked strong { display: block; font-size: 15.5px; }
.book-picked span { font-size: 13.5px; color: var(--ink-dim); }
.pick-list { border-top: 1px solid var(--border); }
.pick-list a { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--ink); }
.pick-list a:last-child { border-bottom: 0; }
.pick-list a:hover { background: var(--cream); }
.pick-list strong { font-weight: 600; min-width: 180px; }
.pick-list span { color: var(--muted); font-size: 13.5px; flex: 1; }
.pick-list em { font-style: normal; font-weight: 600; font-size: 13.5px; color: var(--teal-700); }
.visit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 0 22px 20px; }
.visit-opt { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--ink); }
.visit-opt strong { font-weight: 600; font-size: 14.5px; }
.visit-opt span { font-size: 12.5px; color: var(--muted); }
.visit-opt:hover { border-color: var(--teal-600); }
.visit-opt.selected { border-color: var(--teal-700); background: var(--teal-100); box-shadow: inset 0 0 0 1px var(--teal-700); }
.week-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 22px 14px; }
.week-nav > span { font-size: 13.5px; color: var(--ink-dim); }
.week-jump { margin-left: auto; }
.week-jump .input { min-height: 36px; padding: 5px 10px; }
.time-day { padding: 12px 22px; border-top: 1px solid var(--border); }
.time-day h3 { font-family: var(--font-body); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.time-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.time-chip { font: inherit; font-size: 13px; font-weight: 500; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.time-chip:hover { border-color: var(--teal-600); background: var(--teal-100); }
.time-chip.suggested { border-color: var(--teal-700); background: var(--teal-700); color: #fff; }
.book-note { padding: 12px 22px 18px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
