/* SlowPBX admin. No inline styles anywhere (CSP style-src 'self'). */
:root {
  --bg: #fafaf9; --fg: #1c1917; --muted: #78716c; --line: #e7e5e4;
  --accent: #1d4ed8; --danger: #b91c1c; --ok-bg: #ecfdf5; --ok: #065f46;
  --err-bg: #fef2f2; --panel: #fff;
  --st-open: #16a34a; --st-closed: #a8a29e; --st-lunch: #f59e0b; --st-holiday: #2563eb;
  --st-weather: #7c3aed; --st-meeting: #db2777; --st-other: #0d9488;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1917; --fg: #f5f5f4; --muted: #a8a29e; --line: #44403c;
    --accent: #93c5fd; --danger: #fca5a5; --ok-bg: #052e22; --ok: #6ee7b7;
    --err-bg: #3b0d0d; --panel: #292524;
    --st-open: #22c55e; --st-closed: #57534e; --st-lunch: #fbbf24; --st-holiday: #60a5fa;
    --st-weather: #a78bfa; --st-meeting: #f472b6; --st-other: #2dd4bf;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
/* The header: a bar (the name, who is signed in), then the pages as a row
   of tabs. On a phone the tabs are one line that scrolls sideways, so
   Voicemail and Console are always under the thumb. */
header { border-bottom: 1px solid var(--line); background: var(--panel); }
header .bar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem .25rem; }
.brand { font-weight: 700; color: var(--fg); text-decoration: none; }
header .me { margin-left: auto; display: flex; gap: .9rem; align-items: center; min-width: 0; }
header .help { flex: none; text-decoration: none; }
.signout { display: flex; gap: .75rem; align-items: center; color: var(--muted); min-width: 0; }
.signout .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout button { white-space: nowrap; }
nav { display: flex; gap: 1rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a.on, nav a:hover { color: var(--fg); }
nav.pages { flex-wrap: wrap; gap: 0 .15rem; padding: 0 .45rem; }
nav.pages a { padding: .45rem .55rem; border-bottom: 2px solid transparent; white-space: nowrap; }
nav.pages a.on { border-bottom-color: var(--accent); font-weight: 600; }
nav.pages .sep { flex: none; width: 1px; background: var(--line); margin: .55rem .4rem; }
/* The switch between someone's own pages and an ordinary user's. */
header .seg { flex: none; display: inline-flex; gap: .15rem; padding: 3px; background: var(--line); border-radius: 999px; }
header .seg form { display: flex; margin: 0; }
header .seg button { background: none; color: var(--muted); padding: .1rem .75rem; border-radius: 999px; font-size: .85rem; }
header .seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
@media (max-width: 40rem) {
  header .bar { padding: .55rem .9rem .2rem; gap: .6rem; }
  header .me { gap: .6rem; }
  .signout { gap: .5rem; font-size: .9rem; }
  nav.pages { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 .35rem; scroll-padding: 0 2rem; }
  nav.pages::-webkit-scrollbar { display: none; }
  nav.pages a { padding: .7rem .6rem; }
  nav.pages .sep { margin: .8rem .3rem; }
  main { padding: .9rem; }
  h1 { font-size: 1.3rem; margin: .25rem 0 .75rem; }
}
main { max-width: 60rem; margin: 0; padding: 1rem; }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .75rem; }
a { color: var(--accent); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: .85rem; }
tr.off td { color: var(--muted); }
form.narrow { max-width: 22rem; display: grid; gap: .9rem; }
form.grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); align-items: start; }
form.grid button { justify-self: start; grid-column: 1 / -1; }
td.empty { color: var(--muted); }
label { display: grid; gap: .3rem; font-size: .9rem; }
label.check { display: flex; gap: .5rem; align-items: center; }
small { color: var(--muted); font-size: .8rem; }
input, select { font: inherit; padding: .45rem .55rem; border: 1px solid var(--line);
  border-radius: 6px; background: var(--panel); color: var(--fg); width: 100%; }
input[type=checkbox] { width: auto; }
button, .button { font: inherit; padding: .45rem 1rem; border-radius: 6px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--bg); text-decoration: none; display: inline-block; }
button.danger { background: var(--danger); }
button.link { background: none; color: var(--accent); padding: 0; }
button.link.danger { color: var(--danger); }
.error { background: var(--err-bg); color: var(--danger); padding: .6rem .8rem; border-radius: 6px; }
.notice { background: var(--ok-bg); color: var(--ok); padding: .6rem .8rem; border-radius: 6px; }
.warn { color: var(--danger); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; }
dt { color: var(--muted); }
dd { margin: 0; }
img.qr { display: block; margin: 1rem 0; background: #fff; padding: 8px; border-radius: 6px; image-rendering: pixelated; }
.app p.ok { color: var(--ok); }
.copyable { user-select: all; -webkit-user-select: all; }
code.secret { font-size: 1.05rem; letter-spacing: .05em; word-break: break-all; }
ul.codes { columns: 2; list-style: none; padding: 0; font-size: 1.1rem; max-width: 22rem; }
.toolbar { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 16rem; }
.toolbar .danger { margin-left: auto; }
button:disabled { opacity: .45; cursor: default; }
.button.secondary { background: none; color: var(--accent); border: 1px solid var(--line); }
th.pick, td.pick { width: 2rem; padding-right: 0; }
.hint { color: var(--muted); font-size: .85rem; }
ul.confirm-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px;
  padding: .5rem 1rem .5rem 2rem; background: var(--panel); }
.actions { display: flex; gap: 1rem; align-items: center; }
table.spec td:first-child { white-space: nowrap; }
/* Call log */
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.calls td:first-child { white-space: nowrap; }
tr.missed td:last-child { color: var(--danger); }
form.search { margin-bottom: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
/* Voicemail */
table.voicemail audio { height: 2rem; max-width: 16rem; }
tr.new td:first-child { font-weight: 600; }
td.actions { display: table-cell; white-space: nowrap; }
td.actions form { display: inline; margin-right: .75rem; }
/* Shared mailboxes (SPEC §6.5) */
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chips a { text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .8rem; }
.chips a.on { color: var(--fg); border-color: var(--fg); }
.badge.box { display: inline-block; white-space: nowrap; font-size: .75rem; color: var(--accent); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 .5rem; margin: 0 .4rem .15rem 0; }
.badge.box.urgent { color: #fff; background: var(--danger); border-color: var(--danger); }
tr.urgent td { background: var(--err-bg); }
details.trash { margin-top: 2rem; }
details.trash summary { cursor: pointer; color: var(--muted); }
table.members td:first-child { white-space: nowrap; }
div.grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); align-items: start; margin: .75rem 0; }

