/* Datanis — estilos dos componentes. Todos os valores vêm dos tokens --dt-* (tokens/tokens.css), claro e escuro. */
.dt-root, .dt-preview { font-family: var(--dt-font-sans); color: var(--dt-text-primary); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; }
.dt-preview { background: var(--dt-surface-page); padding: var(--dt-space-5); display: flex; flex-wrap: wrap; gap: var(--dt-space-4); align-items: flex-start; box-sizing: border-box; min-height: 100%; }
.dt-preview *, .dt-root * { box-sizing: border-box; }
.dt-col { display: flex; flex-direction: column; gap: var(--dt-space-3); }
.dt-row { display: flex; flex-wrap: wrap; gap: var(--dt-space-2); align-items: center; }
.dt-num { font-variant-numeric: tabular-nums; }
/* Ícone do sprite (components/icons.svg, Lucide, traço 1.75):
   <svg class="dt-icon" aria-hidden="true"><use href="/assets/icons.svg#chart-column"/></svg>
   Padrão 20px; --sm 16px; --inline acompanha o texto (1em). */
.dt-icon { flex: none; display: inline-block; vertical-align: middle; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dt-icon--sm { width: 16px; height: 16px; }
.dt-icon--lg { width: 24px; height: 24px; }
.dt-icon--inline { width: 1em; height: 1em; vertical-align: -0.125em; }
.dt-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dt-eyebrow { font-family: var(--dt-font-label); font-weight: 300; font-size: 12px; line-height: 16px; letter-spacing: .16em; text-transform: uppercase; }
.dt-h3 { font-family: var(--dt-font-display); font-weight: 600; font-size: 18px; line-height: 26px; margin: 0; }
.dt-caption { font-size: 12px; line-height: 16px; }
@keyframes dt-spin { to { transform: rotate(360deg); } }
.dt-spin { animation: dt-spin .8s linear infinite; }

/* Button */
.dt-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--dt-space-2); height: 40px; padding: 0 var(--dt-space-4); border-radius: var(--dt-radius-sm); border: 1px solid transparent; font: 500 14px/20px var(--dt-font-sans); cursor: pointer; transition: background-color var(--dt-duration-fast) var(--dt-ease), box-shadow var(--dt-duration-fast) var(--dt-ease); white-space: nowrap; }
.dt-btn--sm { height: 32px; padding: 0 var(--dt-space-3); font-size: 13px; }
.dt-btn--primary { background: var(--dt-brand-blue); color: var(--dt-text-on-primary); }
.dt-btn--primary:hover { background: var(--dt-brand-blue-hover); }
.dt-btn--primary:active { background: var(--dt-brand-blue-active); }
.dt-btn--secondary { background: var(--dt-surface-base); color: var(--dt-text-primary); border-color: var(--dt-border-strong); }
.dt-btn--secondary:hover { background: var(--dt-surface-subtle); }
.dt-btn--ghost { background: transparent; color: var(--dt-brand-blue); }
.dt-btn--ghost:hover { background: var(--dt-selection-bg); }
.dt-btn--danger { background: var(--dt-surface-base); color: var(--dt-danger-text); border-color: var(--dt-border-strong); }
.dt-btn--danger:hover { background: var(--dt-danger-bg); }
.dt-btn:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-btn[disabled] { opacity: .45; cursor: not-allowed; }
.dt-btn--block { width: 100%; }

/* Input */
.dt-field { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.dt-field__label { font: 500 13px/18px var(--dt-font-sans); color: var(--dt-text-primary); }
.dt-field__control { display: flex; align-items: center; gap: var(--dt-space-2); height: 40px; padding: 0 var(--dt-space-3); background: var(--dt-surface-base); border: 1px solid var(--dt-border-strong); border-radius: var(--dt-radius-sm); color: var(--dt-text-secondary); }
.dt-field__control:focus-within { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-field__control input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 14px/20px var(--dt-font-sans); color: var(--dt-text-primary); }
.dt-field__control input::placeholder { color: var(--dt-text-secondary); }
.dt-field--error .dt-field__control { border-color: var(--dt-danger); }
.dt-field__hint { font-size: 12px; line-height: 16px; color: var(--dt-text-muted); }
.dt-field--error .dt-field__hint { color: var(--dt-danger-text); display: flex; gap: var(--dt-space-1); align-items: center; }

/* Badge */
.dt-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--dt-radius-pill); font: 500 12px/16px var(--dt-font-sans); white-space: nowrap; background: var(--dt-surface-subtle); color: var(--dt-text-primary); }
.dt-badge__dot { width: 8px; height: 8px; border-radius: var(--dt-radius-pill); background: currentColor; }
.dt-badge--success { background: var(--dt-success-bg); color: var(--dt-success); }
.dt-badge--warning { background: var(--dt-warning-bg); color: var(--dt-warning-text); }
.dt-badge--danger { background: var(--dt-danger-bg); color: var(--dt-danger-text); }
.dt-badge--info { background: var(--dt-selection-bg); color: var(--dt-brand-blue); }
.dt-badge--neutral { background: var(--dt-surface-subtle); color: var(--dt-text-muted); }
.dt-badge--service { background: var(--dt-surface-base); color: var(--dt-text-primary); border: 1px solid var(--dt-border-strong); }

/* Card base */
.dt-card { background: var(--dt-surface-base); border: 1px solid var(--dt-border); border-radius: var(--dt-radius-md); box-shadow: var(--dt-shadow-1); }

/* KpiCard */
.dt-kpi { padding: var(--dt-space-5); min-width: 220px; display: flex; flex-direction: column; gap: var(--dt-space-2); }
.dt-kpi__label { color: var(--dt-text-secondary); font: 500 13px/18px var(--dt-font-sans); display: flex; align-items: center; gap: var(--dt-space-2); }
.dt-kpi__value { font: 600 32px/40px var(--dt-font-sans); font-variant-numeric: tabular-nums; color: var(--dt-text-primary); }
.dt-kpi__delta { display: inline-flex; align-items: center; gap: var(--dt-space-1); font: 500 12px/16px var(--dt-font-sans); font-variant-numeric: tabular-nums; }
.dt-kpi__delta--good { color: var(--dt-success); }
.dt-kpi__delta--bad { color: var(--dt-danger-text); }
.dt-kpi__delta--flat { color: var(--dt-text-secondary); }
.dt-kpi__foot { color: var(--dt-text-secondary); }

/* DataTable */
.dt-table-wrap { overflow-x: auto; width: 100%; }
.dt-table { width: 100%; border-collapse: collapse; font: 400 14px/20px var(--dt-font-sans); font-variant-numeric: tabular-nums; }
.dt-table th { text-align: left; background: var(--dt-surface-subtle); color: var(--dt-text-muted); font-weight: 500; font-size: 13px; padding: 10px var(--dt-space-3); border-bottom: 1px solid var(--dt-border); white-space: nowrap; }
.dt-table td { padding: var(--dt-space-3); border-bottom: 1px solid var(--dt-divider); color: var(--dt-text-primary); vertical-align: middle; }
.dt-table tr:last-child td { border-bottom: 0; }
.dt-table tbody tr:hover { background: var(--dt-selection-bg); }
.dt-table tbody tr.is-selected { background: var(--dt-selection-strong); }
.dt-table .is-num { text-align: right; }
.dt-table .is-muted { color: var(--dt-text-secondary); }
.dt-table tbody tr:hover .is-muted { color: var(--dt-text-muted); }
.dt-table tbody tr.is-selected .is-muted { color: var(--dt-text-primary); }

