/* Tokens do design handoff (docs/ignored/design_handoff_backoffice) — fonte da verdade visual.
   Light é o default; [data-bo-theme="dark"] troca o conjunto. */
:root, [data-bo-theme="light"] {
    --bo-bg: #F2F5F6;
    --bo-surface: #FFFFFF;
    --bo-surface-2: #F7F9FA;
    --bo-border: rgba(155,176,179,0.28);
    --bo-border-strong: rgba(155,176,179,0.45);
    --bo-text: #0F1614;
    --bo-text-2: #4a5d60;
    --bo-text-3: #7c9094;
    --bo-primary: #316568;
    --bo-primary-tint: rgba(49,101,104,0.08);
    --bo-shadow: 0 1px 2px rgba(49,101,104,0.06);
    --bo-shadow-md: 0 8px 24px -10px rgba(49,101,104,0.22);
    --bo-nav: #FFFFFF;
    --bo-nav-text: #4a5d60;
    --bo-nav-text-hi: #0F1614;
    --bo-nav-active: rgba(49,101,104,0.10);
    --bo-grid-line: rgba(49,101,104,0.10);
    --bo-ok: #2e7d32; --bo-ok-bg: rgba(46,125,50,0.10);
    --bo-err: #c62828; --bo-err-bg: rgba(198,40,40,0.10);
    --bo-warn: #b26a00; --bo-warn-bg: rgba(239,108,0,0.12);
}
[data-bo-theme="dark"] {
    --bo-bg: #0A1412;
    --bo-surface: #10201D;
    --bo-surface-2: #0F1E1B;
    --bo-border: rgba(168,213,214,0.14);
    --bo-border-strong: rgba(168,213,214,0.24);
    --bo-text: #EAF1F0;
    --bo-text-2: #a7bcbb;
    --bo-text-3: #6f8886;
    --bo-primary: #7fb7b8;
    --bo-primary-tint: rgba(127,183,184,0.12);
    --bo-shadow: 0 1px 2px rgba(0,0,0,0.3);
    --bo-shadow-md: 0 10px 28px -12px rgba(0,0,0,0.6);
    --bo-nav: #060D0C;
    --bo-nav-text: rgba(234,241,240,0.62);
    --bo-nav-text-hi: #fff;
    --bo-nav-active: rgba(127,183,184,0.14);
    --bo-grid-line: rgba(127,183,184,0.10);
    --bo-ok: #66bb6a; --bo-ok-bg: rgba(102,187,106,0.14);
    --bo-err: #ef5350; --bo-err-bg: rgba(239,83,80,0.14);
    --bo-warn: #ffa726; --bo-warn-bg: rgba(255,167,38,0.14);
}

html, body { margin: 0; height: 100%; font-family: 'Roboto', sans-serif; font-size: 13px;
    background: var(--bo-bg); color: var(--bo-text); }
h1:focus { outline: none; }

/* ── Shell: sidebar fixa escura + conteúdo ── */
/* O fundo é pintado AQUI (o elemento que carrega data-bo-theme), não no body — senão o
   body lê o :root (sempre claro) e só os cards escurecem. */
.bo-shell { display: flex; min-height: 100vh; background: var(--bo-bg); color: var(--bo-text); }
.bo-side { width: 220px; flex-shrink: 0; background: var(--bo-nav); color: var(--bo-nav-text);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    border-right: 1px solid var(--bo-border); }
.bo-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.bo-brand .lg { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg,#316568,#4d8a8d); display: flex; align-items: center;
    justify-content: center; color: #fff; font-weight: 700; font-family: 'Montserrat', sans-serif; }
.bo-brand b { display: block; color: var(--bo-nav-text-hi); font-family: 'Montserrat', sans-serif;
    font-size: 14px; letter-spacing: -0.01em; }
.bo-brand span { font-size: 11px; color: var(--bo-nav-text); }
.bo-side-label { padding: 14px 16px 6px; font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--bo-nav-text); opacity: 0.7; }
.bo-nav-item { display: flex; align-items: center; gap: 10px; margin: 2px 8px; padding: 9px 10px;
    border-radius: 9px; color: var(--bo-nav-text); text-decoration: none; font-size: 13px; }
