/* =====================================================================
   DallyX | Funcionar.ia Virtual · identidade visual do Painel do Agente IA v2
   Base: quadro de tarefas DallyX (tokens, cartões coloridos, tabelas com
   cabeçalho destacado) + cabeçalho no padrão da gerência (barra preta
   compacta, logo, divisória e nome do produto, menu lateral com ícones).
   Temas: DallyX (escuro, padrão), Claro e Personalizado (gerado pelo núcleo).
   No escuro há três camadas nítidas: página, cartão e cabeçalho de tabela,
   com linhas em tom próprio e bordas visíveis.
   ===================================================================== */

/* ---------- tokens: tema DallyX (escuro) ---------- */
:root {
  color-scheme: dark;
  --page: #2c2a2a;            /* 1ª camada: fundo da página */
  --surface: #181818;         /* 2ª camada: cartões, menu, barras */
  --table-heading: #22313f;   /* 3ª camada: cabeçalho de tabela e de cartão */
  --table-heading-text: #d7ecfb;
  --row: #1f1f1f;             /* linhas e campos dentro do cartão */
  --row-alt: #242424;
  --hover: #262c31;
  --surface-control: #262626;
  --surface-sunken: #121212;
  --text: #eeedea;
  --text-secondary: #cec8c0;
  --text-muted: #9a958e;
  --line: #3d3b39;
  --line-soft: #2f2e2d;
  --brand: #00a3ff;
  --link: #5fc4ff;
  --accent: #172e40;
  --selection: #1c2c3e;
  --primary-foreground: #021522;
  --switch-off: #3b3b3b;
  --danger-text: #ffa4a4; --danger-surface: #3d2326; --danger-line: #79424b;
  --success-text: #82d6b0; --success-surface: #183a2c; --success-line: #2e6b50;
  --warning-text: #e9bd75; --warning-surface: #3c3020; --warning-line: #79613c;
  --context-text: #d5b7f2; --context-surface: #2b2334; --context-line: #675477;
  --sombra: 0 10px 30px #00000055, 0 2px 6px #00000033;
  --sombra-leve: 0 4px 12px #00000030;
  --raio: 12px;
  --topo: 56px;
  --menu: 248px;
  --fonte: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* ---------- tema Claro ---------- */
:root[data-theme=light] {
  color-scheme: light;
  --page: #e9eef4;
  --surface: #ffffff;
  --table-heading: #dde8f3;
  --table-heading-text: #1d3650;
  --row: #ffffff;
  --row-alt: #f7f9fc;
  --hover: #eef6fd;
  --surface-control: #f6f8fb;
  --surface-sunken: #f1f4f8;
  --text: #172433;
  --text-secondary: #34465b;
  --text-muted: #596b80;
  --line: #c9d3df;
  --line-soft: #e3e9f0;
  --link: #006cae;
  --accent: #e2f2ff;
  --selection: #d4ecff;
  --switch-off: #c5cfda;
  --danger-text: #b73545; --danger-surface: #fff0f2; --danger-line: #eab6bf;
  --success-text: #16774e; --success-surface: #e6f5ed; --success-line: #a9d9bf;
  --warning-text: #97620e; --warning-surface: #fff4dc; --warning-line: #e3cb98;
  --context-text: #725086; --context-surface: #f4eef8; --context-line: #cbb8d9;
  --sombra: 0 10px 30px #243e5a14, 0 2px 6px #243e5a0d;
  --sombra-leve: 0 4px 12px #243e5a12;
}
/* O tema Personalizado é injetado pelo núcleo em :root[data-theme=custom]. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--fonte); background: var(--page); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; overflow-x: hidden; }
body.sem-rolagem { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--link); }
svg { flex-shrink: 0; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- botões ---------- */
.primary { background: var(--brand); color: var(--primary-foreground); border: 0; border-radius: 9px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; font-size: 14px; font-weight: 700; transition: filter .16s, box-shadow .16s; white-space: nowrap; }
.primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 3px 12px #00a3ff40; }
.primary.pequeno { min-height: 34px; padding: 0 12px; font-size: 13px; }
.secondary { border: 1px solid var(--line); color: var(--text); background: var(--surface-control); border-radius: 8px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.secondary:hover:not(:disabled) { background: var(--accent); border-color: var(--brand); }
.danger-btn { background: #d9473f; color: #fff; border: 0; border-radius: 9px; min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; font-weight: 700; }
.danger-btn:hover:not(:disabled) { filter: brightness(1.08); }
.icon-button { background: transparent; border: 1px solid transparent; color: var(--text-secondary); border-radius: 8px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.icon-button:hover:not(:disabled) { background: var(--accent); color: var(--link); border-color: var(--line); }
.control-button { background: var(--surface-control); border: 1px solid var(--line); color: var(--text-secondary); border-radius: 8px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.control-button:hover:not(:disabled) { background: var(--accent); border-color: var(--brand); }
.control-button.active { color: var(--warning-text); background: var(--warning-surface); border-color: var(--warning-line); }
.add-linha { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px dashed var(--line); color: var(--link); border-radius: 8px; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 700; }
.add-linha:hover { background: var(--accent); border-color: var(--brand); }

/* ---------- campos de formulário ---------- */
.inp, .sel, .txt { background: var(--surface-control); border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 100%; min-width: 0; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.inp, .sel { height: 38px; padding: 0 11px; }
.sel { padding-right: 28px; text-overflow: ellipsis; }
.txt { min-height: 86px; padding: 10px 12px; line-height: 1.55; resize: vertical; display: block; }
.txt.curta { min-height: 56px; }
.inp:focus, .sel:focus, .txt:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px #00a3ff33; }
.inp::placeholder, .txt::placeholder { color: var(--text-muted); opacity: .85; }
[aria-invalid=true] { border-color: var(--danger-line) !important; background: var(--danger-surface) !important; }
.inp-un { display: flex; align-items: stretch; width: 100%; }
.inp-un > span { display: inline-flex; align-items: center; padding: 0 10px; background: var(--surface-sunken); border: 1px solid var(--line); color: var(--text-secondary); font-size: 13px; font-weight: 700; white-space: nowrap; }
.inp-un > .inp { border-radius: 0 8px 8px 0; }
.inp-un > span:first-child { border-radius: 8px 0 0 8px; border-right: 0; }
.inp-un > span:last-child:not(:first-child) { border-radius: 0 8px 8px 0; border-left: 0; }
.inp-un:not(.antes) > .inp { border-radius: 8px 0 0 8px; }
input[type=time].inp { padding-right: 6px; }

/* interruptor (sim ou não): pequeno, natural, sem caixa grande */
.chave-sn { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.chave-sn input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.chave-sn .trilho { position: absolute; inset: 0; border-radius: 999px; background: var(--switch-off); border: 1px solid var(--line); transition: background-color .15s, border-color .15s; }
.chave-sn .trilho::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0005; transition: transform .16s; }
.chave-sn input:checked + .trilho { background: var(--brand); border-color: var(--brand); }
.chave-sn input:checked + .trilho::after { transform: translateX(14px); }
.chave-sn input:focus-visible + .trilho { outline: 2px solid var(--brand); outline-offset: 2px; }
.chave-sn input:disabled { cursor: default; }
.chave-sn input:disabled + .trilho { opacity: .5; }
.sn-compacto { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.sn-valor { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); min-width: 28px; }
.chave-sn:has(input:checked) + .sn-valor, .sn-compacto:has(input:checked) .sn-valor { color: var(--success-text); }

/* ---------- selos ---------- */
.selo { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1.2; border: 1px solid var(--line); color: var(--text-secondary); background: var(--surface-sunken); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.selo-obrig { color: var(--danger-text); background: var(--danger-surface); border-color: var(--danger-line); }
.selo-ok { color: var(--success-text); background: var(--success-surface); border-color: var(--success-line); }
.selo-trava, .selo-pend { color: var(--warning-text); background: var(--warning-surface); border-color: var(--warning-line); }
.selo-pedido, .selo-segmento { color: var(--link); background: var(--accent); border-color: transparent; }
.selo-oculto, .selo-tecnico { color: var(--context-text); background: var(--context-surface); border-color: var(--context-line); }
.selo-mono { font-family: var(--mono); font-weight: 500; font-size: 11px; }
.selo-link { cursor: pointer; color: var(--link); background: var(--accent); border-color: transparent; }
.selo-link:hover { border-color: var(--brand); }
.selo-previa { background: #ffd34d; color: #2b2100; border: 0; font-size: 10.5px; letter-spacing: .06em; flex: none; overflow: visible; }
.selos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- cabeçalho (padrão gerência) ---------- */
.topo { position: sticky; top: 0; z-index: 50; height: var(--topo); display: flex; align-items: center; gap: 12px; padding: 0 14px 0 8px; background: #000; color: #f2f2f2; border-bottom: 1px solid #262626; }
.topo-botao { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9px; border: 0; background: transparent; color: #e6e6e6; flex: none; }
.topo-botao:hover { background: #1c1c1c; color: #fff; }
.topo-conta-botao { display: none; }
.marca { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; flex: none; }
.marca-logo { height: 20px; width: auto; display: block; }
.marca-divisoria { width: 1px; height: 26px; background: #4a4a4a; flex: none; }
.marca-nome { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; color: #fff; }
.topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topo-loja { display: flex; align-items: center; gap: 8px; color: #bdbdbd; min-width: 0; }
.topo-loja.estatica span { color: #fff; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.topo-select { height: 34px; max-width: 250px; min-width: 180px; background: #161616; color: #fff; border: 1px solid #383838; border-radius: 8px; padding: 0 28px 0 10px; font-size: 13px; font-weight: 700; }
.topo-select:focus { border-color: var(--brand); outline: none; }
.topo .selo-segmento { background: #0d2a3f; color: #8fd6ff; }
.topo-chave { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 8px; border-radius: 8px; border: 1px solid #2c2c2c; background: #111; color: #d9d9d9; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; position: relative; }
.topo-chave input { position: absolute; opacity: 0; width: 34px; height: 20px; margin: 0; cursor: pointer; z-index: 1; }
.topo-chave .trilho { position: relative; width: 30px; height: 18px; border-radius: 999px; background: #3a3a3a; flex: none; transition: background-color .15s; }
.topo-chave .trilho::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .16s; }
.topo-chave input:checked + .trilho { background: var(--brand); }
.topo-chave input:checked + .trilho::after { transform: translateX(12px); }
.topo-chave input:focus-visible + .trilho { outline: 2px solid var(--brand); outline-offset: 2px; }
.topo-chave.ligado { border-color: #1d5f86; background: #0c1d29; color: #fff; }
.topo-chave:has(input:disabled) { opacity: .5; cursor: default; }
.topo-conta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topo-email { display: inline-flex; align-items: center; gap: 6px; color: #a8a8a8; font-size: 12.5px; min-width: 0; }
.topo-email span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.topo-sair { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid #2c2c2c; background: #111; color: #e6e6e6; font-size: 12.5px; font-weight: 700; }
.topo-sair:hover { background: #1c1c1c; color: #fff; }

/* seletor de tema */
.tema-botoes { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; flex: none; }
.tema-botoes button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; min-width: 30px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.tema-botoes button span { display: none; }
.tema-botoes.com-rotulos button span { display: inline; }
.tema-botoes.com-rotulos button { padding: 0 10px; }
.tema-botoes button[aria-pressed=true] { background: var(--accent); color: var(--link); font-weight: 700; }
.tema-botoes button:hover { color: var(--text); background: var(--surface-control); }
.tema-botoes .tema-config { border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; }
.topo .tema-botoes { background: #111; border-color: #2c2c2c; }
.topo .tema-botoes button { color: #9c9c9c; }
.topo .tema-botoes button[aria-pressed=true] { background: #0d2a3f; color: #8fd6ff; }
.topo .tema-botoes button:hover { background: #1c1c1c; color: #fff; }
.topo .tema-botoes .tema-config { border-color: #2c2c2c; }

/* ---------- casca: menu lateral + conteúdo ---------- */
.casca { display: grid; grid-template-columns: var(--menu) minmax(0, 1fr); min-height: calc(100vh - var(--topo)); }
.menu-lateral { position: sticky; top: var(--topo); height: calc(100vh - var(--topo)); overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px 12px; display: flex; flex-direction: column; scrollbar-width: thin; }
.menu-nav { display: flex; flex-direction: column; gap: 2px; }
.menu-area { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 700; }
.menu-area:hover { background: var(--hover); }
.menu-area.atual { background: var(--accent); color: var(--link); }
.menu-itens { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 10px 18px; padding-left: 8px; border-left: 1px solid var(--line); }
.menu-item { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 9px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 500; position: relative; }
.menu-item:hover { background: var(--hover); color: var(--text); }
.menu-item.atual { background: var(--selection); color: var(--text); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.menu-item.atual svg { color: var(--link); }
.menu-rotulo { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-contador { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e5534b; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.menu-contador.busca { background: var(--brand); color: var(--primary-foreground); }
.menu-ponto { width: 8px; height: 8px; border-radius: 50%; background: #e07b18; flex: none; }
.menu-rodape { margin-top: auto; padding: 14px 10px 2px; display: flex; flex-direction: column; color: var(--text-muted); font-size: 11.5px; }
.menu-rodape small { font-size: 11px; opacity: .8; }
body.menu-recolhido { --menu: 66px; }
body.menu-recolhido .menu-lateral { padding-inline: 8px; }
body.menu-recolhido .menu-rotulo, body.menu-recolhido .menu-rodape { display: none; }
body.menu-recolhido .menu-area, body.menu-recolhido .menu-item { justify-content: center; padding-inline: 0; }
body.menu-recolhido .menu-itens { margin-left: 0; padding-left: 0; border-left: 0; }
body.menu-recolhido .menu-contador { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
body.menu-recolhido .menu-ponto { position: absolute; bottom: 5px; right: 8px; }
.gaveta-fundo { display: none; }

.conteudo { min-width: 0; padding: 24px 28px 110px; outline: none; }
.area-conteudo { min-width: 0; }
.tela { max-width: 1120px; margin: 0 auto; }

/* faixas de aviso (ver como cliente, modo técnico) */
.faixa { max-width: 1120px; margin: 0 auto 18px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; border: 1px solid; }
.faixa > span { flex: 1; min-width: 0; }
.faixa-cliente { background: var(--warning-surface); border-color: var(--warning-line); color: var(--warning-text); }
.faixa-tecnico { background: var(--context-surface); border-color: var(--context-line); color: var(--context-text); }
.faixa-botao { border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 8px; padding: 6px 11px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.faixa-botao:hover { background: #ffffff14; }

/* ---------- cabeçalho da tela ---------- */
.tela-cabeca { text-align: center; padding: 6px 0 4px; }
.sobretitulo { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0; color: var(--link); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sobretitulo .selo { text-transform: none; letter-spacing: 0; }
.tela-titulo { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 8px; line-height: 1.15; }
.tela-intro { max-width: 760px; margin: 0 auto; color: var(--text-secondary); font-size: 14.5px; line-height: 1.6; }
.tela-intro b { color: var(--text); }
.tela-acoes { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* cartões-resumo coloridos (quadro de tarefas) */
.resumo { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 22px 0 20px; }
.summary-card { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 178px; min-height: 70px; padding: 14px 18px; border: 0; border-radius: 12px; color: #fff; text-align: center; box-shadow: var(--sombra-leve); font: inherit; }
button.summary-card { cursor: pointer; transition: transform .12s, filter .12s; }
button.summary-card:hover { transform: translateY(-1px); filter: brightness(1.07); }
.summary-card strong { font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-card span { font-size: 13px; font-weight: 700; line-height: 1.3; text-align: left; }
.sc-azul { background: #3d8af7; } .sc-cinza { background: #6f6a65; } .sc-vermelho { background: #e5534b; } .sc-verde { background: #3c9f5f; } .sc-laranja { background: #e07b18; }

/* barra com busca e ESSENCIAL | COMPLETO */
.barra-ferramentas { position: sticky; top: calc(var(--topo) + 8px); z-index: 20; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 10px 12px; margin-bottom: 16px; box-shadow: var(--sombra-leve); }
.busca { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 9px; color: var(--text-muted); width: min(440px, 100%); }
.busca:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px #00a3ff26; }
.busca input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; font-size: 14px; color: var(--text); }
.busca.pequena { height: 32px; width: min(260px, 100%); }
.nivel { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-sunken); }
.nivel button { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-secondary); font-size: 12.5px; letter-spacing: .07em; }
.nivel button:hover { color: var(--text); background: var(--surface-control); }
.nivel button.ativo { background: var(--brand); color: var(--primary-foreground); }
.nivel-qtd { min-width: 22px; height: 19px; padding: 0 6px; border-radius: 10px; background: #ffffff1f; font-size: 11px; font-weight: 800; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; }
:root[data-theme=light] .nivel button:not(.ativo) .nivel-qtd { background: #17243312; }

/* ---------- seção ---------- */
.secao-cabeca { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); margin-bottom: 14px; }
.secao-icone { width: 44px; height: 44px; border-radius: 11px; background: var(--accent); color: var(--link); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.secao-cabeca h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.secao-cabeca p { margin: 2px 0 0; color: var(--text-secondary); font-size: 13.5px; }
.secao-conta { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-muted); white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--surface-sunken); border: 1px solid var(--line); }
.busca-outras { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: -2px 0 14px; color: var(--text-muted); font-size: 12.5px; }

.bloco { margin-bottom: 20px; }
.bloco-cabeca { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 6px 0 12px; text-align: center; }
.bloco-cabeca h3 { display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 999px; background: var(--accent); color: var(--link); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.bloco-segmento .bloco-cabeca h3 { background: var(--context-surface); color: var(--context-text); }
.bloco-cabeca span { color: var(--text-muted); font-size: 12.5px; }

/* cartão de grupo: cabeçalho destacado (3ª camada) e linhas (campos) */
.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); overflow: hidden; margin-bottom: 14px; box-shadow: var(--sombra-leve); }
.cartao-cabeca { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--table-heading); color: var(--table-heading-text); border-bottom: 1px solid var(--line); }
.cartao-cabeca h4 { font-size: 14.5px; font-weight: 800; }
.cartao-conta { font-size: 12px; font-weight: 600; opacity: .85; }
.conta-falta { color: var(--danger-text); }
:root[data-theme=dallyx] .conta-falta, :root:not([data-theme]) .conta-falta { color: #ffb4ae; }
.cartao-corpo { background: var(--row); }

.campo { padding: 16px 18px; border-top: 1px solid var(--line-soft); background: var(--row); position: relative; min-width: 0; }
.cartao-corpo > .campo:first-child, .cartao-corpo > .grade-sn:first-child + .campo { border-top-color: var(--line-soft); }
.cartao-corpo > :first-child { border-top: 0; }
.campo.mudou { box-shadow: inset 3px 0 0 #e07b18; }
.campo.erro { box-shadow: inset 3px 0 0 #e5534b; }
.campo-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.campo-titulo { font-size: 14.5px; font-weight: 800; color: var(--text); line-height: 1.35; }
.campo-ajuda { margin: 5px 0 0; font-size: 13px; color: var(--text-secondary); line-height: 1.55; max-width: 880px; }
.campo-entrada { margin-top: 10px; min-width: 0; }
.campo-exemplo { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; max-width: 880px; white-space: pre-line; }
.campo-exemplo b { color: var(--text-secondary); }
.campo.w-curto .campo-entrada > .inp, .campo.w-curto .campo-entrada > .sel, .campo.w-curto .campo-entrada > .inp-un { max-width: 240px; }
.campo.w-medio .campo-entrada > .inp, .campo.w-medio .campo-entrada > .sel, .campo.w-medio .campo-entrada > .inp-un { max-width: 520px; }
.msg-erro { color: var(--danger-text); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.msg-erro:empty { display: none; }

/* campos curtos lado a lado */
.linha-curtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); border-top: 1px solid var(--line-soft); }
.cartao-corpo > .linha-curtos:first-child { border-top: 0; }
.linha-curtos > .campo { border-top: 0; }
.linha-curtos > .campo + .campo { border-left: 1px solid var(--line-soft); }

/* sim ou não: grade compacta de 2 ou 3 colunas, antes dos textos */
.grade-sn { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; padding: 14px 18px; background: var(--row-alt); border-top: 1px solid var(--line-soft); }
.grade-sn.compacta { padding: 0; background: transparent; border: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.sn-item { background: var(--row); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.grade-sn.compacta .sn-item { background: var(--surface-control); padding: 8px 10px; }
.sn-item.mudou { box-shadow: inset 3px 0 0 #e07b18; }
.sn-linha { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.sn-titulo { font-size: 13.5px; font-weight: 700; line-height: 1.35; min-width: 0; }
.sn-ajuda { margin: 6px 0 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.sn-item .selos { margin-top: 6px; }
.sn-linha:has(input:checked) .sn-valor { color: var(--success-text); }

/* objeto (vários dados num campo só) */
.objeto { display: flex; flex-direction: column; gap: 12px; }
.objeto .linha-curtos { display: flex; flex-wrap: wrap; gap: 12px 16px; border: 0; }
.sub { min-width: 0; }
.sub.w-curto { flex: 0 1 240px; }
.sub.w-medio { max-width: 520px; }
.sub-rotulo { display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }

/* listas */
.lista-ed { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.lista-linha { display: flex; align-items: center; gap: 8px; }
.lista-num { width: 22px; text-align: center; color: var(--text-muted); font-size: 12px; font-weight: 700; flex: none; }
.lista-ed.w-curto .lista-linha > .inp, .lista-ed.w-curto .lista-linha > .sel { max-width: 240px; }
.lista-ed.w-medio .lista-linha > .inp, .lista-ed.w-medio .lista-linha > .sel { max-width: 520px; }
.lista-ed > .add-linha { align-self: flex-start; margin-left: 30px; }

/* dados técnicos (só master com modo técnico) */
.dados-tecnicos { border: 1px dashed var(--context-line); background: var(--context-surface); border-radius: 10px; padding: 8px 12px; margin-top: 10px; }
.dados-tecnicos summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--context-text); font-size: 12.5px; font-weight: 800; }
.dados-tecnicos summary small { font-weight: 500; opacity: .85; }
.dados-tecnicos dl { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 6px 14px; margin: 10px 0 2px; font-size: 12.5px; }
.dados-tecnicos dt { font-weight: 700; color: var(--text-secondary); }
.dados-tecnicos dd { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--text); overflow-wrap: anywhere; }

/* referência e informação (só leitura) */
.ref-cartao { background: var(--context-surface); border: 1px solid var(--context-line); border-radius: 10px; padding: 12px 14px; }
.ref-cartao p { margin: 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.ref-cartao small { display: block; margin-top: 8px; color: var(--context-text); font-size: 12px; font-weight: 700; }
.info-cartao { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-radius: 10px; background: var(--surface-sunken); border: 1px solid var(--line); }
.info-cartao strong { font-size: 26px; font-weight: 800; color: var(--link); font-variant-numeric: tabular-nums; }
.info-cartao small { color: var(--text-muted); width: 100%; }

/* ---------- tabelas (cabeçalho destacado, linhas em tom próprio) ---------- */
.grade-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.grade-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; background: var(--surface-sunken); border-bottom: 1px solid var(--line); }
.grade-conta { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.grade-topo .add-linha { margin-left: auto; }
.grade-rolagem { overflow-x: auto; }
table.grade { width: 100%; border-collapse: separate; border-spacing: 0; }
table.grade.grade-compacta { width: auto; min-width: min(100%, 520px); }
table.grade.grade-compacta .col-curto { width: 190px; }
table.grade th { background: var(--table-heading); color: var(--table-heading-text); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grade td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); background: var(--row); vertical-align: top; }
table.grade tbody tr:nth-child(even) td { background: var(--row-alt); }
table.grade tbody tr:hover td { background: var(--hover); }
table.grade tbody tr:last-child td { border-bottom: 0; }
table.grade tr.alterada td:first-child { box-shadow: inset 3px 0 0 #e07b18; }
table.grade tr.nova td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
table.grade tr.travada td { opacity: .8; }
table.grade td .inp, table.grade td .sel { height: 34px; }
table.grade td .txt { min-height: 60px; }
.col-curto { min-width: 120px; width: 170px; }
.col-medio { min-width: 170px; }
.col-total, .col-longa { min-width: 260px; width: 45%; }
.col-sn { width: 96px; white-space: nowrap; }
.col-acao { width: 46px; text-align: center; }
.cadeado { color: var(--text-muted); display: inline-flex; padding: 8px; }
.grade-vazia { padding: 18px; text-align: center; color: var(--text-muted); font-size: 13px; }
.grade-rodape { padding: 10px; text-align: center; border-top: 1px solid var(--line-soft); }

/* ---------- respostas da loja ---------- */
.base-resumo { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.base-topo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.base-topo .busca { width: min(360px, 100%); }
.base-topo .sel { width: auto; max-width: 260px; }
.base-grupo { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.base-grupo summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; background: var(--table-heading); color: var(--table-heading-text); }
.base-grupo summary::-webkit-details-marker { display: none; }
.base-grupo summary > svg:first-child { transition: transform .15s; transform: rotate(-90deg); }
.base-grupo[open] summary > svg:first-child { transform: none; }
.base-grupo summary small { margin-left: auto; font-size: 12px; opacity: .85; }
.base-grupo.g-objecao summary { color: var(--warning-text); }
.base-corpo { padding: 10px; display: grid; gap: 10px; background: var(--row-alt); }
.resp { background: var(--row); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px; }
.resp.objecao { border-left: 3px solid #e07b18; }
.resp.inativa { opacity: .62; }
.resp.alterada { box-shadow: inset 3px 0 0 #e07b18; }
.resp.nova { border-color: var(--brand); }
.resp-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.resp-id { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--surface-sunken); border: 1px solid var(--line); color: var(--text-secondary); }
.resp-topo .sel { width: 140px; }
.resp-topo .inp { width: 190px; }
.resp-textos { display: grid; gap: 6px; }
.resp-rotulo { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.contador { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.contador.passou { color: var(--danger-text); font-weight: 800; }

/* ---------- barra de salvar ---------- */
#loja-salvar { position: sticky; bottom: 14px; z-index: 30; }
.barra-salvar { position: relative; margin: 18px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--brand); border-radius: var(--raio); padding: 11px 14px 11px 16px; box-shadow: var(--sombra); }
.barra-salvar-texto { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-secondary); }
.barra-salvar-texto b { color: var(--text); }
.barra-salvar-texto .outras { color: var(--text-muted); }
.barra-salvar-acoes { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- estados ---------- */
.carregando, .carregando-tela { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-muted); padding: 70px 20px; text-align: center; }
.carregando-tela { min-height: 100vh; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.estado-vazio { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 44px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--raio); color: var(--text-secondary); max-width: 1120px; margin: 0 auto; }
.estado-vazio strong { color: var(--text); font-size: 16px; }
.estado-vazio .primary { margin-top: 8px; }
.estado-vazio.pequeno { padding: 28px 18px; }

/* ---------- diálogos ---------- */
.sobreposicao { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: #000000a0; }
.dialogo { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sombra); overflow: hidden; }
.dialogo.largo { width: min(780px, 100%); }
.dialogo-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px 20px; border-bottom: 1px solid var(--line); background: var(--table-heading); color: var(--table-heading-text); }
.dialogo-topo h2 { font-size: 18px; font-weight: 800; }
.dialogo-topo p { margin: 3px 0 0; font-size: 13px; opacity: .85; }
.dialogo-topo .icon-button { color: inherit; }
.dialogo-corpo { padding: 16px 20px; overflow-y: auto; }
.dialogo-rodape { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-sunken); }
.dialogo-texto { margin: 0 0 10px; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.confirma p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.confirma-digitar { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; font-size: 13.5px; }
.mud { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.mud:first-of-type { border-top: 0; }
.mud h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.mud ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.antes { color: var(--danger-text); }
.depois { color: var(--success-text); }
.seta { color: var(--text-muted); }
.aviso-pedido { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--warning-surface); border: 1px solid var(--warning-line); color: var(--warning-text); font-size: 13px; margin: 12px 0 0; }
.erro-salvar { margin-top: 12px; padding: 12px; border-radius: 10px; border: 1px solid var(--danger-line); background: var(--danger-surface); color: var(--danger-text); font-size: 13.5px; }
.erro-salvar p { margin: 0 0 8px; }
.salvo { text-align: center; }
.salvo-icone { width: 58px; height: 58px; margin: 4px auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--success-surface); color: var(--success-text); border: 1px solid var(--success-line); }
.salvo p { margin: 0 0 8px; color: var(--text-secondary); line-height: 1.55; }
.salvo-lista { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.salvo-lista li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--row-alt); border: 1px solid var(--line-soft); font-size: 13.5px; }
.salvo-lista svg { color: var(--success-text); margin-top: 2px; }
.cores-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cores-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.cor-item { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.cor-item > div { display: flex; gap: 6px; }
.cor-item input[type=color] { width: 42px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-control); flex: none; cursor: pointer; }

/* ---------- avisos (toasts) ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); box-shadow: var(--sombra); font-size: 13.5px; line-height: 1.45; }
.toast > div { flex: 1; }
.toast.ok { border-left-color: #3c9f5f; } .toast.ok > svg { color: var(--success-text); }
.toast.erro { border-left-color: #e5534b; } .toast.erro > svg { color: var(--danger-text); }
.toast-fechar { background: transparent; border: 0; color: var(--text-muted); padding: 2px; display: inline-flex; }

/* ---------- entrada (login) ---------- */
.auth-pagina { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 18px 32px; position: relative; }
.auth-tema { position: absolute; top: 18px; right: 18px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--sombra); }
.auth-marca { display: flex; align-items: center; justify-content: center; gap: 14px; margin: -30px -30px 26px; padding: 24px 20px; background: #000; border-radius: 17px 17px 0 0; }
.auth-marca img { height: 22px; width: auto; }
.auth-marca .marca-nome { font-size: 17px; }
.auth-titulo { display: flex; align-items: center; gap: 10px; color: var(--brand); }
.auth-titulo h1 { color: var(--text); font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.auth-texto { margin: 10px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.auth-card label { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--text-secondary); }
.auth-card input { height: 44px; width: 100%; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-sunken); color: var(--text); font-size: 15px; }
.auth-card input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px #00a3ff33; }
.senha-campo { position: relative; }
.senha-campo input { padding-right: 48px; }
.senha-ver { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.senha-ver:hover { color: var(--link); background: var(--accent); }
.auth-enviar { width: 100%; min-height: 44px; font-size: 15px; }
.auth-link { background: none; border: 0; padding: 0; color: var(--link); font-size: 13.5px; font-weight: 600; }
.auth-link:hover, .auth-rodape a:hover { text-decoration: underline; }
.auth-esqueci { align-self: flex-end; margin-top: -6px; }
.auth-rodape { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; color: var(--text-muted); font-size: 13.5px; }
.auth-rodape a { font-weight: 700; text-decoration: none; }
.auth-aviso { margin-top: 16px; padding: 12px; border-radius: 8px; border: 1px solid var(--warning-line); background: var(--warning-surface); color: var(--warning-text); font-size: 13.5px; line-height: 1.55; }
.auth-erro { padding: 12px; border-radius: 8px; border: 1px solid var(--danger-line); background: var(--danger-surface); color: var(--danger-text); font-size: 13.5px; line-height: 1.55; }
.auth-ok { margin: 18px 0; color: var(--success-text); font-size: 14px; line-height: 1.6; }
.auth-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.auth-dono { margin: 18px 0 0; color: var(--text-muted); font-size: 12px; }

/* ---------- responsivo ---------- */
@media (max-width: 1440px) {
  .topo .selo-segmento { display: none; }
  .topo-email span { display: none; }
  .topo-email { width: 30px; height: 34px; justify-content: center; cursor: help; }
}
@media (min-width: 1181px) and (max-width: 1320px) {
  .topo-chave-texto { font-size: 12px; }
  .topo-select { max-width: 200px; }
  .marca-nome { font-size: 15.5px; }
}
@media (max-width: 1180px) {
  .topo-conta-botao { display: inline-flex; margin-left: auto; }
  .topo-acoes { display: none; position: fixed; top: calc(var(--topo) + 6px); right: 8px; width: min(340px, calc(100vw - 16px)); flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; background: #0b0b0b; border: 1px solid #2c2c2c; border-radius: 12px; box-shadow: 0 16px 40px #000a; z-index: 70; }
  body.conta-aberta .topo-acoes { display: flex; }
  .topo-loja { flex-wrap: wrap; }
  .topo-select { max-width: none; flex: 1; }
  .topo .selo-segmento { display: inline-flex; }
  .topo-chave { justify-content: flex-start; }
  .topo .tema-botoes { align-self: stretch; }
  .topo .tema-botoes button span { display: inline; }
  .topo .tema-botoes button { flex: 1 1 auto; padding: 0 6px; min-width: 0; }
  .topo .tema-botoes .tema-config { flex: 0 0 34px; }
  .topo-conta { justify-content: space-between; border-top: 1px solid #2c2c2c; padding-top: 10px; }
  .topo-email { width: auto; cursor: default; justify-content: flex-start; }
  .topo-email span { display: inline; max-width: 210px; }
}
@media (max-width: 900px) {
  .casca { grid-template-columns: minmax(0, 1fr); }
  body.menu-recolhido { --menu: 248px; }
  .menu-lateral { position: fixed; z-index: 60; left: 0; top: var(--topo); width: min(296px, 86vw); height: calc(100vh - var(--topo)); transform: translateX(-104%); transition: transform .2s ease; box-shadow: var(--sombra); }
  body.menu-recolhido .menu-rotulo, body.menu-recolhido .menu-rodape { display: initial; }
  body.menu-recolhido .menu-area, body.menu-recolhido .menu-item { justify-content: flex-start; padding-inline: 12px; }
  body.gaveta-aberta .menu-lateral { transform: none; }
  .gaveta-fundo { position: fixed; inset: var(--topo) 0 0 0; z-index: 55; background: #00000080; }
  body.gaveta-aberta .gaveta-fundo { display: block; }
  .conteudo { padding: 18px 16px 110px; }
}
@media (max-width: 700px) {
  .topo { gap: 6px; padding: 0 6px 0 2px; }
  .marca { gap: 9px; }
  .marca-logo { height: 15px; }
  .marca-divisoria { height: 20px; }
  .marca-nome { font-size: 14px; }
  .selo-previa { display: none; }
  .tela-titulo { font-size: 24px; }
  .tela-intro { font-size: 14px; }
  .resumo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-card { min-width: 0; padding: 12px; flex-direction: column; gap: 5px; }
  .summary-card span { text-align: center; font-size: 12px; }
  .summary-card strong { font-size: 22px; }
  .barra-ferramentas { position: static; padding: 10px; }
  .busca { width: 100%; }
  .nivel { width: 100%; }
  .nivel button { flex: 1; justify-content: center; padding: 0 8px; }
  .secao-cabeca { flex-wrap: wrap; padding: 12px 14px; }
  .secao-conta { margin-left: 0; }
  .campo { padding: 14px; }
  .campo.w-curto .campo-entrada > .inp, .campo.w-curto .campo-entrada > .sel, .campo.w-curto .campo-entrada > .inp-un { max-width: none; }
  .linha-curtos > .campo + .campo { border-left: 0; border-top: 1px solid var(--line-soft); }
  .grade-sn { padding: 12px 14px; grid-template-columns: 1fr; }
  .sub.w-curto { flex: 1 1 100%; }
  .dados-tecnicos dl { grid-template-columns: 1fr; gap: 2px; }
  .dados-tecnicos dd { margin-bottom: 8px; }
  /* tabela vira cartões empilhados */
  table.grade, table.grade tbody, table.grade tr, table.grade td { display: block; width: 100%; }
  table.grade thead { display: none; }
  table.grade tr { border-bottom: 1px solid var(--line); padding: 8px 4px; background: var(--row); }
  table.grade tbody tr:nth-child(even) td, table.grade td { background: transparent !important; border: 0; padding: 4px 6px; }
  table.grade td[data-rotulo]::before { content: attr(data-rotulo); display: block; font-size: 11.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
  table.grade td.col-acao { text-align: right; }
  table.grade tr.alterada td:first-child, table.grade tr.nova td:first-child { box-shadow: none; }
  table.grade tr.alterada { box-shadow: inset 3px 0 0 #e07b18; }
  .col-curto, .col-medio, .col-total, .col-longa, .col-sn, .col-acao { min-width: 0 !important; width: 100% !important; }
  #loja-salvar { bottom: 8px; }
  .barra-salvar { padding: 10px; }
  .barra-salvar-acoes { width: 100%; }
  .barra-salvar-acoes button { flex: 1; }
  .auth-card { padding: 24px; }
  .auth-marca { margin: -24px -24px 22px; gap: 10px; padding: 20px 14px; }
  .auth-marca img { height: 16px; }
  .auth-marca .marca-nome { font-size: 15px; }
  .auth-tema { top: 12px; right: 12px; }
  .resp-topo .inp, .resp-topo .sel { width: 100%; flex: 1 1 140px; }
  .dialogo-rodape button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01s !important; } }
@media print { .topo, .menu-lateral, .barra-ferramentas, .barra-salvar, .tela-acoes { display: none !important; } .casca { display: block; } }
