/* joobmail back office · builds on the design tokens and primitives in style.css (fallbacks keep it readable alone).
   One accent, tabular figures everywhere, light/dark from the same tokens. No inline styles (CSP). */

.bo {
  --series-1:#2a78d6; --series-1-hover:#256abf; --grid:var(--border,#e2e0da);
  --heat-1:#86b6ef; --heat-2:#5598e7; --heat-3:#2a78d6; --heat-4:#1c5cab; --heat-ink-1:#0b1f3a; --heat-ink-2:#0b1f3a; --heat-ink-3:#fff; --heat-ink-4:#fff;
  min-height:100vh; background:var(--bg,#f4f3ef); color:var(--text,#17191c); font-family:var(--font,system-ui,sans-serif); font-variant-numeric:tabular-nums;
}
[data-theme="dark"] .bo { --series-1:#3987e5; --series-1-hover:#5598e7; --heat-1:#1c5cab; --heat-2:#2a78d6; --heat-3:#5598e7; --heat-4:#86b6ef; --heat-ink-1:#fff; --heat-ink-2:#fff; --heat-ink-3:#0b1f3a; --heat-ink-4:#0b1f3a }
.bo-sprite { position:absolute; width:0; height:0; overflow:hidden }
.bo-mono { font-family:var(--mono,ui-monospace,monospace); font-size:13px }

/* ---------- header & shell ---------- */
.bo-header { position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:12px; height:var(--header-h,64px); padding:0 16px; background:var(--surface,#fff); border-bottom:1px solid var(--border,#e2e0da) }
.bo-console { padding-left:12px; border-left:1px solid var(--border,#e2e0da); color:var(--muted,#6a7079); font-size:13px; font-weight:600 }
.bo-header-actions { display:flex; align-items:center; gap:8px; margin-left:auto; min-width:0 }
.bo-user { display:flex; align-items:center; gap:10px; min-width:0 }
.bo-user-text { display:flex; flex-direction:column; min-width:0; line-height:1.3 }
.bo-user-text strong { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.bo-user-text small { font-size:12px; color:var(--muted,#6a7079); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.bo-menu { display:none }
.bo-shell { display:grid; grid-template-columns:240px minmax(0,1fr); min-height:calc(100vh - var(--header-h,64px)) }
.bo-nav { background:var(--surface,#fff); border-right:1px solid var(--border,#e2e0da) }
.bo-nav-inner { position:sticky; top:var(--header-h,64px); display:flex; flex-direction:column; gap:4px; height:calc(100vh - var(--header-h,64px)); padding:16px 12px; overflow-y:auto }
.bo-nav-links { display:flex; flex-direction:column; gap:4px }
.bo-nav-link { display:flex; align-items:center; gap:12px; min-height:44px; padding:0 12px; border-radius:var(--radius-sm,8px); color:var(--text-2,#3d4248); font-size:14px; font-weight:500 }
.bo-nav-link:hover { background:var(--surface-2,#edece7); color:var(--text,#17191c); text-decoration:none }
.bo-nav-link[aria-current="page"] { background:var(--accent-soft,#e2efec); color:var(--accent,#0f5f58) }
.bo-nav-out { margin-top:auto }
.bo-nav-logout { display:none; width:100%; text-align:left }
.bo-main { min-width:0; padding:24px clamp(16px,3vw,40px) 96px; outline:none }
.bo-banners { display:flex; flex-direction:column; gap:8px; margin-bottom:16px }
.bo-banners:empty { display:none }
.bo-banner { display:flex; align-items:center; gap:10px; flex-wrap:wrap }
.bo-banner > span { flex:1 1 220px }
.bo-banner a { font-weight:600; white-space:nowrap }
.bo-view { display:flex; flex-direction:column; gap:16px; transition:opacity var(--fast,150ms) var(--ease,ease) }
.bo-view.bo-loading { opacity:.55 } /* refetch keeps the previous frame instead of a skeleton flash */
.bo-view .card + .card,.bo-view .card + .portal-card { margin-top:0 }
.bo-footer { margin-top:32px; text-align:center }
.bo-gate { display:grid; place-items:center; min-height:calc(100vh - var(--header-h,64px)); padding:24px 16px }
.bo-gate .card { max-width:460px; display:flex; flex-direction:column; gap:12px; padding:28px }
.bo-gate h1 { font-size:22px }

/* ---------- page parts ---------- */
.bo-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px 24px; flex-wrap:wrap }
.bo-page-head h1 { font-size:clamp(22px,2.4vw,28px) }
.bo-page-head .hint { margin-top:4px; max-width:70ch }
.bo-page-head a,.bo-head-actions { display:inline-flex; align-items:center; gap:6px; font-weight:500 }
.bo-section-title { font-size:17px; margin-top:8px }
.bo-link { display:inline-flex; align-items:center; gap:4px; align-self:flex-start; font-weight:600; font-size:14px }
.bo-card { display:flex; flex-direction:column; gap:12px; min-width:0 }
.bo-card-title { font-size:17px }
.bo-card-head { display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap }
.bo-card-head .bo-card-title { margin-right:auto }
.bo-card-head .bo-field { flex:0 0 auto }
.bo-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px }
.bo-stat { display:flex; flex-direction:column; gap:4px; min-width:0 }
.bo-stat-label { font-size:13px; font-weight:500; color:var(--muted,#6a7079) }
.bo-stat-value { font-size:30px; font-weight:600; line-height:1.2 }
.bo-stat-parts { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--text-2,#3d4248) }
.bo-stat-parts li { display:flex; justify-content:space-between; gap:8px; border-top:1px solid var(--border,#e2e0da); padding-top:4px }
.bo-grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px }
.bo-grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px }
.bo-integration { display:flex; flex-direction:column; gap:8px; min-width:0 }
.bo-integration header { display:flex; align-items:center; gap:10px }
.bo-integration header h3 { margin-right:auto }
.bo-integration > a { display:inline-flex; align-items:center; gap:4px; margin-top:auto; font-weight:600; font-size:14px }
.bo-integration-line { font-size:14px; color:var(--text-2,#3d4248); overflow-wrap:anywhere }
.bo-health { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; font-size:13px; color:var(--muted,#6a7079) }
.bo-health-detail { flex-basis:100%; overflow-wrap:anywhere; color:var(--text-2,#3d4248) }
.bo-badges { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px }
.bo-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap }
.bo-toolbar .input { flex:1 1 220px; width:auto }
.bo-rows { display:flex; flex-direction:column }
.bo-row { display:flex; align-items:center; justify-content:space-between; gap:12px 20px; padding:14px 0; border-top:1px solid var(--border,#e2e0da); min-width:0 }
.bo-rows > .bo-row:first-child { border-top:0 }
.bo-row-main { display:flex; align-items:center; gap:12px; min-width:0; flex:1 1 auto }
.bo-row-main > div { display:flex; flex-direction:column; min-width:0; overflow-wrap:anywhere }
.bo-row-main small { color:var(--muted,#6a7079); font-size:13px }
.bo-row-actions { display:flex; align-items:flex-end; gap:8px; flex-wrap:wrap }
.bo-row-actions .field { margin:0; min-width:140px }
.bo-row-link > a { display:flex; align-items:center; justify-content:space-between; gap:12px 20px; flex:1; min-width:0; color:inherit; flex-wrap:wrap }
.bo-row-link > a:hover { text-decoration:none }
.bo-row-link > a:hover strong { color:var(--accent,#0f5f58) }
.bo-row-figures { display:flex; gap:20px }
.bo-row-figures span { display:flex; flex-direction:column; align-items:flex-end; line-height:1.3 }
.bo-row-figures small { color:var(--muted,#6a7079); font-size:12px }
.bo-create { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 180px auto; gap:0 16px; align-items:start }
.bo-create > button { margin-top:26px }
.bo-create .field { margin-bottom:0 }
/* Admin user rows (QC D25): one grid per row with fixed areas, so role, status and plan line up in every row and the
   buttons sit under the control they belong to. Wide: name | role | status | plan over two lines. */
.bo-user-row { display:grid; grid-template-columns:minmax(0,1fr) 160px 180px 150px; grid-template-areas:"main role status plan" "main save second saveplan"; gap:8px 12px; align-items:end }
.bo-user-row .bo-row-main { grid-area:main; align-self:center }
.bo-user-row .field { margin:0; min-width:0 }
.bo-user-row .bo-u-role { grid-area:role } .bo-user-row .bo-u-status { grid-area:status } .bo-user-row .bo-u-plan { grid-area:plan }
.bo-user-row .bo-u-save { grid-area:save } .bo-user-row .bo-u-second { grid-area:second } .bo-user-row .bo-u-saveplan { grid-area:saveplan }
.bo-user-row > button { width:100%; min-width:0; white-space:normal; line-height:1.25; text-align:center }
.bo-none .empty { padding:24px 0 8px }
/* Folding blocks (filters, create user): open on wide screens, folded on phones. */
.bo-fold { border:0; border-radius:0; padding:0; margin:0 }
.bo-fold > .bo-fold-summary { display:flex; align-items:center; gap:8px; min-height:40px; margin:0; cursor:pointer; list-style:none; font-weight:600; font-size:15px; color:var(--text,#17191c); width:max-content; max-width:100% }
.bo-fold > .bo-fold-summary > span { display:inline-flex; align-items:center; gap:8px }
.bo-fold > .bo-fold-summary::-webkit-details-marker { display:none }
.bo-fold > .bo-fold-summary::after { content:""; width:7px; height:7px; margin-left:4px; border-right:1.5px solid var(--muted,#6a7079); border-bottom:1.5px solid var(--muted,#6a7079); transform:translateY(-2px) rotate(45deg); transition:transform var(--fast,150ms) var(--ease,ease) }
.bo-fold[open] > .bo-fold-summary::after { transform:translateY(2px) rotate(-135deg) }
.bo-fold > .bo-fold-summary .icon { color:var(--accent,#0f5f58) }
.bo-fold > .bo-fold-summary:focus-visible { outline:2px solid var(--accent,#0f5f58); outline-offset:2px; border-radius:6px }
.bo-fold-body { display:flex; flex-direction:column; gap:12px; margin-top:8px }
.bo-create-card .bo-card-title { display:inline-flex; align-items:center; gap:8px; font-size:17px }
.bo-setup { gap:14px; border-color:var(--accent,#0f5f58); outline:none }
.bo-setup-head { display:flex; gap:12px; align-items:flex-start }
.bo-setup-head .icon { color:var(--accent,#0f5f58); margin-top:4px }
.bo-code-row { display:flex; gap:8px; align-items:stretch; flex-wrap:wrap }
.bo-code { flex:1 1 260px; display:block; padding:12px 14px; border-radius:var(--radius-sm,8px); background:var(--surface-2,#edece7); overflow-wrap:anywhere; user-select:all; font-size:15px }
.bo-inline-form { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap }
.bo-inline-form .field { margin:0; flex:1 1 200px }

/* ---------- tabs, filters, pager ---------- */
.bo-tabs { display:flex; gap:4px; padding:4px; border-radius:10px; background:var(--surface-2,#edece7); overflow-x:auto; scrollbar-width:none }
.bo-tabs::-webkit-scrollbar { display:none }
.bo-tabs a { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 14px; border-radius:7px; color:var(--text-2,#3d4248); font-size:14px; font-weight:500; white-space:nowrap }
.bo-tabs a:hover { color:var(--text,#17191c); text-decoration:none }
.bo-tabs a[aria-current="page"] { background:var(--surface,#fff); color:var(--text,#17191c); box-shadow:var(--shadow) }
.bo-filters { display:flex; flex-direction:column; gap:12px }
.bo-presets { display:flex; gap:8px; flex-wrap:wrap }
.bo-filter-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:0 12px }
.bo-filter-grid .field { margin-bottom:8px }
.bo-filter-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap }
.bo-filter-actions a.btn { margin-left:auto }
.bo-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; flex-wrap:wrap }
.bo-pager [aria-disabled="true"] { opacity:.45; pointer-events:none }
.bo-range { margin-top:-4px }

/* ---------- analytics marks ---------- */
.bo-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px }
.bo-kpi { display:flex; flex-direction:column; gap:6px; padding:16px }
.bo-kpi-value { font-size:26px; font-weight:600; line-height:1.15 }
.bo-delta { display:inline-flex; align-items:center; flex-wrap:wrap; gap:2px 4px; font-size:13px; color:var(--muted,#6a7079) }
.bo-delta.good { color:var(--success,#1b7f4b) } .bo-delta.bad { color:var(--danger,#b42318) }
.bo-delta-note { color:var(--muted,#6a7079) }
.bo-split { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px }
.bo-split-item { display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:14px 16px }
.bo-split-item strong { font-size:22px; font-weight:600 }
.bo-split-item small { color:var(--muted,#6a7079) }
.bo-chart { display:flex; flex-direction:column; gap:8px }
.bo-plot { display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:200px auto; column-gap:10px }
.bo-ticks { grid-row:1; grid-column:1; display:flex; flex-direction:column; justify-content:space-between; font-size:12px; line-height:1; color:var(--muted,#6a7079); text-align:right }
.bo-plot-area { grid-row:1; grid-column:2; position:relative; min-width:0; border-bottom:1px solid var(--border-strong,#cfccc5) }
.bo-gridlines { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between; pointer-events:none }
.bo-gridlines i { display:block; height:1px; background:var(--grid) }
.bo-gridlines i:last-child { background:transparent }
.bo-columns { position:absolute; inset:0; display:flex; align-items:stretch; gap:2px }
.bo-column { flex:1 1 0; min-width:0; display:flex; align-items:flex-end; justify-content:center; padding:0; border-radius:0 }
.bo-column-bar { display:block; width:100%; max-width:24px; background:var(--series-1); border-radius:4px 4px 0 0; transition:background var(--fast,150ms) }
.bo-column:hover .bo-column-bar,.bo-column:focus-visible .bo-column-bar { background:var(--series-1-hover) }
.bo-tooltip { position:absolute; top:-8px; transform:translate(-50%,-100%); z-index:3; display:flex; flex-direction:column; align-items:center; padding:6px 10px; border-radius:var(--radius-sm,8px); background:var(--text,#17191c); color:var(--bg,#fff); font-size:12px; white-space:nowrap; pointer-events:none; box-shadow:var(--shadow-lg) }
.bo-tooltip strong { font-size:14px }
.bo-axis { grid-row:2; grid-column:2; display:flex; justify-content:space-between; padding-top:6px; font-size:12px; color:var(--muted,#6a7079) }
.bo-table-view summary { cursor:pointer; font-size:13px; color:var(--text-2,#3d4248); width:max-content }
.bo-scroll { overflow-x:auto }
.bo-table { width:100%; border-collapse:collapse; font-size:13px; margin-top:8px }
.bo-mail-servers .bo-table td,.bo-mail-servers .bo-table th { padding:6px 8px; border-top:1px solid var(--border,#e2e0da); text-align:left; vertical-align:top }
.bo-mail-servers .bo-table thead th { border-top:0; color:var(--muted,#6a7079); font-weight:500 }
.bo-mail-servers .bo-table .num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap }
.bo-mail-servers .bo-row-warn td { background:color-mix(in srgb,var(--danger,#b42318) 6%,transparent) }
.bo-table th,.bo-table td { padding:8px 10px; text-align:left; border-bottom:1px solid var(--border,#e2e0da); white-space:nowrap }
.bo-table th { color:var(--muted,#6a7079); font-weight:500 }
.bo-table .num { text-align:right }
.bo-retention td { border-bottom:2px solid var(--surface,#fff) }
.bo-retention .heat-0 { color:var(--muted,#6a7079) }
.bo-retention .heat-1 { background:var(--heat-1); color:var(--heat-ink-1) } .bo-retention .heat-2 { background:var(--heat-2); color:var(--heat-ink-2) }
.bo-retention .heat-3 { background:var(--heat-3); color:var(--heat-ink-3) } .bo-retention .heat-4 { background:var(--heat-4); color:var(--heat-ink-4) }
.bo-bars { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px }
.bo-bars li { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto; align-items:center; gap:12px; font-size:14px }
.bo-bar-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.bo-bar-track { display:block; height:8px }
.bo-bar-fill { display:block; height:100%; background:var(--series-1); border-radius:0 4px 4px 0 }
.bo-bar-value { min-width:3ch; text-align:right; color:var(--text-2,#3d4248) }
.bo-facts { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px 20px; margin:0 }
.bo-facts div { min-width:0 }
.bo-facts dt { font-size:12px; color:var(--muted,#6a7079) }
.bo-facts dd { margin:2px 0 0; overflow-wrap:anywhere }
.bo-timeline { list-style:none; margin:0; padding:0 }
.bo-event { display:grid; grid-template-columns:72px 64px auto minmax(0,1fr); align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--border,#e2e0da); font-size:14px }
.bo-event:first-child { border-top:0 }
.bo-event-time { color:var(--text-2,#3d4248) } .bo-event-offset { color:var(--muted,#6a7079); font-size:13px }
.bo-event-text { overflow-wrap:anywhere }
.bo-event-heartbeat .bo-event-text { color:var(--muted,#6a7079) }

/* ---------- settings ---------- */
.bo-admin-only { display:flex; align-items:center; gap:8px }
.bo-settings { display:flex; flex-direction:column; gap:16px }
/* A switched-off provider dims only its controls; labels and hints keep their colour so they stay readable (QC M30). */
.bo-provider.is-off .bo-fields :is(input:not([type="checkbox"]),select,textarea,.bo-order),.bo-provider.is-off .bo-test-area :is(.btn,input,textarea) { opacity:.55 }
.bo-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 20px }
.bo-field { display:flex; flex-direction:column; gap:6px; min-width:0 }
.bo-field > label,.bo-field-title,.bo-checks legend { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:500; color:var(--text-2,#3d4248) }
.bo-field .hint { margin:0 }
.bo-checks { border:0; margin:0; padding:0; display:flex; gap:16px; flex-wrap:wrap }
.bo-checks legend { padding:0; margin-bottom:6px; width:100% }
.bo-checks label,.bo-clear { display:inline-flex; align-items:center; gap:8px; font-size:14px; min-height:32px }
.bo-checks input,.bo-clear input { width:18px; height:18px; accent-color:var(--accent,#0f5f58) }
.bo-clear { color:var(--danger,#b42318) }
.bo-source { display:block }
.bo-field-error { margin:0; color:var(--danger,#b42318); font-size:13px }
.bo-error-text { color:var(--danger,#b42318) }
.bo-switch { position:relative; display:inline-flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; font-size:14px; font-weight:500; color:var(--text,#17191c) }
.bo-switch input { position:absolute; left:0; top:50%; width:40px; height:24px; margin:-12px 0 0; opacity:0; cursor:pointer }
.bo-switch-track { position:relative; flex:none; width:40px; height:24px; border-radius:999px; background:var(--border-strong,#cfccc5); transition:background var(--fast,150ms) }
.bo-switch-track::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:var(--surface,#fff); box-shadow:0 1px 2px rgba(0,0,0,.25); transition:transform var(--fast,150ms) var(--ease,ease) }
.bo-switch input:checked + .bo-switch-track { background:var(--accent,#0f5f58) }
.bo-switch input:checked + .bo-switch-track::after { transform:translateX(16px) }
.bo-switch input:focus-visible + .bo-switch-track { outline:2px solid var(--accent,#0f5f58); outline-offset:2px }
.bo-switch-field { grid-column:1 / -1 }
.bo-card-head .bo-switch-field { grid-column:auto }
.bo-switch-field .hint { padding-left:50px }
.bo-order { list-style:none; margin:0; padding:0 }
.bo-order li { display:flex; align-items:center; gap:10px; padding:6px 0; border-top:1px solid var(--border,#e2e0da) }
.bo-order li:first-child { border-top:0 }
.bo-order-index { width:24px; height:24px; display:inline-grid; place-items:center; border-radius:50%; background:var(--surface-2,#edece7); font-size:12px; font-weight:600 }
.bo-order-name { font-weight:500; margin-right:auto }
.bo-order-buttons { display:flex }
.bo-test-area { display:flex; flex-direction:column; gap:12px; padding-top:14px; border-top:1px solid var(--border,#e2e0da) }
.bo-test-inputs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px }
.bo-test-inputs .field { margin-bottom:8px }
.bo-test-inputs > small { grid-column:1 / -1 }
.bo-test { display:flex; align-items:flex-start; gap:12px; flex-wrap:wrap }
.bo-test .btn { flex:none }
.bo-test-result { flex:1 1 240px; min-width:0 }
.bo-price-preview { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 10px; padding:14px 16px; border-radius:var(--radius-sm,8px); background:var(--surface-2,#edece7) }
.bo-preview-label { font-size:12px; color:var(--muted,#6a7079); flex-basis:100% }
.bo-preview-plan { font-size:15px } .bo-preview-price { font-size:24px } .bo-preview-list { color:var(--muted,#6a7079) }
.bo-preview-item { display:inline-flex; align-items:baseline; flex-wrap:wrap; gap:4px 8px; padding-right:12px; border-right:1px solid var(--border,#e2e0da) } .bo-preview-item:last-of-type { border-right:0 }
.bo-provider > .notice { display:flex; align-items:center; gap:8px }
.bo-savebar { position:sticky; bottom:12px; z-index:20; display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 14px; border:1px solid var(--border,#e2e0da); border-radius:var(--radius,12px); background:var(--surface,#fff); box-shadow:var(--shadow-lg) }
.bo-savebar .spacer { flex:1 }
.bo-save-status { display:inline-flex; align-items:center; gap:8px; font-size:13px; color:var(--text-2,#3d4248) }
.btn-danger-solid { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:0 20px; border-radius:var(--radius-sm,8px); background:var(--danger,#b42318); color:#fff; font-weight:600; font-size:14px }
.btn-danger-solid:hover { background:var(--danger,#b42318); filter:brightness(1.08) } /* stays red: .btn:hover turned it pale under its white words */
.btn-danger-solid:disabled { opacity:.5; cursor:not-allowed; filter:none }
.bo-dialog-text { margin-bottom:10px; color:var(--text-2,#3d4248) }
/* Deletes for good (owner, 8 Nov 2026): a tick instead of a typed word, code or username — the whole row is the target */
.bo-tick { display:flex; gap:12px; align-items:flex-start; margin:4px 0 12px; padding:12px 14px; border-radius:var(--radius-sm,8px); background:color-mix(in srgb,var(--danger,#b42318) 9%,transparent); font-size:14px; line-height:1.55; color:var(--text,#16191d); cursor:pointer }
.bo-tick input { flex:none; width:20px; height:20px; margin:1px 0 0; accent-color:var(--danger,#b42318); cursor:pointer }
.bo-tick:has(input:focus-visible) { outline:2px solid var(--accent,#0f766e); outline-offset:2px }
.bo-toast.error { background:var(--danger,#b42318); color:#fff }
.bo-audit-details { margin-top:6px; font-size:13px }
.bo-audit-details summary { cursor:pointer; color:var(--text-2,#3d4248); width:max-content }
.bo-kv { display:grid; grid-template-columns:minmax(120px,max-content) minmax(0,1fr); gap:4px 12px; margin:8px 0 0; padding:10px 12px; border-radius:var(--radius-sm,8px); background:var(--surface-2,#edece7) }
.bo-kv dt { color:var(--muted,#6a7079) } .bo-kv dd { margin:0; overflow-wrap:anywhere }
.bo-kv .bo-kv { grid-column:1 / -1; background:var(--surface,#fff) }

/* ---------- small screens: drawer navigation, stacked cards, full-width buttons ---------- */
@media (max-width:960px) {
  .bo-menu { display:inline-flex }
  .bo-shell { grid-template-columns:minmax(0,1fr) }
  .bo-nav { position:fixed; top:var(--header-h,64px); left:0; bottom:0; z-index:35; width:min(280px,86vw); transform:translateX(-100%); transition:transform var(--normal,220ms) var(--ease,ease); box-shadow:var(--shadow-lg) }
  .bo-nav-inner { position:static; height:100% }
  .bo-nav.open { transform:none }
  .bo-stats { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .bo-grid-3 { grid-template-columns:minmax(0,1fr) }
  .bo-create { grid-template-columns:minmax(0,1fr) minmax(0,1fr) }
}
/* Narrow main column (sidebar beside it, or a tablet): the name goes on top, three aligned columns under it. */
@media (min-width:961px) and (max-width:1120px),(max-width:860px) {
  .bo-user-row { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-areas:"main main main" "role status plan" "save second saveplan" }
  .bo-user-row .bo-row-main { align-self:start }
}
@media (max-width:640px) {
  .bo-header { gap:8px; padding:0 8px }
  .bo-console,.bo-user-text,.bo-logout { display:none !important }
  .bo-nav-logout { display:flex }
  .bo-main { padding:16px 16px 96px }
  .bo-grid-2,.bo-fields,.bo-test-inputs,.bo-create { grid-template-columns:minmax(0,1fr) }
  .bo-create > button { margin-top:8px }
  .bo-stats { grid-template-columns:minmax(0,1fr) }
  .bo-row { flex-direction:column; align-items:stretch }
  .bo-row-actions { align-items:stretch }
  .bo-row-actions .field { flex:1 1 100% }
  .bo-row-actions .btn,.bo-row-actions .btn-ghost,.bo-test .btn,.bo-inline-form .btn,.bo-filter-actions .btn-primary,.bo-filter-actions a.btn { flex:1 1 100%; margin-left:0 }
  .bo-row-figures span { align-items:flex-start }
  .bo-savebar { bottom:8px }
  .bo-savebar .btn-primary,.bo-savebar .btn-ghost { flex:1 1 0; min-width:0; padding:0 10px }
  .bo-savebar .spacer { display:none }
  .bo-save-status { flex-basis:100% }
  .bo-event { grid-template-columns:64px minmax(0,1fr); }
  .bo-event .badge,.bo-event-offset { grid-column:2 }
  .bo-event-text { grid-column:1 / -1 }
  .bo-switch-field .hint { padding-left:0 }
  .bo-kv { grid-template-columns:minmax(0,1fr) }
  .bo-user-row { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-areas:"main main" "role status" "save second" "plan saveplan"; gap:8px 10px; align-items:end }
  .bo-banner { gap:6px 10px; padding:10px 12px; font-size:13px; line-height:1.5 }
}
/* Phones (QC M21): every control 16 px (no iOS zoom) and at least 40 px high; the header fits from 320 to 480 px. */
@media (max-width:700px) {
  .bo select,.bo textarea,.bo input:not([type="checkbox"]):not([type="radio"]) { font-size:16px }
  .bo select,.bo input:not([type="checkbox"]):not([type="radio"]) { min-height:40px }
}
@media (max-width:480px) {
  .bo-header { gap:4px; padding:0 8px }
  .bo-brand .brand-logo { display:none } .bo-brand .brand-mark { display:block }
  .bo-header-actions { gap:4px }
  .bo-header .bo-lang { max-width:96px; padding:4px 6px }
  .bo-user .avatar { width:32px; height:32px }
}
@media (max-width:400px) { .bo-plot { grid-template-rows:160px auto } }
@media (max-width:340px) { .bo-header .icon-btn { width:40px; height:40px } }
@media (forced-colors:active) { .bo-column-bar,.bo-bar-fill { background:CanvasText } .bo-switch-track { border:1px solid CanvasText } }
.bo-lang { min-height:36px; padding:4px 10px; border:1px solid var(--border,#e2e0da); border-radius:var(--radius-sm,8px); background:var(--surface,#fff); color:var(--text,#17191c); font-size:13px }
@media (max-width:700px) { .bo-lang { min-height:40px; font-size:16px } }
.bo-toast { transition:bottom var(--fast,150ms) var(--ease,ease) }
.bo-view > .notice { display:flex; align-items:flex-start; gap:8px }
.bo-view > .notice .icon { margin-top:2px }
/* Texts & languages (29 Oct 2026): languages with their state and progress, then one row per text: key, the built-in
   wording for reference, the text itself, and its save / built-in / history actions. */
.bo-lang-name { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap }
.bo-lang-name strong { font-size:15px }
.bo-lang-row.current .bo-lang-name strong { color:var(--accent,#0f5f58) }
.bo-progress { display:inline-block; width:96px; height:6px; border-radius:var(--radius-pill,999px); background:linear-gradient(90deg,var(--accent,#0f5f58) var(--done,0%),var(--surface-3,#e2e0da) var(--done,0%)) }
.bo-texts { gap:14px }
.bo-text-tools { display:grid; grid-template-columns:minmax(150px,200px) minmax(130px,170px) minmax(0,1fr); gap:12px; align-items:end }
.bo-text-tools .field { margin:0 }
.bo-text-search { display:flex; gap:8px; align-items:center; min-width:0 }
.bo-text-search .input { flex:1 1 auto; min-width:0 }
.bo-text-search .btn { flex:none }
.bo-text-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap }
.bo-text-bar .spacer { flex:1 }
.bo-text-row { display:flex; flex-direction:column; gap:8px; padding:16px 0; border-top:1px solid var(--border,#e2e0da); min-width:0 }
.bo-rows > .bo-text-row:first-child { border-top:0; padding-top:4px }
.bo-text-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0 }
.bo-text-key { font-family:var(--mono,ui-monospace,monospace); font-size:12.5px; color:var(--muted,#6a7079); overflow-wrap:anywhere }
.bo-text-ref { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:4px 14px; margin:0; font-size:13.5px; line-height:1.55 }
.bo-text-ref dt { color:var(--muted,#6a7079); white-space:nowrap }
.bo-text-ref dd { margin:0; color:var(--text-2,#3d4248); overflow-wrap:anywhere; white-space:pre-wrap }
.bo-text-input { width:100%; min-height:44px; resize:vertical; font:inherit; font-size:15px; line-height:1.55 }
.bo-text-row.dirty .bo-text-input { border-color:var(--accent,#0f5f58); box-shadow:0 0 0 3px var(--accent-ring,rgba(15,95,88,.18)) }
.bo-text-info { display:flex; flex-direction:column; gap:2px }
.bo-text-info p,.bo-text-row > .bo-field-error { margin:0; font-size:13px }
.bo-text-foot { display:flex; align-items:center; gap:8px; flex-wrap:wrap }
.bo-text-foot .spacer { flex:1 }
.bo-text-meta { font-size:12.5px }
.bo-text-more { align-self:center }
.bo-history { display:flex; flex-direction:column; gap:12px; margin:0; padding:0; list-style:none; max-height:min(60vh,520px); overflow:auto }
.bo-history li { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding-bottom:12px; border-bottom:1px solid var(--border,#e2e0da) }
.bo-history-text { margin:0; white-space:pre-wrap; overflow-wrap:anywhere }
.bo-history-builtin { display:flex; flex-direction:column; align-items:flex-start; gap:6px; margin-top:12px }
.bo-import-result { display:flex; flex-direction:column; gap:8px; margin-top:12px }
.bo-import-result p { margin:0 }
.bo-import-problems,.bo-import-preview { margin:0; padding-left:20px; max-height:220px; overflow:auto; font-size:13px; overflow-wrap:anywhere }
.bo-import-preview li { margin-bottom:8px }
@media (max-width:760px) {
  .bo-text-tools { grid-template-columns:minmax(0,1fr) minmax(0,1fr) }
  .bo-text-search { grid-column:1 / -1 }
}
@media (max-width:640px) {
  .bo-text-ref { grid-template-columns:minmax(0,1fr); gap:0 }
  .bo-text-ref dd + dt { margin-top:6px }
  .bo-text-input { font-size:16px }
  .bo-text-foot .bo-text-meta { flex:1 1 100% }
  .bo-text-foot .spacer { display:none }
  .bo-lang-row { flex-direction:column; align-items:stretch }
  .bo-lang-row .bo-row-actions { justify-content:flex-end; align-items:center }
  .bo-lang-row .bo-row-actions .btn,.bo-lang-row .bo-row-actions .btn-ghost,.bo-lang-row .bo-row-actions .btn-primary { flex:none; min-height:40px }
  .bo-lang-row .bo-row-actions a { margin-right:auto }
}
@media (max-width:400px) { .bo-text-tools { grid-template-columns:minmax(0,1fr) } }
.bo-lang-count { font-size:12.5px }
/* Deleting an account for its owner (1 Nov 2026, docs/ACCOUNT-DELETION.md): the button has a row of its own under the plan;
   a deleted account's row only says where it is (the trash). */
.bo-user-row { grid-template-areas:"main role status plan" "main save second saveplan" "main . . delete" }
.bo-user-row .bo-u-delete { grid-area:delete } .bo-user-row .bo-u-deleted { grid-column:1 / -1; margin:0 }
@media (min-width:961px) and (max-width:1120px),(max-width:860px) { .bo-user-row { grid-template-areas:"main main main" "role status plan" "save second saveplan" ". . delete" } }
@media (max-width:640px) { .bo-user-row { grid-template-areas:"main main" "role status" "save second" "plan saveplan" ". delete" } }
/* Mail copy in joobmail (4 Nov 2026): a "Mail copy" button beside delete, its line across the whole row when opened;
   the settings block (caps per plan, purge) and the dashboard facts card. */
.bo-user-row { grid-template-areas:"main role status plan" "main save second saveplan" "main . copy delete" "copyline copyline copyline copyline" }
.bo-user-row .bo-u-copy { grid-area:copy } .bo-user-row .bo-u-copyline { grid-area:copyline; margin:0; overflow-wrap:anywhere }
@media (min-width:961px) and (max-width:1120px),(max-width:860px) { .bo-user-row { grid-template-areas:"main main main" "role status plan" "save second saveplan" ". copy delete" "copyline copyline copyline" } }
@media (max-width:640px) { .bo-user-row { grid-template-areas:"main main" "role status" "save second" "plan saveplan" "copy delete" "copyline copyline" } }
.bo-copy-stats { margin-bottom:16px }
.bo-copy { display:flex; flex-direction:column; gap:10px }
.bo-copy > p { margin:0 }
.bo-copy-settings { display:flex; flex-direction:column; gap:8px }
.bo-copy-settings .bo-copy-heading { margin:0; font-size:14px; font-weight:600 }
.bo-copy-settings .bo-table { margin-top:0 }
.bo-copy-settings p { margin:0 }
.bo-copy-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px }
/* Background work (owner, 5 Nov 2026): the page of everything the server does with no page open. */
.bo-work { display:flex; flex-direction:column; gap:16px }
.bo-work-worker { display:flex; flex-direction:column; gap:6px }
.bo-work-worker p { margin:0 }
.bo-work-table { margin-top:0 }
.bo-subhead { margin:12px 0 4px; font-size:14px; font-weight:600 } /* a part of a work card (copy-first, 12 Nov 2026) */
.bo-work-table th,.bo-work-table td { vertical-align:top; white-space:normal }
.bo-work-table td small { display:block; margin-top:2px; font-size:12px; line-height:1.45; color:var(--muted,#6a7079) }
.bo-work-table td .badge { white-space:nowrap }
.bo-work-table td .badge + small { margin-top:4px }
.bo-work-table .num { white-space:nowrap; font-variant-numeric:tabular-nums }
.bo-work-table .num small { white-space:normal }
.bo-work-table .bo-row-warn > td { background:color-mix(in srgb,var(--warning,#b54708) 7%,transparent) }
.bo-work-table td small.bo-work-reason { color:var(--danger,#b42318); max-width:34ch; margin-left:auto; text-align:left }
.bo-work-accounts { min-width:920px }
.bo-work-detail > td { padding:14px; background:var(--surface-2,#edece7) }
.bo-work-boxes { display:flex; flex-direction:column; align-items:flex-start; gap:10px }
.bo-work-boxes > p { margin:0 }
.bo-work-boxes > .bo-scroll { align-self:stretch }
.bo-work-boxes .bo-work-table { min-width:900px; background:var(--surface,#fff); border-radius:8px }
.bo-work-states { display:flex; flex-direction:column; align-items:flex-start; gap:4px }
.bo-work-table td.bo-work-time { white-space:nowrap; font-variant-numeric:tabular-nums }
/* The mailboxes scroll inside their own cell: the cell never widens the accounts table (max-width:0 keeps it to the row). */
.bo-work-detail > td { max-width:0 }
