/* PINESI REMOTE SUPPORT — interface v0.7 ("Console Marinho")
   Menu azul-marinho, conteúdo claro (ou escuro), vermelho Pinesi como cor de ação.
   Tipografia: Plus Jakarta Sans (interface) e JetBrains Mono (IDs do RustDesk e dados técnicos). */

@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "JBMono"; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JBMono"; src: url(fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

/* ---------------------------------------------------------------- tokens */
:root, [data-tema="claro"] {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f4f4f5;
  --line: #e4e4e7;
  --line-soft: #f0f0f1;
  --line-strong: #d4d4d8;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --accent: #ff6b00;          /* laranja Pinesi (fundo de botão, texto preto em cima) */
  --accent-hover: #ff8124;
  --accent-soft: #fff1e6;
  --accent-ring: #ffe0c7;
  --accent-ink: #0a0a0a;
  --link: #c2410c;
  --navy: #0a0a0a;            /* preto Pinesi (menu e áreas escuras) */
  --navy-2: #141414;
  --navy-line: #262626;
  --on: #22c55e;              /* bolinha online */
  --on-ring: #dcfce7;
  --amber: #f59e0b;
  --ok: #15803d;   --ok-soft: #dcfce7;
  --warn: #92400e; --warn-soft: #fef3c7;
  --bad: #b42318;  --bad-soft: #fee4e2;
  --info: #1d4ed8; --info-soft: #eff6ff;
  --orange: #c2410c; --orange-soft: #fff7ed;
  --off: #a1a1aa;
  --side-bg: #0a0a0a;
  --side-card: #171717;
  --side-ink: #d4d4d8;
  --side-muted: #8f8f99;
  --side-strong: #ffffff;
  --side-hover: #222222;
  --bar: #d4d4d8;
  --bar-hoje: #ff6b00;
  --shadow-1: 0 1px 2px rgba(10, 10, 10, .05);
  --shadow-2: 0 18px 40px -18px rgba(10, 10, 10, .3);
  --focus: 0 0 0 4px rgba(255, 107, 0, .28);
  color-scheme: light;
}
[data-tema="escuro"] {
  --bg: #0a0a0a;
  --surface: #151515;
  --surface-2: #1a1a1a;
  --surface-3: #222222;
  --line: #262626;
  --line-soft: #1f1f1f;
  --line-strong: #3a3a3a;
  --ink: #f4f4f5;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --accent: #ff6b00;
  --accent-hover: #ff8124;
  --accent-soft: #2a1a0d;
  --accent-ring: rgba(255, 107, 0, .35);
  --accent-ink: #0a0a0a;
  --link: #ff9a52;
  --navy: #000000;
  --navy-2: #111111;
  --navy-line: #262626;
  --on-ring: rgba(34, 197, 94, .2);
  --ok: #4ade80;   --ok-soft: #10301f;
  --warn: #fbbf24; --warn-soft: #33270b;
  --bad: #ff9a52;  --bad-soft: #351a1a;
  --info: #93b4ff; --info-soft: #172544;
  --orange: #fdba74; --orange-soft: #33200f;
  --off: #64748b;
  --side-bg: #000000;
  --side-card: #141414;
  --side-hover: #1f1f1f;
  --bar: #3a3a3a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 18px 44px -16px rgba(0, 0, 0, .7);
  --focus: 0 0 0 4px rgba(255, 133, 36, .4);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 400 14px/1.55 "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
code, .mono { font-family: "JBMono", ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 500; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 800; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 16px; line-height: 1.35; font-weight: 700; margin: 0 0 14px; letter-spacing: -.01em; }
strong { font-weight: 700; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.top-gap { margin-top: 16px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- marca */
.marca {
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 10px; background: #ff6b00;
}
.marca svg { width: 64%; height: 64%; }
.marca svg path { fill: #0a0a0a; }
.marca .ponto {
  position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%;
  background: #22c55e; border: 3px solid var(--ponto-borda, #0a0a0a);
}
.marca-lg { width: 48px; height: 48px; border-radius: 13px; }
.marca-lg .ponto { width: 14px; height: 14px; top: -4px; right: -4px; }
.marca-xl { width: 64px; height: 64px; border-radius: 18px; }
.marca-xl .ponto { width: 18px; height: 18px; top: -5px; right: -5px; border-width: 4px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--side-strong); }
.logo:hover { text-decoration: none; }
.logo-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.logo-nome { font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.logo-sub { font-size: 9.5px; font-weight: 700; letter-spacing: .22em; color: var(--side-muted); line-height: 1; white-space: nowrap; }
.logo-lg .logo-nome { font-size: 22px; }
.logo-lg .logo-sub { font-size: 10px; }

/* ---------------------------------------------------------------- estrutura do app */
body.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
[data-menu="recolhido"] body.app { grid-template-columns: 80px 1fr; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 14px;
}
.brand { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-title { padding: 0 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--side-muted); }
.nav-item {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--side-ink); font-weight: 600; font-size: 14px; position: relative; white-space: nowrap;
}
.nav-item .ico { color: var(--side-muted); }
.nav-item:hover { background: var(--side-hover); color: var(--side-strong); text-decoration: none; }
.nav-item:hover .ico { color: var(--side-ink); }
.nav-item.active { background: var(--side-hover); color: var(--side-strong); }
.nav-item.active .ico { color: #ff6b00; }
.nav-item .count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: #ff6b00; color: #0a0a0a; font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--side-card); }
.side-user .avatar { background: var(--side-hover); }
.side-user-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.side-user-txt a { color: var(--side-strong); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-txt small { color: var(--side-muted); font-size: 12px; }
.side-btn {
  background: transparent; border: 0; color: var(--side-muted); width: 34px; height: 34px; border-radius: 9px;
  cursor: pointer; display: grid; place-items: center; flex-shrink: 0;
}
.side-btn:hover { background: var(--side-hover); color: #fff; }
.side-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; font-size: 12px; color: var(--side-muted); }

[data-menu="recolhido"] .logo-txt, [data-menu="recolhido"] .nav-label, [data-menu="recolhido"] .nav-title,
[data-menu="recolhido"] .nav-item .count, [data-menu="recolhido"] .side-ver, [data-menu="recolhido"] .side-user-txt,
[data-menu="recolhido"] .side-user form { display: none; }
[data-menu="recolhido"] .brand, [data-menu="recolhido"] .side-foot { display: flex; justify-content: center; padding: 0; }
[data-menu="recolhido"] .nav-item { justify-content: center; padding: 0; }
[data-menu="recolhido"] .side-user { justify-content: center; background: transparent; }
[data-menu="recolhido"] .nav-group { padding-top: 6px; border-top: 1px solid var(--side-hover); }
[data-menu="recolhido"] .nav-group:first-child { border-top: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 32px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}
.busca-global {
  flex: 1 1 320px; max-width: 640px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin: 0; color: var(--muted);
}
.busca-global:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.busca-global input { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; box-shadow: none !important; height: 100%; font-size: 14px; }
.kbd { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 8px; border-radius: 6px; background: var(--surface-3); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.icon-btn .ico { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-line); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.content { padding: 8px 32px 48px; max-width: 1440px; width: 100%; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 22px; }
.page-title h1 { font-size: 26px; }

/* faixa de atendimento em andamento (fora do painel) */
.live-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 12px 16px; border-radius: 14px; background: var(--navy); color: #e4e4e7;
}
.live-bar strong { color: #fff; }
.live-bar .muted { color: #a1a1aa; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: pulse 2.4s ease-in-out infinite; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } }

/* ---------------------------------------------------------------- cartões e grades */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-1);
}
.card.flush { padding: 0; overflow: hidden; }
.card.narrow, .form.narrow { max-width: 600px; }
.card.highlight { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.card.disabled { opacity: .55; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card.flush .card-head { padding: 18px 22px; margin: 0; border-bottom: 1px solid var(--line-soft); }
.card-head a:not(.btn) { font-size: 13px; }
.phase { font-size: 11px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 6px; color: var(--muted); margin-left: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.grid-3 > .card { margin-bottom: 0; }

/* indicadores */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.stat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--off); }
.stat-dot.on { background: var(--on); box-shadow: 0 0 0 4px var(--on-ring); }
.stat-dot.amber { background: var(--amber); }
.stat-dot.red { background: var(--accent); }
.stat strong { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat strong small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat .stat-foot { font-size: 13px; color: var(--muted); }
.stat.disabled { opacity: .55; }

/* ---------------------------------------------------------------- painel (dashboard) */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 22px; flex-wrap: wrap; }
.hello h1 { font-size: 30px; }
.hello p { margin: 0 0 6px; color: var(--muted); }
.rapida {
  display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; margin: 0;
  background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap;
}
.rapida label { padding-left: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rapida input { width: 160px; height: 40px; font-family: "JBMono", monospace; font-size: 14px; }
.btn.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.btn-navy:hover { background: #262626; border-color: #262626; }
[data-tema="escuro"] .btn.btn-navy { background: #e4e4e7; border-color: #e4e4e7; color: #0a0a0a; }
[data-tema="escuro"] .btn.btn-navy:hover { background: #fff; }

.dash-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.dash-main { flex: 2 1 540px; min-width: 0; }
.dash-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.dash-main > .card, .dash-side > .card { margin-bottom: 0; }

.maquinas { list-style: none; margin: 0; padding: 0; }
.maquina { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line-soft); }
.maquina:last-child { border-bottom: 0; }
.maquina:hover { background: var(--surface-2); }
.maquina .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.maquina .who a { color: var(--ink); font-weight: 700; }
.maquina .who small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maquina .rid { width: 112px; color: var(--ink-2); }
.dot-on { width: 10px; height: 10px; border-radius: 50%; background: var(--on); box-shadow: 0 0 0 4px var(--on-ring); flex-shrink: 0; }
.dot-off { width: 10px; height: 10px; border-radius: 50%; background: var(--off); flex-shrink: 0; }

.card-navy { background: var(--navy); border-color: var(--navy); color: #e4e4e7; }
[data-tema="escuro"] .card-navy { background: #171717; border-color: #2e2e2e; }
.card-navy h2 { color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-navy .tit { display: block; color: #fff; font-size: 15px; font-weight: 700; }
.card-navy .sub { display: block; color: #a1a1aa; font-size: 13px; margin-top: 2px; }
.card-navy .sub + .sub { margin-top: 0; }
.card-navy .btn-row { margin-top: 14px; }
.card-navy .btn-row .btn { flex: 1; }
.card-navy .vazio { color: #a1a1aa; font-size: 13.5px; margin: 0; }
.card-navy + .card-navy { margin-top: 0; }
.btn.btn-ok { background: var(--on); border-color: var(--on); color: #052e16; font-weight: 700; }
.btn.btn-ok:hover { background: #4ade80; border-color: #4ade80; }
.btn.btn-outline-dark { background: transparent; border-color: #3f3f46; color: #e4e4e7; }
.btn.btn-outline-dark:hover { background: #262626; border-color: #52525b; }
.andamento + .andamento { border-top: 1px solid #262626; margin-top: 16px; padding-top: 16px; }

.pend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pend-list a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.pend-list a:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pend-list small { color: var(--bad); font-weight: 500; }

.sumidos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sumidos li { display: flex; align-items: center; gap: 12px; }
.sumidos a { flex: 1; min-width: 0; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sumidos span:last-child { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------------------------------------------------------------- gráfico de barras (SVG gerado no servidor) */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--bar); }
.chart .bar-hoje { fill: var(--bar-hoje); }
.chart .bar-2 { fill: var(--ink-2); }
.chart .bar-hit { fill: transparent; }
.chart g:hover .bar, .chart g:hover .bar-hoje { opacity: .75; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: "Jakarta", sans-serif; }
.chart .val { fill: var(--ink-2); font-size: 11px; font-weight: 700; font-family: "Jakarta", sans-serif; }
.chart-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.chart-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.chart-title strong { font-size: 13px; font-weight: 700; }
.chart-title span { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- tabelas */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.table thead th:first-child { border-top-left-radius: 12px; }
.table thead th:last-child { border-top-right-radius: 12px; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn { margin-left: 6px; }
.table td a strong { color: var(--ink); font-weight: 700; }
.table td a:hover strong { color: var(--link); }
.row-inactive td { opacity: .5; }
.row-warn td { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

.dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 14px; margin: 0 0 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dl-wide { grid-template-columns: 120px 1fr; }

.list { list-style: none; padding: 0; margin: 0 0 12px; }
.list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.list li:last-child { border-bottom: 0; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.feed li:last-child { border-bottom: 0; }
.feed .who { min-width: 0; flex: 1; }
.feed .who a { color: var(--ink); font-weight: 700; }
.feed .who small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: 4px; }
.card-navy .empty, .card-navy .empty strong { color: #a1a1aa; }

/* ---------------------------------------------------------------- formulários */
.form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 16px; color: var(--ink-2); }
.form label input, .form label select, .form label textarea { display: block; width: 100%; margin-top: 7px; font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--ink); padding: 10px 14px; border: 1px solid var(--line-strong);
  border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; font-family: "Jakarta", system-ui, sans-serif; letter-spacing: 0; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink) 28%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type=file] { padding: 7px; background: var(--surface-2); }
select { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
textarea { resize: vertical; min-height: 90px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.form .check, .check { display: flex !important; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); }
.form .check input, .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; }
legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--ink-2); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form { display: flex; gap: 8px; margin-bottom: 14px; }
.inline-form input, .inline-form select { flex: 1; }
.input-inline { padding: 7px 10px; min-width: 0; }
.code-input { font-family: "JBMono", monospace; font-size: 24px; letter-spacing: .35em; text-align: center; padding: 12px; }

.form-label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { position: relative; }
.form label.chip { display: inline-block; margin: 0; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer;
}
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--link); }
.chip input:focus-visible + span { box-shadow: var(--focus); }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-3); gap: 3px; margin-top: 8px; }
.seg .chip span { border: 0; background: transparent; border-radius: 9px; padding: 7px 14px; }
.seg .chip input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 10, 10, .12); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input[name=busca] { min-width: 260px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.copy-box {
  display: flex; gap: 10px; align-items: center; background: var(--surface-2); border: 1px dashed var(--line-strong);
  padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; overflow-wrap: anywhere;
}
.copy-box code { flex: 1; font-size: 13.5px; min-width: 0; }
code.wrap { word-break: break-all; }
code.small { font-size: 11.5px; }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; padding: 9px 16px; border-radius: 12px; line-height: 1.3; min-height: 40px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--ink) 25%, var(--line-strong)); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 10px; min-height: 36px; }
.btn-xs { padding: 2px 8px; font-size: 11.5px; border-radius: 7px; min-height: 0; font-weight: 600; }
.btn-block { width: 100%; min-height: 50px; font-size: 15px; }
.btn-lg { min-height: 46px; padding: 0 20px; }
.btn.disabled, .btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------------------------------------------------------------- selos, pontos, avisos */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-blue { background: var(--info-soft); color: var(--info); }
.badge-gray { background: var(--surface-3); color: var(--ink-2); }
.badge-green { background: var(--ok-soft); color: var(--ok); }
.badge-red { background: var(--bad-soft); color: var(--bad); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-navy { background: var(--ink); color: var(--surface); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: middle; flex-shrink: 0; }
.dot-green { background: var(--on); box-shadow: 0 0 0 4px var(--on-ring); }
.dot-red { background: var(--off); }
.dot-gray { background: var(--off); opacity: .5; }
.alert { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; border: 1px solid; font-size: 13.5px; font-weight: 500; }
.alert-success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.alert-error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.alert-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); color: var(--info); }
.alert a { color: inherit; font-weight: 700; text-decoration: underline; }

.tabs { display: inline-flex; gap: 3px; background: var(--surface-3); padding: 4px; border-radius: 12px; }
.tab { padding: 7px 16px; border-radius: 9px; color: var(--ink-2); font-weight: 600; }
.tab:hover { text-decoration: none; color: var(--ink); }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 10, 10, .12); }
.tabs-center { display: flex; justify-content: center; margin: 0 auto 20px; width: fit-content; }

.steps { padding-left: 20px; color: var(--ink-2); margin: 0 0 16px; }
.steps li { margin-bottom: 8px; }
.steps-big { line-height: 1.65; }

.toast {
  position: fixed; right: 22px; bottom: 22px; max-width: 400px; z-index: 50;
  background: var(--navy); color: #e4e4e7; padding: 14px 18px; border-radius: 14px; box-shadow: var(--shadow-2); font-size: 13.5px;
}
[data-tema="escuro"] .toast { background: #e4e4e7; color: #0a0a0a; }

/* janela de finalização do atendimento */
.dlg { border: 0; padding: 0; border-radius: 18px; width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
.dlg::backdrop { background: rgba(10, 10, 10, .55); }
.dlg .form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dlg-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px; background: var(--navy); color: #fff; }
.dlg-head h2 { margin: 0; color: #fff; font-size: 18px; }
.dlg-head p { margin: 2px 0 0; color: #a1a1aa; font-size: 13px; }
.dlg-icone { width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }
.dlg-tempo { text-align: right; }
.dlg-tempo small { display: block; color: #a1a1aa; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dlg-tempo strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.dlg-body { padding: 18px 22px 6px; overflow-y: auto; }
.dlg-body .chips { margin-bottom: 4px; }
.dlg-body .form-label { display: block; margin-bottom: 2px; }
.dlg-body .seg { margin-bottom: 8px; }
.dlg-body textarea { min-height: 96px; }
.dlg-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); }
@media (max-width: 520px) { .dlg-foot .btn { flex: 1 1 auto; } .dlg-tempo strong { font-size: 18px; } }

/* tempo automático do atendimento */
.tempo-auto { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--surface-3); margin-bottom: 16px; }
.tempo-auto strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.tempo-auto strong .muted { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.tempo-auto small { font-size: 12.5px; line-height: 1.45; }
.form label small.muted { display: block; font-weight: 400; margin-top: 6px; }

/* ---------------------------------------------------------------- telas de entrada (login / 2FA) */
body.auth { min-height: 100vh; background: var(--surface); }
.auth-split { display: flex; flex-wrap: wrap; min-height: 100vh; }
.auth-art {
  flex: 1 1 520px; min-width: 0; background: #0a0a0a; color: #e4e4e7;
  display: flex; flex-direction: column; gap: 44px; padding: 48px 56px;
}
.auth-art .logo { --ponto-borda: #0a0a0a; }
.auth-claim { max-width: 520px; margin-top: 32px; }
.auth-claim h2 { color: #fff; font-size: 42px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 0 0 16px; }
.auth-claim p { margin: 0; font-size: 16.5px; line-height: 1.6; color: #a1a1aa; }
.recursos { list-style: none; margin: 0; padding: 8px; max-width: 480px; border-radius: 18px; background: #171717; border: 1px solid #262626; }
.recursos li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.recursos .ri { width: 38px; height: 38px; border-radius: 10px; background: #262626; color: #ff9a52; display: grid; place-items: center; flex-shrink: 0; }
.recursos strong { display: block; color: #f4f4f5; font-size: 14px; font-weight: 700; }
.recursos small { display: block; color: #a1a1aa; font-size: 12.5px; }
.etapas { list-style: none; margin: 0; padding: 0; max-width: 420px; }
.etapas li { display: flex; gap: 16px; }
.etapas .num { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: #262626; color: #a1a1aa; }
.etapas .num.feito { background: #22c55e; color: #052e16; }
.etapas .num.atual { background: #ff6b00; color: #0a0a0a; box-shadow: 0 0 0 5px rgba(255, 107, 0, .25); }
.etapas .trilho { display: flex; flex-direction: column; align-items: center; }
.etapas .linha { width: 2px; height: 28px; background: #22c55e; }
.etapas .txt { padding-top: 5px; }
.etapas strong { display: block; color: #fff; font-size: 15px; }
.etapas small { display: block; color: #a1a1aa; font-size: 13px; }
.auth-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #8f8f99; }
.auth-foot .ico { width: 16px; height: 16px; }
.auth-form { flex: 1 1 440px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 28px; margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); margin: 0 0 26px; font-size: 15px; }
.auth-card .form label { margin-bottom: 18px; }
.auth-card input:not([type=checkbox]) { height: 50px; font-size: 15px; }
.auth-icone { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 22px; }
.auth-icone .ico { width: 30px; height: 30px; }
.auth-dica { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--surface-3); font-size: 13px; color: var(--ink-2); margin-top: 20px; }
.auth-dica .ico { width: 18px; height: 18px; color: var(--muted); }
.auth-theme { position: fixed; top: 16px; right: 16px; z-index: 5; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 20px; font-size: 14px; }
.auth-links a { text-decoration: none; }
.auth-links .voltar { color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.auth-nota { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 1.55; color: var(--muted); }
details.perdi { margin-top: 0; }
details.perdi summary { cursor: pointer; color: var(--link); font-weight: 600; list-style: none; }
details.perdi summary::-webkit-details-marker { display: none; }
details.perdi p { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); padding: 12px 14px; border-radius: 12px; background: var(--surface-3); }

/* código por e-mail */
.email-codigo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.email-codigo span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.email-codigo .ico { color: var(--muted); }

/* código de 6 dígitos em caixinhas */
.otp { border: 0; padding: 0; margin: 0 0 14px; }
.otp legend { padding: 0; margin-bottom: 10px; font-weight: 600; }
.otp-caixas { display: flex; align-items: center; gap: 10px; }
.otp-caixas input {
  width: 0; flex: 1 1 0; max-width: 56px; height: 64px; padding: 0; text-align: center; border-radius: 14px;
  font-family: "JBMono", monospace; font-size: 26px; font-weight: 600;
}
.otp-caixas .sep { width: 12px; height: 2px; background: var(--line-strong); flex-shrink: 0; }
.otp-unico { display: none; }
.no-js .otp-caixas { display: none; }
.no-js .otp-unico { display: block; }
.confiar { display: flex !important; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; margin-bottom: 20px !important; }
.confiar input { width: 20px !important; height: 20px !important; margin: 0 !important; accent-color: var(--accent); flex-shrink: 0; }
.confiar span { display: flex; flex-direction: column; }
.confiar strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.confiar small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ativar 2FA (primeiro acesso) */
body.setup { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.setup-top { background: #0a0a0a; padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #d4d4d8; }
.setup-top .logo { --ponto-borda: #0a0a0a; }
.setup-top .acoes { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.setup-top .acoes strong { color: #fff; }
.setup-top .icon-btn { width: 40px; height: 40px; background: #171717; border-color: #262626; color: #e4e4e7; }
.setup-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 44px 32px; display: flex; flex-direction: column; gap: 28px; }
.setup-head { max-width: 680px; }
.setup-head .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--link); }
.setup-head h1 { font-size: 34px; margin: 8px 0 10px; }
.setup-head p { margin: 0; font-size: 16px; color: var(--ink-2); }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; align-items: stretch; }
.passo { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.passo.atual { border: 2px solid var(--accent); box-shadow: 0 16px 40px -22px rgba(255, 107, 0, .55); }
.passo .n { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; }
[data-tema="escuro"] .passo .n { background: #3a3a3a; }
.passo.atual .n { background: var(--accent); color: var(--accent-ink); }
.passo h2 { margin: 0; font-size: 18px; font-weight: 800; }
.passo p { margin: 0; font-size: 14px; color: var(--ink-2); }
.apps { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.apps li { padding: 10px 12px; border-radius: 10px; background: var(--surface-3); font-size: 14px; font-weight: 600; }
.qr { align-self: center; display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr svg { width: 180px; height: 180px; display: block; }
.chave { display: flex; align-items: center; gap: 8px; }
.chave code { flex: 1; padding: 10px 12px; border-radius: 10px; background: var(--surface-3); font-size: 14px; letter-spacing: .06em; overflow-wrap: anywhere; }
.passo .form { margin-top: auto; display: flex; flex-direction: column; }
.passo .code-input { height: 56px; }
.aviso-amarelo { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 14px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); font-size: 14px; font-weight: 500; }
.setup-alertas .alert { margin: 0; }

/* página pública do suporte */
body.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; background: var(--bg); }
.public-top { width: 100%; background: #0a0a0a; display: flex; justify-content: center; padding: 56px 16px 120px; }
.public-top .logo { --ponto-borda: #0a0a0a; }
.public-card { width: calc(100% - 32px); max-width: 600px; margin: -84px 16px 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow-2); }
.public-intro { text-align: center; color: var(--ink-2); margin: 0 0 20px; font-size: 15px; }

/* ---------------------------------------------------------------- relatório (impressão) */
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.report-head h2 { font-size: 18px; margin: 0 0 4px; }
.report-marca { display: flex; align-items: center; gap: 10px; }
.report-marca .marca { --ponto-borda: #fff; }
.report-marca strong { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.report-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.report-kpis div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.report-kpis strong { display: block; font-size: 22px; font-weight: 800; }
.report-kpis span { color: var(--muted); font-size: 12.5px; }
.w-cat { width: 200px; }
.w-num { width: 60px; }
.cat-bar { height: 8px; border-radius: 4px; background: var(--accent); min-width: 4px; }

/* ---------------------------------------------------------------- relatório do cliente (A4, "Salvar como PDF") */
body.rel-pg { background: var(--bg); padding: 0 16px 40px; }
.rel-barra { position: sticky; top: 0; z-index: 5; max-width: 900px; margin: 0 auto; padding: 14px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--bg); }
.rel-barra .btn-primary { margin-left: auto; }
.rel-mes { display: flex; gap: 8px; margin: 0; }
.rel-mes input { padding: 8px 12px; }
.rel {
  max-width: 900px; margin: 0 auto; background: #fff; color: #18181b; border-radius: 16px; padding: 44px 48px;
  box-shadow: var(--shadow-2); font-size: 13px; line-height: 1.5;
  --ink: #18181b; --ink-2: #3f3f46; --muted: #71717a; --line: #e4e4e7; --surface: #fff; --surface-3: #f4f4f5;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #92400e; --warn-soft: #fef3c7; --bad: #b42318; --bad-soft: #fee4e2;
}
.rel h1 { font-size: 24px; margin: 2px 0 4px; color: #0a0a0a; }
.rel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #0a0a0a; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid #ff6b00; }
.rel p { margin: 0; color: #3f3f46; }
.rel .muted { color: #71717a; }
.rel-topo { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid #e4e4e7; }
.rel-marca { display: flex; align-items: center; gap: 12px; }
.rel-marca .marca { width: 42px; height: 42px; border-radius: 11px; }
.rel-marca span { display: flex; flex-direction: column; font-size: 18px; color: #0a0a0a; line-height: 1.15; }
.rel-marca strong { font-weight: 800; }
.rel-marca small { font-size: 11.5px; color: #71717a; }
.rel-doc { text-align: right; display: flex; flex-direction: column; }
.rel-doc strong { font-size: 15px; color: #0a0a0a; }
.rel-doc span { color: #71717a; }
.rel-cliente { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; flex-wrap: wrap; }
.rel-periodo { display: grid; grid-template-columns: auto; gap: 2px; text-align: right; }
.rel-rotulo { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #71717a; }
.rel-periodo .rel-rotulo + strong, .rel-periodo .rel-rotulo + span { margin-bottom: 6px; }
.rel-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rel-kpis div { background: #0a0a0a; color: #fff; border-radius: 12px; padding: 14px 16px; }
.rel-kpis div:first-child { background: #ff6b00; color: #0a0a0a; }
.rel-kpis strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.rel-kpis span { font-size: 11.5px; opacity: .85; }
.rel-resumo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rel-mini { width: 100%; border-collapse: collapse; }
.rel-mini td { padding: 5px 0; border-bottom: 1px solid #f0f0f1; }
.rel-mini .num { text-align: right; font-weight: 700; white-space: nowrap; }
.rel-at { padding: 12px 0; border-bottom: 1px solid #e4e4e7; break-inside: avoid; page-break-inside: avoid; }
.rel-at-topo { display: flex; gap: 12px; align-items: flex-start; }
.rel-num { width: 24px; height: 24px; border-radius: 50%; background: #f4f4f5; color: #3f3f46; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.rel-at-topo strong { font-size: 13.5px; color: #0a0a0a; }
.rel-meta { display: block; color: #71717a; font-size: 12px; }
.rel-tags { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rel-cat { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #f4f4f5; color: #3f3f46; }
.rel-tempo { min-width: 54px; text-align: right; }
.rel-feito { margin: 8px 0 0 36px !important; padding: 10px 12px; border-radius: 10px; background: #fafafa; border-left: 3px solid #ff6b00; color: #27272a !important; }
.rel-feito .rel-rotulo { margin-bottom: 2px; }
.rel-tab { width: 100%; border-collapse: collapse; font-size: 12px; }
.rel-tab th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #71717a; padding: 6px 8px; border-bottom: 1px solid #d4d4d8; }
.rel-tab td { padding: 6px 8px; border-bottom: 1px solid #f0f0f1; }
.rel-tab tr { break-inside: avoid; }
.rel-nota { margin-top: 8px !important; font-size: 11px; color: #71717a !important; }
.rel-rodape { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 12px; border-top: 1px solid #e4e4e7; font-size: 11px; color: #71717a; }
@media (max-width: 700px) {
  .rel { padding: 24px 18px; }
  .rel-kpis, .rel-resumo { grid-template-columns: 1fr 1fr; }
  .rel-at-topo { flex-wrap: wrap; }
  .rel-feito { margin-left: 0 !important; }
}

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body.rel-pg { background: #fff; padding: 0; }
  .rel { max-width: none; box-shadow: none; border-radius: 0; padding: 0; }
  .rel-kpis div, .rel-feito, .rel-num, .rel-cat, .badge, .marca { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.app { display: block; background: #fff; color: #000; }
  .sidebar, .topbar, .toolbar, .live-bar, .no-print, .alert { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  a { color: #000; }
}

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body.app, [data-menu="recolhido"] body.app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 12px; gap: 10px; }
  .brand { display: flex; justify-content: space-between; align-items: center; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-group { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-title, .side-foot { display: none; }
  .nav-item { height: 38px; padding: 0 10px; font-size: 13px; }
  .side-user { display: none; }
  .topbar { padding: 12px 16px; }
  .busca-global .kbd { display: none; }
  .content { padding: 8px 16px 40px; }
  .form-grid, .chart-pair, .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .table { display: block; overflow-x: auto; }
  .auth-art { padding: 28px 24px; gap: 24px; }
  .auth-claim { margin-top: 0; }
  .auth-claim h2 { font-size: 26px; }
  .recursos, .auth-foot { display: none; }
  .report-kpis { grid-template-columns: 1fr; }
  .maquina { padding: 12px 16px; flex-wrap: wrap; }
  .maquina .rid { width: auto; }
  .setup-top { padding: 14px 16px; }
  .setup-main { padding: 28px 16px; }
  .setup-head h1 { font-size: 26px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px; }
  .stat strong { font-size: 28px; }
  .filters input[name=busca] { min-width: 0; width: 100%; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .rapida { width: 100%; }
  .rapida input { flex: 1; width: auto; }
  .otp-caixas { gap: 6px; }
  .otp-caixas input { height: 56px; font-size: 22px; }
  .public-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
