/* MarkedPaid — one stylesheet for the start page, the business app and the operator console.
   Colors are defined once as tokens (light, then dark) and everything below uses the tokens. */

:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --surface-3: #efede6;
  --line: #e4e1d7;
  --line-strong: #cdc9bc;
  --ink: #1b1e22;
  --ink-2: #4a5058;
  --ink-3: #747a83;

  --brand: #007a64;
  --brand-hover: #00644f;
  --brand-ink: #ffffff;
  --brand-soft: #e1f2ee;
  --brand-text: #006552;

  --good: #17713f;
  --good-soft: #e2f3e8;
  --warn: #8a5a00;
  --warn-soft: #fbf0d3;
  --bad: #b3261e;
  --bad-soft: #fbe6e3;
  --info: #1d5aa6;
  --info-soft: #e3edfa;
  --mute: #555b64;
  --mute-soft: #ecebe5;

  --side-bg: #15201e;
  --side-ink: #c5d0cd;
  --side-ink-strong: #ffffff;
  --side-mute: #7f8f8b;
  --side-hover: rgba(255, 255, 255, 0.06);
  --side-active: rgba(255, 255, 255, 0.1);
  --side-accent: #4cc7b0;

  /* Charts: validated for color-blind separation and contrast on --surface (see README). */
  --series-1: #00856d;
  --series-2: #e0762a;
  --chart-grid: #e6e3da;
  --chart-axis: #c8c4b7;

  /* Team-member dots: eight fixed identity colors, always shown next to the person's name. */
  --cat-1: #2a78d6;
  --cat-2: #eb6834;
  --cat-3: #1baf7a;
  --cat-4: #eda100;
  --cat-5: #e87ba4;
  --cat-6: #008300;
  --cat-7: #6250d6;
  --cat-8: #e34948;

  --shadow-1: 0 1px 2px rgba(22, 24, 28, 0.05), 0 1px 1px rgba(22, 24, 28, 0.03);
  --shadow-2: 0 14px 40px rgba(22, 24, 28, 0.16), 0 3px 8px rgba(22, 24, 28, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101214;
    --surface: #1a1d20;
    --surface-2: #1f2326;
    --surface-3: #272b2f;
    --line: #2c3135;
    --line-strong: #3f454b;
    --ink: #eceeef;
    --ink-2: #b9bec4;
    --ink-3: #8b9199;

    --brand: #3db59e;
    --brand-hover: #56c7b1;
    --brand-ink: #04201a;
    --brand-soft: #14312b;
    --brand-text: #6ad4bf;

    --good: #6cd699;
    --good-soft: #15301f;
    --warn: #f0c366;
    --warn-soft: #382a0b;
    --bad: #ff9389;
    --bad-soft: #3c1917;
    --info: #8fbcf7;
    --info-soft: #14283f;
    --mute: #aab0b7;
    --mute-soft: #262a2e;

    --side-bg: #0b0f0e;
    --side-hover: rgba(255, 255, 255, 0.05);
    --side-active: rgba(255, 255, 255, 0.09);

    --series-1: #2fa58d;
    --series-2: #d47a36;
    --chart-grid: #2a2f33;
    --chart-axis: #3b4146;

    --cat-1: #3987e5;
    --cat-2: #d95926;
    --cat-3: #199e70;
    --cat-4: #c98500;
    --cat-5: #d55181;
    --cat-6: #008300;
    --cat-7: #9085e9;
    --cat-8: #e66767;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 16px 44px rgba(0, 0, 0, 0.6), 0 3px 8px rgba(0, 0, 0, 0.4);
  }
}

