:root {
  /* Clean and calm: an Interstate-style typeface, soft rounded corners, neutral grays, one accent, black buttons. */
  --ink: #1c1c1e;
  --muted: #6c6c70;
  --faint: #8e8e93;
  --line: #e5e5ea;
  --line-strong: #d1d1d6;
  --canvas: #f2f2f7;
  --panel: #ffffff;
  --soft: #f2f2f7;
  /* Hover and press on white rows: dark enough to see clearly. */
  --hover: #e4e4ea;
  --pressed: #d6d6de;
  --deep: #1c1c1e;
  --deep-2: #1c1c1e;
  /* The accent. A business's own brand color replaces it. */
  --teal: #0a66d8;
  --accent-soft: color-mix(in srgb, var(--teal) 10%, #fff);
  --call: #1f9d45;
  --open: #c45500;
  --open-soft: #fff4e8;
  --danger: #d1242f;
  --danger-soft: #ffeef0;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --pill: 999px;
  --shadow: none;
  --serif: var(--sans);
  /* Interstate when it's licensed and loaded; otherwise Overpass, a free typeface from the same highway-sign family. */
  --sans: "Interstate", "Overpass", "Helvetica Neue", Arial, sans-serif;
  --header: 60px;
  --tabbar: 64px;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  /* Overpass sets a little wide; pull the letters in a touch everywhere. */
  letter-spacing: -.02em;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { letter-spacing: inherit; }

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.5; }
body.sheet-open { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only, .owner-skip { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.owner-skip:focus { z-index: 50; width: auto; height: auto; margin: 12px; padding: 10px 14px; clip: auto; border-radius: var(--radius-sm); background: var(--deep); color: #fff; }

/* Sign-in */
.owner-gate { display: grid; place-items: center; align-content: center; gap: 24px; min-height: 100dvh; padding: 40px 20px; }
.gate-brand img { display: block; width: min(220px, 60vw); height: auto; }
.gate-brand strong { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.03em; text-align: center; }
.gate-card { width: min(440px, 100%); padding: 28px 22px; border-radius: var(--radius-lg); background: var(--panel); }
.gate-kicker { margin-bottom: 6px; color: var(--muted); font-size: 14px; font-weight: 500; }
.gate-card h1 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.gate-card > p:not(.gate-kicker) { margin: 10px 0 22px; color: var(--muted); }
.gate-card label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.gate-input-row { display: grid; gap: 10px; }
.gate-input-row input, .owner-search input { width: 100%; min-width: 0; padding: 12px 14px; border: 0; border-radius: var(--radius-sm); background: #e3e3e8; font-size: 16px; }
.gate-input-row input:focus, .owner-search input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.gate-error { min-height: 22px; margin-top: 10px; color: var(--danger); font-size: 15px; }
.gate-security { color: var(--muted); font-size: 14px; text-align: center; }

/* Buttons */
.gate-input-row button, .resolve-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 12px 18px; border: 0; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: opacity .15s ease; }
.gate-input-row button:hover, .resolve-button:hover { opacity: .86; }
.gate-input-row button:active, .resolve-button:active { opacity: .72; }
.resolve-button.is-secondary { background: #e9e9ee; color: var(--ink); }
.quiet-button { min-height: 48px; padding: 12px 16px; border: 0; border-radius: var(--pill); background: #e9e9ee; color: var(--ink); font-size: 16px; font-weight: 600; }
.quiet-button:hover { background: #dedee3; }
.text-action { padding: 6px 0; border: 0; background: transparent; color: var(--teal); font-size: 15px; font-weight: 600; }
.text-action:hover { text-decoration: underline; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 21px; }
.icon-button:hover { background: var(--hover); color: var(--ink); }
.call-back-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 12px 16px; border-radius: var(--pill); background: var(--call); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* App frame */
.owner-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header); padding: 0 16px; border-bottom: .5px solid var(--line-strong); background: rgba(249, 249, 249, .9); backdrop-filter: saturate(180%) blur(20px); }
.owner-brand { display: flex; align-items: center; min-width: 0; color: var(--ink); text-decoration: none; }
.owner-brand img { width: 104px; height: auto; }
.owner-wordmark { overflow: hidden; font-size: 17px; font-weight: 600; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.live-state { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.live-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--call); }
.live-state.is-attention i { background: var(--open); }

.owner-tabs { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; padding-bottom: env(safe-area-inset-bottom); border-top: .5px solid var(--line-strong); background: rgba(249, 249, 249, .94); backdrop-filter: saturate(180%) blur(20px); }
.owner-tabs > div { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: var(--tabbar); }
.owner-tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 6px 4px; border: 0; background: transparent; color: #999; }
.owner-tab i { font-size: 24px; line-height: 1; }
.owner-tab b { font-size: 11px; font-weight: 500; }
.owner-tab.is-active { color: var(--teal); }
.owner-tab.is-active::before { content: none; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; font-variant-numeric: tabular-nums; }
.tab-count { display: none; }

.owner-main { width: min(860px, 100%); margin: 0 auto; padding: 22px 16px calc(var(--tabbar) + 40px + env(safe-area-inset-bottom)); }
.owner-view { display: grid; gap: 16px; animation: view-in .2s ease both; }
#settingsView { row-gap: 28px; }
#settingsView .page-title { margin-bottom: -12px; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }

.page-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-title h1 { font-size: 32px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.page-title p:not(.page-kicker) { margin-top: 8px; color: var(--muted); font-size: 16px; }
.page-kicker { margin-bottom: 2px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.back-link { display: inline-flex; align-items: center; gap: 2px; justify-self: start; margin: -6px 0 -6px -6px; padding: 6px; border: 0; background: transparent; color: var(--teal); font-size: 16px; font-weight: 600; }
.back-link i { font-size: 20px; }

.card { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius-lg); background: var(--panel); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.card-head > span { color: var(--muted); font-size: 14px; }
.empty-owner { padding: 22px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--panel); color: var(--muted); font-size: 15px; text-align: center; }
.card .empty-owner { border: 0; padding: 8px 0; text-align: left; }

/* Inbox and call lists */
.list-section { display: grid; gap: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-label { padding: 0 16px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.section-head .text-action { padding: 0 4px; }
.call-list { display: grid; overflow: hidden; border-radius: var(--radius-lg); background: var(--panel); }
.call-row { display: flex; align-items: center; }
/* Hairline dividers start after the avatar, like iOS lists. */
.call-row + .call-row::before { content: ""; position: absolute; top: 0; right: 0; left: 66px; border-top: .5px solid var(--line-strong); }
.call-row:first-child { border-top: 0; }
.call-row-main { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; min-height: 68px; padding: 12px 14px; border: 0; background: transparent; text-align: left; }
.call-row-main:hover { background: var(--hover); }
.avatar { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(#b4b4bb, #8e8e95); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.avatar i { font-size: 20px; }
.call-row.is-open .avatar { background: linear-gradient(#b4b4bb, #8e8e95); color: #fff; }
.call-row-text { display: grid; flex: 1; gap: 1px; min-width: 0; }
.call-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.call-row-top strong { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.call-row-time { flex: none; color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.call-row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.category-tag { color: var(--faint); font-size: 14px; }
.time-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 14px; }
.priority-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; }
.priority-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.priority-tag.is-urgent { color: var(--danger); }
.priority-tag.is-important { color: var(--open); }
.call-row-reason { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 15px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.new-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.call-icon-button { display: grid; flex: none; place-items: center; width: 44px; height: 44px; margin-right: 12px; border-radius: 50%; background: var(--call); color: #fff; font-size: 20px; text-decoration: none; }
.call-icon-button:hover { filter: brightness(.92); }
.alex-questions { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 16px; padding: 12px 14px 12px 16px; border: 0; border-radius: var(--radius-md); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; }
.alex-questions:hover { background: var(--hover); }
.alex-questions-text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.alex-questions-text strong { font-size: 17px; font-weight: 600; }
.alex-questions-text span { overflow: hidden; color: var(--muted); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.row-value.is-waiting { color: var(--teal); font-weight: 600; }
.all-clear { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: var(--muted); font-size: 16px; }
.all-clear i { color: var(--call); font-size: 24px; }
.all-calls-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 4px; border: 0; background: transparent; color: var(--muted); font-size: 15px; text-align: left; }
.all-calls-action { display: inline-flex; align-items: center; gap: 2px; color: var(--teal); font-weight: 600; white-space: nowrap; }
.all-calls-link:hover .all-calls-action { text-decoration: underline; }

.owner-search { display: block; }
.owner-search input { padding-left: 40px; background: #e3e3e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2356645f' stroke-width='1.8'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 14px center; }
.day-groups { display: grid; gap: 18px; }
.day-group-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; }
.day-group-heading h2 { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.day-group-heading span { color: var(--faint); font-size: 14px; }

/* Notes inside a call */
.message-note { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--panel); }
.note-toggle { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 0; }
.note-text { font-size: 15px; }
.note-editor { display: grid; gap: 8px; }
.note-editor textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); font-size: 16px; resize: vertical; }
.note-editor textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.note-editor .resolve-button { justify-self: end; }

/* Settings */
/* Settings, laid out like the phone's own Settings app: inset groups of rows with a colored icon,
   the name on the left, what's saved on the right in gray, and a short footnote under some groups. */
.settings-group { display: grid; gap: 6px; }
.settings-group[hidden] { display: none; }
.settings-group > h2 { margin: 0; padding: 0 16px; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.settings-list { display: grid; margin: 0; overflow: hidden; border-radius: var(--radius-md); background: var(--panel); }
.settings-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin: 0; padding: 8px 14px; border: 0; background: var(--panel); color: inherit; font-size: 17px; text-align: left; text-decoration: none; cursor: pointer; }
.settings-row[hidden] { display: none; }
div.settings-row { cursor: default; }
.settings-row + .settings-row::before, .receptionist-card-top + .settings-row::before { content: ""; position: absolute; top: 0; right: 0; left: 55px; border-top: .5px solid var(--line-strong); }
div.settings-row + .settings-row::before, .usage-stats .settings-row::before { left: 16px; }
button.settings-row:hover, a.settings-row:hover { background: var(--hover); }
button.settings-row:active, a.settings-row:active { background: var(--pressed); }
/* Icons sit in soft tinted circles, the icon in its color, rather than white on a solid square. */
.row-tile { --tile: var(--faint); display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--tile) 14%, #fff); color: var(--tile); font-size: 18px; }
.row-tile.is-purple { --tile: #9b4fd0; }
.row-tile.is-blue { --tile: #1a6fe0; }
.row-tile.is-red { --tile: #e0352b; }
.row-tile.is-orange { --tile: #e07c00; }
.row-tile.is-indigo { --tile: #5250c8; }
.row-tile.is-green { --tile: #22994a; }
.row-tile.is-brown { --tile: #8f6e47; }
.row-tile.is-gray { --tile: #6c6c70; }
.row-title { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.row-value { flex: 1; min-width: 0; margin: 0; overflow: hidden; color: var(--faint); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.row-value.is-invite { color: var(--teal); }
.row-text { display: grid; flex: 1; gap: 1px; min-width: 0; }
.row-text strong { font-size: 17px; font-weight: 500; }
.row-text small { overflow: hidden; color: var(--faint); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.row-chevron { flex: none; margin-left: -4px; color: #c4c4c7; font-size: 18px; }
.row-alert { flex: none; color: #ff9500; font-size: 20px; }
.row-title + .row-alert { margin-left: auto; }
.row-title + .row-chevron { margin-left: auto; }
.row-badge { display: grid; flex: none; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #ff3b30; color: #fff; font-size: 14px; font-weight: 500; }
.settings-footnote { margin: 0; padding: 0 16px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.settings-footnote:empty { display: none; }

/* Status and test call */
.test-call-number { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.test-call-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.test-call-actions > * { flex: 1 1 140px; }

/* Forms: open positions and delivery */
.delivery-panel { display: grid; gap: 16px; }
.delivery-choice, .delivery-frequency { margin: 0; min-width: 0; }
.delivery-choice legend, .delivery-frequency legend { float: left; width: 100%; margin-bottom: 4px; padding: 0; font-size: 18px; font-weight: 600; }
.delivery-choice > label, .frequency-options label { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); cursor: pointer; }
.delivery-choice > label:has(input:checked), .frequency-options label:has(input:checked) { border-color: var(--teal); background: var(--accent-soft); }
.delivery-choice > label input, .frequency-options input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal); }
.delivery-choice > label span, .frequency-options span { display: grid; gap: 1px; }
.delivery-choice strong, .frequency-options strong { font-size: 16px; font-weight: 600; }
.delivery-choice small, .frequency-options small, .delivery-field small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.delivery-fields { display: grid; gap: 14px; margin-top: 4px; }
.delivery-field { display: grid; gap: 6px; }
.delivery-field > span { font-size: 15px; font-weight: 600; }
.delivery-field input, .delivery-field textarea, .delivery-field select { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); font-size: 16px; resize: vertical; }
.delivery-field input:focus, .delivery-field textarea:focus, .delivery-field select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.delivery-field.is-disabled { opacity: .5; }
.delivery-field small.is-ready { color: var(--teal); }
.delivery-field small.is-attention { color: var(--open); }
.coming-soon-note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-md); background: var(--soft); color: var(--muted); font-size: 14px; line-height: 1.45; }
.coming-soon-note i { flex: none; margin-top: 1px; color: var(--teal); font-size: 18px; }
.coming-soon-note strong { color: var(--ink); font-weight: 600; }
.frequency-options { display: grid; gap: 10px; }
.daily-report-schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.form-footer p { flex: 1 1 100%; color: var(--muted); font-size: 15px; }
.form-footer p:empty { display: none; }
.form-footer > button { flex: 1 1 140px; }

.position-list { display: grid; gap: 10px; }
.position-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title remove" "details details"; gap: 10px 12px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--soft); }
.position-row label { display: grid; gap: 6px; min-width: 0; }
.position-row label:first-child { grid-area: title; }
.position-row label:nth-child(2) { grid-area: details; }
.position-row .remove-position { grid-area: remove; }
.position-row label span { font-size: 14px; font-weight: 600; }
.position-row input { width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); font-size: 16px; }
.position-row input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.email-row .remove-email { display: grid; flex: none; place-items: center; width: 36px; height: 36px; margin-right: -8px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--danger); font-size: 19px; cursor: pointer; }
.email-row .remove-email:hover { background: var(--danger-soft); }
.email-row .remove-email[hidden] { display: none; }
.email-rows > .form-row + .form-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.remove-position { min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--danger); font-size: 15px; font-weight: 600; }
.remove-position:hover { background: var(--danger-soft); }
.position-empty { padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--muted); font-size: 15px; text-align: center; }
.add-position { display: inline-flex; align-items: center; justify-self: start; gap: 6px; min-height: 44px; padding: 9px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); color: var(--teal); font-size: 15px; font-weight: 600; }
.add-position:hover { border-color: var(--teal); background: var(--accent-soft); }
.hiring-preview h2 { font-size: 18px; font-weight: 600; }
.preview-prompt { color: var(--muted); font-size: 15px; }
.hiring-preview blockquote { margin: 0; padding: 12px 15px; border-radius: 18px 18px 18px 6px; background: #e9e9eb; font-size: 16px; line-height: 1.45; }

/* Call details sheet */
.call-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .35); animation: fade-in .15s ease both; }
@keyframes fade-in { from { opacity: 0; } }
.sheet-panel { display: flex; flex-direction: column; width: 100%; max-height: 94dvh; border-radius: 26px 26px 0 0; background: var(--canvas); animation: sheet-up .22s ease both; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } }
.sheet-head { position: relative; display: flex; align-items: flex-start; gap: 6px; padding: 18px 12px 10px; border-radius: 26px 26px 0 0; background: var(--panel); }
/* A grabber, like iOS sheets. */
.sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: #d1d1d6; }
.sheet-head > div { display: grid; flex: 1; gap: 2px; min-width: 0; padding-top: 6px; }
.sheet-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.sheet-head p { color: var(--muted); font-size: 14px; }
.sheet-actions { display: flex; gap: 10px; padding: 4px 16px 16px; background: var(--panel); border-bottom: .5px solid var(--line-strong); }
.sheet-actions > * { flex: 1; }
.sheet-body { overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.call-detail { display: grid; gap: 14px; }
.detail-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-md); background: var(--panel); }
.detail-card blockquote { margin: 0; font-size: 17px; line-height: 1.5; }
.call-detail h3 { font-size: 17px; font-weight: 600; }
.detail-list { display: grid; gap: 12px; margin: 0; }
.detail-list div { min-width: 0; }
.detail-list dt { color: var(--muted); font-size: 14px; font-weight: 500; }
.detail-list dd { margin: 2px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.detail-card audio { width: 100%; height: 44px; }
.load-recording { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 11px; border: 0; border-radius: var(--pill); background: #e9e9ee; color: var(--ink); font-size: 16px; font-weight: 600; }
.transcript { display: grid; gap: 8px; }
.transcript-turn { display: grid; gap: 1px; max-width: 86%; padding: 8px 13px; border-radius: 18px 18px 18px 6px; background: #e9e9eb; }
.transcript-turn.is-agent { justify-self: end; border-radius: 18px 18px 6px 18px; background: var(--teal); color: #fff; }
.transcript-turn strong { color: var(--muted); font-size: 12px; font-weight: 600; }
.transcript-turn.is-agent strong { color: rgba(255, 255, 255, .8); }
.transcript-turn p { font-size: 15px; line-height: 1.45; }

/* Feedback */
.owner-loading { display: grid; place-items: center; gap: 12px; padding: 100px 20px; color: var(--muted); }
.owner-loading span { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.owner-error { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); }
.owner-toast { position: fixed; right: 16px; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); left: 16px; z-index: 45; padding: 12px 16px; border-radius: var(--radius-md); background: rgba(28, 28, 30, .92); color: #fff; font-size: 15px; text-align: center; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.owner-toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 620px) {
  .live-state #liveStateText { display: none; }
  .live-state { padding: 10px; }
}

/* Tablet and desktop: tabs move to the top, content gets more room */
@media (min-width: 900px) {
  :root { --header: 66px; }
  .owner-header { padding: 0 max(24px, calc((100vw - 860px) / 2)); }
  .owner-brand img { width: 124px; }
  .owner-tabs { position: sticky; top: var(--header); bottom: auto; padding: 0 max(16px, calc((100vw - 860px) / 2 - 8px)); border-top: 0; border-bottom: 1px solid var(--line); }
  .owner-tabs > div { display: flex; gap: 4px; height: auto; }
  .owner-tab { display: inline-flex; align-items: center; gap: 8px; padding: 14px 12px; }
  .owner-tab i { font-size: 19px; }
  .owner-tab b { font-size: 15px; }
  .owner-tab.is-active::before { content: ""; position: absolute; top: auto; bottom: -1px; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--teal); }
  .tab-badge { position: static; }
  .owner-main { padding: 32px 0 80px; }
  .page-title h1 { font-size: 34px; }
  .call-sheet { align-items: center; justify-content: center; padding: 24px; }
  .sheet-panel { width: min(720px, 100%); max-height: 88vh; border-radius: 26px; overflow: hidden; }
  .owner-toast { right: 24px; bottom: 24px; left: auto; max-width: 380px; }
  .gate-input-row { grid-template-columns: 1fr auto; }
  .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-footer p { flex: 1 1 auto; }
  .form-footer > button { flex: 0 0 auto; }
}

/* Business info: hours, team, other info */
.template-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.template-chips > span { flex-basis: 100%; color: var(--muted); font-size: 14px; font-weight: 600; }
.template-chip { min-height: 38px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 15px; font-weight: 500; }
.template-chip:hover { border-color: var(--teal); color: var(--teal); }
.hours-list { display: grid; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.hours-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "day toggle" "times times"; align-items: center; gap: 8px 12px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel); }
.hours-row .hours-day { grid-area: day; }
.hours-row .switch { grid-area: toggle; }
.hours-row .hours-times, .hours-row .hours-closed { grid-area: times; }
.hours-row:first-child { border-top: 0; }
.hours-day { font-size: 16px; font-weight: 600; }
.hours-times { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.hours-times input { flex: 1 1 0; min-width: 0; max-width: 150px; padding: 8px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); font-size: 15px; }
.hours-times input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.hours-closed { color: var(--faint); font-size: 15px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s ease; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); outline-offset: 2px; }
.team-row { grid-template-columns: minmax(0, 1fr) 96px; grid-template-areas: "name remove" "role ext"; }
.team-row .remove-position { justify-self: end; }
.team-row label:nth-child(1) { grid-area: name; }
.team-row label:nth-child(2) { grid-area: role; }
.team-row label:nth-child(3) { grid-area: ext; }
@media (min-width: 600px) {
  .team-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px auto; grid-template-areas: "name role ext remove"; }
}
@media (min-width: 600px) {
  .hours-row { grid-template-columns: 120px auto 1fr; grid-template-areas: "day toggle times"; }
  .hours-row .hours-times, .hours-row .hours-closed { justify-self: end; }
}

/* Test call with the receptionist, inside the dashboard */
.talk-panel { height: 94dvh; }
.talk-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: var(--canvas); }
.talk-feedback { max-height: 45dvh; overflow-y: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.talk-feedback .feedback-card { border: 0; padding: 0; box-shadow: none; }

/* Telling the receptionist what to change */
.feedback-card { display: grid; gap: 10px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--panel); }
.feedback-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0; border: 0; background: transparent; color: var(--ink); font-size: 16px; font-weight: 600; text-align: left; }
.feedback-head > i:first-child { color: var(--teal); font-size: 20px; }
.feedback-head span { flex: 1; }
.feedback-chevron { color: var(--faint); transition: transform .15s ease; }
.feedback-card.is-collapsed .feedback-chevron { transform: rotate(-90deg); }
.feedback-body { display: grid; gap: 10px; }
.feedback-body textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; font-size: 16px; resize: vertical; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.feedback-status { min-height: 0; color: var(--muted); font-size: 14px; }
.feedback-status:empty { display: none; }
.feedback-result { display: grid; gap: 10px; }
.feedback-result:empty { display: none; }
.feedback-summary { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: 15px; line-height: 1.45; }
.feedback-change { display: grid; gap: 6px; }
.feedback-change span { color: var(--muted); font-size: 13px; }

.preference-list { display: grid; gap: 10px; }
.preference-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--panel); }
.preference-text { display: grid; flex: 1; gap: 4px; min-width: 0; }
.preference-text strong { font-size: 15px; font-weight: 600; line-height: 1.4; }
.preference-text small { color: var(--faint); font-size: 13px; }
.preference-text p { color: var(--muted); font-size: 14px; line-height: 1.4; }
@media (min-width: 900px) {
  #talkSheet { align-items: center; justify-content: center; }
  .talk-panel { width: min(640px, 92vw); height: min(860px, 92dvh); border-radius: 26px; overflow: hidden; }
}
.text-action.is-danger { color: var(--danger); }
.test-tag { padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--teal); font-size: 13px; font-weight: 600; }

.voice-options { display: grid; gap: 10px; }
.voice-option { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.voice-option:has(input:checked) { border-color: var(--teal); background: var(--accent-soft); }
.voice-option label { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; cursor: pointer; }
.voice-option input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--teal); }
.voice-option span { display: grid; gap: 1px; }
.voice-option strong { font-size: 16px; font-weight: 600; }
.voice-option small { color: var(--muted); font-size: 14px; }
.voice-play { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--teal); font-size: 18px; cursor: pointer; }
.voice-play:hover { border-color: var(--teal); }
.voice-play:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 35%, transparent); outline-offset: 2px; }
.voice-option strong { display: flex; align-items: center; gap: 8px; }
.voice-default { padding: 2px 8px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 12px; font-style: normal; font-weight: 600; }

/* Settings: the receptionist at the top, like the account card in the phone's Settings */
.receptionist-card-top { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.receptionist-card-top > div { flex: 1; min-width: 0; }
.receptionist-card-top:hover { background: var(--hover); }
.receptionist-card-top:active { background: var(--pressed); }
.receptionist-avatar { display: grid; flex: none; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(#b4b4bb, #8e8e95); color: #fff; font-size: 26px; font-weight: 500; }
.receptionist-card h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.2; }
.receptionist-card-top p { margin: 2px 0 0; color: var(--muted); font-size: 15px; line-height: 1.35; }
.receptionist-card-top .receptionist-status { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 14px; }
.receptionist-status i { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--call); }
.receptionist-status[data-state="trial"] i { background: var(--open); }
.receptionist-status[data-state="attention"] i { background: var(--danger); }
.receptionist-card .settings-row .row-title { flex: 1; max-width: none; color: var(--teal); }

/* Emergencies */
.emergency-form { display: grid; gap: 22px; }
.emergency-situations h2 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.emergency-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.emergency-list li { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); font-size: 15px; }
.emergency-list li span { flex: 1; min-width: 0; }
.emergency-list li.emergency-empty { padding: 12px 14px; border-style: dashed; background: none; color: var(--muted); }
.emergency-remove { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 17px; cursor: pointer; }
.emergency-remove:hover { background: var(--danger-soft); color: var(--danger); }
.emergency-add { display: flex; gap: 8px; }
.emergency-add input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; font-size: 16px; }
.emergency-add .quiet-button { display: inline-flex; align-items: center; gap: 4px; }
.emergency-ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.emergency-ideas:empty { display: none; }
.emergency-idea { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--teal); font-size: 14px; cursor: pointer; }
.emergency-idea:hover { border-color: var(--teal); background: var(--accent-soft); }
.emergency-911 { display: flex; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.emergency-911 i { flex: none; margin-top: 2px; color: var(--danger); }

/* This month: calls and minutes against the plan, as plain value rows */
.usage-stats .row-value { color: var(--faint); font-variant-numeric: tabular-nums; }
.usage-meter-row { padding-top: 12px; padding-bottom: 14px; }
.usage-meter { flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: #e5e5ea; }
.usage-meter span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .3s ease; }
.usage-meter[data-level="high"] span { background: var(--open); }
.usage-meter[data-level="over"] span { background: var(--danger); }

/* Call rows: what they wanted on every row; urgent rows marked down the left edge */
.call-row { position: relative; background: var(--panel); transition: transform .15s ease; touch-action: pan-y; }
.call-row.is-urgent { box-shadow: inset 3px 0 0 var(--danger); }
.call-row-reason { color: var(--ink); font-size: 15px; }
.call-row-side { display: grid; flex: none; justify-items: center; gap: 4px; width: 84px; margin-right: 8px; }
.call-row-side .call-icon-button { margin-right: 0; }
.call-row-when { max-width: 84px; color: var(--open); font-size: 12px; font-weight: 500; line-height: 1.2; text-align: center; }
.call-row.is-swiping-done { background: var(--accent-soft); }

/* Call details: summary first */
.summary-card .summary-headline { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; }
.summary-card blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line-strong); color: var(--ink); font-size: 16px; }
.transcript.is-folded > :nth-child(n+5) { display: none; }
.transcript-more { justify-self: start; }
.priority-picker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 10px 16px; border-radius: var(--radius-md); background: var(--panel); color: var(--muted); font-size: 15px; }
.priority-picker select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; }
.priority-picker.is-urgent select { color: var(--danger); }
.priority-picker.is-important select { color: var(--open); }