/* Callout */
.dt-callout { display: flex; gap: var(--dt-space-3); padding: var(--dt-space-4); border-radius: var(--dt-radius-md); border: 1px solid; max-width: 640px; }
.dt-callout__title { font: 600 14px/20px var(--dt-font-sans); margin: 0 0 2px; color: var(--dt-text-primary); }
.dt-callout__body { font: 400 14px/22px var(--dt-font-sans); color: var(--dt-text-primary); margin: 0; }
.dt-callout--info { background: var(--dt-selection-bg); border-color: var(--dt-selection-strong); }
.dt-callout--info .dt-icon { color: var(--dt-brand-blue); }
.dt-callout--warning { background: var(--dt-warning-bg); border-color: var(--dt-warning); }
.dt-callout--warning .dt-icon { color: var(--dt-warning-text); }
.dt-callout--danger { background: var(--dt-danger-bg); border-color: var(--dt-danger); }
.dt-callout--danger .dt-icon { color: var(--dt-danger-text); }
.dt-callout--tip { background: var(--dt-success-bg); border-color: var(--dt-success); }
.dt-callout--tip .dt-icon { color: var(--dt-success); }

/* CodeBlock */
.dt-code { background: var(--dt-surface-subtle); border: 1px solid var(--dt-border); border-radius: var(--dt-radius-sm); overflow: hidden; max-width: 640px; width: 100%; }
.dt-code__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px var(--dt-space-3); border-bottom: 1px solid var(--dt-border); background: var(--dt-surface-base); }
.dt-code__lang { color: var(--dt-text-secondary); }
.dt-code__copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--dt-radius-sm); border: 0; background: transparent; color: var(--dt-brand-blue); font: 500 12px/16px var(--dt-font-sans); cursor: pointer; }
.dt-code__copy:hover { background: var(--dt-selection-bg); }
.dt-code__copy:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 1px; }
.dt-code__copy.is-done { color: var(--dt-success); }
.dt-code pre { margin: 0; padding: var(--dt-space-3) var(--dt-space-4); overflow-x: auto; font: 400 13px/20px var(--dt-font-mono); color: var(--dt-text-primary); }
.dt-code .tk-kw { color: var(--dt-brand-blue); font-weight: 500; }
.dt-code .tk-str { color: var(--dt-danger-text); }
.dt-code .tk-com { color: var(--dt-text-muted); font-style: italic; }

/* PortalCard */
.dt-portal { display: flex; flex-direction: column; gap: var(--dt-space-3); padding: var(--dt-space-5); width: 260px; text-decoration: none; color: inherit; transition: box-shadow var(--dt-duration-fast) var(--dt-ease), border-color var(--dt-duration-fast) var(--dt-ease); }
.dt-portal:hover { box-shadow: var(--dt-shadow-2); border-color: var(--dt-border-strong); }
.dt-portal:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-portal__icon { width: 40px; height: 40px; border-radius: var(--dt-radius-sm); background: var(--dt-selection-bg); color: var(--dt-brand-blue); display: grid; place-items: center; }
.dt-portal__desc { color: var(--dt-text-secondary); margin: 0; font-size: 14px; line-height: 20px; }
.dt-portal__go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--dt-brand-blue); font: 500 14px/20px var(--dt-font-sans); }
.dt-portal__eyebrow { color: var(--dt-text-secondary); }

/* Shell — moldura de TODAS as páginas com login: menu lateral à esquerda (decisão do portal; não há barra superior como moldura).
   <a class="dt-skip" href="#conteudo">Pular para o conteúdo</a>
   <div class="dt-shell dt-root">
     <nav class="dt-sidebar" id="menu-lateral" aria-label="Menu principal">
       <a class="dt-sidebar__brand" href="/" aria-label="Datanis — Início"><img class="dt-sidebar__logo" src="/assets/brand/datanis-wordmark-only-white.svg" alt=""><img class="dt-sidebar__mark" src="/assets/brand/datanis-symbol-white.svg" alt=""></a>
       <a class="dt-sidebar__item" href="/" title="Início"><svg class="dt-icon" aria-hidden="true">…home</svg><span class="dt-sidebar__label">Início</span></a>
       <a class="dt-sidebar__item has-active-child" href="/estatisticas/" title="Estatísticas">…</a>
       <div class="dt-sidebar__sub"><a class="dt-sidebar__item dt-sidebar__item--sub is-active" href="/estatisticas/" aria-current="page"><span class="dt-sidebar__label">Painel</span></a>…</div>
       …
       <div class="dt-sidebar__foot">datanis.mfsolution.tech</div></nav>
     <div class="dt-shell__scrim"></div>
     <div class="dt-shell__body">
       <header class="dt-header">
         <div class="dt-header__start">
           <button class="dt-icon-btn dt-header__menu" aria-controls="menu-lateral" aria-expanded="false" aria-label="Abrir menu">…menu</button>
           <button class="dt-icon-btn dt-header__collapse" aria-controls="menu-lateral" aria-expanded="true" aria-label="Recolher menu" title="Recolher menu">…panel-left-close</button>
           <nav class="dt-header__trail" aria-label="Trilha"><a href="/estatisticas/">Estatísticas de atendimento</a><span aria-hidden="true">·</span><span aria-current="page">Ficha do cliente</span></nav></div>
         <div class="dt-header__end"><div class="dt-theme">…</div><div class="dt-profile">…</div></div></header>
       <main id="conteudo" class="dt-shell__main"><h1 class="dt-page__title">…</h1><p class="dt-page__lead">…</p>…</main></div></div>
   Estados (o JS só troca classes e atributos):
   - Recolhido, a partir de 768px: .dt-sidebar.is-collapsed, ou data-sidebar="collapsed" no <html> (gravado pelo script de início, antes de pintar).
   - Abaixo de 768px o menu é drawer: fechado fora da tela; aberto com .dt-sidebar.is-open (o .dt-shell__scrim seguinte aparece). */