/* ── base ─────────────────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
p,
dl,
dd,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
a {
  color: var(--brand-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3.5px;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--ink-3);
}
.strong {
  font-weight: 600;
}
.nowrap {
  white-space: nowrap;
}
.spacer {
  flex: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── shell: sidebar + main ────────────────────────────────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--side-bg);
  color: var(--side-ink);
  padding: 18px 12px 12px;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 0;
  color: var(--side-ink-strong);
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--side-accent);
  color: #06231d;
  display: grid;
  place-items: center;
  flex: none;
}
.brand-mark svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-biz {
  margin: 14px 8px 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13px;
  line-height: 1.35;
}
.sidebar-biz strong {
  display: block;
  color: var(--side-ink-strong);
  font-weight: 600;
  font-size: 14px;
}
.sidebar-biz span {
  color: var(--side-mute);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-label {
  margin: 16px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--side-mute);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--side-ink);
  font-weight: 500;
  position: relative;
}
.nav-item:hover {
  background: var(--side-hover);
  color: var(--side-ink-strong);
  text-decoration: none;
}
.nav-item.is-active {
  background: var(--side-active);
  color: var(--side-ink-strong);
}
.nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--side-accent);
}
.nav-item .nav-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--side-accent);
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
}
.sidebar-note {
  margin: 10px 10px 2px;
  font-size: 12px;
  color: var(--side-mute);
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-search {
  position: relative;
  flex: 1;
  max-width: 440px;
}
.topbar-search .icon {
  position: absolute;
  left: 11px;
  top: 10px;
  color: var(--ink-3);
  pointer-events: none;
}
.topbar-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.topbar-search input::placeholder {
  color: var(--ink-3);
}
.search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-2);
  padding: 6px;
  max-height: 70vh;
  overflow-y: auto;
}
.search-group {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.search-hit {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--ink);
}
.search-hit:hover,
.search-hit.is-active {
  background: var(--surface-3);
  text-decoration: none;
}
.search-hit small {
  color: var(--ink-3);
  font-size: 12.5px;
}
.search-none {
  padding: 12px 10px;
  color: var(--ink-3);
}
.menu-btn {
  display: none;
}
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 28px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.banner-info {
  background: var(--info-soft);
  color: var(--info);
}
.banner-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.banner .btn {
  margin-left: auto;
}
.view-host {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 28px 60px;
}
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: var(--brand);
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0;
}
.progress.is-on {
  opacity: 1;
  transform: scaleX(0.85);
  transition: transform 2.5s cubic-bezier(0.1, 0.7, 0.2, 1);
}

/* ── page furniture ───────────────────────────────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-title {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.page-sub {
  color: var(--ink-3);
  margin-top: 3px;
}
.page-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.stack {
  display: grid;
  gap: 18px;
}
.cols-2,
.cols-3,
.cols-4,
.split {
  display: grid;
  gap: 18px;
  align-items: start;
}
.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.split {
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 0;
}
.card-title {
  font-size: 15px;
  font-weight: 620;
}
.card-sub {
  color: var(--ink-3);
  font-size: 13px;
}
.card-head .btn,
.card-head .link {
  margin-left: auto;
}
.card-body {
  padding: 14px 18px 18px;
}
.card-flush {
  padding: 8px 0 6px;
}
.link {
  font-size: 13.5px;
  font-weight: 550;
}

/* ── stat tiles ───────────────────────────────────────────────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.kpi {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 15px 18px 14px;
  color: inherit;
}
a.kpi:hover {
  text-decoration: none;
  border-color: var(--line-strong);
}
.kpi-label {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}
.kpi-value {
  margin-top: 4px;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.kpi-note {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 5px;
}
.kpi-note .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}
.kpi-note.is-bad {
  color: var(--bad);
}
.kpi-note.is-good {
  color: var(--good);
}
.hero {
  font-size: 50px;
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* ── buttons ──────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 550;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: var(--surface-3);
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.btn-quiet:hover {
  background: var(--surface-3);
}
.btn-danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .btn-danger {
    color: #2b0b09;
  }
}
.btn-danger:hover {
  filter: brightness(0.92);
  background: var(--bad);
}
.btn-danger-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--bad);
}
.btn-danger-quiet:hover {
  background: var(--bad-soft);
}
.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── pills, chips, dots ───────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}
.pill .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
  vertical-align: 0;
}
.pill-good {
  background: var(--good-soft);
  color: var(--good);
}
.pill-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.pill-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill-info {
  background: var(--info-soft);
  color: var(--info);
}
.pill-mute {
  background: var(--mute-soft);
  color: var(--mute);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.chip-brand {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand-text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}
.dot[data-slot='1'] { background: var(--cat-1); }
.dot[data-slot='2'] { background: var(--cat-2); }
.dot[data-slot='3'] { background: var(--cat-3); }
.dot[data-slot='4'] { background: var(--cat-4); }
.dot[data-slot='5'] { background: var(--cat-5); }
.dot[data-slot='6'] { background: var(--cat-6); }
.dot[data-slot='7'] { background: var(--cat-7); }
.dot[data-slot='8'] { background: var(--cat-8); }
.who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 650;
  flex: none;
}
.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 17px;
}

/* ── tables ───────────────────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  padding: 9px 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table tbody tr.row-link {
  cursor: pointer;
}
.table tbody tr.row-link:hover {
  background: var(--surface-2);
}
.cell-main {
  font-weight: 560;
  color: var(--ink);
}
a.cell-main:hover {
  color: var(--brand-text);
}
.cell-sub {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}
.table-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── tabs and toolbars ────────────────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 9px;
  overflow-x: auto;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 550;
  font-size: 13.5px;
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover {
  color: var(--ink);
}
.tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.tab-count {
  color: var(--ink-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.input,
.select,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.field textarea {
  resize: vertical;
  line-height: 1.45;
}
.input:focus,
.select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.topbar-search input:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
  border-color: var(--brand);
}
.toolbar .input,
.toolbar .select {
  width: auto;
}
.search-input {
  position: relative;
  min-width: 220px;
  flex: 0 1 300px;
}
.search-input .icon {
  position: absolute;
  left: 10px;
  top: 10px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-input input {
  padding-left: 34px;
  width: 100%;
}

/* ── lists ────────────────────────────────────────────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.list-item:last-child {
  border-bottom: 0;
}
a.list-item:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.list-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
  background: var(--mute-soft);
  color: var(--mute);
}
.list-icon .icon {
  width: 16px;
  height: 16px;
}
.list-icon.is-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.list-icon.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.list-icon.is-info {
  background: var(--info-soft);
  color: var(--info);
}
.list-icon.is-good {
  background: var(--good-soft);
  color: var(--good);
}
.list-main {
  min-width: 0;
  flex: 1;
}
.list-title {
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-sub {
  color: var(--ink-3);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-end {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}
.list-end small {
  display: block;
  font-weight: 400;
  color: var(--ink-3);
  font-size: 12.5px;
}
.time-col {
  width: 66px;
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13.5px;
}
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-3);
}
.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--ink-2);
}
.empty h3 {
  font-size: 15px;
  font-weight: 620;
  color: var(--ink);
  margin-bottom: 4px;
}
.empty p {
  max-width: 420px;
  margin: 0 auto 14px;
}
.empty-small {
  padding: 18px;
  font-size: 13.5px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px 22px;
}
.fact dt {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.fact dd {
  font-weight: 540;
  overflow-wrap: anywhere;
}
.fact-wide {
  grid-column: 1 / -1;
}
.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  color: var(--ink-2);
  font-size: 13.5px;
}
.contact-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.contact-line .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

/* ── forms and dialogs ────────────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.field {
  min-width: 0;
}
.field-full {
  grid-column: 1 / -1;
}
.field label,
.label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-2);
}
.optional {
  font-weight: 400;
  color: var(--ink-3);
}
.hint {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.form-intro {
  margin-bottom: 14px;
  color: var(--ink-2);
}
.form-error {
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bad-soft);
  color: var(--bad);
  font-weight: 500;
}
.input-affix {
  display: flex;
  align-items: stretch;
}
.input-affix > span {
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: 0;
  background: var(--surface-3);
  color: var(--ink-3);
}
.input-affix > input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.input-affix.is-suffix > span {
  order: 2;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: 0;
  border-right: 1px solid var(--line-strong);
}
.input-affix.is-suffix > input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.check input {
  width: 17px;
  height: 17px;
  min-height: 0;
  accent-color: var(--brand);
  flex: none;
}
dialog.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
}
dialog.modal-wide {
  width: min(760px, calc(100vw - 24px));
}
dialog.modal::backdrop {
  background: rgba(16, 20, 22, 0.5);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px 4px 20px;
}
.modal-head h2 {
  font-size: 17px;
  font-weight: 640;
  flex: 1;
}
.modal-body {
  padding: 12px 20px 20px;
}
.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 100;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 10px;
  background: #1c2226;
  color: #fff;
  box-shadow: var(--shadow-2);
  font-weight: 500;
  animation: toast-in 0.18s ease-out;
}
.toast.is-error {
  background: #8f1d17;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.menu-anchor {
  position: relative;
}
.menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 210px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-2);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 500;
  cursor: pointer;
}
.menu-item:hover {
  background: var(--surface-3);
  text-decoration: none;
}
.menu-item .icon {
  color: var(--ink-3);
  width: 16px;
  height: 16px;
}
.menu-head {
  padding: 8px 10px 9px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  line-height: 1.35;
}
.menu-head small {
  display: block;
  color: var(--ink-3);
}
.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 6px 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-weight: 550;
}
.user-btn:hover {
  background: var(--surface-3);
}

/* ── estimate / invoice page ("paper" stays light in dark mode, like a print preview) ─── */
.paper {
  --p-ink: #1b1e22;
  --p-mute: #5d636b;
  --p-line: #dedbd1;
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 48px 40px;
  background: #fff;
  color: var(--p-ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-1);
  font-size: 14px;
}
.paper-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--p-ink);
}
.paper-biz {
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.paper-meta {
  margin-top: 4px;
  color: var(--p-mute);
  font-size: 13px;
  line-height: 1.5;
}
.paper-title {
  text-align: right;
}
.paper-kind {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.paper-number {
  margin-top: 2px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.paper-parties {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 26px;
}
.paper h4 {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-mute);
}
.paper-dates {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 18px;
  align-content: start;
  text-align: right;
}
.paper-dates dt {
  color: var(--p-mute);
}
.paper-dates dd {
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}
.paper-items {
  width: 100%;
  border-collapse: collapse;
}
.paper-items th {
  padding: 8px 0;
  border-bottom: 1px solid var(--p-ink);
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-mute);
}
.paper-items td {
  padding: 10px 0;
  border-bottom: 1px solid var(--p-line);
  vertical-align: top;
}
.paper-items .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 16px;
}
.paper-totals {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  gap: 5px 36px;
  margin-top: 16px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.paper-totals dt {
  color: var(--p-mute);
}
.paper-totals .total {
  padding-top: 8px;
  border-top: 2px solid var(--p-ink);
  font-size: 18px;
  font-weight: 680;
  color: var(--p-ink);
}
.paper-notes {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--p-line);
  color: var(--p-mute);
  white-space: pre-line;
}
.paper-stamp {
  position: absolute;
  top: 120px;
  right: 46px;
  padding: 5px 14px;
  border: 2.5px solid #17713f;
  border-radius: 6px;
  color: #17713f;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-7deg);
  opacity: 0.85;
}
.paper-stamp.is-void {
  border-color: #8a8f96;
  color: #8a8f96;
}
.doc-bar {
  max-width: 820px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.doc-notes {
  max-width: 820px;
  margin: 14px auto 0;
  color: var(--ink-3);
  font-size: 13.5px;
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
}

/* editor */
.lines {
  width: 100%;
  border-collapse: collapse;
}
.lines th {
  padding: 0 6px 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 560;
  color: var(--ink-3);
}
.lines td {
  padding: 4px 6px 4px 0;
  vertical-align: middle;
}
.lines td:last-child {
  padding-right: 0;
}
.lines .col-qty {
  width: 86px;
}
.lines .col-price {
  width: 132px;
}
.lines .col-amount {
  width: 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  white-space: nowrap;
}
.lines .col-x {
  width: 38px;
}
.lines input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.lines input:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
}
.totals-box {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  gap: 6px 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.totals-box dt {
  color: var(--ink-3);
}
.totals-box .total {
  padding-top: 8px;
  border-top: 1px solid var(--line-strong);
  font-size: 19px;
  font-weight: 660;
  color: var(--ink);
}

/* ── schedule ─────────────────────────────────────────────────────────────────────────── */
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(148px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.day {
  min-width: 0;
  background: var(--surface-3);
  border-radius: var(--radius);
  padding: 8px;
  min-height: 180px;
}
.day.is-today {
  background: var(--brand-soft);
}
.day-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 2px 6px 8px;
  font-weight: 620;
}
.day-head small {
  color: var(--ink-3);
  font-weight: 500;
}
.day.is-today .day-head {
  color: var(--brand-text);
}
.day-add {
  margin-left: auto;
  width: 24px;
  height: 24px;
  opacity: 0.6;
}
.day-add:hover {
  opacity: 1;
}
.day-empty {
  padding: 10px 6px;
  color: var(--ink-3);
  font-size: 13px;
}
.appt {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  line-height: 1.35;
}
.appt:hover {
  border-color: var(--line-strong);
}
.appt-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.appt-time .icon {
  width: 13px;
  height: 13px;
  margin-left: auto;
  stroke-width: 2.4;
  color: var(--good);
}
.appt-title {
  font-weight: 580;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appt-sub {
  color: var(--ink-3);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appt-who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-2);
}
.appt.is-completed {
  background: var(--surface-2);
  box-shadow: none;
}
.appt.is-completed .appt-title {
  color: var(--ink-2);
}
.appt.is-cancelled {
  opacity: 0.6;
  box-shadow: none;
}
.appt.is-cancelled .appt-title {
  text-decoration: line-through;
}

/* ── task board ───────────────────────────────────────────────────────────────────────── */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.board-col {
  background: var(--surface-3);
  border-radius: var(--radius);
  padding: 10px;
}
.board-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px 10px;
  font-weight: 620;
}
.board-head .tab-count {
  font-size: 13px;
}
.task {
  margin-bottom: 8px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-1);
}
.task-title {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-weight: 560;
  cursor: pointer;
  line-height: 1.4;
}
.task-title:hover {
  color: var(--brand-text);
}
.task.is-done .task-title {
  color: var(--ink-3);
  text-decoration: line-through;
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.task-meta .is-late {
  color: var(--bad);
  font-weight: 600;
}
.task-meta .btn {
  margin-left: auto;
}

/* ── stock ────────────────────────────────────────────────────────────────────────────── */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stepper button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.stepper button:hover {
  background: var(--surface-3);
}
.stepper button .icon {
  width: 14px;
  height: 14px;
}
.stepper output {
  min-width: 46px;
  text-align: center;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

/* ── add-ons ──────────────────────────────────────────────────────────────────────────── */
.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 28px;
  align-items: center;
}
.plan-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.plan-total {
  text-align: right;
}
.plan-total .kpi-value {
  font-size: 32px;
}
.addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.addon {
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.addon.is-on {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-1);
}
.addon-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.addon-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-text);
  flex: none;
}
.addon-icon .icon {
  width: 21px;
  height: 21px;
}
.addon-name {
  font-size: 15.5px;
  font-weight: 640;
  line-height: 1.25;
}
.addon-for {
  font-size: 12.5px;
  color: var(--ink-3);
}
.addon-price {
  margin-left: auto;
  text-align: right;
  font-weight: 650;
  font-size: 16px;
  white-space: nowrap;
}
.addon-price small {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--ink-3);
}
.addon-tagline {
  margin: 12px 0 8px;
  color: var(--ink-2);
}
.ticks li {
  position: relative;
  padding: 2px 0 2px 22px;
  color: var(--ink-2);
  font-size: 13.5px;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 8px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.addon-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
.section-title {
  margin: 26px 0 4px;
  font-size: 16px;
  font-weight: 640;
}
.section-sub {
  margin-bottom: 12px;
  color: var(--ink-3);
}
.promo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.promo .btn {
  margin-left: auto;
}

/* ── charts ───────────────────────────────────────────────────────────────────────────── */
.chart-host {
  position: relative;
}
.chart-host svg {
  display: block;
  overflow: visible;
}
.chart-host text {
  font-family: var(--font);
  font-size: 12px;
  fill: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.chart-host text.chart-label {
  fill: var(--ink);
  font-weight: 620;
  font-size: 12.5px;
}
.chart-host text.chart-note {
  fill: var(--ink-2);
  font-size: 12px;
}
.chart-grid {
  stroke: var(--chart-grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.chart-axis {
  stroke: var(--chart-axis);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.chart-s1 {
  fill: var(--series-1);
}
.chart-s2 {
  fill: var(--series-2);
}
.chart-line {
  fill: none;
  stroke: var(--series-1);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-area {
  fill: var(--series-1);
  opacity: 0.1;
}
.chart-dot {
  fill: var(--series-1);
  stroke: var(--surface);
  stroke-width: 2;
}
.chart-cross {
  stroke: var(--chart-axis);
  stroke-width: 1;
}
.chart-hit {
  fill: transparent;
  cursor: default;
  outline: none;
}
.chart-band.is-dim .chart-s1,
.chart-band.is-dim .chart-s2 {
  opacity: 0.45;
}
.chart-hit:focus-visible + .chart-focus {
  stroke: var(--brand);
}
.chart-focus {
  fill: none;
  stroke: transparent;
  stroke-width: 2;
  pointer-events: none;
}
.chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 120px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: 12.5px;
  line-height: 1.45;
  white-space: nowrap;
}
.chart-tip-title {
  color: var(--ink-3);
  margin-bottom: 2px;
}
.chart-tip-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.chart-tip-row b {
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.chart-tip-row span {
  color: var(--ink-2);
}
.chart-key {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  flex: none;
}
.key-s1 {
  background: var(--series-1);
}
.key-s2 {
  background: var(--series-2);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  color: var(--ink-2);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}
.chart-table {
  max-height: 300px;
  overflow: auto;
}
.meter-list {
  display: grid;
  gap: 12px;
}
.meter-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(80px, 2fr) auto;
  gap: 4px 14px;
  align-items: center;
}
.meter-name {
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meter-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--series-1) 16%, var(--surface));
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--series-1);
}
.meter-figure {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink-2);
}
.meter-figure b {
  color: var(--ink);
  font-weight: 620;
}

/* ── start page ───────────────────────────────────────────────────────────────────────── */
.landing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}
.landing-pitch {
  background: var(--side-bg);
  color: #d5dedb;
  padding: 48px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
}
.landing-pitch .sidebar-brand {
  padding: 0;
  font-size: 19px;
}
.landing-pitch h1 {
  margin-top: auto;
  padding-top: 48px;
  color: #fff;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.landing-pitch > p {
  margin-top: 18px;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.55;
  color: #b7c4c0;
}
.pitch-points {
  margin: 30px 0 auto;
  display: grid;
  gap: 16px;
  max-width: 46ch;
}
.pitch-points li {
  display: flex;
  gap: 13px;
  line-height: 1.45;
}
.pitch-points .icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--side-accent);
}
.pitch-points strong {
  display: block;
  color: #fff;
  font-weight: 600;
}
.landing-foot {
  margin-top: 40px;
  font-size: 12.5px;
  color: var(--side-mute);
}
.landing-panel {
  padding: 48px clamp(20px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 720px;
}
.landing-panel h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.demo-list {
  display: grid;
  gap: 10px;
}
.demo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  text-align: left;
  cursor: pointer;
}
.demo-card:hover {
  border-color: var(--brand);
}
.demo-card:disabled {
  opacity: 0.6;
  cursor: progress;
}
.demo-card .addon-icon {
  width: 42px;
  height: 42px;
}
.demo-card-main {
  min-width: 0;
  flex: 1;
}
.demo-card-name {
  font-size: 15.5px;
  font-weight: 640;
}
.demo-card-blurb {
  color: var(--ink-3);
  font-size: 13px;
  margin: 1px 0 7px;
}
.demo-card > .icon {
  color: var(--ink-3);
}
.demo-card.is-operator {
  background: var(--brand-soft);
  border-color: transparent;
}
.demo-card.is-operator .addon-icon {
  background: var(--brand);
  color: var(--brand-ink);
}
.signin summary {
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 550;
}
.signin form {
  margin-top: 14px;
  max-width: 380px;
}