.bo-nav-item:hover { background: var(--bo-nav-active); color: var(--bo-nav-text-hi); }
.bo-nav-item.active { background: var(--bo-nav-active); color: var(--bo-nav-text-hi); }
.bo-nav-item .mud-icon-root { font-size: 18px; width: 18px; height: 18px; }
.bo-nav-badge { margin-left: auto; background: var(--bo-err); color: #fff; border-radius: 99px;
    font-size: 10.5px; min-width: 18px; height: 18px; display: flex; align-items: center;
    justify-content: center; padding: 0 5px; font-variant-numeric: tabular-nums; }
.bo-side-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--bo-border); }
.bo-user { display: flex; align-items: center; gap: 9px; padding: 6px 4px; }
.bo-user .av { width: 30px; height: 30px; border-radius: 99px; background: var(--bo-nav-active);
    color: var(--bo-nav-text-hi); display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; flex-shrink: 0; }
.bo-user b { display: block; color: var(--bo-nav-text-hi); font-size: 12.5px; font-weight: 500; }
.bo-user span { font-size: 10.5px; color: var(--bo-nav-text); }
.bo-main { flex: 1; padding: 22px 26px 32px; min-width: 0; }

/* ── Cards e tipografia do painel ── */
.bo-card { background: var(--bo-surface); border: 1px solid var(--bo-border); border-radius: 14px;
    box-shadow: var(--bo-shadow); padding: 15px 17px; }
.bo-kicker { font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase;
    color: var(--bo-text-3); font-weight: 600; margin-bottom: 4px; }
.bo-num { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 22px;
    color: var(--bo-text); font-variant-numeric: tabular-nums; line-height: 1.15; }
.bo-sub { font-size: 11.5px; color: var(--bo-text-3); }
.bo-page-title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 19px;
    letter-spacing: -0.01em; margin: 0; color: var(--bo-text); }
.bo-page-sub { font-size: 12px; color: var(--bo-text-3); }
.bo-status-ic { width: 34px; height: 34px; border-radius: 99px; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0; }
.bo-status-ic.ok { background: var(--bo-ok-bg); color: var(--bo-ok); }
.bo-status-ic.err { background: var(--bo-err-bg); color: var(--bo-err); }
.bo-status-ic.warn { background: var(--bo-warn-bg); color: var(--bo-warn); }
.bo-chart-footer { display: flex; justify-content: space-between; font-size: 10.5px;
    color: var(--bo-text-3); margin-top: 4px; }
.bo-live-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
    color: var(--bo-text-2); background: var(--bo-primary-tint); border-radius: 99px; padding: 4px 10px; }
.bo-live-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--bo-ok);
    animation: bo-pulse 1.6s ease-in-out infinite; }
@keyframes bo-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.bo-mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px;
    overflow-x: auto; padding: 12px; border-radius: 10px; background: var(--bo-surface-2);
    border: 1px solid var(--bo-border); }