.dt-skip { position: absolute; left: var(--dt-space-3); top: calc(-1 * var(--dt-header-height)); z-index: 100; padding: var(--dt-space-2) var(--dt-space-3); background: var(--dt-surface-base); color: var(--dt-brand-blue); border-radius: var(--dt-radius-sm); box-shadow: var(--dt-shadow-2); font: 500 14px/20px var(--dt-font-sans); }
.dt-skip:focus { top: var(--dt-space-3); outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-shell { display: flex; min-height: 100%; width: 100%; background: var(--dt-surface-page); }
body > .dt-shell { min-height: 100vh; }
.dt-shell__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* Área de conteúdo (no shell) e página pública (home sem login): largura máxima content-max */
.dt-shell__main, .dt-page { flex: 1 0 auto; width: 100%; min-width: 0; max-width: var(--dt-content-max); margin: 0 auto; padding: var(--dt-space-6); }
.dt-page__title { margin: 0; font: 700 28px/36px var(--dt-font-display); color: var(--dt-text-primary); }
.dt-page__lead { margin: var(--dt-space-1) 0 var(--dt-space-5); max-width: var(--dt-reading-width); color: var(--dt-text-muted); }

/* Menu lateral (navy nos dois temas) */
.dt-sidebar { position: sticky; top: 0; align-self: flex-start; height: 100vh; max-height: 100%; overflow: hidden auto; width: var(--dt-sidebar-width); flex: none; background: var(--dt-brand-navy); color: var(--dt-sidebar-text); display: flex; flex-direction: column; padding: var(--dt-space-5) var(--dt-space-3); gap: var(--dt-space-1); border-right: 1px solid var(--dt-sidebar-border); transition: width var(--dt-duration) var(--dt-ease); }
.dt-sidebar__brand { display: flex; align-items: center; flex: none; height: 32px; padding: 0 var(--dt-space-3); margin-bottom: var(--dt-space-5); border-radius: var(--dt-radius-sm); }
.dt-sidebar__brand:focus-visible { outline: 2px solid var(--dt-sidebar-focus); outline-offset: 2px; }
.dt-sidebar__brand img { display: block; width: 140px; min-width: 120px; height: auto; }
.dt-sidebar__brand img.dt-sidebar__mark { display: none; width: 28px; min-width: 0; height: 28px; }
.dt-sidebar__group { flex: none; padding: var(--dt-space-4) var(--dt-space-3) var(--dt-space-2); color: var(--dt-sidebar-text); border-top: 1px solid var(--dt-sidebar-divider); margin-top: var(--dt-space-2); }
.dt-sidebar__item { display: flex; flex: none; align-items: center; gap: var(--dt-space-3); height: 40px; padding: 0 var(--dt-space-3); border-radius: var(--dt-radius-sm); color: var(--dt-sidebar-text); text-decoration: none; font: 500 14px/20px var(--dt-font-sans); }
.dt-sidebar__item:hover { background: var(--dt-sidebar-hover); }
.dt-sidebar__item:focus-visible { outline: 2px solid var(--dt-sidebar-focus); outline-offset: -2px; }
.dt-sidebar__item.is-active { background: var(--dt-sidebar-active); color: var(--dt-text-on-brand); }
.dt-sidebar__label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Sub-itens (Estatísticas: Painel e Ficha do cliente): sem ícone, recuados; o pai do ativo fica em text-on-brand */
.dt-sidebar__sub { display: flex; flex: none; flex-direction: column; gap: 2px; margin: 0 0 var(--dt-space-1); }
.dt-sidebar__item--sub { height: 34px; padding-left: calc(var(--dt-space-3) + 20px + var(--dt-space-3)); font-size: 13px; font-weight: 400; }
.dt-sidebar__item.has-active-child { color: var(--dt-text-on-brand); }
.dt-sidebar__foot { flex: none; margin-top: auto; padding: var(--dt-space-3); border-top: 1px solid var(--dt-sidebar-divider); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Recolhido (72px, a partir de 768px): símbolo D branco e só ícones; o rótulo continua no title e no nome acessível;
   sub-itens, grupos e rodapé somem; o pai do sub-item ativo assume o fundo ativo. */
@media (min-width: 768px) {
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) { width: var(--dt-sidebar-collapsed); }
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) .dt-sidebar__brand { justify-content: center; padding: 0; }
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) .dt-sidebar__logo { display: none; }
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) img.dt-sidebar__mark { display: block; }
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) .dt-sidebar__item { justify-content: center; padding: 0; }
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) :is(.dt-sidebar__label, .dt-sidebar__group, .dt-sidebar__foot) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) .dt-sidebar__sub { display: none; }
  :is(.dt-sidebar.is-collapsed, [data-sidebar="collapsed"] .dt-sidebar) .dt-sidebar__item.has-active-child { background: var(--dt-sidebar-active); }
}

/* Cabeçalho interno (dentro do shell): à esquerda abrir menu (só < 768px), recolher menu (≥ 768px) e trilha; à direita .dt-theme e .dt-profile, nessa ordem. A marca fica no menu. */
.dt-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--dt-space-3); height: var(--dt-header-height); flex: none; padding: 0 var(--dt-space-6) 0 var(--dt-space-4); background: var(--dt-surface-base); border-bottom: 1px solid var(--dt-border); }
.dt-header__start { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--dt-space-3); color: var(--dt-text-secondary); }
.dt-header__end { flex: none; display: flex; align-items: center; gap: var(--dt-space-3); }
.dt-header .dt-header__menu { display: none; }
.dt-header__trail { display: flex; align-items: center; gap: var(--dt-space-2); min-width: 0; color: var(--dt-text-secondary); font: 500 14px/20px var(--dt-font-sans); white-space: nowrap; overflow: hidden; }
.dt-header__trail a { color: var(--dt-text-secondary); text-decoration: none; border-radius: 2px; }
.dt-header__trail a:hover { color: var(--dt-brand-blue); text-decoration: underline; text-underline-offset: 2px; }
.dt-header__trail a:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-header__trail [aria-current] { color: var(--dt-text-primary); overflow: hidden; text-overflow: ellipsis; }

/* Fundo do drawer (só < 768px, com o menu aberto) */
.dt-shell__scrim { display: none; position: fixed; inset: 0; z-index: 55; background: color-mix(in srgb, var(--dt-brand-navy-deep) 55%, transparent); }

/* Abaixo de 768px: menu vira drawer (abre pelo .dt-header__menu; fecha com Esc, clique no fundo ou navegação) */
@media (max-width: 767.98px) {
  .dt-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; height: 100%; max-height: none; width: min(var(--dt-sidebar-width), calc(100vw - 56px)); transform: translateX(-100%); visibility: hidden; transition: transform var(--dt-duration) var(--dt-ease), visibility 0s linear var(--dt-duration); }
  .dt-sidebar.is-open { transform: none; visibility: visible; box-shadow: var(--dt-shadow-3); transition: transform var(--dt-duration) var(--dt-ease), visibility 0s; }
  .dt-sidebar.is-open ~ .dt-shell__scrim { display: block; }
  .dt-header { padding: 0 var(--dt-space-4); gap: var(--dt-space-2); }
  .dt-header__start, .dt-header__end { gap: var(--dt-space-2); }
  .dt-header .dt-header__menu { display: inline-grid; }
  .dt-header .dt-header__collapse { display: none; }
  .dt-header__trail { font-size: 13px; }
  .dt-header__trail > :not([aria-current]) { display: none; }
  .dt-shell__main, .dt-page { padding: var(--dt-space-4); }
}

/* Seletor de tema: 3 opções (Claro / Escuro / Sistema). Fica sobre surface-base (cabeçalho do shell, cabeçalho público, login).
   <div class="dt-theme" role="radiogroup" aria-label="Tema">
     <button class="dt-theme__opt" type="button" role="radio" aria-checked="false" data-tema="light" aria-label="Tema claro" title="Tema claro" tabindex="-1"><svg class="dt-icon dt-icon--sm" aria-hidden="true">…sun</svg></button>
     …data-tema="dark" (moon) · data-tema="system" (monitor, aria-checked="true" sem escolha salva)</div> */