.members-list { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .75rem 0; }
details.members { margin: .5rem 0 .75rem; }
details.members summary { cursor: pointer; }
details.members summary .hint { margin-left: .5rem; }
details.members form { padding: .25rem 0 0 1rem; }
table.greetings td:first-child { width: 14rem; }
td.actions form.inline label { display: inline; font-weight: normal; }
td.actions form.inline input[type=date] { width: auto; display: inline-block; margin: 0 .25rem; }

/* A page's shared player (phone phrases, voicemail, greetings). */
.player { position: sticky; top: 0; z-index: 1; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  padding: .5rem 0; background: var(--bg); }
.player audio { flex: 1 1 16rem; min-width: 0; }
tr.playing td, .greeting.playing, .phrase-grid li.playing { background: var(--ok-bg); }
/* The phone phrases page's times of day: hundreds, so folded away and five
   to a row (fewer on a narrow screen). */
.phrase-grid { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem .5rem; }
.phrase-grid li { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .2rem .4rem;
  border: 1px solid var(--line); border-radius: 4px; }
.phrase-grid li span { min-width: 0; overflow-wrap: anywhere; }
.phrase-grid form { padding: 0; margin: 0; }
.phrase-grid button { padding: .1rem .5rem; }
@media (max-width: 900px) { .phrase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .phrase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Day bars: the Weekly call tab's week at a glance. */
.sched { display: grid; gap: 3px; margin-bottom: 1rem; }
.sched-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; align-items: center; cursor: pointer; }
.sched-label { font-size: .85rem; white-space: nowrap; }
.sched-bar { width: 100%; height: 1.1rem; display: block; background: var(--line); border-radius: 3px; }
.sched-scale { display: flex; justify-content: space-between; font-size: .75rem; }
.sched-bar rect.st-open { fill: var(--st-open); }
.sched-bar rect.st-closed { fill: var(--st-closed); }
.sched-bar rect.st-lunch { fill: var(--st-lunch); }
.sched-bar rect.st-holiday { fill: var(--st-holiday); }
.sched-bar rect.st-weather { fill: var(--st-weather); }
.sched-bar rect.st-meeting { fill: var(--st-meeting); }
.sched-bar rect.st-other { fill: var(--st-other); }
fieldset { border: 1px solid var(--line); border-radius: 6px; display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 480px) {
  .sched-row { grid-template-columns: 5.5rem 1fr; }
}

/* The schedule month (2026-11-09, design B; schedule_month.go): each day
   top to bottom from midnight, green while open, else whoever is on call,
   striped during a closure. Hover over a day or tap it for the detail. */