/* ── Auth (login / 403) ── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bo-bg); padding: 20px; }
.auth-box { background: var(--bo-surface); border: 1px solid var(--bo-border); border-radius: 16px;
    box-shadow: var(--bo-shadow-md); padding: 26px; width: 360px; }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.auth-brand .lg { width: 40px; height: 40px; border-radius: 11px;
    background: linear-gradient(135deg,#316568,#4d8a8d); display: flex; align-items: center;
    justify-content: center; color: #fff; font-weight: 700; font-family: 'Montserrat', sans-serif; }
.auth-brand b { display: block; font-family: 'Montserrat', sans-serif; font-size: 17px;
    letter-spacing: -0.02em; color: var(--bo-text); }
.auth-brand span { font-size: 12px; color: var(--bo-text-3); letter-spacing: 0.03em; }
.auth-field { margin-bottom: 13px; }
.auth-field label { display: block; font-size: 11px; font-weight: 600; color: var(--bo-text-2);
    margin-bottom: 5px; letter-spacing: 0.02em; }
.auth-field input[type="email"], .auth-field input[type="password"] {
    width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 13px;
    border: 1px solid var(--bo-border-strong); border-radius: 10px;
    background: var(--bo-surface-2); color: var(--bo-text); outline: none;
    font-family: 'Roboto', sans-serif; }
.auth-field input:focus { border-color: var(--bo-primary); box-shadow: 0 0 0 3px var(--bo-primary-tint); }
.auth-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px;
    color: var(--bo-text-2); margin: 4px 0 16px; }
.auth-btn { width: 100%; padding: 11px; border: none; border-radius: 10px; cursor: pointer;
    background: var(--bo-primary); color: #fff; font-size: 13.5px; font-weight: 600;
    font-family: 'Roboto', sans-serif; }
.auth-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.auth-alert { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px;
    border-radius: 10px; font-size: 12.5px; line-height: 1.45; margin-bottom: 16px; }
.auth-alert.err { background: var(--bo-err-bg); color: var(--bo-err); }
.auth-alert.warn { background: var(--bo-warn-bg); color: var(--bo-warn); }
.auth-foot { font-size: 11px; color: var(--bo-text-3); margin-top: 14px; line-height: 1.5; }

/* ── Gráfico de barras rotulado (VgBarChart) ── */
.vg-bars { display: flex; align-items: stretch; gap: 5px; }
.vg-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; cursor: default; }
.vg-bar-val { font-size: 10px; color: var(--bo-text-2); font-variant-numeric: tabular-nums; line-height: 1.5; height: 15px; }
.vg-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.vg-bar-fill { width: 100%; max-width: 30px; background: var(--bo-primary); border-radius: 4px 4px 0 0; min-height: 2px; transition: opacity .15s; }
.vg-bar-col:hover .vg-bar-fill { filter: brightness(1.12); }
.vg-bar-lbl { font-size: 9.5px; color: var(--bo-text-3); margin-top: 4px; white-space: nowrap; height: 13px; font-variant-numeric: tabular-nums; }

/* ════════════════════════════════════════════════════════════════════════
   Vocabulário do handoff (docs/ignored/design_handoff_detalhe_clinica),
   compartilhado entre as telas do back-office. O que é exclusivo de uma
   tela mora no .razor.css dela.

   Global de propósito: aqui não existe `::deep`, então as regras alcançam
   o que o MudBlazor renderiza sem ginástica de escopo.
   ════════════════════════════════════════════════════════════════════════ */

.bo-page { max-width: 1280px; }

/* ── cabeçalho de página: título, pills e ações ── */
.bo-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.bo-head-main { flex: 1; min-width: 250px; }
.bo-head-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.bo-head-top h2 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 23px;
    letter-spacing: -0.02em; margin: 0; color: var(--bo-text); }
.bo-head-meta { font-size: 12.5px; color: var(--bo-text-3); margin-top: 5px; }
.bo-head-act { display: flex; gap: 7px; flex-shrink: 0; flex-wrap: wrap; align-items: flex-end; }