.dt-theme { display: inline-flex; flex: none; gap: 2px; padding: 2px; border-radius: var(--dt-radius-sm); background: var(--dt-surface-subtle); border: 1px solid var(--dt-border); }
.dt-theme__opt { display: inline-grid; place-items: center; width: 32px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--dt-text-muted); cursor: pointer; transition: background-color var(--dt-duration-fast) var(--dt-ease), color var(--dt-duration-fast) var(--dt-ease); }
.dt-theme__opt:hover { color: var(--dt-text-primary); }
.dt-theme__opt[aria-checked="true"] { background: var(--dt-surface-base); color: var(--dt-brand-blue); box-shadow: var(--dt-shadow-1); }
.dt-theme__opt:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 1px; }

/* Caixa de seleção (Login: "Manter conectado neste computador por 30 dias")
   <label class="dt-check"><input type="checkbox" name="…"> Manter conectado neste computador por 30 dias</label> */
.dt-check { display: inline-flex; align-items: flex-start; gap: var(--dt-space-2); font: 400 14px/20px var(--dt-font-sans); color: var(--dt-text-primary); cursor: pointer; }
.dt-check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--dt-brand-blue); cursor: pointer; }
.dt-check input:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }

/* LoginPanel */
.dt-login { display: flex; width: 100%; min-height: 420px; border-radius: var(--dt-radius-lg); overflow: hidden; border: 1px solid var(--dt-border); background: var(--dt-surface-base); box-shadow: var(--dt-shadow-1); }
.dt-login__brand { flex: 1 1 45%; background: var(--dt-brand-navy); color: var(--dt-text-on-brand); padding: var(--dt-space-7) var(--dt-space-6); display: flex; flex-direction: column; justify-content: space-between; gap: var(--dt-space-6); position: relative; overflow: hidden; }
.dt-login__brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--dt-brand-gradient); }
.dt-login__brand img { width: 200px; height: auto; display: block; }
.dt-login__claim { font: 700 28px/36px var(--dt-font-display); margin: 0; color: var(--dt-text-on-brand); }
.dt-login__sub { color: var(--dt-sidebar-text); margin: var(--dt-space-2) 0 0; font-size: 14px; line-height: 22px; }
.dt-login__form { flex: 1 1 55%; padding: var(--dt-space-7) var(--dt-space-6); display: flex; flex-direction: column; gap: var(--dt-space-4); justify-content: center; max-width: 440px; margin: 0 auto; }
.dt-login__title { font: 700 22px/30px var(--dt-font-display); margin: 0; }
.dt-login__help { color: var(--dt-text-secondary); font-size: 13px; }
.dt-login__help a, .dt-link { color: var(--dt-brand-blue); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 720px) { .dt-login { flex-direction: column; } .dt-login__brand { padding: var(--dt-space-5); } }

/* StatusRow */
.dt-status { display: flex; align-items: center; gap: var(--dt-space-3); padding: var(--dt-space-3) var(--dt-space-4); background: var(--dt-surface-base); border-bottom: 1px solid var(--dt-divider); }
.dt-status:last-child { border-bottom: 0; }
.dt-status__name { flex: 1; min-width: 0; font: 500 14px/20px var(--dt-font-sans); }
.dt-status__meta { color: var(--dt-text-secondary); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.dt-status__bars { display: flex; gap: 2px; }
.dt-status__bar { width: 4px; height: 20px; border-radius: 1px; background: var(--dt-success); }
.dt-status__bar--warning { background: var(--dt-warning); height: 20px; }
.dt-status__bar--danger { background: var(--dt-danger); }
.dt-status-list { border: 1px solid var(--dt-border); border-radius: var(--dt-radius-md); overflow: hidden; width: 100%; max-width: 720px; box-shadow: var(--dt-shadow-1); }

/* EmptyState */
.dt-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--dt-space-3); padding: var(--dt-space-7) var(--dt-space-5); border: 1px dashed var(--dt-border-strong); border-radius: var(--dt-radius-lg); background: var(--dt-surface-base); max-width: 480px; width: 100%; }
.dt-empty__icon { width: 48px; height: 48px; border-radius: var(--dt-radius-pill); background: var(--dt-surface-subtle); color: var(--dt-text-muted); display: grid; place-items: center; }
.dt-empty__title { font: 600 18px/26px var(--dt-font-display); margin: 0; }
.dt-empty__text { color: var(--dt-text-secondary); margin: 0; max-width: 340px; }

/* Troca de logo por tema (ver tokens.css) */
.dt-only-light { display: var(--dt-show-light); }
.dt-only-dark { display: var(--dt-show-dark); }

/* Garante fundo e cor do tema na página inteira */
html { background: var(--dt-surface-page); color: var(--dt-text-primary); }

/* =====================================================================
   Componentes do site real (Portal Datanis) — HTML/CSS puros.
   Breakpoint principal: 768px (abaixo: 1 coluna). Só tokens --dt-*.
   Regra do tema claro: controles com contorno border-strong ficam sobre
   surface-base (dentro de cartão, da barra de filtro ou do cabeçalho),
   nunca direto em surface-page.
   ===================================================================== */

/* Botão só com ícone (fechar, tema, anterior/próximo) */
.dt-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--dt-radius-sm); background: transparent; color: var(--dt-text-secondary); cursor: pointer; transition: background-color var(--dt-duration-fast) var(--dt-ease), color var(--dt-duration-fast) var(--dt-ease); }
.dt-icon-btn:hover { background: var(--dt-surface-subtle); color: var(--dt-text-primary); }
.dt-icon-btn:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-icon-btn--sm { width: 28px; height: 28px; }
.dt-btn--icon { width: 40px; padding: 0; }
.dt-btn--sm.dt-btn--icon { width: 32px; }

/* Select nativo (seletor de página, filtros) */
.dt-select { height: 32px; padding: 0 var(--dt-space-2); border: 1px solid var(--dt-border-strong); border-radius: var(--dt-radius-sm); background: var(--dt-surface-base); color: var(--dt-text-primary); font: 400 13px/18px var(--dt-font-sans); font-variant-numeric: tabular-nums; cursor: pointer; }
.dt-select:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }

/* 1. Segmented — alternância em grupo.
   <div class="dt-segmented" role="radiogroup" aria-label="Contar">
     <button role="radio" aria-checked="true">por atendimentos</button>
     <button role="radio" aria-checked="false">por clientes</button></div>
   Também aceita <button aria-pressed="true|false"> sem role. */
.dt-segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--dt-border-strong); border-radius: var(--dt-radius-sm); background: var(--dt-surface-base); }
.dt-segmented > button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 var(--dt-space-3); border: 0; border-radius: 4px; background: transparent; color: var(--dt-text-secondary); font: 500 13px/18px var(--dt-font-sans); white-space: nowrap; cursor: pointer; transition: background-color var(--dt-duration-fast) var(--dt-ease), color var(--dt-duration-fast) var(--dt-ease); }
.dt-segmented > button:hover { background: var(--dt-surface-subtle); color: var(--dt-text-primary); }
.dt-segmented > button[aria-checked="true"], .dt-segmented > button[aria-pressed="true"] { background: var(--dt-brand-blue); color: var(--dt-text-on-primary); }
.dt-segmented > button:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; position: relative; z-index: 1; }
.dt-segmented--sm > button { height: 26px; padding: 0 10px; font-size: 12px; }