/* ── operator console extras ──────────────────────────────────────────────────────────── */
.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 32px;
  align-items: end;
  padding: 20px 22px;
}
.hero-split {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.mini {
  font-size: 13px;
  color: var(--ink-3);
}
.mini b {
  display: block;
  font-size: 18px;
  font-weight: 640;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.health {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px 18px;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-3);
}
.live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}
.calc-field {
  margin-bottom: 18px;
}
.calc-field:last-child {
  margin-bottom: 0;
}
.calc-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calc-row input[type='range'] {
  flex: 1;
  accent-color: var(--brand);
  min-width: 0;
}
.calc-row .input-affix {
  width: 128px;
  flex: none;
}
.calc-row .input-affix input {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ledger {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 24px;
  font-variant-numeric: tabular-nums;
}
.ledger dt {
  color: var(--ink-2);
}
.ledger dd {
  text-align: right;
}
.ledger .total {
  padding-top: 9px;
  border-top: 1px solid var(--line-strong);
  font-weight: 660;
  color: var(--ink);
}
.price-input {
  width: 118px;
}
.callout {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 13.5px;
}
.callout .icon {
  margin-top: 1px;
  color: var(--ink-3);
}

/* ── responsive ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split,
  .calc {
    grid-template-columns: minmax(0, 1fr);
  }
  .hide-md {
    display: none;
  }
}
@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 264px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .shell.nav-open .sidebar {
    transform: none;
    box-shadow: var(--shadow-2);
  }
  .shell.nav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(16, 20, 22, 0.45);
  }
  .menu-btn {
    display: inline-grid;
  }
  .topbar {
    padding: 8px 16px;
  }
  .banner {
    padding: 9px 16px;
  }
  .view-host {
    padding: 18px 16px 48px;
  }
  .cols-2,
  .cols-3,
  .board {
    grid-template-columns: minmax(0, 1fr);
  }
  .week {
    grid-template-columns: minmax(0, 1fr);
  }
  .day {
    min-height: 0;
  }
  .landing {
    grid-template-columns: minmax(0, 1fr);
  }
  .landing-pitch {
    padding: 28px 22px 30px;
  }
  .landing-pitch h1 {
    padding-top: 26px;
  }
  .pitch-points {
    margin-bottom: 0;
  }
  .landing-panel {
    padding: 28px 16px 40px;
  }
  .hide-sm {
    display: none;
  }
  .paper {
    padding: 26px 20px;
  }
  .paper-head,
  .paper-parties {
    flex-direction: column;
    gap: 14px;
  }
  .paper-title,
  .paper-dates {
    text-align: left;
  }
  .paper-dates {
    justify-content: start;
  }
  .paper-stamp {
    top: 22px;
    right: 18px;
  }
  .hero {
    font-size: 40px;
  }
  .hero-card,
  .plan {
    grid-template-columns: minmax(0, 1fr);
  }
  .plan-total {
    text-align: left;
  }
  .user-btn .user-name {
    display: none;
  }
  .lines .col-qty {
    width: 62px;
  }
  .lines .col-price {
    width: 96px;
  }
  .lines .col-amount {
    display: none;
  }
}
@media (max-width: 560px) {
  .kpis,
  .cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .field-half {
    grid-column: 1 / -1;
  }
  .page-title {
    font-size: 21px;
  }
  .table th,
  .table td {
    padding-left: 14px;
    padding-right: 14px;
  }
  .meter-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .meter-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* ── printing an estimate or invoice ──────────────────────────────────────────────────── */
@media print {
  :root {
    color-scheme: light;
  }
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  .banner,
  .no-print,
  .toasts,
  .progress {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .view-host {
    max-width: none;
    padding: 0;
  }
  .paper {
    max-width: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  @page {
    margin: 16mm;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ── small additions ──────────────────────────────────────────────────────────────────── */
.sidebar-brand:hover {
  text-decoration: none;
}
.list-title,
.list-sub,
.demo-card-name,
.demo-card-blurb,
.appt-title,
.appt-sub {
  display: block;
}
.list-title.is-wrap {
  white-space: normal;
  font-weight: 500;
}
.page-head-center {
  align-items: center;
}
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 560;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.link-btn:hover {
  color: var(--brand-text);
}
.picker {
  width: auto;
  min-height: 30px;
  padding: 3px 8px;
  font-size: 13px;
}
.kpis-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 700px) {
  .kpis-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.form-heading {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 620;
  color: var(--ink-2);
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}
@media (max-width: 560px) {
  .check-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.input-affix.is-bare > input {
  border-radius: var(--radius-sm);
}
.mini span {
  display: block;
}
.price-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.price-form .input-affix {
  width: 112px;
}
.price-form input {
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.item-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.item-cell .addon-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.item-cell .addon-icon .icon {
  width: 17px;
  height: 17px;
}
.fee-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink-2);
}
.fee-row input {
  width: 76px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.toolbar .search-input .input {
  width: 100%;
}
.table-roomy td:first-child {
  min-width: 200px;
}

/* ── small-screen polish ──────────────────────────────────────────────────────────────── */
.tabs {
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.show-sm {
  display: none;
}
@media (max-width: 860px) {
  .show-sm {
    display: block;
  }
  .topbar {
    gap: 8px;
  }
  .topbar-search {
    max-width: none;
  }
  .topbar-search ~ .spacer {
    display: none;
  }
  .page-actions {
    margin-left: 0;
  }
  .doc-bar .spacer {
    display: none;
  }
}
@media (max-width: 560px) {
  .kpis:not(.kpis-3) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpi {
    padding: 12px 14px;
  }
  .kpi-value {
    font-size: 23px;
  }
  .modal-foot .btn {
    flex: 1 1 auto;
  }
}
@media (max-width: 860px) {
  .toolbar .spacer {
    display: none;
  }
  .toolbar .search-input {
    flex: 1 1 100%;
  }
  .paper-stamp {
    top: 112px;
    right: 18px;
  }
}

/* The PAID / ACCEPTED stamp sits beside the totals, where there is always empty space. */
.paper-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.paper-bottom .paper-totals {
  margin: 0 0 0 auto;
}
.paper-stamp {
  position: static;
  margin-left: 10px;
}
@media (max-width: 560px) {
  .paper-stamp {
    font-size: 14px;
    padding: 4px 10px;
    margin-left: 0;
  }
}

/* ── billing, welcome checklist and emailing (added with the real, paid version) ──────── */
.btn-bright {
  background: #35c9ae;
  border-color: #35c9ae;
  color: #04201a;
}
.btn-bright:hover {
  background: #52d8bf;
  border-color: #52d8bf;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.notice-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
}
.notice-bar > span {
  flex: 1 1 260px;
}
.notice-bar.is-good {
  background: var(--good-soft);
  color: var(--good);
}
.notice-bar.is-info {
  background: var(--info-soft);
  color: var(--info);
}
.notice-bar.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.billing-standing {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
}
.billing-standing h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.billing-standing p {
  margin-top: 2px;
  color: var(--ink-2);
}
.billing-glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--info-soft);
  color: var(--info);
}
.billing-glyph .icon {
  width: 24px;
  height: 24px;
}
.billing-standing.is-good .billing-glyph {
  background: var(--good-soft);
  color: var(--good);
}
.billing-standing.is-warn .billing-glyph {
  background: var(--warn-soft);
  color: var(--warn);
}
.billing-standing.is-bad .billing-glyph {
  background: var(--bad-soft);
  color: var(--bad);
}
.bill-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.bill-line:first-child {
  padding-top: 0;
}
.bill-line.is-total {
  border-bottom: 0;
  padding-bottom: 0;
  font-size: 16px;
  font-weight: 700;
}
.btn-pay {
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
}
.callout-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.callout-warn .icon {
  color: var(--warn);
}
.hint .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2.5px;
}

/* what happened to a document after it was sent */
.journey {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  max-width: 820px;
  margin: 0 auto 14px;
}
.journey-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 13px;
  font-weight: 550;
}
.journey-step .icon {
  width: 14px;
  height: 14px;
}
.journey-step.is-good {
  background: var(--good-soft);
  color: var(--good);
}
.journey-step.is-mute {
  background: var(--mute-soft);
  color: var(--mute);
}
.journey-step.is-bad {
  background: var(--bad-soft);
  color: var(--bad);
}

/* getting-started checklist */
.start-meter {
  height: 5px;
  margin: 12px 20px 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.start-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}
.start-step {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}
.start-step:last-child {
  border-bottom: 0;
}
.start-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: var(--brand-ink);
}
.start-check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}
.start-step.is-done .start-check {
  border-color: var(--brand);
  background: var(--brand);
}
.start-title {
  display: block;
  font-weight: 600;
}
.start-step.is-done .start-title {
  color: var(--ink-3);
}
.list-sub.is-wrap {
  white-space: normal;
}
.welcome-hero {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-bottom: 18px;
  padding: 30px 32px;
  border-radius: 16px;
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(53, 201, 174, 0.26), transparent 65%),
    #0d1614;
  color: #c6d2ce;
}
.welcome-hero > div {
  flex: 1 1 320px;
}
.welcome-hero h1 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: #fff;
}
.welcome-hero p {
  max-width: 46em;
  margin-top: 6px;
  font-size: 15.5px;
}
.tip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.fact dd .pill {
  margin-left: 6px;
  vertical-align: 1px;
}
.fact dd .btn {
  margin-left: 6px;
}
@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .start-step {
    flex-wrap: wrap;
  }
  .start-step .list-main {
    flex: 1 1 60%;
  }
}
@media (max-width: 560px) {
  .billing-standing {
    align-items: flex-start;
    padding: 18px;
  }
  .welcome-hero {
    padding: 24px 20px;
  }
  .btn-pay {
    flex: 1 1 100%;
  }
}

