/* Guest Line: shared layout and components. Colours, fonts and logos are per client:
   public/brand/theme.css (loaded first) defines every token used here. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */

.shell {
  display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--ink) var(--sidebar), transparent 0);
}

.sidebar {
  background: var(--ink);
  color: var(--on-ink);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .logo { display: block; width: 184px; margin: 4px auto 28px; }
.sidebar .logo img { width: 100%; height: auto; display: block; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--on-ink-muted); font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--ink-2); color: var(--on-ink); }
.nav a[aria-current='page'] { background: var(--ink-2); color: var(--sky); box-shadow: inset 2px 0 0 var(--sky); }
.nav .count {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--sky); color: var(--ink); font-size: 11px; font-weight: 600; text-align: center; line-height: 20px;
}

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.duty {
  border: 1px solid var(--ink-line); border-radius: var(--radius-sm);
  padding: 12px; font-size: 12.5px; color: var(--on-ink-muted);
}
.duty strong { display: flex; align-items: center; gap: 8px; color: var(--on-ink); font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on-ink-muted); flex: none; }
.dot.on { background: var(--sky); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 22%, transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--sky) 6%, transparent); } }
@media (prefers-reduced-motion: reduce) { .dot.on { animation: none; } }

.demo-badge {
  align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sky); border: 1px solid color-mix(in srgb, var(--sky) 45%, transparent); border-radius: 999px; padding: 3px 10px;
}
.sidebar-actions { display: flex; gap: 8px; }
.ghost-dark {
  flex: 1; background: transparent; border: 1px solid var(--ink-line); color: var(--on-ink-muted);
  border-radius: var(--radius-sm); padding: 7px 10px; font-size: 12.5px;
}
.ghost-dark:hover { color: var(--on-ink); border-color: var(--on-ink-muted); }
.built-by { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--ink-line); font-size: 11px; color: var(--on-ink-muted); }
.built-by img { height: 13px; width: auto; display: block; }

.main { min-width: 0; padding: 32px 40px 64px; max-width: 1240px; width: 100%; }