/* 2. Pager — paginador de tabela.
   <nav class="dt-pager" aria-label="Paginação">
     <p class="dt-pager__range" aria-live="polite">1–25 de 312</p>
     <label class="dt-pager__size">Por página <select class="dt-select">…</select></label>
     <div class="dt-pager__nav"><button class="dt-btn dt-btn--secondary dt-btn--sm dt-btn--icon" aria-label="Página anterior">…</button>…</div></nav> */
.dt-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--dt-space-2) var(--dt-space-4); padding: var(--dt-space-3) 0 0; font-size: 13px; line-height: 18px; color: var(--dt-text-secondary); }
.dt-pager__range { margin: 0; font-variant-numeric: tabular-nums; }
.dt-pager__range strong { color: var(--dt-text-primary); font-weight: 600; }
.dt-pager__size { display: inline-flex; align-items: center; gap: var(--dt-space-2); }
.dt-pager__nav { display: inline-flex; gap: var(--dt-space-2); margin-left: auto; }
@media (max-width: 767.98px) { .dt-pager__range { flex-basis: 100%; } .dt-pager__nav { margin-left: auto; } }

/* 3. Profile — botão avatar + painel do perfil (pop-over).
   <div class="dt-profile">
     <button class="dt-avatar-btn" aria-expanded="false" aria-controls="perfil"><span class="dt-avatar">MK</span><span class="dt-avatar-btn__name">Matheus</span><svg class="dt-icon dt-icon--sm">…chevron-down</svg></button>
     <div class="dt-profile__panel" id="perfil" hidden>
       <div class="dt-profile__who"><span class="dt-avatar dt-avatar--lg">MK</span><div><p class="dt-profile__name">…</p><p class="dt-profile__user">…</p></div></div>
       <ul class="dt-profile__menu"><li><a class="dt-profile__link">…Trocar senha</a></li>…
         <li class="dt-profile__sep"><button class="dt-profile__link dt-profile__link--danger">…Sair</button></li></ul></div></div> */
.dt-avatar { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--dt-radius-pill); background: var(--dt-brand-blue); color: var(--dt-text-on-primary); font: 600 12px/1 var(--dt-font-sans); letter-spacing: .02em; text-transform: uppercase; }
.dt-avatar--lg { width: 40px; height: 40px; font-size: 14px; }
.dt-avatar-btn { display: inline-flex; align-items: center; gap: var(--dt-space-2); height: 40px; padding: 0 var(--dt-space-2) 0 4px; border: 0; border-radius: var(--dt-radius-pill); background: transparent; color: var(--dt-text-primary); font: 500 14px/20px var(--dt-font-sans); cursor: pointer; }
.dt-avatar-btn:hover { background: var(--dt-surface-subtle); }
.dt-avatar-btn:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-avatar-btn > .dt-icon { color: var(--dt-text-secondary); transition: transform var(--dt-duration-fast) var(--dt-ease); }
.dt-avatar-btn[aria-expanded="true"] > .dt-icon { transform: rotate(180deg); }
.dt-profile { position: relative; display: inline-block; }
.dt-profile__panel { position: absolute; top: calc(100% + var(--dt-space-2)); right: 0; z-index: 50; width: 280px; max-width: calc(100vw - 2 * var(--dt-space-4)); padding: var(--dt-space-2); background: var(--dt-surface-base); border: 1px solid var(--dt-border); border-radius: var(--dt-radius-md); box-shadow: var(--dt-shadow-3); color: var(--dt-text-primary); }
.dt-profile__panel[hidden] { display: none; }
.dt-profile__who { display: flex; align-items: center; gap: var(--dt-space-3); padding: var(--dt-space-2) var(--dt-space-2) var(--dt-space-3); border-bottom: 1px solid var(--dt-divider); margin-bottom: var(--dt-space-1); min-width: 0; }
.dt-profile__who > div { min-width: 0; }
.dt-profile__name { margin: 0; font: 600 14px/20px var(--dt-font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-profile__user { margin: 0; font-size: 12px; line-height: 16px; color: var(--dt-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-profile__menu { list-style: none; margin: 0; padding: 0; }
.dt-profile__sep { border-top: 1px solid var(--dt-divider); margin-top: var(--dt-space-1); padding-top: var(--dt-space-1); }
.dt-profile__link { display: flex; align-items: center; gap: var(--dt-space-3); width: 100%; height: 36px; padding: 0 var(--dt-space-2); border: 0; border-radius: var(--dt-radius-sm); background: transparent; color: var(--dt-text-primary); font: 400 14px/20px var(--dt-font-sans); text-align: left; text-decoration: none; cursor: pointer; }
.dt-profile__link > .dt-icon { color: var(--dt-text-secondary); }
.dt-profile__link:hover { background: var(--dt-selection-bg); }
.dt-profile__link:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: -2px; }
.dt-profile__link--danger, .dt-profile__link--danger > .dt-icon { color: var(--dt-danger-text); }
.dt-profile__link--danger:hover { background: var(--dt-danger-bg); }
@media (max-width: 767.98px) { .dt-avatar-btn__name { display: none; } .dt-avatar-btn { padding-right: 4px; } }

/* 4. Chip — filtro (selecionável) e etiqueta (estática).
   Filtro: <button class="dt-chip" aria-pressed="false"><svg class="dt-icon dt-icon--sm dt-chip__check">…check</svg>Ana <span class="dt-chip__count">42</span></button>
   Etiqueta: <span class="dt-chip dt-chip--tag">NFC-e</span>
   Grupo: <div class="dt-chips" role="group" aria-label="…">…</div> */
.dt-chips { display: flex; flex-wrap: wrap; gap: var(--dt-space-2); }
.dt-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--dt-space-3); border: 1px solid var(--dt-border-strong); border-radius: var(--dt-radius-pill); background: var(--dt-surface-base); color: var(--dt-text-primary); font: 500 13px/18px var(--dt-font-sans); white-space: nowrap; cursor: pointer; transition: background-color var(--dt-duration-fast) var(--dt-ease), border-color var(--dt-duration-fast) var(--dt-ease); }
.dt-chip:hover { background: var(--dt-surface-subtle); }
.dt-chip:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-chip__check { display: none; }
.dt-chip__count { font-variant-numeric: tabular-nums; font-weight: 400; }
.dt-chip[aria-pressed="true"], .dt-chip.is-active { background: var(--dt-selection-strong); border-color: var(--dt-brand-blue); color: var(--dt-brand-blue); }
.dt-chip[aria-pressed="true"] .dt-chip__check, .dt-chip.is-active .dt-chip__check { display: inline-block; margin-left: -4px; }
.dt-chip--tag { height: 24px; padding: 0 10px; border-color: transparent; background: var(--dt-surface-subtle); font-size: 12px; line-height: 16px; cursor: default; }
.dt-chip--tag:hover { background: var(--dt-surface-subtle); }

/* 5. Modal de explicação (<dialog>) + botão "i".
   <button class="dt-info-btn" aria-label="Como ler este bloco" aria-haspopup="dialog"><svg class="dt-icon">…info</svg></button>
   <dialog class="dt-modal" aria-labelledby="m-t">
     <header class="dt-modal__head"><h2 class="dt-modal__title" id="m-t">…</h2><form method="dialog"><button class="dt-icon-btn" aria-label="Fechar">…x</button></form></header>
     <div class="dt-modal__body">…</div><footer class="dt-modal__foot">…</footer></dialog>
   Abrir: dialog.showModal(). Esc e o botão Fechar fecham sem JS extra. */
.dt-info-btn { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--dt-radius-pill); background: transparent; color: var(--dt-text-secondary); cursor: pointer; transition: background-color var(--dt-duration-fast) var(--dt-ease), color var(--dt-duration-fast) var(--dt-ease); }
.dt-info-btn:hover { background: var(--dt-selection-bg); color: var(--dt-brand-blue); }
.dt-info-btn:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-modal { width: min(560px, calc(100vw - 2 * var(--dt-space-4))); max-height: min(85vh, 720px); padding: 0; border: 1px solid var(--dt-border); border-radius: var(--dt-radius-lg); background: var(--dt-surface-base); color: var(--dt-text-primary); box-shadow: var(--dt-shadow-3); font: 400 14px/22px var(--dt-font-sans); overflow: hidden; }
.dt-modal[open] { display: flex; flex-direction: column; animation: dt-modal-in var(--dt-duration) var(--dt-ease); }
.dt-modal::backdrop { background: color-mix(in srgb, var(--dt-brand-navy-deep) 55%, transparent); }
@keyframes dt-modal-in { from { opacity: 0; transform: translateY(8px); } }
.dt-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--dt-space-3); padding: var(--dt-space-4) var(--dt-space-3) var(--dt-space-3) var(--dt-space-5); border-bottom: 1px solid var(--dt-divider); }
.dt-modal__head form { margin: 0; }
.dt-modal__title { margin: 0; font: 600 18px/26px var(--dt-font-display); }
.dt-modal__body { padding: var(--dt-space-4) var(--dt-space-5) var(--dt-space-5); overflow-y: auto; }
.dt-modal__body > :first-child { margin-top: 0; }
.dt-modal__body > :last-child { margin-bottom: 0; }
.dt-modal__body p, .dt-modal__body ul { margin: 0 0 var(--dt-space-3); }
.dt-modal__foot { display: flex; justify-content: flex-end; gap: var(--dt-space-2); padding: var(--dt-space-3) var(--dt-space-5); border-top: 1px solid var(--dt-divider); background: var(--dt-surface-base); }

