/* Simplyfree PBX admin — plain, readable, no external assets */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #1d2433;
  --muted: #667085;
  --line: #e2e5ea;
  --accent: #0b6e74;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2f2;
  --ok: #1a7f37;
  --ok-soft: #e6f4ea;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .92em; background: #f0f1f4; padding: 1px 5px; border-radius: 4px; }
h1 { font-size: 1.6rem; margin: 0 0 .2rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { font-size: 1.02rem; margin: 0 0 .7rem; }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--ink); color: #fff; padding: .7rem 1.5rem; }
.brand { color: #fff; font-weight: 650; display: flex; align-items: center; gap: .55rem; }
.brand:hover { text-decoration: none; }
.mark { width: 18px; height: 18px; border-radius: 5px; background: var(--accent); box-shadow: inset 0 0 0 4px #5fb7bb; }
nav.main { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
nav.main a, nav.main .link { color: #d5dae3; }
nav.main a:hover, nav.main .link:hover { color: #fff; }
/* grouped top menus (0.48.2) */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; color: #d5dae3; display: flex; align-items: center; gap: .3rem; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: "▾"; font-size: .75em; opacity: .8; }
details.menu > summary:hover, details.menu[open] > summary { color: #fff; }
.menu-pop { position: absolute; top: calc(100% + .6rem); left: -.8rem; z-index: 50; min-width: 15rem; display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: .4rem; box-shadow: 0 10px 28px rgba(15, 23, 42, .18); }
nav.main .menu-pop a { color: #2b3342; padding: .45rem .65rem; border-radius: 6px; white-space: nowrap; }
nav.main .menu-pop a:hover { background: #f1f3f6; color: var(--ink); text-decoration: none; }
.menu-head { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .55rem .65rem .2rem; }
.menu-note { font-size: .8rem; color: var(--muted); padding: .35rem .65rem .45rem; max-width: 15rem; white-space: normal; }

main { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.5rem 3rem; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem 0 2rem; }

.tenant-head { margin-bottom: .8rem; }
.eyebrow { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
nav.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; overflow-x: auto; }
nav.tabs a { padding: .55rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
nav.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
nav.tabs a:hover { text-decoration: none; color: var(--ink); }

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.card.narrow { max-width: 460px; margin: 2rem auto; }
.card.danger { border-color: #f3c7c2; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.2rem; align-items: start; }
.grid2 > .card, .grid2 > .stack > .card { margin-bottom: 0; }
/* four fields to a row (Phones form); boxes line up along the bottom even when a hint wraps */
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.2rem; align-items: end; }
.grid4 > label > select, .grid4 > label > input { width: 100%; max-width: 100%; box-sizing: border-box; }
@media (max-width: 1000px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid4 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 1rem; }

.flash, .error { border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1.1rem; }
.flash { background: var(--accent-soft); border: 1px solid #b9dfe0; }
.error { background: var(--danger-soft); border: 1px solid #f3c7c2; color: var(--danger); }

table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card table.list { border: 0; }
table.list th, table.list td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fafbfc; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
table.compact th, table.compact td { padding: .45rem .6rem; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.center { text-align: center !important; }
.muted { color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; }
ul.plain { list-style: none; padding: 0; margin: 0 0 1rem; }
ul.plain li { padding: .25rem 0; }

.badge { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: #344054; margin-right: 4px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

form .actions { display: flex; gap: 1rem; align-items: center; }
.actions.sticky { position: sticky; bottom: 0; background: var(--bg); padding: .7rem 0; }
.form-grid { display: flex; flex-direction: column; gap: .9rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 550; }
label.check { flex-direction: row; align-items: baseline; gap: .5rem; font-weight: 450; flex-wrap: wrap; }
label.check .hint { display: inline; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .6rem; margin: 0; min-width: 0; }
select { max-width: 100%; }
legend { font-weight: 600; padding: 0 .3rem; }
input, select { font: inherit; padding: .5rem .6rem; border: 1px solid #cfd4dc; border-radius: 6px; background: #fff; color: var(--ink); min-width: 0; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
input:disabled, select:disabled { background: #f4f5f7; color: var(--muted); }
input.money { width: 8rem; }
input.short { width: 6rem; }
form.row { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1rem; }
form.row label { flex: 0 1 auto; }
form.row label:first-of-type { flex: 1 1 260px; }
form.inline { display: inline; }

button, .button { font: inherit; display: inline-block; padding: .5rem 1rem; border-radius: 6px; border: 1px solid #cfd4dc; background: #fff; color: var(--ink); cursor: pointer; font-weight: 550; }
button:hover, .button:hover { background: #f4f5f7; text-decoration: none; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover, .button.primary:hover { background: #095a5f; }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 450; }
button.link:hover { text-decoration: underline; }

dl.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; margin: 0 0 1rem; }
dl.stats div { background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; }
dl.stats dt { color: var(--muted); font-size: .8rem; }
dl.stats dd { margin: 0; font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
dl.stats .total { background: var(--accent-soft); border-color: #b9dfe0; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.2rem; margin: 0 0 1rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
dl.kv.big dd { font-size: 1.08rem; }
code.secret { font-size: 1.1rem; padding: 3px 8px; background: var(--warn-soft); user-select: all; }
.kv-line { margin: 0; }
.big-number { font-size: 2.2rem; font-weight: 700; margin: .2rem 0; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  main { padding: 1rem; }
  header.top { padding: .7rem 1rem; }
  table.list { display: block; overflow-x: auto; }
}

/* 0.2: extension editor tabs (no script: #anchors + :target) */
.ext-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.ext-summary > div:first-child { flex: 1 1 34rem; min-width: 0; }
.ext-summary h2 { margin: 0 0 .3rem; }
.ext-summary .badges { margin: 0; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.ext-summary .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.ext-page { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.ext-nav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 2px; background: #eceef2; border-radius: var(--radius); padding: 6px; }
.ext-nav a { display: flex; flex-direction: column; padding: .55rem .8rem; border-radius: 6px; color: #3a4252; }
.ext-nav a small { color: var(--muted); font-size: .78rem; }
.ext-nav a:hover { background: #f6f7f9; text-decoration: none; }
.ext-secs { flex: 999 1 520px; min-width: 0; }
.ext-sec { display: none; scroll-margin-top: 1rem; }
.ext-sec:target { display: block; }
.ext-secs:not(:has(.ext-sec:target)) .ext-sec.first { display: block; }
.ext-page:not(:has(.ext-sec:target)) .ext-nav a.first,
.ext-page:has(#user:target) a[href="#user"], .ext-page:has(#phones:target) a[href="#phones"],
.ext-page:has(#security:target) a[href="#security"], .ext-page:has(#calls:target) a[href="#calls"],
.ext-page:has(#voicemail:target) a[href="#voicemail"], .ext-page:has(#callerid:target) a[href="#callerid"],
.ext-page:has(#limits:target) a[href="#limits"], .ext-page:has(#groups:target) a[href="#groups"],
.ext-page:has(#billing:target) a[href="#billing"], .ext-page:has(#advanced:target) a[href="#advanced"] {
  background: #fff; color: var(--ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.soon { margin: .4rem 0 0; padding-top: .7rem; border-top: 1px dashed #cfd4dc; color: var(--muted); font-size: .88rem; }
.lockb { display: inline-block; font-size: .72rem; font-weight: 600; color: #5b6474; background: #eef0f3; border: 1px solid #d5dae3; border-radius: 999px; padding: 0 8px; margin-left: 6px; }
details.card summary { cursor: pointer; font-weight: 600; color: var(--danger); }
details.card.plain summary { color: inherit; }
details.card[open] summary { margin-bottom: .8rem; }
.narrow-form { max-width: 420px; }
textarea { font: inherit; padding: .5rem .6rem; border: 1px solid #cfd4dc; border-radius: 6px; resize: vertical; }
.filters { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.row-actions { white-space: nowrap; display: flex; gap: .4rem; align-items: center; }
a.badge:hover { text-decoration: none; background: var(--accent-soft); }
.indent { margin-left: 1.6rem; }
.csv-copy { margin-top: 1rem; }
.csv-copy textarea { font-family: var(--mono); font-size: .85rem; }
.page-head .actions { display: flex; gap: .6rem; }
.hours-table input[type=time] { width: 7.5rem; }
.hours-table { max-width: 820px; }
@media (max-width: 760px) { .hours-table { display: block; overflow-x: auto; } }
.hours-top { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.status-line { display: flex; gap: .5rem; align-items: center; }
.table-scroll { overflow-x: auto; }
.special-table input[type=time] { width: 7rem; }
.special-table input[type=date] { width: 9.5rem; }
.special-table td:first-child input { width: 100%; min-width: 10rem; }
.special-table select { max-width: 15rem; }
.table-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.inline-label { flex-direction: row; align-items: center; gap: .5rem; font-weight: 450; flex-wrap: wrap; }
@media (max-width: 760px) { .hours-top { grid-template-columns: 1fr; } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.tenant-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .3rem 1rem; margin-left: 1.6rem; }
.step-card { border-left: 4px solid var(--accent); }
.step-head { display: flex; justify-content: space-between; align-items: baseline; }
.step-head h3 { margin: 0; }
.step-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.step-then { text-align: center; color: var(--muted); font-size: .9rem; margin: -.4rem 0; }
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .4rem 1.6rem; margin: .5rem 0 .8rem; padding-left: 1.4rem; }
.slot-list select { width: 100%; }
.hint.inline { display: inline; }
@media (max-width: 760px) { .step-grid { grid-template-columns: 1fr; } }
.outside-number { margin-top: .3rem; }
/* the outside-number box shows only when "Outside number…" is chosen just above it */
@supports selector(:has(a)) {
  .outside-number { display: none; }
  label:has(select option[value="outbound:"]:checked) + .outside-number,
  select:has(option[value="outbound:"]:checked) + .outside-number { display: block; }
}
label + .outside-number { margin-top: -.45rem; }
.outside-number.small { width: 100%; max-width: 15rem; font-size: .88rem; padding: .35rem .5rem; }
.vm-help { margin-top: .6rem; padding: .8rem 1rem; background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; font-size: .92rem; }
.vm-help ul { margin: .4rem 0 0; }
.ext-summary .quick { display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: flex-start; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.toggle-row { flex: 1 1 18rem; display: flex; flex-direction: column; gap: .3rem; }
.toggle-row .fwd-dest { display: none; gap: .5rem; flex-wrap: wrap; margin-top: .2rem; }
.toggle-row.fwd:has(input[name=fwd_on]:checked) .fwd-dest { display: flex; }
.toggle-row .fwd-dest select, .toggle-row .fwd-dest .outside-number { flex: 1 1 12rem; margin: 0; min-width: 0; }
/* slide switch (a styled checkbox: works without script, keyboard and screen readers as normal) */
label.switch { display: inline-flex; flex-direction: row; align-self: flex-start; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; position: relative; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.switch .slider { width: 44px; height: 24px; border-radius: 999px; background: #c9ced6; position: relative; flex: none; transition: background .15s; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch .state::before { content: "Off"; font-weight: 500; font-size: .8rem; color: var(--muted); margin-left: .3rem; }
.switch:has(input:checked) .state::before { content: "On"; color: var(--accent); }
.toggle-row.dnd .switch:has(input:checked) .state::before { color: var(--warn); }
.form-grid > .toggle-row { flex: none; }
@media (prefers-reduced-motion: reduce) { .switch .slider, .switch .slider::after { transition: none; } }
/* IVR keypad grid */
.ivr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem 1.2rem; margin-top: .6rem; }
.ivr-key { display: flex; gap: .6rem; align-items: flex-start; }
.ivr-key > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.ivr-key > div .outside-number { margin-top: 0; }
.ivr-key .key { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.ivr-keys .badge { margin-bottom: 2px; }
.row2 { display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; align-items: flex-end; }
.row2 > label { flex: 1 1 14rem; }
table.sounds audio { height: 2rem; max-width: 16rem; }
audio { max-width: 100%; }
.sounds-add { margin-bottom: 1.2rem; align-items: start; }
.tpl-chooser { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .6rem 0; }
.tpl-chooser label { flex: 1 1 18rem; }
.tpl-note { margin: .3rem 0 0; }
.stack + .card, .stack + form.card { margin-top: 1.2rem; }
/* transcription provider form: show the settings for the chosen kind */
@supports selector(:has(a)) {
  form:has(input[name=kind]) .kind-aws, form:has(input[name=kind]) .kind-openai, form:has(input[name=kind]) .kind-webhook, form:has(input[name=kind]) .kind-deepgram,
  form:has(input[name=kind]) .kind-bedrock, form:has(input[name=kind]) .kind-anthropic { display: none; }
  form:has(input[name=kind][value=aws]:checked) .kind-aws,
  form:has(input[name=kind][value=openai]:checked) .kind-openai,
  form:has(input[name=kind][value=webhook]:checked) .kind-webhook,
  form:has(input[name=kind][value=deepgram]:checked) .kind-deepgram,
  form:has(input[name=kind][value=bedrock]:checked) .kind-bedrock,
  form:has(input[name=kind][value=anthropic]:checked) .kind-anthropic { display: flex; }
}
.codec-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem 1rem; }
.codec-picks label { font-size: .9rem; }
.codec-picks select { width: 100%; }
.badge.live { background: #dbeafe; color: #1e40af; }
.live-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .2rem 0 .6rem; font-size: .9rem; }
audio { height: 32px; max-width: 260px; vertical-align: middle; }
.summary-box { white-space: pre-wrap; background: var(--bg, #f3f4f6); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; line-height: 1.5; }
.transcript { display: grid; gap: .45rem; }
.transcript .line { display: grid; grid-template-columns: 3.2rem 9rem 1fr; gap: .6rem; align-items: baseline; }
.transcript .line.staff .who { color: #0f766e; font-weight: 600; }
.transcript .line.other .who { color: #1e40af; font-weight: 600; }
.transcript .at { color: var(--muted, #6b7280); font-size: .85rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .transcript .line { grid-template-columns: 2.6rem 1fr; } .transcript .line .text { grid-column: 1 / -1; } }
.review-wrap { max-width: 760px; margin: 0 auto; }
textarea.summary-edit { min-height: 11rem; line-height: 1.5; }

/* 0.18.1: tenant menu down the left side (stays in view while the page scrolls) */
.with-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.6rem; max-width: 1440px; margin: 0 auto; padding: 1.4rem 1.5rem 3rem; align-items: start; }
main.side-main { max-width: none; margin: 0; padding: 0; min-width: 0; }
aside.side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .65rem .5rem; }
.side-head { padding: 0 .6rem .55rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.side-name { font-weight: 650; font-size: 1.02rem; line-height: 1.25; margin-top: .15rem; overflow-wrap: anywhere; }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav a { padding: .3rem .65rem; border-radius: 6px; color: #3a4252; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.side-nav a:hover { background: #f1f3f6; text-decoration: none; }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* company menu categories that fold (0.48.2): Build / Statistics / Organisation / Billing */
details.side-cat { margin-top: .15rem; }
details.side-cat > summary { list-style: none; cursor: pointer; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: .5rem .65rem .25rem; display: flex; justify-content: space-between; align-items: center; border-radius: 6px; }
details.side-cat > summary::-webkit-details-marker { display: none; }
details.side-cat > summary::after { content: "▸"; font-size: .9rem; }
details.side-cat[open] > summary::after { content: "▾"; }
details.side-cat > summary:hover { color: var(--ink); background: #f1f3f6; }
details.side-cat > a { display: flex; }
.side-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .55rem .65rem .15rem; }
@media (max-width: 860px) {
  .with-side { display: block; padding: 1rem; }
  aside.side { position: static; max-height: none; margin-bottom: 1rem; padding: .6rem; }
  .side-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: .2rem; }
  .side-nav:has(details) { flex-direction: column; overflow-x: visible; }
  .side-nav a { white-space: nowrap; }
  .side-group { display: none; }
}

/* 0.21.0: phone keys */
.keys-table select, .keys-table input { width: 100%; min-width: 7rem; }
.keys-table tr.own td { background: var(--accent-soft); }
.key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.key-cell { border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; display: flex; flex-direction: column; gap: 2px; background: #fbfcfd; position: relative; }
.key-cell.blf { border-left: 4px solid #19a774; }
.key-cell.speed_dial { border-left: 4px solid #3b82f6; }
.key-cell.ring_group, .key-cell.pickup { border-left: 4px solid #f0a400; }
.key-pos { position: absolute; top: 4px; right: 8px; font-size: .75rem; color: var(--muted); }

/* 0.22.0: single sign-on buttons */
.sso-or { display: flex; align-items: center; gap: .6rem; color: var(--muted); margin: 1rem 0 .6rem; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.sso-btn { justify-content: center; text-align: center; font-weight: 600; }

/* 0.23.0: provisioning */
textarea.mono, pre.mono { font-family: var(--mono); font-size: .85rem; }
pre.prov-sample { white-space: pre-wrap; background: #f6f7f9; border: 1px solid var(--line); border-radius: 8px; padding: .8rem; max-height: 32rem; overflow: auto; }
.model-code { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }

/* two-factor sign-in (0.31.0) */
.qr-box { margin: .75rem 0; }
.qr-box svg.qr { display: block; width: 200px; height: 200px; background: #fff; padding: 4px; border-radius: 6px; }
code.secret { letter-spacing: .08em; word-spacing: .2em; user-select: all; }
.code-input { font-size: 1.4rem; letter-spacing: .3em; max-width: 12rem; }
ol.steps li { margin-bottom: .6rem; }
ul.recovery-codes { columns: 2; list-style: none; padding: 0; font-size: 1.1rem; }
ul.recovery-codes li { margin: .3rem 0; }
@media print { header, nav, .actions { display: none !important; } }

/* hot desking (0.32.0) */
fieldset.hotdesk { border: 1px solid var(--line, #e3e6ec); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0; }
form.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
form.inline-form label { display: flex; align-items: center; gap: .4rem; }

/* 0.33.0: logins and positions */
.notice { border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1.1rem; background: #fff8e6; border: 1px solid #f1dca5; }
.readonly form[method="post"] :is(input, select, textarea, button):not([type="hidden"]):not(.keep-live) { pointer-events: none; opacity: .55; }
.readonly form[method="post"]:not(.keep-live) .actions { display: none; }
.readonly details.danger { display: none; }
.side-switch { display: block; font-size: .85rem; margin-bottom: .4rem; }
table.perms td, table.perms th { vertical-align: middle; }
table.perms .lv { text-align: center; width: 6.5rem; }
table.perms .lv input { margin: 0; }
table.perms .lv.na { color: var(--muted, #9aa3ae); }
.tenant-picks.wide { max-height: 16rem; overflow: auto; }
.login-forgot { margin-top: .6rem; font-size: .92rem; }
.readonly .page-head a.button.primary { display: none; }
.ext-own .ext-nav, .ext-own .ext-sec:not(#calls):not(#voicemail) { display: none !important; }
.ext-own .ext-sec#calls, .ext-own .ext-sec#voicemail { display: block; margin-bottom: 1rem; }
[hidden] { display: none !important; }
.ext-own .admin-only { display: none; }

/* ---- 0.34.0: category side bar + widget dashboard (widget-dashboard-spec.md) ----
   Theme: these variables are the default (Simplyfree) look; a partner theme overrides them. */
:root {
  --side-bg: #0E4F4F; --side-ink: #ffffff; --side-muted: #A9D2CE; --side-hover: rgba(255,255,255,.08); --side-cur: rgba(255,255,255,.14);
  --w-bg: #F3F6F6; --w-line: #DBE3E2; --w-ink: #1C2626; --w-muted: #5D6D6C; --w-radius: 14px;
}
.with-cats { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 52px);
  background: linear-gradient(to right, var(--side-bg) 236px, var(--w-bg) 236px); } /* the side bar's colour runs the full height */
.with-cats > main.side-main { padding: 24px 28px 48px; max-width: 1300px; width: 100%; }
.cat-side { background: var(--side-bg); color: var(--side-ink); padding: 18px 12px; position: sticky; top: 0; height: calc(100vh - 52px); overflow-y: auto; }
.cat-side-head { padding: 0 8px 14px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 12px; }
.cat-tenant { font-weight: 700; font-size: 1rem; }
.cat-sub { color: var(--side-muted); font-size: .8rem; }
.cat-switch { color: var(--side-muted); font-size: .8rem; display: block; margin-bottom: 8px; }
.cat-nav { display: flex; flex-direction: column; gap: 4px; }
.cat-btn { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--side-ink); border: 1px solid transparent; min-height: 50px; }
.cat-btn:hover { background: var(--side-hover); text-decoration: none; }
.cat-btn[aria-current="page"] { background: var(--side-cur); border-color: rgba(255,255,255,.22); }
.cat-btn:focus-visible, .w-expand:focus-visible, .w-play:focus-visible, .widget a:focus-visible, .cat-pages a:focus-visible { outline: 2px solid #5fd3cb; outline-offset: 2px; }
.cat-tile { width: 36px; height: 36px; border-radius: 10px; background: var(--tint); color: var(--c); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cat-name { flex: 1; font-weight: 600; font-size: .95rem; }
.cat-count { color: var(--side-muted); font-size: .8rem; }
.cat-pages { display: flex; flex-direction: column; padding: 2px 0 8px 54px; }
.cat-pages a { color: var(--side-muted); font-size: .85rem; padding: 4px 6px; border-radius: 6px; }
.cat-pages a:hover { color: #fff; background: var(--side-hover); text-decoration: none; }

.dash { color: var(--w-ink); }
.dash-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dash-head h1 { margin: 0; font-size: 1.45rem; }
.w-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; max-width: 1240px; }
.widget { background: var(--wbg, #fff); border: 1px solid var(--wline, var(--w-line)); border-radius: var(--w-radius); box-shadow: 0 1px 2px rgba(16,40,40,.05);
  padding: 14px 16px 12px; display: flex; flex-direction: column; min-width: 0; }
.widget.open { grid-column: 1 / -1; border-color: var(--c); box-shadow: 0 4px 14px rgba(16,40,40,.10); }
.w-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.w-head h2 { font-size: 15px; font-weight: 700; margin: 0; flex: 1; }
.w-icon { color: var(--c); display: inline-flex; }
.w-expand { border: 1px solid var(--w-line); background: #fff; color: var(--w-muted); border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.w-expand:hover { color: var(--c); border-color: var(--c); }
.w-expand .i-min, .widget.open .w-expand .i-max { display: none; }
.widget.open .w-expand .i-min { display: inline-flex; }
.w-body { flex: 1; display: flex; flex-direction: column; }
.w-stats { display: flex; gap: 22px; margin: 2px 0 8px; }
.w-stats div { display: flex; flex-direction: column-reverse; }
.w-stats dt { font-size: 12px; color: var(--w-muted); margin: 0; }
.w-stats dd { font-size: 24px; font-weight: 700; margin: 0; line-height: 1.15; }
.w-rows { list-style: none; margin: 0; padding: 0; flex: 1; }
.w-rows li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(16,40,40,.08); min-height: 46px; }
.w-rows li:first-child { border-top: 0; }
.w-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.w-row-title { font-size: 14px; font-weight: 600; color: var(--w-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.w-row-title:hover { color: var(--c); }
.w-row-sub { font-size: 12px; color: var(--w-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget.open .w-row-title, .widget.open .w-row-sub { white-space: normal; }
.w-val { font-size: 13px; color: var(--w-muted); white-space: nowrap; }
.chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.75); color: #3c4a49; }
.chip.ok { background: #E3F3E6; color: #1d6b2b; }
.chip.warn { background: #FFF1D6; color: #7a4f00; }
.chip.bad { background: #FDE7E4; color: #a3271b; }
.w-play { border: 1px solid var(--w-line); background: #fff; color: var(--c); border-radius: 50%; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.w-play svg { width: 14px; height: 14px; }
.w-audio { width: 100%; margin-top: 6px; }
.w-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding-top: 10px; border-top: 1px solid rgba(16,40,40,.08); margin-top: 4px; }
/* "Open …": a button in the category's colour (white on each category colour passes WCAG AA) */
.w-open { display: inline-flex; align-items: center; gap: 6px; background: var(--c); color: #fff; font-size: 15px; font-weight: 600;
  padding: 8px 16px; border-radius: 9px; min-height: 38px; box-shadow: 0 1px 2px rgba(16,40,40,.12); transition: filter .15s, box-shadow .15s; }
.w-open:hover { color: #fff; text-decoration: none; filter: brightness(1.12); box-shadow: 0 3px 8px rgba(16,40,40,.18); }
.w-open:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.w-open span { transition: transform .15s; }
.w-open:hover span { transform: translateX(2px); }
.w-more, .w-muted { color: var(--w-muted); font-size: 13px; }
.w-error { color: #a3271b; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.skeleton li { height: 46px; border-top: 1px solid #EEF2F1; position: relative; }
.skeleton li::after { content: ""; position: absolute; left: 0; top: 14px; height: 16px; width: 70%; border-radius: 6px; background: linear-gradient(90deg, #eef2f1, #f7f9f9, #eef2f1); background-size: 200% 100%; animation: wshimmer 1.4s infinite; }
@keyframes wshimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton li::after { animation: none; } }

/* call flow */
.flow { margin: 2px 0 8px; }
.flow-start { font-size: 14px; padding: 6px 10px; background: var(--tint); border-radius: 8px; display: inline-block; }
.flow-sum { font-size: 13px; color: var(--w-muted); margin: 6px 0 0 4px; }
.flow-nodes { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--w-line); }
.flow > .flow-nodes { margin: 6px 0 0 14px; }
.fn { position: relative; padding: 8px 0 0 0; }
.fn::before { content: ""; position: absolute; left: -18px; top: 22px; width: 14px; border-top: 2px solid var(--w-line); }
.fn-box { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; border: 1px solid var(--w-line); border-radius: 8px; padding: 6px 10px; background: #fff; max-width: 100%; }
.fn-hours > .fn-box { border-color: var(--c); }
.fn-key { font-size: 12px; font-weight: 700; color: var(--c); }
.fn-label { font-weight: 600; font-size: 14px; }
.fn-edit { font-size: 12px; }
.fn-detail { flex-basis: 100%; font-size: 12px; color: var(--w-muted); }
.fn-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.fn-branch-label { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.fn-branch-label.ok { background: #E3F3E6; color: #1d6b2b; }
.fn-branch-label.bad { background: #FDE7E4; color: #a3271b; }

@media (max-width: 720px) {
  .with-cats { display: block; background: var(--w-bg); }
  .cat-side { position: static; height: auto; padding: 10px; }
  .cat-side-head { display: none; }
  .cat-nav { flex-direction: row; overflow-x: auto; }
  .cat-btn { min-height: 44px; flex: none; }
  .cat-count, .cat-pages { display: none; }
  .with-cats > main.side-main { padding: 16px; }
  .w-grid { grid-template-columns: 1fr; }
  .fn-split { grid-template-columns: 1fr; }
  .w-expand, .w-play { width: 44px; height: 44px; }
  .w-open { min-height: 44px; }
}

/* the category's colour through its pages (People & phones purple, Routing blue ...) */
.cat-page { --accent: var(--c); --accent-soft: var(--tint); }
.cat-page .page-head { border-left: 4px solid var(--c); padding-left: 12px; }
.cat-page .card, .cat-page table.list { border-top: 3px solid var(--c); }
.cat-page .ext-nav { background: var(--tint); }
.w-expand, .w-play { background: rgba(255,255,255,.8); }

.rec-player { max-width: 100%; width: 420px; }
.narrow-wrap { max-width: 480px; }

/* partners and hotel guest charges (0.37.0) */
td.neg { color: var(--danger); }
.plan-rates select { min-width: 11rem; }
.room-bill h2 { margin-top: 0; }
@media print {
  .no-print, aside, .side, .dash-side, .side-nav, .flash, footer { display: none !important; }
  .with-side, .with-cats { display: block !important; padding: 0 !important; }
  body { background: #fff !important; }
  main, .side-main { margin: 0 !important; padding: 0 !important; }
  .room-bill { border: 0; box-shadow: none; }
}
p.rounding { margin: .8rem 0 0; }
p.rounding input { display: inline-block; width: 5.5rem; margin: 0 .3rem; }
.plan-rates td.cost, td.margin { color: var(--muted); font-size: .92em; }
.plan-rates td.margin { min-width: 6rem; }
.plan-rates select { min-width: 9.5rem; }
.plan-rates input.money, .plan-rates input.short { width: 5.5rem; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.room-grid .card { margin: 0; }
.room.occupied { border-left: 4px solid var(--accent, #0f766e); }
.room.vacant { border-left: 4px solid #d0d5dd; }
.room h3 { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.room-bill tfoot tr.total td { font-weight: 700; border-top: 2px solid currentColor; }
form.inline { display: inline; }
tr.sub td { background: var(--soft, #f7f8fa); }
.secret-once { border-left: 4px solid var(--accent); }
code.secret { font-size: 1.05em; word-break: break-all; user-select: all; }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.button-row form { margin: 0; }
label.check.sub { margin-left: 1.6rem; }
input.narrow { width: 5em; display: inline-block; margin: 0 .3em; }

/* Search or ask (0.48.3) */
.site-search { position: relative; flex: 1 1 18rem; max-width: 30rem; }
.site-search input { width: 100%; box-sizing: border-box; background: #2a3445; border: 1px solid #3a4558; color: #fff; border-radius: 8px; padding: .45rem .75rem; font: inherit; }
.site-search input::placeholder { color: #9aa4b5; }
.site-search input:focus { outline: 2px solid var(--accent); background: #fff; color: var(--ink); }
.search-pop { position: absolute; top: calc(100% + .45rem); left: 0; right: 0; z-index: 60; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .2); padding: .35rem; max-height: 70vh; overflow-y: auto; min-width: 22rem; }
.search-pop .sr { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .55rem; border-radius: 7px; color: var(--ink); text-align: left; width: 100%;
  background: none; border: 0; font: inherit; cursor: pointer; box-sizing: border-box; }
.search-pop .sr:hover, .search-pop .sr.on { background: var(--accent-soft); text-decoration: none; }
.sr-kind { flex: 0 0 3.6rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: .2rem; }
.sr-askk { color: var(--accent); font-weight: 700; }
.sr-text { display: flex; flex-direction: column; min-width: 0; }
.sr-text b { font-weight: 600; }
.sr-text small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr-ask { border-top: 1px solid var(--line) !important; margin-top: .2rem; }
.sr-none, .sr-thinking { color: var(--muted); padding: .6rem; margin: 0; }
.sr-answer { padding: .6rem .7rem .4rem; line-height: 1.45; }
.sr-answer p { margin: 0; }
.sr-err { color: var(--danger, #b42318); }
.sr-note { color: var(--muted); font-size: .75rem; padding: .3rem .7rem .5rem; margin: 0; }
@media (max-width: 860px) { .site-search { order: 3; flex-basis: 100%; max-width: none; } }

.badge.private { background: #efe7fb; color: #5b34a6; }

/* 0.48.5: menus as windows of icon tiles (menu.go) */
.g-companies, .g-stats { --gc: #0E6B6B; --gt: #DCEFEC; }
.g-build { --gc: #2450B5; --gt: #E1E8FA; }
.g-hotel { --gc: #9A5B00; --gt: #FCEBD2; }
.g-org { --gc: #6A3FBD; --gt: #ECE5F9; }
.g-system { --gc: #3A4558; --gt: #E6E9EF; }
.g-billing { --gc: #2E7A33; --gt: #E0F0DE; }
.menu-panel { position: absolute; top: calc(100% + .6rem); right: -1rem; z-index: 50; width: min(46rem, 92vw); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-top: 4px solid var(--gc); border-radius: 12px; padding: .9rem; box-shadow: 0 14px 34px rgba(15, 23, 42, .22); }
.mp-head, .win-head { display: flex; gap: .7rem; align-items: center; margin-bottom: .7rem; }
.mp-head b, .win-head b { display: block; font-size: 1.02rem; }
.mp-head small, .win-head small { color: var(--muted); font-size: .82rem; }
.mp-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--gc); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mp-tiles, .win-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .45rem; }
nav.main .menu-panel a.tile, .tile { display: flex; gap: .65rem; align-items: flex-start; padding: .6rem .65rem; border-radius: 10px; color: var(--ink);
  border: 1px solid var(--line); background: var(--surface); white-space: normal; }
nav.main .menu-panel a.tile:hover, .tile:hover { border-color: var(--gc); background: var(--gt); text-decoration: none; color: var(--ink); }
.tile.cur { border-color: var(--gc); background: var(--gt); }
.t-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--gt); color: var(--gc); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tile:hover .t-icon { background: var(--surface); }
.t-text { display: flex; flex-direction: column; min-width: 0; }
.t-text b { font-weight: 600; font-size: .92rem; }
.t-text small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
nav.main .menu-panel a.mp-all { display: inline-block; margin-top: .6rem; color: var(--accent); font-weight: 600; font-size: .85rem; }
.win-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: 1rem; }
.win { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gc); border-radius: 12px; padding: 1rem; }
kbd { font-family: var(--mono); font-size: .8em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3em; background: #fff; }
/* side menu with icons */
.side-nav a .si { display: inline-flex; width: 20px; color: var(--muted); flex: none; }
.side-nav a .si svg { width: 17px; height: 17px; }
.side-nav a { justify-content: flex-start; }
.side-nav a .sl { flex: 1; }
.side-nav a[aria-current="page"] .si { color: var(--accent); }
details.side-cat > summary { gap: .45rem; justify-content: flex-start; }
details.side-cat > summary::after { margin-left: auto; }
.sc-icon { width: 20px; height: 20px; border-radius: 6px; background: var(--gc); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.sc-icon svg { width: 13px; height: 13px; }
details.side-cat > a { padding-left: 1rem; }
@media (max-width: 860px) { .menu-panel { right: auto; left: -1rem; } .win-grid { grid-template-columns: 1fr; } }
.sr-auto { background: var(--accent-soft); border-radius: 8px; margin-bottom: .35rem; }
.sr-ai::before { content: "✦ "; color: var(--accent); }
.search-pop .sr-link { display: block; padding: .2rem 0 .1rem 1.1rem; color: var(--accent); font-weight: 600; font-size: .9rem; }

/* 0.48.6 (Mark: "make popup windows larger and larger font"): the top-bar windows open big,
   centred under the top bar, with larger text and icons. */
header.top { position: relative; }
details.menu.menu-win { position: static; }
details.menu.menu-win > summary { font-size: 1rem; padding: .3rem .1rem; }
details.menu-win .menu-panel { position: absolute; top: calc(100% - .2rem); left: 50%; right: auto; transform: translateX(-50%);
  width: min(78rem, calc(100vw - 2rem)); max-height: calc(100vh - 6rem); overflow-y: auto; padding: 1.4rem 1.5rem 1.2rem; border-radius: 14px; }
details.menu-win .mp-head { margin-bottom: 1.1rem; gap: .9rem; }
details.menu-win .mp-head b { font-size: 1.4rem; }
details.menu-win .mp-head small { font-size: 1rem; }
details.menu-win .mp-icon { width: 50px; height: 50px; border-radius: 13px; }
details.menu-win .mp-icon svg { width: 26px; height: 26px; }
details.menu-win .mp-tiles { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; }
nav.main details.menu-win .menu-panel a.tile { padding: .95rem 1rem; gap: .9rem; border-radius: 12px; }
details.menu-win .t-icon { width: 46px; height: 46px; border-radius: 12px; }
details.menu-win .t-icon svg { width: 24px; height: 24px; }
details.menu-win .t-text b { font-size: 1.08rem; margin-bottom: .15rem; }
details.menu-win .t-text small { font-size: .92rem; line-height: 1.4; }
nav.main details.menu-win .menu-panel a.mp-all { font-size: 1rem; margin-top: 1rem; }

/* 0.48.6 (Mark: "in side menu keep expanded but box each section"): every section is open, in
   its own box with a coloured heading. */
.with-side { grid-template-columns: 250px minmax(0, 1fr); }
.side-box { border: 1px solid var(--line); border-left: 4px solid var(--gc); border-radius: 10px; margin-top: .65rem; background: var(--surface); overflow: hidden; }
.side-box.here { box-shadow: 0 0 0 1px var(--gc); }
.sb-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .65rem; background: var(--gt); color: var(--gc);
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.side-box > a { display: flex; margin: 2px 4px; }
.side-box > a:last-child { margin-bottom: 5px; }
.side-box > a:first-of-type { margin-top: 5px; }
@media (max-width: 860px) {
  .side-nav:has(.side-box) { flex-direction: column; overflow-x: visible; }
  .side-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
  .side-box > .sb-head { grid-column: 1 / -1; }
}

/* 0.52.0 white label: a partner's logo in the top bar, and its preview on the partner page */
.brand-logo { height: 26px; width: auto; display: block; }
.brand-preview { height: 26px; width: auto; vertical-align: middle; background: #1d2433; padding: 3px 6px; border-radius: 4px; }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: .6rem .8rem; border-radius: 4px; margin: .6rem 0; }
/* 0.53.0 licensed installs: notice / lock banner */
.licence-banner { padding: .5rem 1rem; font-size: .92rem; background: #fff4e5; color: #7a4100; border-bottom: 1px solid #f1c27d; }
.licence-banner.locked { background: #fdecea; color: #8a1c13; border-bottom-color: #f5b5ae; }
/* build sheets (0.53.0) */
.bs-sec h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; margin: 0 0 .3rem; }
.bs-step { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .9rem; font-weight: 650; flex: none; }
.bs-sec > .muted { margin-top: 0; }
.bs-table input:not([type=checkbox]), .bs-table select { width: 100%; min-width: 0; }
.bs-table td { vertical-align: top; }
.bs-table input.bs-num { width: 4.6rem; }
.bs-table input.tiny { width: 3.6rem; }
.bs-table tbody.bs-row + tbody.bs-row tr:first-child td { border-top: 2px solid var(--line); }
.bs-table tr:not(.bs-sub) td { border-bottom: 0; padding-bottom: .2rem; }
.bs-table tr.bs-sub td { padding-top: .2rem; }
#bs-x { min-width: 880px; }
#bs-x td:nth-child(2) { min-width: 10rem; }
#bs-x td:nth-child(3) { min-width: 13rem; }
#bs-g { min-width: 640px; }
#bs-n { min-width: 720px; }
.bs-line { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; }
.bs-table .bs-line select, .bs-table .bs-line input:not([type=checkbox]), .bs-line select, .bs-line input { width: auto; }
.bs-table .bs-line input.short { width: 9rem; }
.bs-line .bs-mac { width: 11rem; }
.bs-line .bs-notes { flex: 1 1 10rem; }
.bs-hours { max-width: 26rem; }
.bs-hours input { width: 8rem; }
.bs-ivr { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem 1rem; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .7rem; }
.bs-ivr legend { font-weight: 600; padding: 0 .3rem; }
.bs-ivr textarea { width: 100%; }
.bs-ivr .tiny-label { flex: 0 0 6rem; }
.bs-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .4rem .9rem; }
.bs-keys select { flex: 1; min-width: 0; }
.bs-key { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 1px solid var(--line); border-radius: 6px; font-weight: 650; background: #fafbfc; flex: none; }
.bs-add { margin-top: .8rem; align-items: flex-start; }
.bs-paste { flex: 1 1 20rem; }
.bs-paste textarea { width: 100%; margin: .4rem 0; font-family: ui-monospace, monospace; }
.bs-built { margin: 0 0 .8rem; }
.bs-built summary, .bs-paste summary { cursor: pointer; color: var(--accent); }
.bs-problems li { margin: .2rem 0; }
.bs-log { list-style: none; padding: 0; margin: .5rem 0 0; }
.bs-log li { padding: .15rem 0; }
.bs-link { display: flex; gap: .5rem; margin: .4rem 0 .8rem; }
.bs-link input { flex: 1; font-family: ui-monospace, monospace; font-size: .85rem; }
.bs-actions { border-top: 1px solid var(--line); z-index: 5; }
.bs-intro p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .bs-keys { grid-template-columns: 1fr; } }
/* builds board (0.53.1) */
.bd-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.bd-stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; display: flex; flex-direction: column; }
.bd-stage b { font-size: 1.5rem; line-height: 1.1; }
.bd-stage span { color: var(--muted); font-size: .85rem; }
.bd-filter { margin-bottom: .8rem; }
.bd-table td { vertical-align: top; }
.bd-table tr.bd-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.bd-when { white-space: nowrap; }
.bd-steps { display: flex; gap: 4px; margin: .25rem 0 .2rem; }
.bd-dot { width: 1.4rem; height: .45rem; border-radius: 999px; background: #e3e6ea; }
.bd-dot.on { background: var(--accent); opacity: .45; }
.bd-dot.cur { opacity: 1; }
.bd-stagename { font-size: .85rem; }
.bd-trackhead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.bd-trackhead h3 { margin: 0; }
.bd-filter a[aria-current] { font-weight: 650; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