/* ── operator: go-live checklist and the email outbox ─────────────────────────────────── */
.check-item {
  padding: 18px 20px;
}
.check-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.check-main {
  flex: 1;
  min-width: 0;
}
.check-dot {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--mute-soft);
  color: var(--mute);
}
.check-dot .icon {
  width: 16px;
  height: 16px;
}
.check-item.is-done .check-dot {
  background: var(--good-soft);
  color: var(--good);
}
.check-item.is-warn .check-dot {
  background: var(--warn-soft);
  color: var(--warn);
}
.check-item.is-manual .check-dot {
  background: var(--info-soft);
  color: var(--info);
}
.check-summary {
  margin-top: 3px;
  color: var(--ink-2);
}
.check-steps {
  margin-top: 10px;
  font-size: 13.5px;
}
.check-steps summary {
  width: fit-content;
  color: var(--brand-text);
  font-weight: 560;
  cursor: pointer;
}
.check-steps ol {
  margin: 8px 0 2px;
  padding-left: 20px;
  list-style: decimal;
  color: var(--ink-2);
}
.check-steps li {
  margin-bottom: 6px;
}
.check-result {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 550;
}
.check-result.is-good {
  background: var(--good-soft);
  color: var(--good);
}
.check-result.is-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  font: 12.5px/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.mail-frame {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #f4f3ee;
}
.mail-frame iframe {
  display: block;
  width: 100%;
  height: 430px;
  border: 0;
}
.mail-text {
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-2);
}
@media (max-width: 560px) {
  .check-head {
    flex-wrap: wrap;
  }
  .check-head > .pill {
    order: -1;
    margin-left: 44px;
  }
}