/* 6. Elementos de manual */
/* "Resumo em um minuto": <section class="dt-summary-box" aria-labelledby="r1"><h2 class="dt-summary-box__title" id="r1"><svg class="dt-icon dt-icon--sm">…lightbulb</svg>Resumo em um minuto</h2><ul>…</ul></section> */
.dt-summary-box { padding: var(--dt-space-4) var(--dt-space-5); border: 1px solid var(--dt-selection-strong); border-radius: var(--dt-radius-md); background: var(--dt-selection-bg); color: var(--dt-text-primary); font: 400 15px/24px var(--dt-font-sans); }
.dt-summary-box__title { display: flex; align-items: center; gap: var(--dt-space-2); margin: 0 0 var(--dt-space-2); color: var(--dt-brand-blue); font: 600 13px/18px var(--dt-font-sans); letter-spacing: .04em; text-transform: uppercase; }
.dt-summary-box ul, .dt-summary-box ol { margin: 0; padding-left: 1.25em; }
.dt-summary-box li + li { margin-top: var(--dt-space-1); }
.dt-summary-box p { margin: 0 0 var(--dt-space-2); }
.dt-summary-box > :last-child { margin-bottom: 0; }

/* Passos numerados: <ol class="dt-steps"><li><p class="dt-steps__title">Abra o cadastro</p><p>…</p></li>…</ol> */
.dt-steps { list-style: none; margin: var(--dt-space-4) 0; padding: 0; counter-reset: dt-step; }
.dt-steps > li { position: relative; padding: 2px 0 var(--dt-space-5) 44px; counter-increment: dt-step; }
.dt-steps > li::before { content: counter(dt-step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--dt-radius-pill); background: var(--dt-brand-blue); color: var(--dt-text-on-primary); font: 600 13px/1 var(--dt-font-sans); font-variant-numeric: tabular-nums; }
.dt-steps > li::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--dt-border); }
.dt-steps > li:last-child { padding-bottom: 0; }
.dt-steps > li:last-child::after { display: none; }
.dt-steps p { margin: 0 0 var(--dt-space-2); }
.dt-steps > li > :last-child { margin-bottom: 0; }
.dt-steps__title { font-weight: 600; }

/* Caminho de menu do ERP: <span class="dt-erp-path" role="text" aria-label="Cadastros, Produto"><span>Cadastros</span><span>Produto</span></span> */
.dt-erp-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 0; vertical-align: baseline; font: 500 13px/18px var(--dt-font-sans); }
.dt-erp-path > span { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--dt-space-2); border: 1px solid var(--dt-border); border-radius: 4px; background: var(--dt-surface-subtle); color: var(--dt-text-primary); white-space: nowrap; }
.dt-erp-path > span + span { position: relative; margin-left: 18px; }
.dt-erp-path > span + span::before { content: "›" / ""; position: absolute; left: -19px; width: 18px; text-align: center; color: var(--dt-text-muted); font-weight: 600; }

/* Botão do ERP (desenhado, não clicável): <kbd class="dt-erp-button">Gravar</kbd> ou <span class="dt-erp-button"><svg class="dt-icon dt-icon--sm">…</svg>F2 Gravar</span> */
.dt-erp-button { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 var(--dt-space-2); vertical-align: baseline; border: 1px solid var(--dt-border-strong); border-bottom-width: 2px; border-radius: 3px; background: var(--dt-surface-subtle); box-shadow: inset 0 1px 0 var(--dt-surface-base); color: var(--dt-text-primary); font: 500 13px/18px var(--dt-font-sans); white-space: nowrap; }

/* Imagem de tela: <figure class="dt-figure"><img src alt width height><figcaption>…</figcaption></figure> */
.dt-figure { margin: var(--dt-space-5) 0; }
.dt-figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--dt-border); border-radius: var(--dt-radius-sm); background: var(--dt-surface-base); box-shadow: var(--dt-shadow-1); }
.dt-figure figcaption { margin-top: var(--dt-space-2); color: var(--dt-text-muted); font-size: 13px; line-height: 18px; }

/* Coluna de leitura: <article class="dt-doc"><h1>…</h1><p class="dt-doc__lead">…</p><h2 id>…</h2>…</article>
   h2 recebe número automático (1., 2., …); use .dt-doc--plain para desligar. */