/* Tell Alex */
.feedback-card.is-open .feedback-head { font-size: 17px; font-weight: 600; }
.feedback-notice { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); color: var(--ink); font-size: 14px; line-height: 1.45; }

/* Prices */
.price-list { display: grid; gap: 10px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name name" "kind amount" "note note" "says says" "remove remove"; gap: 10px 12px; padding: 14px; border-radius: var(--radius-md); background: var(--soft); }
.price-row.is-range { grid-template-areas: "name name" "kind kind" "amount max" "note note" "says says" "remove remove"; }
.price-row label { display: grid; gap: 6px; min-width: 0; }
.price-row label span { font-size: 14px; font-weight: 600; }
.price-row input, .price-row select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); font-size: 16px; }
.price-row input:focus, .price-row select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.price-name { grid-area: name; }
.price-kind { grid-area: kind; }
.price-amount { grid-area: amount; }
.price-max { grid-area: max; }
.price-note { grid-area: note; }
.price-row .remove-position { grid-area: remove; justify-self: start; }
.price-says { grid-area: says; margin: 0; color: var(--ink); font-size: 15px; line-height: 1.45; }
.price-says.is-empty { color: var(--muted); }
.price-row.is-suggested { border: 1px dashed var(--line-strong); background: var(--panel); }
/* A suggestion stays short until it has a price; the note shows up once it does. */
.price-row.is-suggested .remove-position { color: var(--muted); }
.price-row.is-suggested .remove-position:hover { background: var(--hover); color: var(--ink); }
.price-ideas { display: grid; gap: 10px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.price-ideas h2 { margin: 0; font-size: 18px; font-weight: 600; }
.price-ideas > p { margin: 0; color: var(--muted); font-size: 15px; }
.price-ideas .link-button { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--teal); font-size: 15px; font-weight: 600; cursor: pointer; }
@media (min-width: 700px) {
  .price-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; grid-template-areas: "name kind amount remove" "note note note note" "says says says says"; align-items: end; }
  .price-row.is-range { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "name kind amount max remove" "note note note note note" "says says says says says"; }
  .price-row .remove-position { justify-self: end; }
}

