/* ==========================================================================
   Hoppers Crossing Plumbing Co. - dashboard design system
   Hand-written, no external fonts, no CDN. Slate + copper, card based.
   ========================================================================== */

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --copper: #b45309;
  --copper-2: #c2410c;
  --copper-dark: #9a3412;
  --copper-soft: #fff7ed;
  --copper-line: #fed7aa;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 26px -18px rgba(15, 23, 42, 0.28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ------------------------------------------------------------------ base */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

a {
  color: var(--copper-2);
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--copper-2);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

.break {
  overflow-wrap: anywhere;
}

.text-danger {
  color: var(--danger);
}

.link {
  color: var(--copper-2);
  font-weight: 600;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.icon {
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ shell */

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 16px 18px;
  background: #0f172a;
  color: #cbd5e1;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 2px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #c2410c, #9a3412);
  color: #fff;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-mark-lg {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.brand-text strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
}

.sidebar .brand-text strong {
  color: #f8fafc;
}

.sidebar .brand-text span {
  color: #94a3b8;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.nav-label {
  margin: 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64748b;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link .icon {
  color: #94a3b8;
}

.nav-link:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
}

.nav-link:hover .icon {
  color: #e2e8f0;
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--copper-2);
}

.nav-link.is-active .icon {
  color: #fdba74;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.user-meta strong {
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta span {
  color: #94a3b8;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .btn-sidebar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sidebar .btn-sidebar:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #fff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 247, 249, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 32px;
}

.topbar-page {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 32px 72px;
}

.icon-btn.nav-toggle {
  display: none;
}

.nav-scrim {
  display: none;
}

/* ------------------------------------------------------------------ pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.6;
  white-space: nowrap;
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill-ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
  color: var(--ok);
}

.pill-warn {
  background: var(--warn-soft);
  border-color: #fde68a;
  color: var(--warn);
}

.pill-neutral {
  background: #f1f5f9;
  border-color: var(--border);
  color: #475569;
}

/* ----------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.badge-warn {
  background: var(--warn-soft);
  border-color: #fde68a;
  color: var(--warn);
}

.badge-ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
  color: var(--ok);
}

.badge-info {
  background: var(--info-soft);
  border-color: #bfdbfe;
  color: var(--info);
}

.badge-neutral {
  background: #f1f5f9;
  border-color: var(--border);
  color: #475569;
}

.badge-sim {
  background: var(--copper-soft);
  border-color: #fdba74;
  border-style: dashed;
  color: var(--copper-dark);
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:disabled,
.btn[aria-busy="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #c2410c, #b45309);
  border-color: var(--copper-dark);
  color: #fff;
  box-shadow: 0 1px 2px rgba(154, 52, 18, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #b45309, var(--copper-dark));
}

.btn-secondary {
  background: #fff;
  border-color: var(--border-strong);
  color: var(--ink-2);
}

.btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: var(--muted-2);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--ink-2);
}

.btn-danger {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #991b1b;
}

.btn-sm {
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.btn.is-busy {
  opacity: 0.7;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.icon-btn:hover {
  background: #eef2f7;
}

/* ------------------------------------------------------------- page heads */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-head-text {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.page-head h1 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.page-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.page-head-lead {
  align-items: flex-end;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--copper-2);
}

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.main > .card {
  margin-bottom: 18px;
}

.detail-main > .card,
.detail-side > .card,
.stack > .card {
  margin-bottom: 16px;
}

.split > .card,
.grid-2 > .card,
.appt-grid > .card,
.form-grid-cards > .card {
  margin-bottom: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #eef2f7;
}

.card-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
}

.card-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-body {
  padding: 18px 20px;
}

.card-body-flush {
  padding: 0;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid #eef2f7;
  background: #fbfcfd;
}

/* ------------------------------------------------------------------ stats */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.stat-tone-danger {
  border-left: 3px solid #dc2626;
  padding-left: 15px;
}

.stat-tone-warn {
  border-left: 3px solid #d97706;
  padding-left: 15px;
}

.stat-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-value-split {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.stat-divider {
  font-size: 19px;
  font-weight: 400;
  color: var(--muted-2);
}

.stat-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.stat-flash {
  animation: stat-flash 900ms ease-out;
}

@keyframes stat-flash {
  0% {
    color: var(--copper-2);
  }
  100% {
    color: var(--ink);
  }
}

/* ------------------------------------------------------------------- grid */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  align-items: start;
}