.dt-doc { max-width: none; min-width: 0; color: var(--dt-text-primary); font: 400 16px/26px var(--dt-font-sans); counter-reset: dt-sec; }   /* largura toda (2026-10-27; antes 50rem) */
.dt-doc h1 { margin: 0 0 var(--dt-space-2); font: 700 32px/40px var(--dt-font-display); letter-spacing: -.01em; }
.dt-doc__lead { margin: 0 0 var(--dt-space-5); color: var(--dt-text-muted); font-size: 17px; line-height: 28px; }
.dt-doc h2 { margin: var(--dt-space-7) 0 var(--dt-space-3); font: 600 24px/32px var(--dt-font-display); counter-increment: dt-sec; scroll-margin-top: calc(var(--dt-header-height) + var(--dt-space-4)); }
.dt-doc:not(.dt-doc--plain) h2:not(.dt-summary-box__title)::before { content: counter(dt-sec) "."; margin-right: .4em; color: var(--dt-brand-blue); font-variant-numeric: tabular-nums; }
.dt-doc h2.dt-summary-box__title { counter-increment: none; margin: 0 0 var(--dt-space-2); font: 600 13px/18px var(--dt-font-sans); }
.dt-doc h3 { margin: var(--dt-space-6) 0 var(--dt-space-2); font: 600 18px/26px var(--dt-font-display); scroll-margin-top: calc(var(--dt-header-height) + var(--dt-space-4)); }
.dt-doc p, .dt-doc ul, .dt-doc ol:not(.dt-steps), .dt-doc .dt-callout, .dt-doc .dt-code, .dt-doc .dt-table-wrap { margin: 0 0 var(--dt-space-4); }
.dt-doc ul, .dt-doc ol:not(.dt-steps) { padding-left: 1.5em; }
.dt-doc li + li { margin-top: var(--dt-space-1); }
.dt-doc a { color: var(--dt-brand-blue); text-decoration: underline; text-underline-offset: 2px; }
.dt-doc a:hover { color: var(--dt-brand-blue-hover); }
.dt-doc a:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; border-radius: 2px; }
.dt-doc :not(pre) > code { padding: 1px 5px; border: 1px solid var(--dt-border); border-radius: 4px; background: var(--dt-surface-subtle); font: 400 .875em/1 var(--dt-font-mono); }
.dt-doc > pre { margin: 0 0 var(--dt-space-4); padding: var(--dt-space-3) var(--dt-space-4); overflow-x: auto; border: 1px solid var(--dt-border); border-radius: var(--dt-radius-sm); background: var(--dt-surface-subtle); font: 400 13px/20px var(--dt-font-mono); }
.dt-doc .dt-callout, .dt-doc .dt-code { max-width: none; }
.dt-doc .dt-summary-box { margin: 0 0 var(--dt-space-5); }
.dt-doc table:not(.dt-table) { width: 100%; border-collapse: collapse; margin: 0 0 var(--dt-space-4); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; background: var(--dt-surface-base); border: 1px solid var(--dt-border); }
.dt-doc table:not(.dt-table) th { text-align: left; padding: var(--dt-space-2) var(--dt-space-3); background: var(--dt-surface-subtle); color: var(--dt-text-muted); font-weight: 500; font-size: 13px; border-bottom: 1px solid var(--dt-border); }
.dt-doc table:not(.dt-table) td { padding: var(--dt-space-2) var(--dt-space-3); border-bottom: 1px solid var(--dt-divider); vertical-align: top; }
.dt-doc .dt-table-wrap > table { margin: 0; }
.dt-doc .dt-table-wrap { border: 1px solid var(--dt-border); border-radius: var(--dt-radius-sm); background: var(--dt-surface-base); }
.dt-doc .dt-table-wrap > table:not(.dt-table) { border: 0; }
@media (max-width: 767.98px) { .dt-doc { font-size: 15px; line-height: 24px; } .dt-doc h1 { font-size: 26px; line-height: 34px; } .dt-doc h2 { font-size: 21px; line-height: 28px; margin-top: var(--dt-space-6); } }

/* Sumário "Nesta página" + layout da coluna.
   <div class="dt-doc-layout">
     <nav class="dt-toc" aria-label="Nesta página"><details open><summary>Nesta página <svg class="dt-icon dt-icon--sm">…chevron-down</svg></summary>
       <ol><li><a href="#s1" aria-current="true">…</a></li>…</ol></details></nav>
     <article class="dt-doc">…</article></div>
   ≥1280px: sumário fixo à direita e sempre aberto. Menor: acima do conteúdo, recolhível.
   Item ativo: aria-current="true" (ou .is-active), marcado pelo script de rolagem. */
.dt-doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--dt-space-5); align-items: start; }
.dt-toc { min-width: 0; font: 400 14px/20px var(--dt-font-sans); }
.dt-toc details { border: 1px solid var(--dt-border); border-radius: var(--dt-radius-md); background: var(--dt-surface-base); }
.dt-toc summary { display: flex; align-items: center; justify-content: space-between; gap: var(--dt-space-2); min-height: 44px; padding: 0 var(--dt-space-4); color: var(--dt-text-primary); font: 600 13px/18px var(--dt-font-sans); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; list-style: none; border-radius: var(--dt-radius-md); }
.dt-toc summary::-webkit-details-marker { display: none; }
.dt-toc summary:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 2px; }
.dt-toc summary > .dt-icon { color: var(--dt-text-secondary); transition: transform var(--dt-duration-fast) var(--dt-ease); }
.dt-toc details[open] > summary > .dt-icon { transform: rotate(180deg); }
.dt-toc ol { list-style: none; margin: 0; padding: 0 var(--dt-space-4) var(--dt-space-4); }
.dt-toc li { margin: 0; }
.dt-toc li li a { padding-left: calc(var(--dt-space-3) + var(--dt-space-3)); font-size: 13px; }
.dt-toc ol ol { padding: 0; }
.dt-toc a { display: block; padding: 6px var(--dt-space-3); border-left: 2px solid var(--dt-border); color: var(--dt-text-muted); text-decoration: none; }
.dt-toc a:hover { color: var(--dt-brand-blue); }
.dt-toc a:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: -2px; border-radius: 2px; }
.dt-toc a[aria-current="true"], .dt-toc a[aria-current="location"], .dt-toc a.is-active { border-left-color: var(--dt-brand-blue); color: var(--dt-text-primary); font-weight: 600; }
@media (min-width: 1280px) {
  .dt-doc-layout { grid-template-columns: minmax(0, 1fr) 15rem; column-gap: var(--dt-space-7); }
  .dt-doc-layout > .dt-toc { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--dt-header-height) + var(--dt-space-5)); max-height: calc(100vh - var(--dt-header-height) - 2 * var(--dt-space-5)); overflow-y: auto; }
  .dt-doc-layout > .dt-doc { grid-column: 1; grid-row: 1; }
  .dt-toc details { border: 0; background: transparent; }
  .dt-toc details::details-content { content-visibility: visible; display: block; height: auto; }
  .dt-toc summary { min-height: 0; padding: 0 0 var(--dt-space-3); color: var(--dt-text-muted); pointer-events: none; }
  .dt-toc summary > .dt-icon { display: none; }
  .dt-toc ol { padding: 0; }
}

/* 7. Stat — número grande do resumo (sem variação).
   <div class="dt-stats"><div class="dt-stat"><p class="dt-stat__label">Atendimentos</p><p class="dt-stat__value">12.480</p><p class="dt-stat__note">no período</p></div>…</div> */