/* Settings pages, laid out like the phone's own Settings: a top bar with Back and Save, a large title,
   then inset groups of rows. Each field sits in a row with its label on the left. Explanations go in
   small gray footnotes under a group, the way the phone explains a setting. */
.settings-page { row-gap: 28px; }
.settings-page .page-title { margin-top: -14px; margin-bottom: -14px; }
.nav-bar { position: sticky; top: var(--header); z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: -22px -16px -10px; padding: 0 8px; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: saturate(180%) blur(20px); }
.nav-bar .back-link { margin: 0; padding: 8px; font-weight: 400; font-size: 17px; }
.nav-bar .back-link i { font-size: 24px; margin-right: -2px; }
.nav-save { min-height: 44px; padding: 8px 10px; border: 0; background: none; color: var(--teal); font-size: 17px; font-weight: 600; cursor: pointer; }
.nav-save:disabled { color: var(--faint); cursor: progress; }
.page-form { display: grid; gap: 28px; }
.form-status { margin: 0 0 -16px; padding: 0 16px; color: var(--muted); font-size: 14px; }
.form-status:empty { display: none; }

/* One field per row, label on the left */
.form-row, .price-row > label, .price-head > label, .position-row > label { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 4px 16px; background: var(--panel); }
.form-row + .form-row::before, .price-row > * + *::before, .position-row > * + *::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.form-row > span, .price-row > label > span, .price-head > label > span, .position-row > label > span { flex: none; width: 92px; color: var(--ink); font-size: 17px; font-weight: 400; }
.form-row input, .form-row select, .form-row textarea,
.price-row textarea { flex: 1; width: auto; min-width: 0; min-height: 40px; padding: 10px 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; line-height: 1.35; resize: none; overflow: hidden; box-shadow: none; }
.price-row textarea:focus { outline: none; }
.price-row textarea::placeholder { color: #c4c4c7; }
.price-row .price-note { align-items: flex-start; }
.price-row .price-note > span { padding-top: 10px; }
.price-row input, .price-row select, .position-row input { flex: 1; width: auto; min-width: 0; min-height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 17px; box-shadow: none; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.price-row input:focus, .price-row select:focus, .position-row input:focus { border: 0; outline: none; box-shadow: none; }
.form-row select, .price-row select { color: var(--faint); appearance: none; text-align: right; text-align-last: right; cursor: pointer; }
.form-row input::placeholder, .form-row textarea::placeholder, .price-row input::placeholder, .position-row input::placeholder { color: #c4c4c7; }
.form-row.is-stacked { display: block; padding: 10px 16px; }
.form-row.is-stacked textarea { display: block; width: 100%; line-height: 1.4; resize: vertical; }

/* Lists of things the owner adds: each one is its own small group, with a red remove row at the bottom */
.price-list, .position-list { display: grid; gap: 16px; }
.price-row, .position-row, .price-row.is-range, .team-row { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--panel); }
.price-row.is-suggested { border: 0; background: var(--panel); }
.remove-position, .price-row .remove-position, .position-row .remove-position, .team-row .remove-position { position: relative; align-self: stretch; justify-self: stretch; min-height: 46px; margin: 0; padding: 0 16px; border: 0; border-radius: 0; background: var(--panel); color: var(--danger); font-size: 17px; font-weight: 400; text-align: left; }
.remove-position:hover { background: var(--hover); }
.price-head { position: relative; display: flex; align-items: center; background: var(--panel); }
.price-head > label { flex: 1; min-width: 0; padding-right: 0; }
.price-row .price-head .remove-position { flex: none; align-self: center; min-height: 44px; padding: 0 16px 0 8px; background: none; color: var(--danger); font-size: 15px; }
/* Short labels (Item, Type, Price), so item names have room next to Remove. */
.price-row > label > span, .price-head > label > span { width: 52px; }
.price-row .price-head .remove-position:hover { background: none; text-decoration: underline; }
.price-says { position: relative; margin: 0; padding: 10px 16px; background: var(--panel); color: var(--muted); font-size: 15px; line-height: 1.45; }
.price-says.is-empty { color: var(--faint); }
.position-empty { padding: 14px 16px; border: 0; border-radius: var(--radius-md); background: var(--panel); color: var(--faint); font-size: 15px; text-align: left; }
.add-position { display: flex; align-items: center; justify-self: stretch; gap: 12px; width: 100%; min-height: 48px; margin-top: 10px; padding: 0 16px; border: 0; border-radius: var(--radius-md); background: var(--panel); color: var(--teal); font-size: 17px; font-weight: 400; }
.add-position:hover { border: 0; background: var(--hover); }
.add-position i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #34c759; color: #fff; font-size: 15px; }
.price-ideas { margin: 0; padding: 0; border: 0; }
.price-ideas > h2 { margin: 0; font-size: 13px; font-weight: 400; }
.price-ideas .link-button { justify-self: start; padding: 0 16px; }

/* Services: suggestions are one list with Yes and No on each row */
.service-idea { position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 12px 6px 16px; background: var(--panel); }
.service-idea + .service-idea::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.service-idea-name { flex: 1; min-width: 0; font-size: 17px; }
/* "Service" is a longer label than "Item", so it gets a little more room. */
.service-switch-row { position: relative; display: grid; gap: 2px; padding: 8px 16px; background: var(--panel); }
.service-switch-row + .service-switch-row::before, .service-switch-row + .service-idea::before, .service-switch-row + .price-row::before, .price-row + .service-switch-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.service-switch-head { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.service-note-button { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.service-note-button:hover { background: var(--hover); color: var(--teal); }
.price-head .service-note-button { align-self: end; }
.service-switch-row .price-note { grid-area: auto; display: flex; align-items: center; gap: 12px; padding: 0; }
.service-switch-row .price-note span { flex: none; width: 52px; color: var(--muted); font-size: 15px; font-weight: 400; }
.service-switch-row .price-note textarea { flex: 1; min-width: 0; min-height: 36px; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.35; resize: none; overflow: hidden; }
.service-switch-row .price-note textarea:focus { outline: none; }
.service-switch-row .price-note textarea::placeholder { color: #c4c4c7; }
.service-switch-row .price-note { align-items: flex-start; }
.service-switch-row .price-note > span { padding-top: 9px; }
.service-switch-row .price-note input { flex: 1; min-width: 0; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 16px; box-shadow: none; }
.service-switch-row .price-note input:focus { outline: none; box-shadow: none; }
.service-switch-row .price-note input::placeholder { color: #c4c4c7; }
#specialtyServices .price-row, #notOfferedServices .price-row { border-radius: 0; }
.service-add { flex: none; min-width: 56px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--pill); background: var(--soft); color: var(--muted); font-size: 15px; font-weight: 600; cursor: pointer; }
.service-add:hover { background: var(--hover); color: var(--ink); }
.service-add:active { background: var(--pressed); }
.service-row > label > span, .service-row .price-head > label > span { width: 64px; }

/* Hours: one row per day, a switch on the right, times under it */
.hours-list { border: 0; border-radius: var(--radius-md); }
.hours-row { position: relative; grid-template-columns: 1fr auto; grid-template-areas: "day toggle" "times times"; gap: 6px 12px; min-height: 48px; padding: 9px 16px; border-top: 0; }
.hours-row + .hours-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.hours-day { font-size: 17px; font-weight: 400; }
.hours-times { gap: 8px; color: var(--faint); font-size: 15px; }
.hours-times input { flex: none; width: auto; max-width: none; padding: 6px 10px; border: 0; border-radius: 12px; background: #eeeef0; color: var(--ink); font-size: 16px; }
.hours-times input:focus { border: 0; box-shadow: 0 0 0 2px var(--teal); }
.hours-closed { display: none; }
.switch { width: 51px; height: 31px; }
.switch span::after { width: 27px; height: 27px; top: 2px; left: 2px; }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
@media (min-width: 600px) {
  .hours-row { grid-template-columns: 1fr auto auto; grid-template-areas: "day times toggle"; }
}

/* Voice: like choosing a ringtone. A check by the chosen one, a play button on the right */
.voice-options { gap: 0; }
.voice-option { position: relative; gap: 8px; padding: 0 12px 0 0; border: 0; border-radius: 0; background: var(--panel); }
.voice-option + .voice-option::before { content: ""; position: absolute; top: 0; right: 0; left: 46px; border-top: .5px solid var(--line-strong); }
.voice-option:has(input:checked) { border: 0; background: var(--panel); }
.voice-option label { gap: 0; padding: 10px 0 10px 16px; }
.voice-option input { position: absolute; opacity: 0; pointer-events: none; }
.voice-option label::before { content: ""; flex: none; width: 30px; color: var(--teal); font-size: 18px; font-weight: 600; }
.voice-option:has(input:checked) label::before { content: "✓"; }
.voice-option:has(input:focus-visible) label { outline: 2px solid var(--teal); outline-offset: -2px; }
.voice-option strong { font-size: 17px; font-weight: 400; }
.voice-option small { color: var(--faint); font-size: 14px; }
.voice-default { padding: 1px 7px; background: #e9e9ee; color: var(--muted); font-size: 12px; font-weight: 500; }
.voice-play { width: 34px; height: 34px; border: 0; background: var(--accent-soft); font-size: 15px; }

/* Emergencies */
.emergency-list { gap: 0; margin: 0; }
.emergency-list li { position: relative; gap: 12px; min-height: 48px; padding: 8px 16px; border: 0; border-radius: 0; background: var(--panel); font-size: 17px; }
.emergency-list li + li::before, .emergency-add::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.emergency-list li.emergency-empty { padding: 12px 16px; border: 0; color: var(--faint); font-size: 15px; }
.emergency-remove { order: -1; width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 14px; }
.emergency-remove:hover { background: var(--danger); color: #fff; opacity: .85; }
.emergency-add { position: relative; align-items: center; gap: 12px; padding: 4px 8px 4px 16px; background: var(--panel); }
.emergency-add input { min-height: 40px; padding: 0; border: 0; background: transparent; font-size: 17px; }
.emergency-add input:focus { outline: none; }
.nav-text-button { min-height: 40px; padding: 0 8px; border: 0; background: none; color: var(--teal); font-size: 17px; font-weight: 600; cursor: pointer; }
.emergency-ideas { display: grid; gap: 0; margin: 0; }
.emergency-ideas-group:has(.emergency-ideas:empty) { display: none; }
.emergency-idea { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 16px; border: 0; border-radius: 0; background: var(--panel); color: var(--ink); font-size: 17px; text-align: left; }
.emergency-idea + .emergency-idea::after { content: ""; position: absolute; top: 0; right: 0; left: 50px; border-top: .5px solid var(--line-strong); }
.emergency-idea::before { content: "+"; display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #34c759; color: #fff; font-size: 18px; font-weight: 600; line-height: 1; }
.emergency-idea:hover { border: 0; background: var(--hover); }
.emergency-911 { display: block; margin: 0; color: var(--muted); }

/* "What callers hear": the question in gray, then the answer as a message bubble */
.preview-row { position: relative; display: grid; gap: 8px; padding: 12px 16px 14px; background: var(--panel); }
.preview-row + .preview-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.preview-row .preview-prompt { margin: 0; color: var(--faint); font-size: 14px; }
.preview-row blockquote { justify-self: start; margin: 0; padding: 9px 14px; border-radius: 18px 18px 18px 6px; background: #e9e9eb; font-size: 16px; line-height: 1.4; }
.preview-row blockquote:empty { display: none; }

/* Tell Alex: the note box is a group, and saved notes are rows in one list */
.preference-list { gap: 0; }
.preference-row { position: relative; padding: 12px 16px; border-radius: 0; }
.preference-row + .preference-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.preference-text strong { font-size: 16px; font-weight: 400; }
.preference-list .empty-owner { margin: 0; padding: 14px 16px; border: 0; border-radius: 0; color: var(--faint); text-align: left; }

/* Caller messages: choices with a check on the right */
.frequency-options { gap: 0; }
.frequency-options label { position: relative; align-items: center; gap: 12px; padding: 10px 16px; border: 0; border-radius: 0; background: var(--panel); }
.frequency-options label + label::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.frequency-options label:has(input:checked) { border: 0; background: var(--panel); }
.frequency-options input { position: absolute; opacity: 0; pointer-events: none; }
.frequency-options span { flex: 1; }
.frequency-options strong { font-size: 17px; font-weight: 400; }
.frequency-options small { color: var(--faint); }
.frequency-options label::after { content: ""; flex: none; width: 20px; color: var(--teal); font-size: 18px; font-weight: 600; text-align: right; }
.frequency-options label:has(input:checked)::after { content: "✓"; }
.frequency-options label:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: -2px; }
.settings-footnote small { font-size: inherit; }
.settings-footnote small.is-ready { color: var(--call); }
.settings-footnote small.is-attention { color: var(--open); }
#deliveryEmailField.is-disabled { opacity: .5; }
.settings-page .settings-list > button.settings-row .row-title { color: var(--teal); }

/* Finish setting up */

@media (min-width: 900px) {
  .nav-bar { position: static; margin: -10px -8px -10px; background: none; backdrop-filter: none; }
}
.settings-page .settings-group > h2 { margin: 0; padding: 0 16px; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: .02em; line-height: 1.4; text-transform: uppercase; }

/* Inbox and Calls, like the phone's Recents and Mail lists: priority shows as a red or orange label,
   not a colored bar, and calling back is one small round button. */
.call-row.is-urgent { box-shadow: none; }
.call-row-side { width: auto; margin-right: 14px; }
.call-icon-button { width: 36px; height: 36px; margin-right: 0; background: #e3f6e8; color: var(--call); font-size: 18px; }
.call-icon-button:hover { filter: none; background: #d3f0dc; }
.call-row-top strong { font-size: 17px; }
.call-row-reason { color: var(--ink); }
#overviewView > .settings-list { margin-top: 6px; }
.calls-footnote { margin-top: -6px; }
.day-group-heading { margin: 0 16px 6px; }
.day-group-heading h2 { font-weight: 400; }
.all-clear { padding: 16px; }

/* A call opens like a contact card: Done at the top right, the caller's initials and name in the middle,
   action tiles under them, then grouped details. */
.sheet-head { flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px 14px; text-align: center; }
.sheet-head > div { justify-items: center; padding-top: 0; }
.sheet-head h2 { font-size: 24px; }
.sheet-done { position: absolute; top: 10px; right: 8px; min-height: 44px; padding: 8px 10px; border: 0; background: none; color: var(--teal); font-size: 17px; font-weight: 600; cursor: pointer; }
.sheet-avatar { width: 72px; height: 72px; font-size: 28px; font-weight: 500; }
.sheet-avatar i { font-size: 34px; }
.sheet-head.is-compact { padding-top: 18px; }
.sheet-head.is-compact > div { padding: 0 56px; }
.sheet-head.is-compact h2 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.sheet-actions { gap: 8px; padding: 4px 16px 16px; border-bottom: 0; }
.sheet-actions > .call-back-link, .sheet-actions > .resolve-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; padding: 8px; border-radius: var(--radius-md); background: var(--soft); color: var(--teal); font-size: 13px; font-weight: 500; }
.sheet-actions > * i { font-size: 22px; }
.sheet-actions > .call-back-link { color: var(--call); }
.sheet-actions > .resolve-button.is-secondary { background: var(--soft); color: var(--teal); }
.sheet-actions > *:hover { opacity: 1; background: #e5e5ea; }
.sheet-body { display: grid; gap: 20px; }
.call-detail { display: grid; gap: 20px; }
.detail-card { gap: 0; padding: 0; overflow: hidden; }
.detail-card > * { position: relative; padding: 11px 16px; }
.detail-card > * + *::before, .detail-list > div + div::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.summary-headline { font-size: 17px; font-weight: 600; }
.detail-card blockquote { padding-left: 16px; border: 0; color: var(--muted); font-size: 16px; line-height: 1.45; }
.detail-list { display: block; gap: 0; padding: 0; }
.detail-list > div { position: relative; padding: 9px 16px; }
.detail-list dt { color: var(--ink); font-size: 13px; font-weight: 400; }
.detail-list dd { margin: 1px 0 0; font-size: 17px; }
.detail-list dd a { color: var(--teal); text-decoration: none; }
.detail-card h3.detail-label { color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.detail-card .detail-label + * { padding-top: 0; }
.detail-card .detail-label + *::before { display: none; }
.detail-card .load-recording { justify-content: flex-start; min-height: 44px; border-radius: 0; background: none; color: var(--teal); font-size: 17px; font-weight: 400; }
.detail-card .transcript { padding-top: 12px; padding-bottom: 14px; }
.detail-card .transcript-more { justify-self: stretch; text-align: left; font-size: 17px; font-weight: 400; }
.message-note { gap: 0; padding: 0; overflow: hidden; }
.message-note > * { padding: 12px 16px; }
.message-note .note-toggle { justify-self: stretch; min-height: 46px; font-size: 17px; font-weight: 400; }
.message-note .note-text { padding-top: 0; color: var(--muted); }
.message-note .note-editor { padding-top: 0; }
.priority-picker { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin: 0; padding: 0 16px; border-radius: var(--radius-md); background: var(--panel); }
.priority-picker > span { color: var(--ink); font-size: 17px; font-weight: 400; }
.priority-picker select { min-height: 40px; padding: 0 22px 0 8px; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5'%3E%3Cpath d='m7 9 5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E") no-repeat right center; color: var(--faint); font-size: 17px; font-weight: 400; appearance: none; text-align: right; cursor: pointer; }
.priority-picker.is-urgent select { color: var(--danger); }
.priority-picker.is-important select { color: var(--open); }
.sheet-body > .feedback-card { margin: 0; }

/* Sign in: centered, with the PIN in one field like the phone's own passcode screens */
.gate-card { text-align: center; }
.gate-card > p:not(.gate-kicker) { margin: 8px 0 20px; }
.gate-card label { font-weight: 400; color: var(--muted); }
.gate-input-row input { font-size: 22px; letter-spacing: .3em; text-align: center; }
.gate-error { min-height: 0; }
.gate-error:empty { display: none; }
.sheet-body > .feedback-card .feedback-head { min-height: 32px; color: var(--teal); font-size: 17px; font-weight: 400; }

/* Usage opens on its own page, like Battery or Cellular in the phone's Settings */
.row-value { padding-right: 2px; }
#usageSummary[data-level="high"] { color: var(--open); }
#usageSummary[data-level="over"] { color: var(--danger); }

/* Message Alex: chats like Messages, with Chats and Changes as a segmented control */
.nav-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--teal); font-size: 22px; cursor: pointer; }
.nav-icon[hidden] { display: none; }
.nav-title { flex: 1; overflow: hidden; font-size: 17px; font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.segmented { display: flex; gap: 2px; margin-top: -12px; padding: 2px; border-radius: var(--pill); background: #e3e3e8; }
.segmented button { flex: 1; min-height: 32px; padding: 0 8px; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--panel); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.settings-page #chatsPane, .settings-page #changesPane { margin-top: -12px; }
.chat-row { position: relative; display: grid; gap: 2px; width: 100%; padding: 11px 16px; border: 0; background: var(--panel); color: inherit; text-align: left; cursor: pointer; }
.chat-row + .chat-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.chat-row:hover { background: var(--hover); }
.chat-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chat-row-top strong { overflow: hidden; font-size: 17px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-top small { flex: none; color: var(--faint); font-size: 14px; }
.chat-row-preview { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 15px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.chat-row-preview.is-waiting { color: var(--teal); }
.chat-start { display: flex; align-items: center; gap: 12px; min-height: 52px; color: var(--teal); font-size: 17px; }
.preference-chat { justify-self: start; padding: 2px 0 0; font-size: 14px; font-weight: 400; text-align: left; }

.chat-view { grid-template-rows: auto 1fr auto; gap: 12px; min-height: calc(100dvh - var(--header) - var(--tabbar) - 130px); }
.chat-view .nav-bar { gap: 4px; }
.chat-thread { display: flex; flex-direction: column; align-content: end; justify-content: flex-end; gap: 6px; padding-bottom: 6px; }
.chat-starters { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin: 14px 0 6px; }
.chat-starters button { max-width: 80%; padding: 8px 13px; border: 1px solid #007aff; border-radius: 18px; background: transparent; color: #007aff; font: inherit; font-size: 15px; line-height: 1.35; text-align: right; cursor: pointer; }
.chat-starters button:hover { background: rgba(0, 122, 255, .1); }
.chat-starters button:active { background: rgba(0, 122, 255, .18); }
.chat-bubble { max-width: 80%; font-size: 16px; line-height: 1.4; }
.chat-bubble p { margin: 0; padding: 8px 13px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble.is-owner { align-self: flex-end; }
.chat-bubble.is-owner p { border-bottom-right-radius: 6px; background: #007aff; color: #fff; }
.chat-bubble.is-alex { align-self: flex-start; }
.chat-bubble.is-alex p { border-bottom-left-radius: 6px; background: #e9e9eb; color: var(--ink); }
.chat-bubble.is-owner + .chat-bubble.is-alex, .chat-bubble.is-alex + .chat-bubble.is-owner { margin-top: 8px; }
.chat-proposal { display: grid; gap: 6px; margin-top: 6px; padding: 12px 14px; border-radius: 22px; background: var(--panel); box-shadow: 0 0 0 .5px var(--line-strong); }
.chat-proposal small { color: var(--muted); font-size: 13px; }
.chat-proposal > small:first-child { text-transform: uppercase; letter-spacing: .02em; }
.chat-bubble .chat-proposal p { padding: 0; border-radius: 0; background: none; font-size: 16px; }
.chat-proposal-note { line-height: 1.4; }
.chat-proposal-actions { display: flex; gap: 8px; margin-top: 4px; }
.chat-proposal-actions button { flex: 1; min-height: 40px; border: 0; border-radius: var(--pill); background: var(--soft); color: var(--teal); font-size: 15px; font-weight: 600; cursor: pointer; }
.chat-proposal-actions button.is-primary { background: #007aff; color: #fff; }
.chat-proposal-state { font-weight: 600; }
.chat-proposal.is-saved .chat-proposal-state { color: var(--call); }
.chat-proposal.is-declined { opacity: .7; }
.chat-bubble.is-typing { display: flex; gap: 4px; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: #e9e9eb; }
.chat-bubble.is-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9a9aa0; animation: typing 1.2s infinite ease-in-out; }
.chat-bubble.is-typing span:nth-child(2) { animation-delay: .15s; }
.chat-bubble.is-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-composer { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); z-index: 5; display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border: .5px solid var(--line-strong); border-radius: 22px; background: var(--panel); }
.chat-composer textarea { flex: 1; min-width: 0; min-height: 32px; max-height: 140px; padding: 6px 0; border: 0; background: transparent; font-size: 17px; line-height: 1.3; resize: none; }
.chat-composer textarea:focus { outline: none; }
.chat-composer button { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #007aff; color: #fff; font-size: 18px; cursor: pointer; }
@media (min-width: 900px) {
  .chat-composer { bottom: 16px; }
  .chat-view { min-height: calc(100dvh - var(--header) - 160px); }
}

/* Inbox: Open and Closed, like a segmented switch */
.inbox-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 0 16px; padding: 3px; border-radius: var(--pill); background: #e3e3e8; }
.inbox-filter button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; border-radius: var(--pill); background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.inbox-filter button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.filter-count { min-width: 20px; padding: 1px 6px; border-radius: var(--pill); background: var(--open); color: #fff; font-size: 12px; line-height: 18px; }

.owner-toast.has-action { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; pointer-events: auto; }
.toast-action { flex: none; padding: 4px 6px; border: 0; background: transparent; color: #8cc4ff; font: inherit; font-weight: 700; cursor: pointer; }

/* Stats: one big number, three colored tiles, then a few simple charts */
#statsView { display: grid; gap: 22px; }
#statsView[hidden] { display: none; }
.stat-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--teal), color-mix(in srgb, var(--teal) 70%, #5b2bd6)); color: #fff; }
.stat-hero-text { display: grid; gap: 2px; }
.stat-hero-text span { font-size: 15px; font-weight: 600; opacity: .85; }
.stat-hero-text strong { font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-hero-text small { font-size: 15px; opacity: .85; }
.stat-hero-icon { display: grid; flex: none; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .18); font-size: 32px; }
.stat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-tile, .time-card { display: grid; align-content: start; justify-items: start; gap: 2px; min-width: 0; padding: 14px; border-radius: var(--radius-md); background: var(--panel); }
.stat-tile .row-tile, .time-card .row-tile { margin-bottom: 8px; }
.stat-tile.is-green .row-tile, .time-card.is-green .row-tile { --tile: #22994a; }
.stat-tile.is-orange .row-tile, .time-card.is-orange .row-tile { --tile: #e07c00; }
.stat-tile.is-purple .row-tile { --tile: #9b4fd0; }
.stat-tile.is-blue .row-tile { --tile: #1a6fe0; }
.time-card.is-blue .row-tile { --tile: #1a6fe0; }
.time-card.is-indigo .row-tile { --tile: #5250c8; }
.stat-tile strong, .time-card strong { font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-tile span:not(.row-tile), .time-card span:not(.row-tile) { max-width: 100%; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; }
.stat-tile small, .time-card small { color: var(--muted); font-size: 13px; line-height: 1.25; }
.time-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat-card { padding: 16px; border-radius: var(--radius-md); background: var(--panel); }
.stat-empty { margin: 0; color: var(--muted); font-size: 15px; }
.day-chart { display: grid; grid-template-columns: repeat(var(--bars, 7), minmax(0, 1fr)); gap: 10px; height: 170px; }
.day-chart.is-dense { gap: 3px; }
.day-chart.is-dense .day-bar { grid-template-rows: 1fr auto; }
.day-chart.is-dense .day-bar-value { display: none; }
.day-bar.is-future .day-bar-fill { min-height: 0; }
.day-chart.is-dense .day-bar-label { display: flex; justify-content: center; width: 4px; min-height: 16px; overflow: visible; font-size: 11px; line-height: 16px; white-space: nowrap; }
.day-bar.is-future .day-bar-label { color: var(--faint); }
.stats-period { grid-template-columns: repeat(3, 1fr); margin: 0; }
.stat-error { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 15px; }
.day-bar { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; min-width: 0; }
.day-bar-value { color: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.day-bar-track { display: flex; align-items: flex-end; width: 100%; max-width: 36px; height: 100%; border-bottom: 1px solid var(--line-strong); }
.day-bar-fill { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--teal) 30%, #fff); }
.day-bar-label { color: var(--muted); font-size: 13px; }
.day-bar.is-today .day-bar-fill { background: var(--teal); }
.day-bar.is-today .day-bar-value, .day-bar.is-today .day-bar-label { color: var(--ink); font-weight: 700; }
.bar-list { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; }
.bar-label { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 10px; overflow: hidden; border-radius: 5px; background: var(--soft); }
.bar-fill { display: block; height: 100%; min-width: 2px; border-radius: 5px; background: #9b4fd0; }
.month-card { display: flex; align-items: center; gap: 20px; }
.month-ring { --share: 0%; --ring: var(--call); display: grid; flex: none; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--ring) var(--share), var(--soft) 0); }
.month-ring::before { content: ""; grid-area: 1 / 1; width: 74px; height: 74px; border-radius: 50%; background: var(--panel); }
.month-ring span { grid-area: 1 / 1; position: relative; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.month-ring[data-level="high"] { --ring: var(--open); }
.month-ring[data-level="over"] { --ring: var(--danger); }
.month-ring[hidden] { display: none; }
.month-facts { display: grid; flex: 1; gap: 10px; margin: 0; }
.month-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.month-facts div[hidden] { display: none; }
.month-facts dt { color: var(--muted); font-size: 15px; }
.month-facts dd { margin: 0; color: var(--ink); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .stat-tile, .time-card { padding: 12px; }
  .stat-tile strong, .time-card strong { font-size: 23px; }
}

/* Computers: a sidebar menu on the left, the call beside the list, Settings beside its pages, Stats across the page.
   Phones and tablets keep the layout above. */
/* Stats: total calls with the average beside it, how the receptionist handled calls, and a pie for time of day */
.stat-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.stat-total { display: grid; gap: 2px; }
.stat-total span { color: var(--muted); font-size: 15px; font-weight: 600; }
.stat-total strong { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-average { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--soft); }
.stat-average .row-tile { --tile: #9b4fd0; background: #fff; }
.stat-average div { display: grid; }
.stat-average strong { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-average span:not(.row-tile) { color: var(--muted); font-size: 13px; }
.handled-card { display: grid; gap: 14px; }
.handled-title { margin: 0; font-size: 16px; font-weight: 600; }
.handled-bar { --answered: 50%; display: flex; gap: 2px; height: 12px; overflow: hidden; border-radius: 6px; }
.handled-bar span { display: block; height: 100%; }
.handled-bar .is-answered { width: var(--answered); background: #2a78d6; }
.handled-bar .is-message { flex: 1; background: #eb6834; }
.handled-legend { display: grid; gap: 12px; }
.handled-item { display: flex; align-items: center; gap: 10px; }
.handled-item > i { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.handled-item.is-answered > i { background: #2a78d6; }
.handled-item.is-message > i { background: #eb6834; }
.handled-item > div { display: grid; flex: 1; min-width: 0; }
.handled-item > div span { font-size: 15px; font-weight: 600; }
.handled-item small { color: var(--muted); font-size: 13px; }
.handled-item > strong { display: grid; justify-items: end; font-size: 20px; font-weight: 700; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.handled-item > strong small { color: var(--muted); font-size: 13px; font-weight: 500; }
.handled-note { margin: 0; color: var(--muted); font-size: 13px; }
.pie-card { display: flex; align-items: center; gap: 20px; }
.pie { flex: none; width: 132px; height: 132px; }
.pie-slice { stroke: var(--panel); stroke-width: 2; stroke-linejoin: round; }
.pie-empty { fill: var(--soft); }
.pie-label { fill: #fff; font-size: 12px; font-weight: 700; text-anchor: middle; dominant-baseline: central; letter-spacing: 0; }
.pie-legend { display: grid; flex: 1; gap: 10px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.pie-legend li { display: flex; align-items: center; gap: 10px; }
.pie-legend i { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.pie-legend-text { display: grid; flex: 1; min-width: 0; }
.pie-legend-text span { font-size: 15px; font-weight: 600; }
.pie-legend-text small { color: var(--muted); font-size: 13px; }
.pie-legend strong { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

.settings-placeholder { display: none; }
@media (min-width: 1100px) {
  :root { --header: 0px; --sidebar: 232px; --pane: clamp(380px, 32vw, 480px); }
  body.sheet-open { overflow: auto; }
  .owner-app::before { content: ""; position: fixed; top: 0; bottom: 0; left: 0; z-index: 19; width: var(--sidebar); border-right: 1px solid var(--line); background: var(--panel); }
  .owner-header { position: fixed; top: 0; left: 0; z-index: 20; flex-direction: column; align-items: flex-start; gap: 10px; width: var(--sidebar); height: auto; padding: 26px 22px 0; border: 0; background: transparent; backdrop-filter: none; }
  .owner-wordmark { max-width: calc(var(--sidebar) - 44px); font-size: 19px; font-weight: 700; }
  .live-state { margin-left: -10px; }
  .owner-tabs { position: fixed; top: 118px; bottom: 0; left: 0; z-index: 20; width: var(--sidebar); padding: 0 12px; border: 0; background: transparent; backdrop-filter: none; }
  .owner-tabs > div { display: grid; grid-auto-flow: row; gap: 2px; height: auto; }
  .owner-tab { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; color: var(--muted); cursor: pointer; }
  .owner-tab:hover { background: var(--soft); color: var(--ink); }
  .owner-tab i { font-size: 21px; }
  .owner-tab b { font-size: 16px; font-weight: 600; }
  .owner-tab.is-active { background: var(--accent-soft); color: var(--teal); }
  .owner-tab.is-active::before { content: none; }
  .tab-badge { position: static; margin-left: auto; }
  .owner-main { width: auto; max-width: 1240px; margin: 0 0 0 var(--sidebar); padding: 36px 40px 64px; }
  .page-title h1 { font-size: 36px; }

  /* Inbox and Calls: the list, with the open call docked on the right. */
  body.sheet-open[data-section="overview"] .owner-main, body.sheet-open[data-section="calls"] .owner-main { margin-right: var(--pane); padding-right: 32px; }
  #callSheet { position: fixed; inset: 0 0 0 auto; z-index: 15; width: var(--pane); padding: 0; align-items: stretch; background: none; animation: none; }
  #callSheet .sheet-panel { width: 100%; height: 100%; max-height: none; border-left: 1px solid var(--line); border-radius: 0; animation: none; }
  #callSheet .sheet-head { border-radius: 0; padding-top: 30px; }
  #callSheet .sheet-head::before, #callSheet .sheet-done { display: none; }
  .call-row.is-selected { background: var(--accent-soft); }
  .call-row.is-selected .call-row-main:hover { background: transparent; }
  .inbox-filter { max-width: 420px; }

  /* Stats: the four numbers in one row, then the charts two to a row. */
  #statsView { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: start; }
  #statsView > .page-title { grid-column: 1 / -1; }
  #statsView .stat-tiles { display: contents; }
  #statsView .stat-hero { padding: 18px 20px; align-self: stretch; }
  #statsView .stat-hero-text strong { font-size: 44px; }
  #statsView .stat-hero-icon { width: 52px; height: 52px; font-size: 26px; }
  #statsView > .settings-group { grid-column: span 2; }
  #statsView > .stats-period { grid-column: 1 / -1; width: 420px; }
  #statsView > .stat-error, #statsView > .stat-wide { grid-column: 1 / -1; }
  #statsView > .stat-summary, #statsView > .handled-card { grid-column: span 2; align-self: stretch; }

  /* Settings: the list on the left, the setting you opened on the right. */
  body[data-section="settings"] .owner-main { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  body[data-section="settings"] .owner-main > * { grid-column: 1 / -1; }
  body[data-section="settings"] #settingsView { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-bottom: 24px; }
  body[data-section="settings"] .settings-page, body[data-section="settings"] .settings-placeholder { grid-column: 2; grid-row: 1; }
  body[data-view="settings"] .settings-placeholder { display: grid; place-items: center; gap: 10px; min-height: 360px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
  .settings-placeholder i { font-size: 34px; color: var(--faint); }
  .settings-page .back-link[data-open-view="settings"] { display: none; }
  .settings-page .nav-bar { justify-content: flex-end; }
  #settingsView .settings-row.is-current, #settingsView .receptionist-card-top.is-current { background: var(--accent-soft); }
  #settingsView .settings-row.is-current .row-title { color: var(--teal); font-weight: 600; }
}
.emergency-text-preview { white-space: pre-line; }
.after-hours-switch { justify-content: space-between; }
.after-hours-details { display: contents; }
.after-hours-details[hidden], #afterHoursUntilRow[hidden] { display: none; }
.after-hours-details > .form-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--line-strong); }
.after-hours-switch > span { width: auto; }

/* Sign in matches the website: warm paper, the Receptionist Plus mark, a heavy heading with the italic serif stamp,
   and the logo's green, gold, and mint. Only the sign-in screen changes; the dashboard keeps its own look. */
.owner-gate {
  gap: 28px; color: #102f28; font-family: var(--sans);
  background: radial-gradient(40rem 28rem at 90% -10%, rgba(223, 171, 96, .18), transparent 60%),
    radial-gradient(36rem 26rem at -10% 10%, rgba(36, 88, 76, .12), transparent 60%), #fbfbf8;
}
.gate-home { display: flex; align-items: center; gap: 12px; }
.gate-home img { width: 44px; height: 44px; border-radius: 12px; }
.gate-home span { display: flex; flex-direction: column; font-family: "Bricolage Grotesque", var(--sans); font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: #24584c; }
.gate-home small { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0; color: #c98f3d; }
.gate-card { width: min(420px, 100%); padding: 36px 26px 28px; border-radius: 28px; background: #fff; box-shadow: 0 28px 60px -38px rgba(16, 47, 40, .6); text-align: center; }
.gate-brand { margin-bottom: 14px; }
.gate-brand:not(:has(:not([hidden]))) { display: none; }
.gate-brand img { width: min(160px, 50vw); margin: 0 auto; }
.gate-brand strong { font-family: "Bricolage Grotesque", var(--sans); font-size: 18px; color: #24584c; }
.gate-card h1 { font-family: "Bricolage Grotesque", var(--sans); font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; color: #102f28; }
.gate-stamp { display: inline-block; padding: .02em .28em .1em .22em; border-radius: .18em; background: #102f28; color: #f5f1e8; font-family: "DM Serif Display", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; transform: rotate(-2deg); box-shadow: 0 .14em .34em -.16em rgba(16, 47, 40, .5); }
.gate-stamp i { color: #dfab60; font-style: normal; }
.gate-card > p:not(.gate-kicker) { margin: 16px 0 24px; color: #56665f; font-size: 16px; }
.gate-card label { color: #56665f; font-size: 14px; }
.gate-input-row input { min-height: 56px; border: 1.5px solid transparent; border-radius: 16px; background: #f5f1e8; color: #102f28; }
.gate-input-row input:focus { border-color: #4f9a80; box-shadow: 0 0 0 4px rgba(79, 154, 128, .18); }
.gate-input-row button { min-height: 56px; border-radius: 16px; background: #102f28; font-family: var(--sans); }
.gate-input-row button:hover { background: #24584c; opacity: 1; }
.gate-security { color: #56665f; }
.owner-gate { position: relative; }
.gate-back { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: #24584c; font-size: 15px; font-weight: 600; text-decoration: none; }
.gate-back:hover { background: rgba(16, 47, 40, .06); }
.gate-back i { font-size: 18px; }