/* ── pills de estado ── */
.bo-pill { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 10px;
    border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.bo-pill .d { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.bo-pill.plan { background: var(--bo-surface-2); color: var(--bo-text-2);
    border: 1px solid var(--bo-border-strong); letter-spacing: 0.04em; }
.bo-pill.info { background: var(--bo-primary-tint); color: var(--bo-primary); }
.bo-pill.info .d { background: var(--bo-primary); }
.bo-pill.ok { background: var(--bo-ok-bg); color: var(--bo-ok); } .bo-pill.ok .d { background: var(--bo-ok); }
.bo-pill.warn { background: var(--bo-warn-bg); color: var(--bo-warn); } .bo-pill.warn .d { background: var(--bo-warn); }
.bo-pill.err { background: var(--bo-err-bg); color: var(--bo-err); } .bo-pill.err .d { background: var(--bo-err); }
.bo-pill.mute { background: var(--bo-surface-2); color: var(--bo-text-3);
    border: 1px solid var(--bo-border); } .bo-pill.mute .d { background: var(--bo-text-3); }

/* ── faixa de sinais ── */
.bo-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.bo-stats.four { grid-template-columns: repeat(4, 1fr); }
.bo-stat { background: var(--bo-surface); border: 1px solid var(--bo-border); border-radius: 14px;
    box-shadow: var(--bo-shadow); padding: 12px 15px 13px; min-width: 0; }
.bo-stat-k { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 0.08em;
    text-transform: uppercase; font-weight: 600; color: var(--bo-text-3); }
.bo-stat-k .mud-icon-root { width: 13px; height: 13px; font-size: 13px; }
.bo-stat-v { display: block; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 21px;
    letter-spacing: -0.02em; color: var(--bo-text); margin-top: 9px; line-height: 1.05;
    font-variant-numeric: tabular-nums; }
.bo-stat-v--good { color: var(--bo-ok); }
.bo-stat-v--warn { color: var(--bo-warn); }
.bo-stat-v--danger { color: var(--bo-err); }
.bo-stat-v--mute { color: var(--bo-text-3); }
.bo-stat-s { font-size: 11.5px; color: var(--bo-text-3); margin-top: 6px; line-height: 1.4; }

/* ── banner de aviso ── */
.bo-note { display: flex; align-items: flex-start; gap: 11px; padding: 12px 15px;
    background: var(--bo-warn-bg); border: 1px solid var(--bo-warn); border-radius: 12px; margin-bottom: 14px; }
.bo-note .ic { color: var(--bo-warn); flex-shrink: 0; display: flex; margin-top: 1px; }
.bo-note .ic .mud-icon-root { width: 17px; height: 17px; font-size: 17px; }
.bo-note-t { font-size: 13px; font-weight: 600; color: var(--bo-warn); }
.bo-note-s { font-size: 12.5px; line-height: 1.5; color: var(--bo-text-2); margin-top: 3px; }

/* ── painel ── */
.bo-panel { background: var(--bo-surface); border: 1px solid var(--bo-border); border-radius: 14px;
    box-shadow: var(--bo-shadow); overflow: hidden; }
.bo-panel.is-live { border-left: 3px solid var(--bo-ok); }
.bo-panel-h { display: flex; align-items: center; gap: 9px; padding: 12px 17px;
    border-bottom: 1px solid var(--bo-border); }
.bo-panel-h .ic { color: var(--bo-primary); display: flex; }
.bo-panel-h .ic .mud-icon-root { width: 16px; height: 16px; font-size: 16px; }
.bo-panel-h .t { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 13.5px;
    color: var(--bo-text); letter-spacing: -0.01em; }
.bo-panel-h .grow { flex: 1; }
.bo-panel-h .meta { font-size: 11.5px; color: var(--bo-text-3); font-variant-numeric: tabular-nums; }
.bo-panel-h .meta b { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 16px;
    color: var(--bo-text); margin-right: 5px; }
.bo-panel-b { padding: 15px 17px 17px; }
.bo-panel-b.flush { padding: 0; }

/* ── chave/valor ── */
.bo-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.bo-kv.one { grid-template-columns: 1fr; }
.bo-kv + .bo-kv { margin-top: 12px; }
.bo-kv-k { font-size: 11px; color: var(--bo-text-3); margin-bottom: 2px; }
.bo-kv-v { font-size: 13px; color: var(--bo-text); font-weight: 500; word-break: break-word; }
.bo-kv-v.na { color: var(--bo-text-3); font-weight: 400; }
.bo-kv-v a { color: var(--bo-primary); text-decoration: none; }
.bo-kv-v a:hover { text-decoration: underline; }

/* ── tabela crua (listas sem ordenação) ── */
.bo-tb { width: 100%; border-collapse: collapse; }
.bo-tb th { text-align: left; font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase;
    font-weight: 600; color: var(--bo-text-3); padding: 9px 17px; background: var(--bo-surface-2);
    border-bottom: 1px solid var(--bo-border); white-space: nowrap; }
.bo-tb td { padding: 9px 17px; border-bottom: 1px solid var(--bo-border); font-size: 12.5px;
    vertical-align: top; color: var(--bo-text-2); }
.bo-tb tr:last-child td { border-bottom: none; }
.bo-tb tbody tr:hover { background: var(--bo-surface-2); }
.bo-tb .when { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--bo-text); font-weight: 500; }
.bo-tb .sub { font-size: 11px; color: var(--bo-text-3); margin-top: 2px; }
.bo-tb .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--bo-text); white-space: nowrap; }