/* ------------------------------------------------------------------ chart */

.chart-card .card-head {
  align-items: center;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 200px;
}

.chart-grid {
  stroke: #e2e8f0;
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.chart-bar {
  fill: var(--copper);
}

.chart-bar-zero {
  fill: #e2e8f0;
}

.chart-labels {
  display: flex;
  margin-top: 10px;
}

.chart-label {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chart-label b {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.chart-label i {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-size: 10px;
  color: var(--muted-2);
}

.chart-range {
  display: none;
}

.chart-total {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* -------------------------------------------------------------- attention */

.attention-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.attention-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #eef2f7;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.attention-row:last-child {
  border-bottom: 0;
}

.attention-row:hover {
  background: #f8fafc;
}

.attention-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

.attention-dot.tone-danger {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.attention-dot.tone-warn {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

.attention-dot.tone-ok {
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.attention-dot.tone-info {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.attention-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.attention-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-issue {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.attention-time {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ table */

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table-compact {
  min-width: 640px;
}

.table caption {
  text-align: left;
}

.table th {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  color: var(--ink-2);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr[data-row-href] {
  cursor: pointer;
}

.table tbody tr[data-row-href]:hover {
  background: #f8fafc;
}

.table td .empty-state {
  padding: 26px 12px;
}

.cell-ref {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cell-link {
  color: var(--copper-2);
  font-weight: 650;
  text-decoration: none;
}

.cell-link:hover {
  text-decoration: underline;
}

.cell-strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.cell-sub {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.cell-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cell-body {
  max-width: 520px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.cell-actions {
  text-align: right;
  white-space: nowrap;
}

.numeric {
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- chips */

.chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
}

.chip-key {
  font-weight: 650;
  color: var(--ink-2);
}

.chip-value {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.chip-warn {
  background: var(--warn-soft);
  border-color: #fde68a;
}

.chip-ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
}

.chip-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
}

.chip-neutral {
  background: #f1f5f9;
}

/* ---------------------------------------------------------------- filters */

.filters {
  margin-bottom: 18px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(5, minmax(0, 1fr));
  gap: 12px 14px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ------------------------------------------------------------------ forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.req {
  color: var(--danger);
}

.field-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}

.field-wide {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.35;
}

.input:hover {
  border-color: var(--muted-2);
}

.input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15);
}

.input::placeholder {
  color: var(--muted-2);
}

.input-readonly {
  background: #f8fafc;
  color: var(--muted);
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.select {
  padding-right: 9px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.check-block {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.check-input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--copper);
}

.check-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  cursor: pointer;
}

.check-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.form-error {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
}

.form-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.form-note-ok { color: var(--ok); font-weight: 600; }
.form-note-error { color: var(--danger); }
.form-note-info { color: var(--muted); }

.site-contact-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}


.form-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 2px 2px 28px;
}

.form-footer .muted {
  font-size: 12.5px;
}

.rule {
  border: 0;
  border-top: 1px solid #eef2f7;
  margin: 2px 0;
}

.subhead {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------- banner */

.banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.banner-sim {
  background: var(--copper-soft);
  border-color: #fdba74;
  border-style: dashed;
  color: #7c2d12;
}

.banner-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}

.banner-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #7f1d1d;
}

.banner-ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
  color: #065f46;
}

.banner-info {
  background: var(--info-soft);
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.banner-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  opacity: 0.85;
}

.banner-body {
  flex: 1;
  min-width: 0;
}

.banner-title {
  margin: 0 0 2px;
  font-size: 13.5px;
  font-weight: 700;
}

.banner-text {
  font-size: 13px;
  line-height: 1.5;
}

.banner-text p {
  margin: 0 0 4px;
}

.banner-text p:last-child {
  margin-bottom: 0;
}

.banner-actions {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------- meta grid */

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 0;
}

.meta-item {
  min-width: 0;
}

.meta-wide {
  grid-column: 1 / -1;
}

.meta-grid dt {
  margin-bottom: 2px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.meta-grid dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.meta-note {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- kv list */

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.kv {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.kv dt {
  padding-top: 2px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.kv dd {
  margin: 0;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.health-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.health-line .meta-note {
  margin: 0;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.mini-stat {
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 9px;
  background: #fbfcfd;
}

.mini-label {
  display: block;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.mini-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.webhook-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.webhook-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #eef2f7;
}

.webhook-row:first-child {
  padding-top: 0;
}

.webhook-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.webhook-text {
  flex: 1;
  min-width: 0;
}

.webhook-label {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.webhook-url {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: #475569;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ modes */

.mode-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}

.mode-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px 16px;
  background: #fff;
}

.mode-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mode-dot.is-live,
.mode-dot.is-open {
  background: #059669;
}

.mode-dot.is-sim {
  background: #d97706;
}

.mode-dot.is-quiet {
  background: #2563eb;
}

.mode-text {
  min-width: 0;
}

.mode-name {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.mode-value {
  margin: 1px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ detail */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.detail-side,
.detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.enquiry-summary {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

.enquiry-escalation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--danger-soft);
  color: #7f1d1d;
  font-size: 12.5px;
  line-height: 1.45;
}

.enquiry-escalation .icon {
  margin-top: 1px;
}

.enquiry-details {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- transcript */

.transcript {
  max-height: 540px;
  overflow-y: auto;
  padding: 18px 20px;
  background: #f8fafc;
}

.transcript:focus-visible {
  outline: 2px solid var(--copper-2);
  outline-offset: -2px;
}

.messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  display: flex;
}

.msg-out {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: min(78%, 620px);
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.msg-out .msg-bubble {
  background: var(--copper-soft);
  border-color: var(--copper-line);
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.msg-who {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
}

.msg-time {
  font-variant-numeric: tabular-nums;
}

.msg-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.msg-status {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.msg-status-ok {
  color: var(--ok);
}

.msg-status-warn {
  color: var(--warn);
}

.msg-status-danger {
  color: var(--danger);
}

.msg-error {
  font-size: 11.5px;
  color: var(--danger);
}

.transcript-head {
  align-items: center;
}

.transcript-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.transcript-foot {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 20px;
  border-top: 1px solid #eef2f7;
  background: #fff;
  font-size: 11.5px;
  color: var(--muted-2);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.15s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
  background: var(--copper);
}

.switch input:checked + .switch-track::after {
  transform: translateX(15px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--copper-2);
  outline-offset: 2px;
}

/* ------------------------------------------------------------ appointments */

.appt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.appt-item {
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 9px;
  background: #fbfcfd;
}

.appt-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.appt-when {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.appt-note {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.appt-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.appt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}

.appt-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}

.appt-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.appt-card-who {
  min-width: 0;
}

.appt-lead {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}

.appt-lead:hover {
  color: var(--copper-2);
  text-decoration: underline;
}

.appt-request {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13.5px;
  color: var(--ink-2);
}

.appt-facts {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin: 0;
}

.appt-facts div {
  min-width: 0;
}

.appt-facts dt {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.appt-facts dd {
  margin: 1px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

.appt-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.inline-form .input {
  width: auto;
  flex: 0 1 210px;
  min-width: 180px;
}

.inline-form .form-error {
  flex-basis: 100%;
}

/* --------------------------------------------------------------- timeline */

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  display: flex;
  gap: 12px;
}

.timeline-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  box-shadow: 0 0 0 3px #f1f5f9;
}

.timeline-action {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  font-family: var(--mono);
}

.timeline-meta {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* -------------------------------------------------------------- pagination */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid #eef2f7;
}

.pagination-info {
  font-size: 12px;
  color: var(--muted);
}

.pagination-links {
  display: flex;
  gap: 8px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.page-link:hover {
  background: #f8fafc;
}

.page-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ------------------------------------------------------------- empty state */

.empty-state {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--muted-2);
}

.empty-state h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-2);
}

.empty-state p {
  max-width: 340px;
  margin: 0 auto;
  font-size: 12.5px;
  line-height: 1.5;
}

/* --------------------------------------------------------------- settings */

.settings-form {
  gap: 16px;
}

.settings-form > .card {
  margin-bottom: 0;
}

.fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #eef2f7;
  border-radius: 9px;
  background: #fbfcfd;
  cursor: pointer;
}

.service-item:hover {
  border-color: var(--border-strong);
  background: #fff;
}

.service-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.service-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.service-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}

.hours-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.hours-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.notice {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
}

.notice-title {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
}

.notice-text {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* -------------------------------------------------------------- simulator */

.form-grid-cards {
  columns: 2;
  column-gap: 16px;
  margin-bottom: 18px;
}

.form-grid-cards > .card {
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
}

.form-card {
  margin-bottom: 0;
}

.quick-fill {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.quick-fill-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.pad {
  padding: 18px 20px;
}

.pad-top-0 {
  padding: 0;
}

/* --------------------------------------------------------------- public */

.public-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.public-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
}

.public-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--copper-2);
  text-decoration: none;
}

.public-phone:hover {
  text-decoration: underline;
}

.public-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.public-foot {
  padding: 18px 24px 28px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
}

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 160px);
  padding: 24px 0;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  padding: 30px 30px 26px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 2px;
}

.auth-brand .brand-text strong {
  font-size: 16px;
}

.auth-card h1 {
  margin: 2px 0 0;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.auth-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.auth-form {
  margin-top: 4px;
}

.auth-card .banner {
  margin-bottom: 2px;
}

.auth-foot {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: center;
}

.public-body[data-page="login"] .auth-wrap {
  min-height: calc(100vh - 90px);
}

.error-card {
  align-items: center;
  gap: 10px;
  text-align: center;
}

.error-code {
  margin: 0;
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--border-strong);
}

.error-card h1 {
  margin: 0;
  font-size: 20px;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* --------------------------------------------------------------- enquiry */

.enquiry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: start;
  gap: 40px;
  padding: 12px 0;
}

.enquiry-copy {
  max-width: 520px;
}

.enquiry-copy h1 {
  margin: 6px 0 12px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.enquiry-lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
}

.trust-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
}

.trust-list .icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--copper);
}

.trust-list strong {
  color: var(--ink-2);
}

.enquiry-call {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.enquiry-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.enquiry-card .banner {
  margin-bottom: 4px;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.success-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 6px;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #a7f3d0;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}

.success-panel h2 {
  margin: 0;
  font-size: 19px;
  color: var(--ink);
}

.success-panel p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #475569;
}

.success-panel .reference {
  padding: 7px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: var(--ink-2);
}

/* ----------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-left: 4px solid #64748b;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 12px 32px -14px rgba(15, 23, 42, 0.55);
  font-size: 13px;
  line-height: 1.45;
  animation: toast-in 0.18s ease-out;
}

.toast-success {
  border-left-color: #10b981;
}

.toast-error {
  border-left-color: #ef4444;
}

.toast-info {
  border-left-color: #60a5fa;
}

.toast-text {
  flex: 1;
  margin: 0;
  overflow-wrap: anywhere;
}

.toast-close {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.toast-close:hover {
  color: #fff;
}

.toast.is-leaving {
  animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.copy-shim {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .split,
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: 282px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .app-body.nav-open .sidebar {
    transform: none;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
  }

  .app-body.nav-open .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.45);
  }

  .icon-btn.nav-toggle {
    display: inline-grid;
  }

  .main {
    padding: 20px 18px 56px;
  }

  .topbar-inner {
    padding: 10px 16px;
    gap: 10px;
  }

  .topbar-status .pill-quiet {
    display: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appt-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid-cards {
    columns: 1;
  }

  .enquiry-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .enquiry-copy {
    max-width: none;
  }

  .mode-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .attention-row {
    padding: 11px 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .attention-meta {
    width: 100%;
    padding-left: 20px;
    justify-content: flex-start;
  }

  .attention-time {
    display: none;
  }

  .attention-issue {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    overflow: hidden;
  }

  .chart-label b {
    font-size: 10.5px;
  }

  .chart-label i {
    display: none;
  }

  .chart-range {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: var(--muted-2);
  }

  .footer,
  .form-footer {
    padding-bottom: 20px;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-body {
    padding: 14px;
  }

  .card-head {
    padding: 13px 14px;
  }

  .table th,
  .table td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .transcript {
    padding: 14px;
  }

  .msg-bubble {
    max-width: 92%;
  }

  .banner {
    flex-wrap: wrap;
  }

  .banner-actions {
    width: 100%;
    margin-left: 32px;
  }

  .webhook-row {
    flex-wrap: wrap;
  }

  .webhook-row .btn {
    margin-left: auto;
  }

  .kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .service-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .enquiry-copy h1 {
    font-size: 27px;
  }

  .appt-card {
    padding: 15px;
  }

  .appt-facts {
    gap: 18px;
  }

  .hours-row {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .main {
    padding: 16px 14px 48px;
  }

  .topbar-status .pill:nth-child(n + 2) {
    display: none;
  }

  .topbar-page {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 12px 13px;
  }

  .stat-tone-danger,
  .stat-tone-warn {
    padding-left: 11px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-note {
    font-size: 11px;
  }

  .card-body {
    padding: 13px;
  }

  .meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pagination {
    padding: 11px 14px;
  }

  .chip-row {
    gap: 6px;
  }

  .chip {
    padding: 4px 9px;
    font-size: 11.5px;
  }

  .chart-svg {
    height: 150px;
  }

  .hours-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .inline-form {
    width: 100%;
  }

  .inline-form .input {
    flex: 1 1 100%;
  }

  .auth-card {
    padding: 24px 20px 22px;
  }

  .public-main {
    padding: 20px 16px 44px;
  }

  .public-bar-inner {
    padding: 12px 16px;
  }

  .enquiry-card {
    padding: 16px;
  }

  .success-panel {
    padding: 10px 0;
  }

  .toasts {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------ v1.1 additions */

.range-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.range-tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.range-tab:hover { border-color: var(--border-strong); color: var(--ink); }
.range-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.range-note { margin-left: auto; font-size: 12px; color: var(--muted); }
.btn-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px; background: var(--copper); color: #fff; font-size: 11px; font-weight: 700;
}
.unread-pill {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  background: var(--copper-soft); border: 1px solid var(--copper-line); color: var(--copper-dark);
  font-size: 12px; font-weight: 700;
}
.split-activity { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr); }
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #eef2f7; }
.activity-feed li:last-child .activity-item { border-bottom: 0; }
.activity-link { text-decoration: none; color: inherit; display: flex; }
.activity-link:hover { background: #f8fafc; }
.activity-icon {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: var(--muted);
}
.activity-icon.tone-ok { background: var(--ok-soft); color: var(--ok); }
.activity-icon.tone-warn { background: var(--warn-soft); color: var(--warn); }
.activity-icon.tone-danger { background: var(--danger-soft); color: var(--danger); }
.activity-icon.tone-info { background: var(--info-soft); color: var(--info); }
.activity-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity-label { font-size: 13px; font-weight: 650; color: var(--ink); }
.activity-detail { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.activity-meta { font-size: 11.5px; color: #94a3b8; }
.status-chip {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; border: 1px solid transparent;
}
.status-ok { background: var(--ok-soft); color: var(--ok); border-color: #a7f3d0; }
.status-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--copper-line); }
.status-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.status-sim, .status-neutral { background: #f1f5f9; color: var(--muted); border-color: var(--border); }

/* inbox */
.inbox {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: stretch;
  min-height: 620px;
}
.inbox-list, .inbox-main, .inbox-side { display: flex; flex-direction: column; overflow: hidden; }
.inbox-list-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.inbox-list-title { margin: 0; font-size: 14px; }
.input-sm { padding: 7px 10px; font-size: 12.5px; }
.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; max-height: 720px; }
.conv-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #eef2f7; text-decoration: none; color: inherit; }
.conv-item:hover { background: #f8fafc; }
.conv-item.is-active { background: var(--copper-soft); box-shadow: inset 3px 0 0 var(--copper); }
.conv-item.is-unread .conv-name { font-weight: 750; }
.conv-avatar {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e2e8f0; color: var(--ink); font-size: 12px; font-weight: 700;
}
.conv-avatar-lg { width: 42px; height: 42px; flex-basis: 42px; font-size: 14px; }
.conv-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.conv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.conv-name { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.conv-phone { font-size: 11.5px; color: var(--muted); }
.conv-preview { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-dir { color: #94a3b8; }
.conv-badges { display: flex; gap: 4px; margin-top: 3px; align-items: center; flex-wrap: wrap; }
.unread-dot {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--copper); color: #fff; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.conv-empty { padding: 18px; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.inbox-head-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.inbox-name { margin: 0; font-size: 16px; }
.inbox-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.inbox-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.inbox-transcript { flex: 1; overflow-y: auto; padding: 16px; background: #fbfcfe; max-height: 560px; }
.inbox-transcript .messages { margin: 0; }
.inbox-composer { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.inbox-input { resize: vertical; min-height: 48px; }
.inbox-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inbox-hint { font-size: 11.5px; color: var(--muted); }
.inbox-composer-blocked { padding: 16px; }
.inbox-side .card-body { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.side-block { border-top: 1px solid #eef2f7; padding-top: 10px; }
.side-title { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.side-text { margin: 0; font-size: 12.5px; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.msg-owner .msg-bubble { border-color: #bbf7d0; background: #f0fdf4; }

/* receptionist */
.stack-lg { display: flex; flex-direction: column; gap: 14px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.service-check { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.service-check input { margin-top: 2px; }
.service-check strong { display: block; font-size: 13px; }
.service-meta { font-size: 11.5px; color: var(--muted); }
.hours-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.hours-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; }
.hours-label { font-size: 12.5px; color: var(--muted); }
.switch-row { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.switch-input { margin-top: 3px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.switch-text span { font-size: 12px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; }

/* phone & sms */
.split-phone { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inline-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.webhook-list { list-style: none; margin: 0; padding: 0; }
.webhook-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-bottom: 1px solid #eef2f7; }
.webhook-row:last-child { border-bottom: 0; }
.webhook-label { margin: 0 0 2px; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.webhook-url { font-family: var(--mono); font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.check-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); }
.check-list code { font-family: var(--mono); font-size: 11.5px; color: var(--ink); overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink); }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef2f7; font-size: 12.5px; }
.event-list li:last-child { border-bottom: 0; }
.event-type { font-weight: 600; }
.event-meta { color: var(--muted); }
.mini-stat { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 2px; }
.mini-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.mini-stat strong { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.appt-conversation-link { margin-right: auto; display: inline-flex; align-items: center; gap: 5px; }

@media (max-width: 1180px) {
  .inbox { grid-template-columns: 280px minmax(0, 1fr); }
  .inbox-side { grid-column: 1 / -1; }
  .inbox-side .card-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .split-activity, .split-phone { grid-template-columns: minmax(0, 1fr); }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox-list { order: 1; }
  .inbox-main { order: 2; }
  .inbox-side { order: 3; }
  .conv-list { max-height: 320px; }
  .hours-grid { grid-template-columns: minmax(0, 1fr); }
}

/* activity feed scroll */
.activity-feed { max-height: 420px; overflow-y: auto; }
@media (max-width: 900px){ .activity-feed { max-height: none; } }

.table-narrow { min-width: 0; }
.table-narrow th, .table-narrow td { white-space: normal; }
.split-phone .card > .table-wrap { width: 100%; }

/* --------------------------------------------------------- public marketing site */

.public-body[data-page="home"] .public-main {
  max-width: none;
  padding: 0;
}
.public-body[data-page="home"] .public-foot {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 13px 24px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}
.site-brand .brand-text strong { font-size: 15px; }
.site-brand .brand-text span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.site-nav { display: flex; gap: 4px; margin-left: 10px; }
.site-nav-link {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.site-nav-link:hover { background: #f1f5f9; color: var(--ink); }
.site-header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-phone {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: none;
  padding: 7px 10px; border-radius: 7px;
}
.site-phone:hover { background: #f1f5f9; }
.site-owner-link { font-size: 12px; color: var(--muted); text-decoration: none; margin-left: 4px; }
.site-owner-link:hover { color: var(--copper); text-decoration: underline; }
.site-hero {
  background: #fbf7f2;
  border-bottom: 1px solid var(--border);
}
.site-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 68px;
}
.site-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}
.site-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 15ch;
}
.site-hero h1 span { color: var(--copper); }
.site-lead {
  margin: 0 0 24px;
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.65;
  color: #475569;
}
.site-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.site-trust {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  list-style: none; margin: 0; padding: 0;
  font-size: 12.5px; color: #475569;
}
.site-trust li { display: inline-flex; align-items: center; gap: 6px; }
.site-trust .icon { color: var(--ok); }
.site-hero-card {
  background: var(--ink);
  color: #e2e8f0;
  border-radius: 16px;
  padding: 26px 26px 22px;
  box-shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.55);
}
.site-card-eyebrow {
  margin: 0 0 16px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}
.site-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.site-steps li { display: flex; gap: 12px; align-items: flex-start; }
.site-steps li > span {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(180, 83, 9, 0.25); color: #fdba74;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 750;
}
.site-steps strong { display: block; font-size: 14px; color: #fff; margin-bottom: 2px; }
.site-steps p { margin: 0; font-size: 12.5px; color: #94a3b8; line-height: 1.5; }
.site-card-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 20px 0 0; padding-top: 14px; border-top: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 11.5px; color: #94a3b8;
}
.site-section { padding: 64px 24px; }
.site-section-alt { background: #f8fafc; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.site-section-inner { max-width: 1120px; margin: 0 auto; }
.site-section-head { max-width: 620px; margin-bottom: 30px; }
.site-section-head h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; color: var(--ink); }
.site-section-head p { margin: 0; color: #64748b; font-size: 15px; line-height: 1.6; }
.site-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.site-service {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.site-service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--copper-soft); color: var(--copper);
  margin-bottom: 12px;
}
.site-service h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.site-service p { margin: 0; font-size: 13px; line-height: 1.55; color: #64748b; }
.site-exclusions { margin: 20px 0 0; font-size: 12.5px; color: #64748b; }
.site-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.site-how > div { padding: 4px 0; }
.site-how span { font-size: 12px; font-weight: 750; color: var(--copper); letter-spacing: 0.08em; }
.site-how h3 { margin: 8px 0 6px; font-size: 16px; color: var(--ink); }
.site-how p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #64748b; }
.site-areas {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 7px;
}
.site-areas li {
  padding: 5px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border);
  font-size: 12px; color: #475569;
}
.site-contact { background: var(--ink); color: #e2e8f0; padding: 48px 24px; }
.site-contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-contact h2 { margin: 0 0 8px; color: #fff; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; }
.site-contact p { margin: 0; color: #94a3b8; font-size: 14px; max-width: 52ch; }
.site-contact .site-eyebrow { color: #fdba74; }
.site-contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.site-contact .btn-ghost { color: #e2e8f0; border-color: rgba(148, 163, 184, 0.4); }
.site-contact .btn-ghost:hover { background: rgba(148, 163, 184, 0.12); }
@media (max-width: 980px) {
  .site-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 44px 20px 50px; }
  .site-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-how { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .site-nav { display: none; }
  .site-contact-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
  .site-header-inner { flex-wrap: wrap; gap: 10px; padding: 11px 16px; }
  .site-header-actions { width: 100%; justify-content: space-between; }
  .site-phone { padding-left: 0; }
  .site-services { grid-template-columns: minmax(0, 1fr); }
  .site-section { padding: 44px 18px; }
  .site-hero h1 { max-width: none; }
}

.public-home-link { text-decoration: none; color: inherit; display: inline-flex; }
.public-home-link:hover strong { color: var(--copper); }

/* mobile inbox view tabs */
.inbox-tabs { display: none; }
.inbox-tab {
  flex: 1 1 0;
  padding: 9px 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  border-radius: 8px;
  cursor: pointer;
}
.inbox-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.inbox-tab-count {
  display: inline-flex; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px;
  align-items: center; justify-content: center;
  border-radius: 999px; background: var(--copper); color: #fff; font-size: 10.5px;
}
@media (max-width: 900px) {
  .inbox-tabs { display: flex; gap: 6px; margin: 0 0 10px; position: sticky; top: 56px; z-index: 20; padding: 6px 0; background: var(--bg); }
  .inbox[data-view="list"] .inbox-main,
  .inbox[data-view="list"] .inbox-side { display: none; }
  .inbox[data-view="chat"] .inbox-list,
  .inbox[data-view="chat"] .inbox-side { display: none; }
  .inbox[data-view="details"] .inbox-list,
  .inbox[data-view="details"] .inbox-main { display: none; }
  .inbox { min-height: 0; gap: 10px; }
  .inbox-transcript { max-height: none; min-height: 320px; }
  .inbox-composer { position: sticky; bottom: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 900px) {
  .inbox .conv-list { max-height: calc(100vh - 330px); }
}

/* stacked tables on small screens */
@media (max-width: 700px) {
  .table-responsive { min-width: 0; display: block; }
  .table-responsive thead { display: none; }
  .table-responsive tbody { display: block; }
  .table-responsive tr {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid #eef2f7;
  }
  .table-responsive td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
    width: auto;
    padding: 3px 0;
    border: 0;
    vertical-align: top;
    overflow-wrap: anywhere;
  }
  .table-responsive td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 2px;
  }
  .table-responsive td.cell-body { display: block; }
  .table-responsive td.cell-body::before { display: block; margin-bottom: 3px; }
}