.dt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--dt-space-4); }
.dt-stat { display: flex; flex-direction: column; gap: var(--dt-space-1); min-width: 0; padding: var(--dt-space-4) var(--dt-space-5); background: var(--dt-surface-base); border: 1px solid var(--dt-border); border-radius: var(--dt-radius-md); box-shadow: var(--dt-shadow-1); }
.dt-stat__label { margin: 0; color: var(--dt-text-secondary); font: 500 13px/18px var(--dt-font-sans); }
.dt-stat__value { margin: 0; color: var(--dt-text-primary); font: 600 28px/36px var(--dt-font-sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.dt-stat__note { margin: 0; color: var(--dt-text-muted); font-size: 12px; line-height: 16px; }
@media (max-width: 1023.98px) { .dt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .dt-stats { gap: var(--dt-space-3); } .dt-stat { padding: var(--dt-space-3) var(--dt-space-4); } .dt-stat__value { font-size: 22px; line-height: 30px; } }

/* 8. State — linha de estado do bloco.
   <p class="dt-state" role="status"><svg class="dt-icon dt-icon--sm dt-spin">…refresh-cw</svg>Carregando…</p>
   Variantes: --error (circle-x), --empty (info). Some com [hidden] quando há dados. */
.dt-state { display: flex; align-items: center; gap: var(--dt-space-2); min-height: 24px; margin: var(--dt-space-3) 0 0; color: var(--dt-text-muted); font: 400 13px/18px var(--dt-font-sans); }
.dt-state[hidden] { display: none; }
.dt-state--error { color: var(--dt-danger-text); }
.dt-state--error .dt-icon { color: var(--dt-danger); }
.dt-state .dt-btn { margin-left: var(--dt-space-1); }

/* 9. Filterbar — filtro em linha (fica sobre surface-base).
   <form class="dt-filterbar" role="search">
     <label class="dt-field dt-field--compact"><span class="dt-field__label">De</span><span class="dt-field__control"><input type="date"></span></label> …Até…
     <div class="dt-filterbar__actions"><button class="dt-btn dt-btn--primary">Aplicar</button><button type="button" class="dt-btn dt-btn--secondary">Últimos 12 meses</button></div>
     <label class="dt-field dt-field--compact dt-filterbar__search">…<input type="search"></label></form> */
.dt-filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--dt-space-3) var(--dt-space-4); padding: var(--dt-space-4); background: var(--dt-surface-base); border: 1px solid var(--dt-border); border-radius: var(--dt-radius-md); box-shadow: var(--dt-shadow-1); }
.dt-filterbar--flat { padding: 0; background: transparent; border: 0; box-shadow: none; }
.dt-field--compact { min-width: 0; }
.dt-filterbar .dt-field { min-width: 0; flex: 0 1 auto; }
.dt-filterbar .dt-field__control input[type="date"] { min-width: 132px; font-variant-numeric: tabular-nums; }
.dt-filterbar__actions { display: flex; flex-wrap: wrap; gap: var(--dt-space-2); }
.dt-filterbar__search { flex: 1 1 220px; margin-left: auto; max-width: 360px; }
@media (max-width: 767.98px) {
  .dt-filterbar { padding: var(--dt-space-3); }
  .dt-filterbar .dt-field { flex: 1 1 140px; }
  .dt-filterbar__actions { flex: 1 1 100%; }
  .dt-filterbar__actions > .dt-btn { flex: 1 1 auto; }
  .dt-filterbar__search { flex-basis: 100%; max-width: none; margin-left: 0; }
}

/* 10. Card de bloco (sobre .dt-card).
   <section class="dt-card dt-card--block" aria-labelledby="b1">
     <header class="dt-card__head"><div><h2 class="dt-card__title" id="b1">Volume por mês</h2><p class="dt-card__note">…</p></div><div class="dt-card__actions"><button class="dt-info-btn">…</button></div></header>
     <div class="dt-card__body">…</div><p class="dt-state">…</p></section>
   Grade de blocos: <div class="dt-blocks"> (2 colunas; 1 abaixo de 768px; .dt-card--wide ocupa as duas). */
.dt-card--block { padding: var(--dt-space-5); min-width: 0; }
.dt-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--dt-space-3); }
.dt-card__head > div:first-child { min-width: 0; }
.dt-card__title { margin: 0; font: 600 18px/26px var(--dt-font-display); color: var(--dt-text-primary); }
.dt-card__note { margin: 2px 0 0; color: var(--dt-text-secondary); font-size: 13px; line-height: 18px; }
.dt-card__actions { display: flex; align-items: center; gap: var(--dt-space-2); flex: none; margin-top: -2px; }
.dt-card__body { margin-top: var(--dt-space-4); min-width: 0; }
.dt-card__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--dt-space-2) var(--dt-space-3); margin-top: var(--dt-space-4); }
.dt-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--dt-space-4); }
.dt-blocks > .dt-card--wide { grid-column: 1 / -1; }
@media (max-width: 767.98px) { .dt-card--block { padding: var(--dt-space-4); } .dt-blocks { grid-template-columns: minmax(0, 1fr); } }

/* 11. Cabeçalho público — só na home sem login (/): marca + seletor de tema. Nas páginas com login o cabeçalho é o .dt-header do shell.
   <header class="dt-public-header"><div class="dt-public-header__inner">
     <a class="dt-public-header__brand" href="/"><img class="dt-only-light" src="/assets/brand/datanis-wordmark-only-color.svg" alt="Datanis"><img class="dt-only-dark" src="/assets/brand/datanis-wordmark-only-white.svg" alt="Datanis"></a>
     <div class="dt-public-header__actions"><div class="dt-theme" role="radiogroup" aria-label="Tema">…</div></div></div></header>
   Conteúdo da home: <main id="conteudo" class="dt-page">. */
.dt-public-header { position: sticky; top: 0; z-index: 40; background: var(--dt-surface-base); border-bottom: 1px solid var(--dt-border); }
.dt-public-header__inner { display: flex; align-items: center; gap: var(--dt-space-4); height: var(--dt-header-height); max-width: var(--dt-content-max); margin: 0 auto; padding: 0 var(--dt-space-5); }
.dt-public-header__brand { display: inline-flex; align-items: center; flex: none; border-radius: var(--dt-radius-sm); }
.dt-public-header__brand img { height: 26px; width: auto; }
.dt-public-header__brand:focus-visible { outline: 2px solid var(--dt-focus-ring); outline-offset: 4px; }
.dt-public-header__actions { display: flex; align-items: center; gap: var(--dt-space-2); margin-left: auto; }
@media (max-width: 767.98px) {
  .dt-public-header__inner { padding: 0 var(--dt-space-4); gap: var(--dt-space-3); }
  .dt-public-header__brand img { height: 22px; }
}

/* Ajustes de encaixe dentro da coluna de leitura (evitam que .dt-doc p sobrescreva os componentes) */
.dt-doc .dt-callout p.dt-callout__title { margin: 0 0 2px; }
.dt-doc .dt-callout p.dt-callout__body { margin: 0; }
.dt-doc .dt-steps p { margin: 0 0 var(--dt-space-2); }
.dt-doc .dt-steps p.dt-steps__title { margin-bottom: 2px; }
.dt-doc .dt-steps > li > :last-child, .dt-doc .dt-summary-box > :last-child, .dt-doc .dt-summary-box li > :last-child { margin-bottom: 0; }
.dt-doc .dt-summary-box ul, .dt-doc .dt-summary-box ol { padding-left: 1.25em; margin: 0; }
.dt-doc figure.dt-figure { margin: var(--dt-space-5) 0; }
.dt-state { flex-wrap: wrap; }