/* ---------- Page header ---------- */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 4px; }
h1 { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.sub { color: var(--muted); margin: 6px 0 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.back svg { width: 16px; height: 16px; }

/* ---------- Cards ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head .link { color: var(--accent-text); font-weight: 500; font-size: 13px; }
.card-body { padding: 20px; }
.card + .card { margin-top: 16px; }
.kpis > .card, .guest-grid > .card, .settings > .card { margin-top: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { padding: 18px 20px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .label svg { width: 16px; height: 16px; color: var(--faint); }
.kpi .value { font-size: 34px; font-weight: 600; line-height: 1.15; margin-top: 8px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .note { color: var(--faint); font-size: 12.5px; }
.kpi.accent { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.kpi.accent .label, .kpi.accent .label svg, .kpi.accent .note { color: rgba(255, 255, 255, 0.82); }
.kpi.accent .value { color: var(--on-brand); }
.kpi.alert .value { color: var(--red); }

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

/* ---------- Call rows ---------- */

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--line); transition: background 0.12s;
}
.rows li:last-child .row { border-bottom: 0; }
a.row:hover { background: var(--surface-2); }
.row .when { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.row .when b { display: block; color: var(--text); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.row .who { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row .what { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row .dur { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.row.emergency { box-shadow: inset 3px 0 0 var(--red); }

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

/* Narrow side-panel lists: badge sits under the text, no right column. */
.rows.compact .row { grid-template-columns: 64px minmax(0, 1fr); }
.rows.compact .row .meta { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--grey-tint); color: var(--muted);
}
.badge svg { width: 12px; height: 12px; }
.badge.checkin { background: var(--accent-tint); color: var(--accent-text); }
.badge.question { background: var(--blue-tint); color: var(--blue); }
.badge.emergency { background: var(--red-tint); color: var(--red); }
.badge.resolved { background: var(--green-tint); color: var(--green); }
.badge.followup { background: var(--accent-tint); color: var(--accent-text); }
.badge.risk { background: var(--red-tint); color: var(--red); }
.badge.outline { background: transparent; border: 1px solid var(--line-strong); }

/* Alert badge: solid fill, white text, optional divider + action.
   Shades are one or two steps darker than Tailwind's 500s so white text passes WCAG AA. */
.alert-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 6px; padding: 6px 10px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; color: #fff;
  --ab-bg: #2563eb; --ab-line: #60a5fa;
  background: var(--ab-bg);
}
.alert-badge .ab-main, .alert-badge .ab-action { display: inline-flex; align-items: center; gap: 6px; }
.alert-badge svg { width: 16px; height: 16px; flex: none; }
.alert-badge .ab-divider { width: 1px; height: 20px; margin: -4px 0; background: var(--ab-line); }
.alert-badge .ab-action { color: inherit; text-decoration: none; }
.alert-badge .ab-action:hover { text-decoration: underline; text-underline-offset: 2px; }
.alert-badge.error { --ab-bg: #dc2626; --ab-line: #f87171; }
.alert-badge.success { --ab-bg: #047857; --ab-line: #34d399; }
.alert-badge.info { --ab-bg: #2563eb; --ab-line: #60a5fa; }
.alert-badge.warning { --ab-bg: #fdbd5a; --ab-line: #b98a3e; color: #1d1e21; }
.alert-badge.neutral { --ab-bg: #4b4d52; --ab-line: #7a7c81; }
.ab-row { margin: 0 0 12px; }

/* ---------- Toolbar ---------- */

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--muted);
}
.chip:hover { color: var(--text); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--sky); }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search input {
  width: 260px; max-width: 100%; padding: 8px 12px 8px 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2);
}
.search input:focus { outline: none; border-color: var(--sky); background: var(--surface); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: var(--radius-sm);
  padding: 8px 14px; font-weight: 600; font-size: 13px; border: 1px solid var(--line-strong); background: var(--surface);
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.done { color: var(--green); border-color: var(--green); background: var(--green-tint); }

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

.summary { font-size: 15px; line-height: 1.6; margin: 0; }
.summary-flags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.player { display: flex; align-items: center; gap: 14px; }
.play {
  width: 44px; height: 44px; border-radius: 50%; flex: none; border: 0;
  background: var(--brand); color: var(--on-brand); display: grid; place-items: center;
}
.play svg { width: 18px; height: 18px; }
.play:hover { background: var(--brand-hover); }
.track { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--grey-tint); cursor: pointer; }
.bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 3px; width: 0; }
.bar .knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--sky); transform: translate(-50%, -50%); left: 0; }
.times { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }

.transcript { display: flex; flex-direction: column; gap: 10px; }
.line { display: flex; gap: 10px; max-width: 88%; }
.line .avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; margin-top: 2px;
}
.line .bubble {
  padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
  transition: background 0.2s, border-color 0.2s; cursor: pointer;
}
.line .bubble .who { display: block; font-size: 11.5px; font-weight: 600; color: var(--faint); margin-bottom: 2px; }
.line.agent .avatar { background: var(--ink); color: var(--sky); }
.line.guest { align-self: flex-end; flex-direction: row-reverse; }
.line.guest .avatar { background: var(--accent-tint); color: var(--accent-text); }
.line.guest .bubble { background: var(--surface); }
.line.active .bubble { border-color: var(--sky); background: var(--accent-tint); }
.event {
  align-self: center; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500;
  color: var(--muted); background: var(--grey-tint); padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.event svg { width: 14px; height: 14px; }
.event.active { background: var(--accent-tint); color: var(--accent-text); }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; text-align: right; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.tick svg { width: 12px; height: 12px; }
.tick.yes { background: var(--green-tint); color: var(--green); }
.tick.no { background: var(--red-tint); color: var(--red); }
.tick.unknown { background: var(--grey-tint); color: var(--faint); }

.chain { list-style: none; margin: 0; padding: 0; position: relative; }
.chain li { position: relative; padding: 0 0 16px 28px; font-size: 13.5px; }
.chain li:last-child { padding-bottom: 0; }
.chain li::before { content: ''; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.chain li:last-child::before { display: none; }
.chain .node { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.chain .node.ok { border-color: var(--green); background: var(--green); }
.chain .node.miss { border-color: var(--red); }
.chain .node.accent { border-color: var(--brand); background: var(--brand); }
.chain small { display: block; color: var(--muted); }

.section-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- Guests ---------- */

.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.guest-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.15s, transform 0.15s; }
.guest-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.guest-top { display: flex; align-items: center; gap: 12px; }
.initials {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ink); color: var(--sky); font-weight: 600; font-size: 14px;
}
.guest-name { font-weight: 600; font-size: 15px; }
.guest-prop { color: var(--muted); font-size: 13px; }
.guest-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; gap: 8px; flex-wrap: wrap; }