/* ── MudTable no visual da .bo-tb (mantém a ordenação por coluna) ── */
.bo-panel .mud-table-container { overflow-x: auto; }
.bo-panel .mud-table-root { border-collapse: collapse; }
.bo-panel .mud-table-head th, .bo-panel .mud-table-head .mud-table-cell {
    font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600;
    color: var(--bo-text-3); padding: 9px 17px; background: var(--bo-surface-2);
    border-bottom: 1px solid var(--bo-border); white-space: nowrap; }
.bo-panel .mud-table-head .mud-button-root.mud-table-sort-label { color: var(--bo-text-3);
    font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600; }
.bo-panel .mud-table-body .mud-table-cell { padding: 9px 17px; font-size: 12.5px;
    color: var(--bo-text-2); border-bottom: 1px solid var(--bo-border); }
.bo-panel .mud-table-body tr:last-child .mud-table-cell { border-bottom: none; }
.bo-panel .mud-table-row:hover { background: var(--bo-surface-2); }
.bo-panel .mud-table-cell .strong { color: var(--bo-text); font-weight: 500; }
.bo-panel .mud-table-cell .sub { font-size: 11px; color: var(--bo-text-3); margin-top: 2px; }
.bo-panel .mud-table-cell .na { color: var(--bo-text-3); }
.bo-panel .mud-table-cell .vencido { color: var(--bo-err); font-weight: 500; }
.bo-panel .mud-table-cell.r { text-align: right; }
.bo-panel .mud-table-toolbar { display: none; }

.bo-cell-act { display: inline-flex; gap: 6px; justify-content: flex-end; }

