/* Painel interno (ticket 42). Maquete aprovada: docs/maquetes/2026-12-02-painel-admin-interno.html
   Valores copiados de apps/desktop/src/renderer/src/styles.css (:root). Nenhuma cor nova. */
:root {
  --background: #FFFFFF;
  --painel: #FAF9FC;
  --foreground: #241F2B;
  --primary: #2A1947;
  --primary-foreground: #FFFFFF;
  --muted: #F6F5F9;
  --muted-foreground: #67626F;
  --accent: #ECE9F2;
  --destructive: #A3311D;
  --destructive-soft: #FBECE7;
  --border: rgba(0, 0, 0, 0.10);
  --input: rgba(42, 25, 71, 0.22);
  --success: #0A6B36;
  --success-soft: rgba(41, 255, 134, 0.16);
  --warning-soft: rgba(224, 201, 118, 0.22);
  --invert: #17121F;
  --invert-foreground: #F4F2F7;
  --casca: #2A1947;
  --casca-2: #35225A;
  --casca-borda: rgba(255, 255, 255, 0.08);
  --casca-txt: #E9E5F1;
  --casca-mudo: #A49BB8;
  --casca-destaque: #29FF86;
  --brand-lime: #29FF86;
  --avatar-lilas: #E3DCF0;
  --avatar-menta: #D7F0E2;
  --avatar-areia: #F1E8D2;
  --avatar-ceu: #DCE6F2;
  --ease-saida: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Hanken Grotesk', system-ui, sans-serif; color: var(--foreground); background: var(--painel); }
button { font: inherit; }
.janela { height: 100%; display: flex; min-height: 0; }
nav.lateral { width: 224px; background: var(--casca); color: var(--casca-txt); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; flex: none; }
.marca { display: flex; align-items: center; gap: 8px; padding: 4px 8px 16px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.marca b { color: var(--casca-destaque); }
.marca small { font-weight: 500; font-size: 12px; color: var(--casca-mudo); }
.item { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 12px; border-radius: 8px; font-size: 14px; color: var(--casca-mudo); white-space: nowrap; text-decoration: none; }
.item:hover { color: var(--casca-txt); }
.item.ativo { background: var(--casca-2); color: #FFF; }
.item svg { width: 18px; height: 18px; }
.lateral .pe { margin-top: auto; border-top: 1px solid var(--casca-borda); padding: 12px 8px 0; font-size: 12px; color: var(--casca-mudo); }
.lateral .pe b { display: block; color: var(--casca-txt); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral .pe a { color: var(--casca-mudo); }
.selo-papel { display: inline-flex; margin: 4px 0 8px; height: 24px; align-items: center; padding: 0 10px; border-radius: 12px; background: var(--casca-2); color: var(--casca-txt); font-size: 11px; font-weight: 600; }
main { flex: 1; min-width: 0; background: var(--painel); overflow: auto; padding: 24px 32px; position: relative; }
h1 { font-size: 22px; margin: 0; font-weight: 700; white-space: nowrap; }
.sub { color: var(--muted-foreground); font-size: 13px; margin-top: 4px; white-space: nowrap; }
.topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.contagens { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.contagem { background: var(--background); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--muted-foreground); white-space: nowrap; cursor: pointer; }
.contagem b { color: var(--foreground); font-size: 15px; margin-right: 4px; }
.contagem.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.barra { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; position: relative; }
.busca { flex: 1; max-width: 420px; height: 36px; border: 1px solid var(--input); border-radius: 8px; background: var(--background); display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--muted-foreground); }
.busca input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 14px; color: var(--foreground); background: transparent; min-width: 0; }
.busca svg { width: 16px; height: 16px; flex: none; }
.btn { height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--input); background: var(--background); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--foreground); cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn.pri { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.btn.perigo { color: var(--destructive); border-color: rgba(163,49,29,.35); }
.btn.perigo.cheio { background: var(--destructive); color: #fff; border-color: var(--destructive); }
.btn.peq { height: 32px; padding: 0 12px; font-size: 13px; }
.btn .n { background: var(--primary); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; height: 18px; display: inline-flex; align-items: center; }
.cartao { background: var(--background); border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted-foreground); padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr.clic:hover { background: var(--muted); cursor: pointer; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mudo { color: var(--muted-foreground); }
.corta { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.forte { font-weight: 600; }
.selo { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.selo i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; }
.s-teste { background: var(--accent); color: var(--primary); }
.s-ativa, .s-cortesia { background: var(--success-soft); color: var(--success); }
.s-atencao { background: var(--warning-soft); color: var(--primary); }
.s-perigo { background: var(--destructive-soft); color: var(--destructive); }
.s-neutro { background: var(--muted); color: var(--muted-foreground); }
.barra-uso { width: 48px; height: 6px; border-radius: 3px; background: var(--accent); display: inline-block; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.barra-uso i { display: block; height: 100%; background: var(--primary); }
.vazio { padding: 48px 16px; text-align: center; }
.vazio b { display: block; font-size: 15px; margin-bottom: 4px; }
.vazio p { margin: 0 0 16px; color: var(--muted-foreground); font-size: 13px; }
.voltar { font-size: 13px; color: var(--muted-foreground); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 12px; white-space: nowrap; text-decoration: none; }
.cab-emp { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.cab-emp .linha { display: flex; gap: 8px; align-items: center; }
.acoes { display: flex; gap: 8px; position: relative; }
.grade3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.bloco { padding: 16px; }
.bloco .rot { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.bloco .valor { font-size: 22px; font-weight: 700; margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bloco .valor small { font-size: 14px; color: var(--muted-foreground); font-weight: 500; }
.bloco .det { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 8px; }
.aba { padding: 12px; font-size: 14px; color: var(--muted-foreground); border: 0; border-bottom: 2px solid transparent; background: none; white-space: nowrap; cursor: pointer; }
.aba.on { color: var(--foreground); border-color: var(--primary); font-weight: 600; }
.aba .c { font-size: 12px; color: var(--muted-foreground); margin-left: 4px; }
.ava { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--primary); margin-right: 8px; vertical-align: middle; }
.redondo { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--background); display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); cursor: pointer; padding: 0; vertical-align: middle; }
.redondo svg { width: 16px; height: 16px; }
.menu { position: absolute; background: var(--background); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(23,18,31,.14); padding: 4px; width: 248px; z-index: 5; top: 44px; right: 0; text-align: left; }
.menu .op { display: flex; gap: 12px; align-items: center; height: 36px; padding: 0 12px; border-radius: 6px; font-size: 14px; white-space: nowrap; width: 100%; border: 0; background: none; color: var(--foreground); cursor: pointer; }
.menu .op:hover { background: var(--muted); }
.menu .op svg { width: 16px; height: 16px; color: var(--muted-foreground); }
.menu .op.perigo, .menu .op.perigo svg { color: var(--destructive); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.menu .tit { font-size: 11px; color: var(--muted-foreground); padding: 8px 12px 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.filtros { position: absolute; top: 44px; left: 0; width: 300px; padding: 16px; z-index: 5; box-shadow: 0 12px 32px rgba(23,18,31,.14); }
.veu { position: fixed; inset: 0; background: rgba(23,18,31,.32); display: flex; align-items: center; justify-content: center; z-index: 10; }
.dialogo { width: 460px; max-width: calc(100vw - 32px); background: var(--background); border-radius: 16px; padding: 24px; box-shadow: 0 24px 64px rgba(23,18,31,.3); }
.dialogo h2 { margin: 0 0 4px; font-size: 18px; white-space: nowrap; }
.dialogo .sub { white-space: normal; margin-bottom: 16px; }
.campo { margin-bottom: 16px; }
.campo label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; white-space: nowrap; }
.campo input, .campo select, .campo textarea { width: 100%; height: 36px; border: 1px solid var(--input); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 14px; background: var(--background); color: var(--foreground); }
.campo textarea { height: 72px; padding: 8px 12px; resize: vertical; }
.campo .ajuda { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rodape-d { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.campo [aria-invalid="true"] { border-color: var(--destructive); }
.previa { background: var(--muted); border-radius: 8px; padding: 12px; font-size: 13px; margin-bottom: 16px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.previa span { color: var(--muted-foreground); white-space: nowrap; }
.previa b { white-space: nowrap; font-weight: 600; }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--invert); color: var(--invert-foreground); border-radius: 10px; padding: 12px 16px; font-size: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 12px 32px rgba(23,18,31,.3); white-space: nowrap; z-index: 20; animation: entra 320ms var(--ease-saida); }
.toast b { color: var(--brand-lime); }
.faixa { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.faixa.perigo { background: var(--destructive-soft); color: var(--destructive); }
.faixa.neutra { background: var(--muted); color: var(--muted-foreground); }
.faixa .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faixa svg { width: 18px; height: 18px; flex: none; }
.hist { padding: 4px 16px; }
.ev { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ev:last-child { border-bottom: 0; }
.ev .quando { color: var(--muted-foreground); font-size: 13px; white-space: nowrap; }
.ev .quem { color: var(--muted-foreground); font-size: 13px; white-space: nowrap; }
.ev .mot { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
.ev .dif { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; background: var(--muted); border-radius: 6px; padding: 4px 8px; margin-top: 4px; white-space: nowrap; }
.novo { animation: entra 320ms var(--ease-saida); }
@keyframes entra { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .novo, .toast { animation: none; } }
.cheio-centro { min-height: 100%; display: flex; align-items: center; justify-content: center; }
.aviso-cheio { width: 520px; max-width: 100%; text-align: center; }
.aviso-cheio .ic { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.aviso-cheio h2 { margin: 0 0 8px; font-size: 20px; white-space: nowrap; }
.aviso-cheio p { margin: 0 0 20px; color: var(--muted-foreground); font-size: 14px; }
.esqueleto { height: 14px; border-radius: 4px; background: var(--muted); }
.mais { display: flex; justify-content: center; padding: 12px; }
table th:first-child, table td:first-child { padding-left: 16px; }
table th:last-child, table td:last-child { padding-right: 16px; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible, .busca:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn:focus-visible, .redondo:focus-visible, .aba:focus-visible, .contagem:focus-visible, .op:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.busca input:focus { outline: 0; }
.redondo.perigo { color: var(--destructive); border-color: rgba(163,49,29,.35); }