:root { --who-0: #1d4ed8; --who-1: #c2410c; --who-2: #7e22ce; --who-3: #475569;
  --who-4: #be185d; --who-5: #0e7490; --who-6: #a16207; --who-7: #78350f; }
@media (prefers-color-scheme: dark) {
  :root { --who-0: #60a5fa; --who-1: #fb923c; --who-2: #c084fc; --who-3: #94a3b8;
    --who-4: #f472b6; --who-5: #22d3ee; --who-6: #facc15; --who-7: #d6a77a; }
}
.who-open { fill: var(--st-open); background-color: var(--st-open); }
.who-none { fill: var(--st-closed); background-color: var(--st-closed); }
.who-0 { fill: var(--who-0); background-color: var(--who-0); } .who-1 { fill: var(--who-1); background-color: var(--who-1); }
.who-2 { fill: var(--who-2); background-color: var(--who-2); } .who-3 { fill: var(--who-3); background-color: var(--who-3); }
.who-4 { fill: var(--who-4); background-color: var(--who-4); } .who-5 { fill: var(--who-5); background-color: var(--who-5); }
.who-6 { fill: var(--who-6); background-color: var(--who-6); } .who-7 { fill: var(--who-7); background-color: var(--who-7); }
.cal-defs { position: absolute; }
.cal-stripe { fill: #fff; fill-opacity: .45; }
.cal { display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; align-items: flex-start; margin: 1.5rem 0 1rem; }
.cal-month { flex: 1 1 26rem; max-width: 40rem; min-width: 0; display: grid; gap: .5rem; }
.cal-head { display: flex; align-items: center; gap: .5rem; }
.cal-head h2 { margin: 0; flex: 1; font-size: 1.25rem; }
.cal-nav { width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; color: var(--fg); background: var(--panel); }
.cal-wk, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wk { font-size: .75rem; font-weight: 600; color: var(--muted); }
.cal-day { position: relative; display: block; aspect-ratio: 10 / 11; padding: 0; border: 0; border-radius: 9px;
  background: var(--line); cursor: pointer; font: inherit; color: var(--fg); }
.cal-day svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 9px; }
.cal-day.out { background: transparent; cursor: default; }
.cal-day.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cal-day.shown { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.cal-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.cal-n { position: absolute; top: 4px; left: 4px; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 6px;
  background: var(--panel); font-size: .7rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
.cal-day.out .cal-n { background: transparent; color: var(--muted); }
.cal-closure { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 1rem; padding: 0 .25rem; border-radius: 5px;
  background: var(--panel); font-size: .625rem; font-weight: 600; line-height: 1rem; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: .25rem 0 0; font-size: .8rem; color: var(--muted); }
.cal-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.cal-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; flex: none; }
.cal-key.striped { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .5) 0 2px, transparent 2px 5px); }
.cal-detail { flex: 1 1 16rem; max-width: 24rem; margin-top: 2.75rem; padding: 1rem 1.15rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.cal-detail h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.cal-detail h3 .hint { font-size: .8rem; font-weight: 400; }
.cal-chip { display: inline-block; margin: 0 0 .5rem; padding: .05rem .6rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: .8rem; font-weight: 600; }
.cal-bar { width: 100%; height: 14px; display: block; margin: .25rem 0 .75rem; border-radius: 4px; }
.cal-detail ol { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .55rem; }
.cal-detail li { display: grid; grid-template-columns: .75rem minmax(0, 1fr); column-gap: .6rem; }
.cal-detail li .cal-key { grid-row: span 2; margin-top: .4rem; }
.cal-detail li > span:last-child { grid-column: 2; font-size: .85rem; color: var(--muted); }
.cal-detail > .hint { margin: 0; font-size: .8rem; }
@media (max-width: 40rem) {
  .cal-detail { margin-top: 0; max-width: none; }
  .cal-closure { display: none; }
}

/* Phone menus (ivr.templ): a map of cards in columns, wired left to
   right, with an inspector for the selected card; and Try it. */
:root { --ring: #1f6b44; --ring-bg: #e8f5ee; --vm: #5e36a6; --vm-bg: #f1ecfa; --go: #2457d6; --go-fg: #fff;
  --end-bg: #eef0f3; --when: #8a3f0a; --when-bg: #fdf0e6; --dot: #d6d3d1; --seen-bg: #eef4ff; }
@media (prefers-color-scheme: dark) {
  :root { --ring: #86efac; --ring-bg: #14361f; --vm: #c4b5fd; --vm-bg: #2e1f4f; --go: #60a5fa; --go-fg: #0b1220;
    --end-bg: #3a3633; --when: #fdba74; --when-bg: #43260e; --dot: #44403c; --seen-bg: #1e2a44; }
}
main.wide { max-width: none; }
textarea.code { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
details.advanced { margin-top: 2rem; }
button.secondary { background: none; color: var(--accent); border: 1px solid var(--line); }
.ivr-bar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.ivr-bar .sp { flex: 1; }
.ivr-bar form { margin: 0; }
.pill { font-size: .8rem; color: var(--muted); background: var(--end-bg); border-radius: 999px; padding: .2rem .7rem; }
.pill.bad { color: var(--danger); background: var(--err-bg); }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.ivr-edit { display: grid; grid-template-columns: minmax(0, 1fr) 27rem; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .ivr-edit { grid-template-columns: 1fr; } }

/* The map. Wires are an SVG drawn by app.js under the cards. */
.map { overflow: auto; max-height: calc(100vh - 11rem); min-height: 20rem; border: 1px solid var(--line); border-radius: 8px;
  background-color: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 20px 20px; }
.map-inner { position: relative; display: flex; gap: 4.5rem; padding: 1rem 1.25rem 2rem; width: max-content; min-width: 100%; }
svg.wires { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
svg.wires path { fill: none; stroke: var(--go); stroke-width: 2; opacity: .55; }
svg.wires path.hot { opacity: 1; stroke-width: 2.5; }
.map-col { display: flex; flex-direction: column; gap: 1rem; width: 21.25rem; position: relative; z-index: 1; }
.colhead { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-height: 1.1rem; }
.mc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.06); scroll-margin: 2rem; }
.mc.sel { box-shadow: 0 0 0 2px var(--go), 0 0 0 6px rgba(36,87,214,.15); }
.mc.bad { border-color: var(--danger); }
.mc.seen { background: var(--seen-bg); }
.mc.now { box-shadow: 0 0 0 2px var(--ok), 0 0 0 6px rgba(6,95,70,.18); }
.mc-head { display: flex; align-items: center; gap: .35rem; padding: .55rem .75rem; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: .9rem; color: var(--fg); text-decoration: none; flex-wrap: wrap; }
a.mc-head:hover .mc-name { text-decoration: underline; }
.mc-name { margin-right: auto; }
.when { font-size: .7rem; font-weight: 600; color: var(--when); background: var(--when-bg); border-radius: 999px; padding: .05rem .45rem; }
.when.def { color: var(--muted); background: var(--end-bg); }
.kind { font-size: .72rem; color: var(--muted); font-weight: 500; }
.badge.bad { font-size: .7rem; color: #fff; background: var(--danger); border-radius: 999px; padding: 0 .4rem; }
.mc-prompt { padding: .4rem .75rem; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-rows { padding: .25rem 0; }
.mc-row { position: relative; display: flex; align-items: center; gap: .45rem; padding: .2rem .75rem; font-size: .82rem; min-height: 1.9rem; }
.mc-row.last { border-top: 1px solid var(--line); margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.mc-row[data-to]::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--go); border: 2px solid var(--panel); }
.mc-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key { flex: none; min-width: 1.3rem; height: 1.3rem; border-radius: 5px; background: var(--seen-bg); color: var(--go);
  font-weight: 700; font-size: .72rem; display: flex; align-items: center; justify-content: center; }
.cond { font-size: .7rem; font-weight: 700; color: var(--when); background: var(--when-bg); border-radius: 4px; padding: .05rem .35rem; }
.dest { flex: none; max-width: 11.9rem; font-size: .72rem; font-weight: 600; border-radius: 5px; padding: .15rem .45rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dest.ring { color: var(--ring); background: var(--ring-bg); }
.dest.vm { color: var(--vm); background: var(--vm-bg); }
.dest.go { color: var(--go-fg); background: var(--go); }
.dest.end { color: var(--muted); background: var(--end-bg); }
form.ghost { border: 2px dashed var(--line); border-radius: 12px; padding: .75rem; display: grid; gap: .5rem; font-size: .85rem; }

/* The inspector. */
.insp { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem;
  position: sticky; top: .5rem; max-height: calc(100vh - 1rem); overflow: auto; }
.insp-form { display: grid; gap: .8rem; }
.insp-head { display: flex; gap: .6rem; align-items: center; }
.insp-name { font-size: 1.15rem; font-weight: 600; }
/* The office manager's inspector: the name isn't a field, and what they
   can't change is said in words. */
.insp-title { flex: 1; min-width: 0; font-size: 1.15rem; font-weight: 600; }
.insp dl.locked { grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; padding: .7rem .8rem; font-size: .9rem;
  background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; align-items: center; }
.insp dl.locked .dest { display: inline-block; max-width: 100%; }
.insp textarea { width: 100%; font: inherit; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--fg); }
.insp .error, .insp ul.hint { margin: 0; padding-left: 1.6rem; }
fieldset.when-boxes { padding: .4rem .7rem .6rem; gap: .3rem 1rem; }
fieldset.when-boxes legend { font-size: .9rem; padding: 0 .3rem; }
table.insp-keys { background: none; }
table.insp-keys th, table.insp-keys td { padding: .2rem .3rem .2rem 0; border: none; }
table.insp-keys select[name=key] { width: 3.6rem; }
.insp .inline { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.insp .inline input[type=number] { width: 4.2rem; }
.insp .inline select { width: auto; }
select.goes { font-weight: 600; }
select.goes.ring { color: var(--ring); background: var(--ring-bg); }
select.goes.vm { color: var(--vm); background: var(--vm-bg); }
select.goes.go { color: var(--go); background: var(--seen-bg); }
select.goes option, select.goes optgroup { color: var(--fg); background: var(--panel); font-weight: normal; }
.insp-more { justify-content: space-between; margin-top: .8rem; }
.insp-more form { margin: 0; }

/* Try it. */
.try { display: grid; grid-template-columns: 17rem minmax(0, 1fr) 23rem; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .try { grid-template-columns: 1fr; } .try-map { order: 3; } }
.try-when { display: grid; gap: .6rem; }
.try-when button { justify-self: start; }
ul.scen { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
ul.scen li { display: grid; grid-template-columns: 1.2rem 1fr auto; gap: .4rem; align-items: start; padding: .4rem .5rem;
  border-radius: 6px; background: var(--panel); border: 1px solid var(--line); }
ul.scen li.on { border-color: var(--accent); }
ul.scen li.ok .mark { color: var(--ok); }
ul.scen li.bad .mark { color: var(--danger); }
ul.scen form { margin: 0; }
ol.transcript { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
ol.transcript li { padding: .45rem .6rem; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); font-size: .9rem; }
ol.transcript li.sim-keys { background: var(--seen-bg); font-weight: 600; margin-left: 2rem; }
ol.transcript li.sim-end { font-weight: 600; border: 2px solid var(--ok); }
.t-card { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.t-say button[data-play] { padding: 0 .4rem; margin-right: .3rem; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .75rem; }
.padkey { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.2rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-decoration: none; font-size: 1.25rem; font-weight: 600; }
.padkey.valid { color: var(--go); border-color: var(--go); }
.padkey small { font-size: .65rem; font-weight: 500; max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-call { display: grid; gap: .5rem; margin-bottom: 1rem; }
.save-call button { justify-self: start; }
.try-banner { background: var(--when-bg); color: var(--when); border-radius: 6px; padding: .5rem .8rem; margin: 0 0 .75rem; }
.try h2 { font-size: .95rem; margin: 0 0 .6rem; }
.try-left h2 + * { margin-top: 0; }
.try-left > h2 { margin-top: 1.5rem; }
.sched-now { font-weight: 600; margin: 0; }
ol.transcript li.playing { border-color: var(--ok); background: var(--ok-bg); }
.try-call .player { position: static; }
.try-call label.check { margin-bottom: .75rem; }
form.numbers { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 0 0 .75rem;
  padding: .5rem .8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
form.numbers small { margin-left: .3rem; }
form.numbers button { padding: .25rem .8rem; }
/* Tabs (the schedule page) */
nav.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); margin: 2rem 0 1rem; }
nav.tabs a { color: var(--muted); text-decoration: none; padding: .4rem 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
nav.tabs a.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
nav.tabs a:hover { color: var(--fg); }
/* Upcoming / Past over a list of dated blocks: a filter, not a page tab. */
nav.tabs.sub { display: inline-flex; gap: .2rem; border-bottom: 0; margin: 1.5rem 0 .6rem; padding: 3px; background: var(--line); border-radius: 999px; }
nav.tabs.sub a { padding: .25rem .9rem; margin: 0; border-bottom: 0; border-radius: 999px; font-size: .875rem; }
nav.tabs.sub a.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
details.fold { margin: .5rem 0 .75rem; }
details.fold summary { cursor: pointer; }
details.fold summary .hint { margin-left: .5rem; }
details.fold form { padding: .25rem 0 0 1rem; }
.pending { border: 1px solid var(--line); background: var(--panel); padding: .6rem .8rem; border-radius: 6px; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
form.inline { display: inline; }
div.field { display: grid; gap: .3rem; font-size: .9rem; }
div.field > label:first-child { display: block; }
div.field.invalid input { border-color: var(--danger); }
details.settings { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin: .6rem 0; padding: 0 1rem; }
details.settings > summary { cursor: pointer; padding: .7rem 0; font-weight: 600; }
details.settings > summary .hint { font-weight: 400; margin-left: .5rem; }
details.settings > summary .badge { margin-left: .5rem; font-weight: 400; }
details.settings[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: .75rem; }
details.settings > form { padding-bottom: 1rem; }
details.settings code { margin-left: .4rem; font-size: .75rem; }
.greetings .greeting { border-bottom: 1px solid var(--line); padding: .5rem 0 .75rem; }
.greetings h4 { margin: .25rem 0 .4rem; font-size: .95rem; }
.greetings p { margin: .3rem 0; }
.greetings .empty { color: var(--muted); }
.greetings .typed-text { font-style: italic; }
.greetings .actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
form.typed { display: grid; gap: .5rem; max-width: 40rem; padding: .25rem 0 0 1rem; }
form.typed textarea { font: inherit; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); width: 100%; }
form.typed .preview { display: flex; gap: .75rem; align-items: center; }

/* Receptionist console (design A, 2026-11-09): cards with their buttons
   at the bottom, so they never move; a light for each colleague. */
form.inline { display: inline-flex; gap: .35rem; align-items: center; margin: 0 .35rem .25rem 0; }
.console { max-width: 75rem; display: grid; gap: 1.25rem; }
.console h1 { margin: 0; }
.console h2 { margin: 0 0 .75rem; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.console section { margin-bottom: 1.5rem; }
.console-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.console-head .live { display: inline-flex; align-items: center; gap: .45rem; padding: .15rem .75rem; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok); font-size: .85rem; font-weight: 500; }
.console-head .live .lamp { width: 8px; height: 8px; box-shadow: none; }
.console-head .me { margin-left: auto; color: var(--muted); font-size: .9rem; }
.console .count { border-radius: 999px; padding: 0 .55rem; font-size: .8rem; font-weight: 600;
  background: var(--line); color: var(--fg); }
.console .count.ringing { background: rgba(249,115,22,.18); }
.console .count.talking { background: rgba(220,38,38,.15); }
.console .count.parked { background: rgba(79,70,229,.16); }
.console .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: .75rem; }
.console .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .85rem 1rem;
  display: flex; flex-direction: column; gap: .45rem; min-height: 9rem; }
.console .card.ringing { border-color: rgba(249,115,22,.45); }
.console .card .top { display: flex; align-items: center; gap: .6rem; }
.console .card .who { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.console .card .time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.console .card.ringing .time { color: #c2410c; }
.console .card .sub { color: var(--muted); font-size: .9rem; }
.console .card .sub strong { color: var(--fg); font-weight: 600; }
.console .card .detail { color: var(--muted); font-size: .85rem; }
/* The buttons sit at the bottom of every card, however long its text. */
.console .card .actions { margin-top: auto; padding-top: .35rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.console .card .actions form.inline { margin: 0; }
.console .card .actions form.send { flex: 1; min-width: 12rem; }
.console .card .actions form.send select { min-width: 0; }
.console .card button { border-radius: 10px; min-height: 2.5rem; padding: .45rem .9rem; }
.console button.secondary { background: var(--panel); color: var(--fg); border: 1px solid var(--line); }
.console select { border-radius: 10px; min-height: 2.5rem; }
.console .pill.held { border-radius: 999px; padding: 0 .55rem; font-size: .75rem; font-weight: 600;
  background: rgba(234,179,8,.2); color: #92400e; }
.console .card.parked { flex-direction: row; gap: .9rem; align-items: stretch; }
.console .card.parked .slot { flex: none; width: 4rem; border-radius: 10px; background: rgba(79,70,229,.1); color: #4338ca;
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.console .card.parked .slot span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.console .card.parked .slot strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.console .card.parked .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .45rem; }
.console .recall { margin-left: auto; font-size: .85rem; font-weight: 600; color: #4f46e5; white-space: nowrap; }
.console .recall.soon { color: #c2410c; }
.console progress { appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; }
.console progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.console progress::-webkit-progress-value { background: #4f46e5; border-radius: 999px; }
.console progress::-moz-progress-bar { background: #4f46e5; border-radius: 999px; }
.console progress.soon::-webkit-progress-value { background: #ea580c; }
.console progress.soon::-moz-progress-bar { background: #ea580c; }
/* Lights */
.lamp { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; box-sizing: border-box; }
.lamp-available { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.16); }
.lamp-oncall { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.16); }
.lamp-held { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.16); animation: lamp-slow 2.4s ease-in-out infinite; }
.lamp-ringing { background: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.2); animation: lamp-blink 1s steps(2, start) infinite; }
.lamp-dnd { background: #eab308; box-shadow: 0 0 0 4px rgba(234,179,8,.2); }
.lamp-offline { border: 2px solid #a8a29e; }
.lamp-nophone { border: 2px dashed #a8a29e; }
.pb .pb-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb table.pb-table { max-width: 44rem; }
.pb table.pb-table td.actions { text-align: right; width: 1%; }
.pb table.pb-table td.actions .button { padding: .2rem .7rem; font-size: .9rem; }
.pb table.pb-table tr.pb-editing td.actions > * { margin-left: .6rem; }
.pb table.pb-problems { max-width: 44rem; margin-bottom: 1rem; }
.pb form.pb-add { display: flex; gap: .6rem; align-items: center; max-width: 44rem; margin-bottom: .75rem; }
.pb form.pb-add input[name=name], .pb form.pb-add input[type=file] { flex: 1 1 14rem; }
.pb form.pb-add input[name=number], .pb tr.pb-editing input[name=number] { flex: 0 0 10.5rem; width: 10.5rem; font-variant-numeric: tabular-nums; }
.pb form.inline { display: inline; }
.blk h2 { margin-top: 1.75rem; }
.blk form.pb-add { flex-wrap: wrap; }
.blk form.pb-add select { flex: 0 0 auto; width: auto; }
.blk form.pb-add input.blk-value { flex: 0 1 15rem; font-variant-numeric: tabular-nums; }
.blk form.pb-add input[name=note] { flex: 1 1 10rem; }
.blk .blk-result { max-width: 44rem; padding: .6rem .8rem; border-left: 3px solid var(--muted); background: rgba(0,0,0,.035); }
.blk form.grid { max-width: 44rem; }
.app-on { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: 0 .4rem; margin-left: .25rem;
  border-radius: 999px; color: #166534; background: #dcfce7; vertical-align: middle; }
.legend .app-on { margin: 0 .35rem 0 0; }
@keyframes lamp-blink { to { opacity: .25; } }
@keyframes lamp-slow { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .lamp-ringing, .lamp-held { animation: none; } }
.console .people-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.console .people-head h2 { margin: 0; }
.console ul.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--muted); }
.console ul.legend li { display: inline-flex; align-items: center; gap: .4rem; }
.console ul.legend .lamp { box-shadow: none; }
.console ul.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .6rem; }
.console li.person { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem;
  display: flex; align-items: center; gap: .75rem; min-height: 4rem; }
.console li.person .body { flex: 1; min-width: 0; }
.console li.person .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console li.person .ext { color: var(--muted); font-variant-numeric: tabular-nums; }
.console li.person .detail { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console li.person.oncall .detail, .console li.person.held .detail { color: var(--danger); }
.console li.person.ringing .detail { color: #c2410c; }
.console li.person.dnd .detail { color: #854d0e; }
.console li.person .vm { flex: none; font-size: .75rem; font-weight: 600; color: var(--accent); border-radius: 999px; padding: .1rem .5rem;
  background: rgba(29,78,216,.1); white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  .console .card.ringing .time, .console .recall.soon, .console li.person.ringing .detail { color: #fb923c; }
  .console .recall, .console .card.parked .slot { color: #a5b4fc; }
  .console li.person.dnd .detail { color: #fde047; }
  .console .pill.held { color: #fde047; }
}

/* Ring groups, in the console's card style (2026-11-09) */
.rg { max-width: 60rem; display: grid; gap: 1rem; }
.rg .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; }
.rg .card.add { border-style: dashed; }
.rg .card h2 { margin: 0; font-size: 1.1rem; }
.rg .card.add h2 { margin-bottom: .5rem; }
.rg .group-head { display: flex; align-items: center; gap: .6rem; }
.rg .ext-badge { border-radius: 999px; padding: .05rem .6rem; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums;
  background: rgba(29,78,216,.1); color: var(--accent); }
.rg .how { margin: .35rem 0 .75rem; color: var(--muted); font-size: .9rem; }
.rg ol.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rg .step { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .75rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); font-size: .9rem; }
.rg .step .ext { color: var(--muted); font-variant-numeric: tabular-nums; }
.rg .step .ring { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.rg .step .lamp { width: 10px; height: 10px; }
.rg .step.then { border-style: dashed; color: var(--muted); }
/* One at a time: an arrow before each step after the first. */
.rg .step { position: relative; }
.rg ol.flow:not(.together) .step + .step::before { content: "→"; color: var(--muted); position: absolute;
  left: -1.2rem; top: 50%; transform: translateY(-50%); }
.rg ol.flow:not(.together) { gap: .5rem 1.5rem; }
.rg details.edit { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.rg details.edit > summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.rg details.edit form { display: grid; gap: .75rem; margin-top: .75rem; }
.rg .grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); align-items: start; }
.rg .members { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rg .members-head, .rg .member { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 7rem; gap: .75rem; align-items: center; padding: .45rem .75rem; }
.rg .members-head { background: var(--bg); color: var(--muted); font-size: .8rem; font-weight: 500; }
.rg .member + .member, .rg .members-head + .member { border-top: 1px solid var(--line); }
.rg .member .order { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.rg select, .rg input { border-radius: 10px; }
.rg .card-actions { display: flex; justify-content: flex-end; margin-top: .25rem; }
.rg .card-actions button { border-radius: 10px; min-height: 2.5rem; }

/* Extension page, in the console's card style (2026-11-09) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ext { max-width: 52rem; display: grid; gap: .9rem; }
.ext .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem; }
.ext .card-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.ext .card-head h2 { margin: 0; font-size: 1rem; }
.numbers .numbers-group { margin: 1.6rem 0 .4rem; font-size: 1.15rem; }
.numbers .numbers-group:first-of-type { margin-top: 0; }
.numbers .card.number { border: 1px solid var(--line); border-left: 4px solid var(--fg); margin: .9rem 0; padding: .9rem 1.1rem; }
.numbers .card.number.other { border-style: dashed; border-left: 4px solid var(--line); }
.numbers .number-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.numbers .number-head h2 { margin: 0; font-size: 1.2rem; white-space: nowrap; }
.numbers .number-head form { margin: 0; }
.numbers .number-fields { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(12rem, 2fr); gap: 1rem; align-items: end; }
.numbers .number-fields label { margin: 0; }
.numbers .number-fields input, .numbers .number-fields select { width: 100%; }
.numbers .number-actions { display: flex; gap: .6rem; margin-top: .8rem; }
.numbers .card.number p.warn, .numbers .card.number p.hint { margin: 0 0 .7rem; }
.app .app-group { margin: 1.4rem 0 .5rem; font-size: 1.15rem; }
.app .app-group:first-of-type { margin-top: 0; }
.ext .flush { margin: 0; }
.ext .ext-id { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.ext .ext-num { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: .15rem .7rem; border-radius: 12px;
  background: rgba(29,78,216,.1); color: var(--accent); }
.ext .ext-who { display: flex; flex-direction: column; min-width: 0; }
.ext .ext-who strong { font-size: 1.1rem; }
.ext .ext-meta { display: flex; gap: .6rem; align-items: center; font-size: .85rem; color: var(--muted); }
.ext .chip { border: 1px solid var(--line); border-radius: 999px; padding: 0 .55rem; font-size: .8rem; }
.ext .ext-status { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; }
.ext .ext-status .lamp { width: 10px; height: 10px; }
.ext details.fold { margin-top: .6rem; }
.ext details.fold > summary { cursor: pointer; color: var(--accent); font-size: .9rem; width: max-content; }
.ext details.fold[open] > summary { margin-bottom: .5rem; }
.ext form.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.ext form.row label { flex: 0 1 11rem; }
.ext form.row label.grow { flex: 1 1 14rem; }
.ext form.row button, .ext button.secondary { border-radius: 10px; min-height: 2.4rem; }
.ext input, .ext select { border-radius: 10px; }
.ext button.secondary { background: var(--panel); color: var(--fg); border: 1px solid var(--line); padding: .35rem .8rem; font-size: .9rem; }
.ext ul.rows { list-style: none; margin: 0; padding: 0; }
.ext li.item { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem 0; }
.ext li.item + li.item { border-top: 1px solid var(--line); }
.ext li.item > .lamp { margin-top: .35rem; width: 10px; height: 10px; }
.ext li.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ext li.item .meta { font-size: .85rem; color: var(--muted); }
.ext li.item.off { opacity: .6; }
.ext .item-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end; max-width: 22rem; }
.ext .item-actions form, .ext .lockline form { margin: 0; }
.ext .lockline { display: flex; gap: .75rem; align-items: center; margin-top: .4rem; }
.ext .ext-delete { justify-self: end; }
.ext .hint { margin: .4rem 0 0; }

/* User page, in the same card style (2026-11-09) */
.ext .usr-badge { min-width: 2.6rem; text-align: center; letter-spacing: .02em; }
.ext a.ext-status { text-decoration: none; }
.ext a.ext-status:hover { border-color: var(--accent); color: var(--accent); }
.ext .chip-warn { border-color: #eab308; color: #a16207; }
.ext dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0; }
.ext dl.facts dt { color: var(--muted); font-size: .9rem; }
.ext dl.facts dd { margin: 0; }
.ext dl.facts .hint, .ext li.item .meta .hint { margin: 0; }
.ext form.row label.check { align-self: center; }

/* Voicemail page, in the same card style (2026-11-09), in voicemail's
   colour from the phone menus (--vm). */
.vm .ext-head .ext-num { background: var(--vm-bg); color: var(--vm); min-width: 2.6rem; text-align: center; }
.vm .ext-head .ext-num.vm-none { background: var(--end-bg); color: var(--muted); }
.vm .vm-filters { margin-left: auto; }
.vm .vm-filters a { font-size: .9rem; padding: .25rem .85rem; }
.vm .vm-filters a.on { color: var(--vm); border-color: var(--vm); background: var(--vm-bg); }
.vm .player { background: var(--panel); padding: .25rem 0 .5rem; }
.vm .player audio, .mb .player audio { height: 2.2rem; }
.vm .player button, .mb .player button { border-radius: 10px; background: var(--panel); color: var(--fg); border: 1px solid var(--line); padding: .35rem .8rem; font-size: .9rem; }
.vm .greetings button[data-play], .mb .greetings button[data-play] { background: var(--vm-bg); color: var(--vm); border: 1px solid transparent; border-radius: 999px; padding: .3rem .95rem; font-size: .9rem; }
.vm .greetings button[data-play]:hover, .mb .greetings button[data-play]:hover { border-color: var(--vm); }
.vm .greetings .actions, .mb .greetings .actions { gap: .9rem; }
.vm details.trash { margin-top: 0; }
.vm details.trash[open] > summary { margin-bottom: .25rem; }
.vm li.item { align-items: center; padding: .55rem .6rem; margin: 0 -.6rem; border-radius: 10px; }
.vm li.item + li.item { border-top: 1px solid var(--line); }
.vm li.item.new strong { font-weight: 700; }
.vm li.item:not(.new) strong { font-weight: 500; }
.vm li.item.urgent { background: var(--err-bg); }
.vm li.item.playing { background: var(--ok-bg); }
.vm li.item .meta .badge { margin-right: .35rem; }
.vm .vm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--vm); margin: 0 .4rem .1rem 0; vertical-align: middle; }
.vm button.play { flex: none; width: 2.4rem; height: 2.4rem; padding: 0; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--vm-bg); color: var(--vm); border: 1px solid transparent; }
.vm button.play:hover { border-color: var(--vm); }
.vm li.item.playing button.play { background: var(--vm); color: var(--panel); }
.vm .item-actions { gap: .2rem .9rem; }
.vm .item-actions .pill { margin-right: .2rem; }
.vm details.trash > summary { color: var(--muted); }
.vm .greetings .greeting:last-of-type, .mb .greetings .greeting:last-of-type { border-bottom: 0; }
.vm .greetings h4 { margin-top: 0; }
.vm .vm-foot { margin: 0 .2rem; }
@media (max-width: 40rem) {
  .vm li.item { flex-wrap: wrap; }
  .vm li.item .body { flex-basis: calc(100% - 3.4rem); }
  .vm .item-actions { width: 100%; max-width: none; justify-content: flex-start; padding-left: 3.15rem; }
  .vm .vm-filters { margin-left: 0; }
}

/* Shared mailboxes page, in the ring groups' card style (2026-11-09) */
.mb .card.oncall { border-color: var(--danger); }
.mb .group-head .badge.box { margin: 0; }
.mb .mb-line { display: flex; align-items: baseline; gap: .75rem; margin-top: .55rem; }
.mb .mb-label { flex: none; width: 5.5rem; color: var(--muted); font-size: .85rem; }
.mb .hint.flush { margin: 0; }
.mb ul.mb-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.mb ul.mb-chips li { border: 1px solid var(--line); border-radius: 999px; padding: .1rem .65rem; font-size: .88rem; }
.mb ul.mb-chips li.set { background: var(--vm-bg); color: var(--vm); border-color: transparent; }
.mb details.edit form { display: block; margin-top: .5rem; }
.mb details.edit + details.edit { border-top: 0; margin-top: .1rem; padding-top: .35rem; }
.mb .members-list { margin: .25rem 0 .5rem; }
.mb details.edit .greetings { margin-top: .5rem; }
.mb .mb-oncall { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; margin: .8rem 0 0; }
.mb button.secondary { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: .35rem .8rem; font-size: .9rem; }
@media (max-width: 40rem) {
  .mb .mb-line { flex-direction: column; gap: .3rem; }
  .mb .mb-oncall { justify-content: flex-start; flex-wrap: wrap; }
}

/* Schedule entry forms (2026-11-09, design C): what it is on top, then
   Starts and Ends side by side, then the span day by day (app.js). */
.span-form, .wc-form { max-width: 40rem; display: grid; gap: .9rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1rem 1.15rem; margin: .75rem 0 1.25rem; }
.span-form input, .span-form select, .wc-form input, .wc-form select { border-radius: 10px; min-height: 2.5rem; }
.span-form .span-what { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: .75rem; }
.span-form label, .wc-form label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.span-form label > input, .span-form label > select, .wc-form label > input, .wc-form label > select { font-size: 1rem; font-weight: 400; color: var(--fg); }
.span-form .span-title, .wc-form .span-title { margin: 0; font-size: 1.05rem; }
.span-pair { display: grid; grid-template-columns: minmax(0, 1fr) 1.75rem minmax(0, 1fr); gap: .5rem; align-items: stretch; }
fieldset.span-end { margin: 0; min-width: 0; display: flex; flex-direction: column; flex-wrap: nowrap; gap: .5rem;
  border-radius: 12px; padding: .5rem .75rem .75rem; }
fieldset.span-end legend { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0 .3rem; }
.span-day { font-size: 1.1rem; }
.span-arrow { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.span-form input.auto { background: rgba(37, 99, 235, .08); border-color: rgba(37, 99, 235, .45); }
.span-days { display: flex; gap: 4px; align-items: flex-end; min-height: 2.6rem; }
.span-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.span-col span { font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.span-col svg { width: 100%; height: 26px; display: block; background: var(--end-bg); border-radius: 6px; }
.span-col rect.span-open { fill: var(--st-open); fill-opacity: .22; }
.span-key { background: var(--st-open); opacity: .35; }
.span-col rect.st-open { fill: var(--st-open); } .span-col rect.st-closed { fill: var(--st-closed); }
.span-col rect.st-lunch { fill: var(--st-lunch); } .span-col rect.st-holiday { fill: var(--st-holiday); }
.span-col rect.st-weather { fill: var(--st-weather); } .span-col rect.st-meeting { fill: var(--st-meeting); }
.span-col rect.st-other { fill: var(--st-other); }
.span-more { font-size: .75rem; color: var(--muted); padding-bottom: .4rem; white-space: nowrap; }
.span-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.span-foot .hint { flex: 1; margin: 0; font-size: .8rem; }
.span-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; vertical-align: -1px; }
.span-foot button { border-radius: 10px; min-height: 2.5rem; padding: 0 1.1rem; }

/* The dated blocks above the form: a row each, Edit opens the same form. */
ul.entries { list-style: none; margin: .5rem 0; padding: 0; max-width: 40rem; display: grid; gap: .5rem; }
li.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .55rem .9rem; }
li.entry.now { border-color: var(--accent); }
li.entry.off { opacity: .6; }
li.entry > details > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .75rem; list-style: none; }
li.entry > details > summary::-webkit-details-marker { display: none; }
.entry-what { font-weight: 600; }
.entry-when { font-variant-numeric: tabular-nums; }
.entry-sets { color: var(--muted); font-size: .85rem; }
.entry-open { color: var(--accent); font-size: .85rem; }
li.entry > details[open] .entry-open { display: none; }
li.entry .span-form, li.entry .wc-form { margin: .75rem 0 .25rem; padding: .85rem .9rem; }
li.entry form.entry-end { margin: 0; }

/* Weekly call (SPEC §6.4): who, day, from, to on one row; the week at a
   glance above the list. */
.wc-fields { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.wc-fields label:nth-child(1) { flex: 2 1 7.5rem; } .wc-fields label:nth-child(2) { flex: 1 1 6.5rem; }
.wc-fields label:nth-child(3), .wc-fields label:nth-child(4) { flex: 1 1 6.5rem; max-width: 9.5rem; }
.wc-fields select, .wc-fields input { width: 100%; }
.wc-fields label { display: grid; gap: .25rem; margin: 0; }
.wc-fields button { border-radius: 10px; min-height: 2.5rem; padding: 0 1.1rem; }
.sched.week { max-width: 40rem; }
.sched.week .sched-row { cursor: default; }
.sched-bar rect.span-open { fill: var(--st-open); fill-opacity: .22; }
.span-key.call { background: var(--st-other); opacity: 1; margin-left: .75rem; }
@media (max-width: 40rem) {
  .span-pair { grid-template-columns: minmax(0, 1fr); }
  .span-arrow { transform: rotate(90deg); }
  .span-form .span-what { grid-template-columns: minmax(0, 1fr); }
}

/* The Lamps page: a tick, the extension, and arrows to move the row. */
.ext ul.lamps li.item { align-items: center; padding: .45rem 0; }
.ext ul.lamps label.body { cursor: pointer; }
.ext ul.lamps input[type=checkbox] { margin-right: .5rem; }
.ext ul.lamps .item-actions { flex-wrap: nowrap; }
.ext ul.lamps [data-move] { font-size: 1.1rem; min-width: 2.75rem; min-height: 2.75rem; text-decoration: none; }
.ext form[data-lamps] .row { margin-top: .9rem; }
/* Sortable tables (the Devices page) */
table.sortable th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable th[data-sort]:hover { color: var(--text, inherit); }
table.sortable th[aria-sort=ascending]::after { content: " \25B2"; font-size: .7em; }
table.sortable th[aria-sort=descending]::after { content: " \25BC"; font-size: .7em; }
table.devices td { vertical-align: top; }
table.devices .meta { font-size: .85rem; color: var(--muted); }
table.devices .lamp { margin-right: .45rem; vertical-align: -1px; }
table.devices td:first-child { white-space: nowrap; }
table.devices .meta.warn { color: #b45309; }
/* The firmware card on the Devices page: a row for each model, a column
   for each step; the tinted cell is where a model stands. */
.firmware { margin-top: 1.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem;
  --fw-now-bg: #eff6ff; --fw-now-line: #bfdbfe; --fw-now-fg: #1e3a8a; --fw-wait: #b45309; }
@media (prefers-color-scheme: dark) {
  .firmware { --fw-now-bg: #172554; --fw-now-line: #1e40af; --fw-now-fg: #bfdbfe; --fw-wait: #fbbf24; }
}
.firmware .card-head h2 { margin: 0; font-size: 1rem; }
.firmware > .hint { margin: .15rem 0 .6rem; }
.firmware .fw-scroll { overflow-x: auto; }
.firmware .fw-steps { min-width: 48rem; }
.firmware .fw-row { display: grid; grid-template-columns: 7.5rem repeat(3, minmax(0, 1fr)); column-gap: .75rem;
  padding: .6rem 0; border-bottom: 1px solid var(--line); }
.firmware .fw-head { align-items: center; padding: .3rem 0 .5rem; font-size: .85rem; font-weight: 600; }
.firmware .fw-head > div { display: flex; align-items: center; gap: .5rem; padding: 0 .65rem; }
.firmware .fw-n { flex: none; width: 1.3rem; height: 1.3rem; border-radius: 999px; background: var(--fg); color: var(--panel);
  font-size: .75rem; display: flex; align-items: center; justify-content: center; }
.firmware .fw-model { padding-top: .5rem; }
.firmware .meta { font-size: .85rem; color: var(--muted); }
.firmware .fw-cell { padding: .5rem .65rem; border: 1px solid transparent; border-radius: 8px; min-width: 0; }
.firmware .fw-now { background: var(--fw-now-bg); border-color: var(--fw-now-line); }
.firmware .fw-later { color: var(--muted); font-size: .85rem; }
.firmware .fw-label { display: block; font-size: .85rem; font-weight: 600; color: var(--fw-now-fg); margin-bottom: .3rem; }
.firmware .fw-done { font-variant-numeric: tabular-nums; }
.firmware .fw-done::before { content: "\2713"; color: var(--ok); font-weight: 700; margin-right: .4rem; }
.firmware form { margin: 0; }
.firmware .fw-line { display: flex; gap: .4rem; align-items: center; }
.firmware .fw-line select, .firmware .fw-line input { flex: 1; min-width: 0; padding: .3rem .45rem; }
.firmware .fw-pick { display: grid; gap: .35rem; justify-items: start; }
.firmware .fw-pick select { padding: .3rem .45rem; }
.firmware .fw-line button, .firmware .fw-pick button, .firmware .fw-give button { padding: .35rem .8rem; white-space: nowrap; }
.firmware .fw-give { margin-bottom: .25rem; }
.firmware .fw-upload { display: grid; gap: .35rem; }
.firmware .fw-upload input[type=file] { padding: .2rem; font-size: .85rem; }
.firmware .fw-foot, .firmware .fw-acts { display: flex; flex-wrap: wrap; gap: .1rem .9rem; font-size: .85rem; margin-top: .25rem; }
.firmware .fw-foot { justify-content: space-between; }
.firmware .fw-acts summary { cursor: pointer; color: var(--accent); }
.firmware .fw-acts details[open] { flex-basis: 100%; order: 2; }
.firmware .fw-acts details[open] summary { margin-bottom: .35rem; }
.firmware .fw-ok { color: var(--ok); }
.firmware .fw-wait { color: var(--fw-wait); }
.firmware .fw-meter { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.firmware progress { appearance: none; flex: 1; min-width: 0; height: 6px; border: 0; border-radius: 999px; background: var(--fw-now-line); overflow: hidden; }
.firmware progress::-webkit-progress-bar { background: var(--fw-now-line); }
.firmware progress::-webkit-progress-value { background: var(--accent); }
.firmware progress::-moz-progress-bar { background: var(--accent); }
.firmware .fw-push { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-top: .8rem; }
.firmware .fw-push p { margin: 0; flex: 1; min-width: 16rem; }