/* ---------- Settings ---------- */

.settings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.integration { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.integration:last-child { border-bottom: 0; }
.integration span { color: var(--muted); font-size: 13px; }
.hours-big { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Login ---------- */

.login { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 24px; }
.login-card { width: 100%; max-width: 380px; text-align: center; color: var(--on-ink); }
.login-card img { width: 220px; margin: 0 auto 28px; display: block; }
.login-card h1 { color: var(--on-ink); font-size: 26px; }
.login-card p { color: var(--on-ink-muted); margin: 8px 0 24px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card input {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--ink-line);
  background: var(--ink-2); color: var(--on-ink); text-align: center;
}
.login-card input:focus { outline: none; border-color: var(--sky); }
.login-card button { padding: 12px; border-radius: var(--radius-sm); border: 0; background: var(--brand); color: var(--on-brand); font-weight: 600; }
.login-card button:hover { background: var(--brand-hover); }
.login-card .error { color: #e3826f; font-size: 13px; min-height: 18px; margin: 0; }
.login-card .hint { font-size: 12.5px; margin-top: 20px; }

/* ---------- Loading ---------- */

.loading { padding: 80px 0; text-align: center; color: var(--faint); }

/* ---------- Responsive ---------- */

/* ---------- Guest messages: inbox, knowledge base, reply settings ---------- */

.muted { color: var(--muted); font-weight: 400; }
.section-title { font-size: 15px; font-weight: 600; margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.6; cursor: default; }

.form, .draft { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; font-weight: 600; margin-top: 8px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.form input[type='text'], .form input:not([type]), .form textarea, .draft textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; resize: vertical;
}
.form input:focus, .form textarea:focus, .draft textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
fieldset { border: 0; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.usage { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.usage-card { margin-bottom: 8px; }
.meter { display: block; flex: 1; min-width: 120px; height: 6px; border-radius: 3px; background: var(--grey-tint); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); }
.usage .over { color: var(--red); font-weight: 600; }

.draft { padding: 18px 20px; }
.draft.urgent { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red); }
.draft-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.draft-meta b { color: var(--text); }
.draft blockquote { margin: 4px 0; padding: 10px 14px; background: var(--surface-2); border-left: 3px solid var(--line-strong); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14.5px; }
.why { font-size: 13px; color: var(--muted); margin: 0; }
.cal-note { font-size: 13px; margin: 0; padding: 8px 12px; background: var(--accent-tint); border-radius: var(--radius-sm); display: flex; gap: 8px; align-items: flex-start; }
.cal-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.bad-count { color: var(--red); font-weight: 600; }
.ack { font-size: 13px; margin: 0; padding: 8px 12px; background: var(--red-tint); border-radius: var(--radius-sm); }

.answered-list { list-style: none; margin: 0; padding: 0; }
.answered { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.answered:last-child { border-bottom: 0; }
.guest-says { margin: 8px 0 4px; font-size: 14px; }
.we-said { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.we-said span { font-weight: 600; color: var(--text); margin-right: 6px; }

.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.kb-grid > .card { margin-top: 0; }
.kb-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; color: inherit; text-decoration: none; font-size: 13px; }
.kb-card:hover { border-color: var(--brand); }
.kb-name { font-weight: 600; font-size: 15px; }
.kb-card .meter { flex: none; width: 100%; }
.grid-2 > .card + .card { margin-top: 0; }
.uploads { list-style: none; margin: 12px 0; padding: 0; font-size: 13.5px; }
.uploads li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.drop { display: block; padding: 24px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; color: var(--muted); }
.drop.over, .drop:hover { border-color: var(--brand); color: var(--text); }

.reply-settings { margin-bottom: 8px; }
.report-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.select { padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.section-hint { margin: -6px 0 12px; }
.sched-day { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0; padding: 14px 20px 0; }
.sched-recent { margin-top: 12px; }
.sched-recent summary { padding: 14px 20px; cursor: pointer; font-weight: 600; font-size: 14px; }
.rule { border-top: 1px solid var(--line); padding-top: 14px; }
.rule:first-of-type { border-top: 0; padding-top: 0; }
.rule-body { padding-left: 26px; display: flex; flex-direction: column; gap: 8px; }
.rule:has(.rule-toggle input:not(:checked)) .rule-body { opacity: 0.55; }
.inline-choices { display: flex; gap: 20px; flex-wrap: wrap; }
.inline-number { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.inline-number input { width: 72px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hint svg { width: 13px; height: 13px; vertical-align: -2px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--accent-tint); }
.choice input, .check input { margin-top: 3px; accent-color: var(--brand); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check.locked { cursor: default; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50; padding: 10px 18px; border-radius: var(--radius-sm); background: var(--ink); color: var(--on-ink); font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }
.toast.bad { background: var(--red); color: #fff; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-detail, .settings { grid-template-columns: 1fr; }
}

.top-duty, .mobile-only { display: none; }
.account-actions { display: flex; gap: 10px; }
.account-actions .btn { flex: 1; justify-content: center; padding: 12px; }

@media (max-width: 1100px) {
  /* Call page, one column: the things a PA needs first come first. */
  .grid-detail > div { display: contents; }
  .grid-detail .card + .card { margin-top: 0; }
  .sec-summary { order: 1; }
  .sec-transfer { order: 2; }
  .sec-guest { order: 3; }
  .sec-recording { order: 4; }
  .sec-transcript { order: 5; }
  .sec-history { order: 6; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; background: none; }

  /* Top bar: logo and who is on duty. */
  .sidebar {
    position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center;
    justify-content: space-between; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  }
  .sidebar .logo { width: 120px; margin: 0; }
  .top-duty {
    display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500;
    color: var(--on-ink-muted); border: 1px solid var(--ink-line); border-radius: 999px; padding: 6px 12px;
  }
  .sidebar-foot { display: none; }

  /* Bottom tab bar, within thumb reach. */
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; flex-direction: row; gap: 0;
    background: var(--ink); border-top: 1px solid var(--ink-line);
    padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .nav a {
    flex: 1; flex-direction: column; gap: 3px; padding: 7px 0 5px; font-size: 11px; position: relative;
    border-radius: var(--radius-sm);
  }
  .nav a svg { width: 22px; height: 22px; }
  .nav a[aria-current='page'] { box-shadow: none; background: var(--ink-2); }
  .nav .count {
    position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 18px; line-height: 18px; font-size: 10.5px;
  }
  .mobile-only { display: block; }

  .main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 30px; }
  .page-head { margin-bottom: 18px; }
  .page-head .btn { width: 100%; justify-content: center; padding: 12px; }
  .kpis { gap: 10px; margin-bottom: 16px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 28px; }
  .kpi .note { font-size: 12px; line-height: 1.35; }
  .row { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
  .row .meta { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
  .toolbar { padding: 12px 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; width: calc(100% + 32px); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; padding: 8px 14px; }
  .search, .search input { width: 100%; }
  .search input { padding-top: 10px; padding-bottom: 10px; font-size: 16px; } /* 16px stops iOS zooming in */
  .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
  .line { max-width: 100%; }
  .hint-jump { display: none; }

  /* Keep the player in view while reading the transcript. */
  .sec-recording { position: sticky; top: 58px; z-index: 5; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
  .sec-recording .card-head { display: none; }
  .sec-recording .card-body { padding: 12px 16px; }
  .play { width: 48px; height: 48px; }
  .bar { height: 8px; }

  .guest-grid { grid-template-columns: 1fr; gap: 12px; }
  .login-card input { font-size: 16px; }
}

/* Seven tabs on the narrowest phones: smaller labels so they don't run together. */
@media (max-width: 380px) {
  .nav { padding-left: 2px; padding-right: 2px; }
  .nav a { font-size: 9.5px; letter-spacing: -0.01em; }
  .nav a svg { width: 20px; height: 20px; }
}