/* ── semáforo de recência ── */
.bo-recencia { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.bo-sem { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bo-sem.ok { background: var(--bo-ok); }
.bo-sem.warn { background: var(--bo-warn); }
.bo-sem.err { background: var(--bo-err); }
.bo-sem.mute { background: var(--bo-border-strong); }

/* ── botão de ação ── */
.bo-act { height: 37px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--bo-border-strong);
    background: var(--bo-surface); font-family: 'Montserrat', sans-serif; font-weight: 600;
    font-size: 11.5px; color: var(--bo-text-2); display: inline-flex; align-items: center;
    justify-content: center; gap: 6px; cursor: pointer; transition: all 0.15s ease; }
.bo-act .mud-icon-root { width: 14px; height: 14px; font-size: 14px; }
.bo-act:hover { border-color: var(--bo-primary); color: var(--bo-primary); background: var(--bo-primary-tint); }
.bo-act.on { border-color: var(--bo-primary); background: var(--bo-primary); color: #fff; }
.bo-act.primary { border-color: var(--bo-primary); background: var(--bo-primary); color: #fff; }
.bo-act.primary:hover { filter: brightness(1.08); background: var(--bo-primary); color: #fff; }
.bo-act.danger:hover { border-color: var(--bo-err); color: var(--bo-err); background: var(--bo-err-bg); }
.bo-act.on.danger { border-color: var(--bo-err); background: var(--bo-err); color: #fff; }
.bo-act.ok:hover { border-color: var(--bo-ok); color: var(--bo-ok); background: var(--bo-ok-bg); }
.bo-act:disabled { opacity: 0.5; cursor: not-allowed; }
.bo-act.sm { height: 30px; padding: 0 11px; font-size: 11px; }

/* ── formulário inline (uma linha, abaixo do cabeçalho) ── */
.bo-form { background: var(--bo-surface); border: 1px solid var(--bo-border); border-radius: 14px;
    box-shadow: var(--bo-shadow); padding: 14px 17px 15px; margin-bottom: 14px; animation: bo-pop 180ms ease; }
@keyframes bo-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.bo-form .inner { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.bo-form .fk { flex: 0 0 100%; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    font-weight: 600; color: var(--bo-text-3); margin-bottom: 2px; }
.bo-form .f-btns { flex: 0 0 auto; display: flex; gap: 8px; margin-left: auto; padding-bottom: 2px; }
.bo-form .f-qtd { flex: 0 0 92px; }
.bo-form .f-unit { flex: 0 0 118px; }
.bo-form .f-date { flex: 0 0 150px; }
.bo-form .f-date-wide { flex: 0 0 210px; }
.bo-form .f-motivo { flex: 1 1 220px; min-width: 190px; }
.bo-form .f-code { flex: 0 0 200px; }
.bo-form .f-wide { flex: 1 1 100%; }
.bo-form .f-mid { flex: 1 1 260px; min-width: 220px; }

/* bloco de formulário dentro de um painel */
.bo-formbox { margin-top: 12px; padding: 13px; background: var(--bo-surface-2);
    border: 1px solid var(--bo-border); border-radius: 12px; animation: bo-pop 180ms ease; }
.bo-formbox-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 11px; }

/* segmento (duas ou três opções mutuamente exclusivas) */
.bo-seg { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; }
.bo-seg button { height: 37px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--bo-border-strong);
    background: var(--bo-surface); font-family: 'Roboto', sans-serif; font-size: 12.5px; font-weight: 500;
    color: var(--bo-text-2); cursor: pointer; transition: all 0.15s ease; }
.bo-seg button.on { border-color: var(--bo-primary); background: var(--bo-primary-tint);
    color: var(--bo-primary); font-weight: 600; }
.bo-seg.sm button { height: 30px; padding: 0 11px; font-size: 11.5px; }

/* prévia / nota dentro de formulário */
.bo-prev { flex: 0 0 100%; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px;
    background: var(--bo-primary-tint); border: 1px solid var(--bo-border); border-radius: 8px;
    font-size: 12px; line-height: 1.5; color: var(--bo-text-2); margin-top: 2px; }
.bo-prev.warn { background: var(--bo-warn-bg); border-color: var(--bo-warn); }
.bo-prev .ic { color: var(--bo-primary); flex-shrink: 0; display: flex; margin-top: 1px; }
.bo-prev .ic .mud-icon-root { width: 14px; height: 14px; font-size: 14px; }
.bo-prev.warn .ic { color: var(--bo-warn); }
.bo-prev b { color: var(--bo-text); font-weight: 600; }

/* ── barra de ferramentas de lista (busca, filtros) ── */
.bo-toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bo-toolbar .grow { flex: 1; }
.bo-toolbar .f-busca { flex: 0 1 320px; min-width: 220px; }
/* Campo solto sobre o fundo da página precisa de superfície própria: sem isso ele fica
   cinza como o fundo e some. --bo-surface é branco no claro e escuro no escuro. */
.bo-toolbar .mud-input.mud-input-outlined { background: var(--bo-surface); border-radius: 8px; }

/* ── empty state ── */
.bo-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 16px; }
.bo-empty .ic { color: var(--bo-text-3); margin-bottom: 8px; display: flex; }
.bo-empty .ic .mud-icon-root { width: 20px; height: 20px; font-size: 20px; }
.bo-empty .t { font-size: 12.5px; color: var(--bo-text-2); font-weight: 500; }
.bo-empty .s { font-size: 11.5px; color: var(--bo-text-3); margin-top: 2px; }

/* MudButton nas telas do painel: raio e caixa-baixa do design */
.bo-page .mud-button-root { border-radius: 8px; text-transform: none; font-family: 'Montserrat', sans-serif; }

@media (max-width: 1180px) {
    .bo-stats, .bo-stats.four { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .bo-stats, .bo-stats.four { grid-template-columns: repeat(2, 1fr); }
    .bo-kv { grid-template-columns: 1fr; }
}

#blazor-error-ui { color-scheme: light only; background: lightyellow; bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2); display: none; left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