/* menu entries stay on one line; the menu grows to fit */
.menu-item {
  white-space: nowrap;
}

/* a status pill in a card's heading sits at the right-hand end, like a button would */
.card-head > .pill {
  margin-left: auto;
  flex: none;
}
#payouts .card-body p + p {
  margin-top: 6px;
}

/* ── Payroll add-on ───────────────────────────────────────────────────────────────────── */
a.tab {
  text-decoration: none;
}
.steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 14px;
  line-height: 1.55;
}
.steps .btn {
  margin-left: 6px;
  vertical-align: baseline;
}
.pay-table td {
  vertical-align: middle;
}
.pay-input {
  width: 96px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pay-salary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.pay-salary .pay-input {
  width: 118px;
}
tr.is-skipped .cell-main {
  color: var(--ink-3);
}
.pay-detail > td {
  background: var(--surface-2);
  padding: 16px 18px 18px;
}
.pay-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 22px;
  margin-bottom: 16px;
}
.pay-extra > label:not(.check) {
  display: grid;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pay-extra .pay-input {
  width: 128px;
}
.pay-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 32px;
}
.pay-lines h4 {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pay-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.pay-line.is-total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}
.pay-notes {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--warn);
  font-size: 13px;
}
.pay-stub-lines {
  margin-top: 22px;
}
.pay-stub-lines tr.is-total td {
  font-weight: 600;
}
@media (max-width: 860px) {
  .pay-detail-grid {
    grid-template-columns: 1fr;
  }
  .pay-input {
    width: 76px;
  }
}
.pay-table th,
.pay-table td {
  padding-left: 12px;
  padding-right: 12px;
}
.pay-table th:first-child,
.pay-table td:first-child {
  padding-left: 18px;
}
.pay-table .pay-input {
  width: 78px;
}
.pay-table .pay-salary .pay-input {
  width: 104px;
}
