/* Winner Hub — direção "Placar" (ver docs/DESIGN.md) */

:root {
  --ink: #0B0B0C;
  --ink-2: #2A2A2E;
  --muted: #6B6B73;
  --line: #E6E6E3;
  --paper: #FAFAF7;
  --surface: #FFFFFF;
  --zebra: #F6F6F2;
  --volt: #D4FF3A;
  --volt-ink: #4A5A00;
  --on-ink: #FFFFFF;

  --ok: #1F9D55;   --ok-bg: #E7F6EC;
  --warn: #B7791F; --warn-bg: #FDF3E1;
  --crit: #D64545; --crit-bg: #FCE9E9;
  --info: #2F6FEB; --info-bg: #E8F0FE;

  --sidebar: #0B0B0C;
  --sidebar-ink: #F2F2EE;
  --sidebar-muted: #9A9AA2;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 11, 12, .04), 0 1px 0 rgba(11, 11, 12, .02);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F2F2EE;
    --ink-2: #D6D6D0;
    --muted: #9A9AA2;
    --line: #2A2A2E;
    --paper: #0E0E10;
    --surface: #17171A;
    --zebra: #1B1B1F;
    --volt-ink: #D4FF3A;
    --on-ink: #0B0B0C;
    --ok-bg: #12301F; --ok: #4CC17E;
    --warn-bg: #33270F; --warn: #E0A84A;
    --crit-bg: #3A1717; --crit: #F07171;
    --info-bg: #142440; --info: #6E9CF5;
    --sidebar: #050506;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Carregando: barra no topo enquanto a próxima tela vem do servidor. */
html.carregando::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 9999; background: var(--volt);
  transform-origin: left; animation: wh-carrega 8s cubic-bezier(.1,.7,.3,1) forwards; }
html.carregando body { cursor: progress; }
@keyframes wh-carrega { from { transform: scaleX(0); } to { transform: scaleX(.95); } }
@media (prefers-reduced-motion: reduce) { html.carregando::before { animation: none; transform: scaleX(.6); } }
body.app { --side-w: 240px; background: linear-gradient(to right, var(--sidebar) var(--side-w), var(--paper) var(--side-w)); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 12px; background: var(--zebra); padding: 1px 5px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--volt); color: #0B0B0C; padding: 8px 12px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.icon { flex: none; vertical-align: -4px; }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 2px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 20;
  background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px 20px; }
.brand { display: block; line-height: 0; }
.brand img { width: 140px; height: auto; }
.nav-toggle { display: none; }
.sidebar-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 8px; border: 0; background: none;
  color: var(--sidebar-ink); text-decoration: none; font: inherit; font-weight: 500; cursor: pointer; text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); }
/* Título de bloco do menu (Estoque, Vendas) */
.nav-grupo { margin: 14px 12px 4px; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--sidebar-muted); }
.nav-grupo:first-child { margin-top: 2px; }
.nav-item.is-active { background: var(--volt); color: #0B0B0C; font-weight: 700; }
.nav-item > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Ponto discreto = área ainda no sistema atual (em migração) */
.nav-tag { margin-left: auto; flex: none; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--sidebar-muted); }
.nav-item.is-active .nav-tag { border-color: #0B0B0C; }
.sidebar-user { margin-top: auto; padding: 16px 12px 20px; border-top: 1px solid #222226; }
.user-email { padding: 0 12px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge {
  display: inline-block; margin: 6px 12px 8px; padding: 1px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: #222226; color: var(--volt);
}
.logout-form { margin: 0; }
.nav-logout { color: var(--sidebar-muted); }

/* Recolher o menu (só desktop, precisa de JS; a escolha fica no cookie "nav") */
.nav-collapse { display: none; }
@media (min-width: 900px) {
  .js .nav-collapse {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px;
    border: 1px solid #333338; border-radius: 8px; background: none; color: var(--sidebar-muted); cursor: pointer;
  }
  .js .nav-collapse:hover { color: var(--sidebar-ink); background: rgba(255, 255, 255, .07); }
  body.app.nav-min { --side-w: 68px; }
  .nav-min .sidebar-top { justify-content: center; padding: 20px 0 16px; }
  .nav-min .nav-grupo { margin: 10px 8px 4px; height: 1px; overflow: hidden; color: transparent; background: rgba(255, 255, 255, .15); }
  .nav-min .brand, .nav-min .nav-tag, .nav-min .user-email, .nav-min .role-badge { display: none; }
  .nav-min .nav, .nav-min .sidebar-user { padding-left: 10px; padding-right: 10px; }
  .nav-min .nav-item { justify-content: center; padding: 10px 0; }
  .nav-min .nav-item > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-min .nav-collapse .icon { transform: scaleX(-1); }
  /* menu recolhido: o conteúdo ganha o espaço que sobrou (23/11, pedido do dono) */
  .nav-min .container { max-width: 1640px; }
}

/* ---------- Conteúdo ---------- */
.main { margin-left: var(--side-w); min-height: 100vh; }
.container { max-width: 1280px; margin: 0 auto; padding: 28px 24px 48px; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-size: 28px; font-weight: 800; font-stretch: 125%; letter-spacing: -.01em; text-transform: uppercase; }
.page-sub { color: var(--muted); margin-top: 4px; }

.demo-banner {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 8px 12px;
  border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-crit { background: var(--crit-bg); color: var(--crit); }

.period { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 12px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; container-type: inline-size;
}
.kpi-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
/* Fonte proporcional à largura do card (cqi): o valor cabe com o menu aberto ou recolhido. */
.kpi-value {
  font-size: 40px; font-size: clamp(22px, 15cqi, 40px);
  font-weight: 800; font-stretch: 125%; line-height: 1.1; margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kpi-value.is-long {
  font-size: 24px; font-size: clamp(16px, 10cqi, 28px); font-stretch: 100%; line-height: 1.45;
  white-space: normal; overflow-wrap: anywhere;
}
/* Agenda de contas (04/12): 5 quadros com valores de 6 dígitos; todos no mesmo tamanho, sem cortar. */
.kpis-agenda .kpi-value, .kpis-agenda .kpi-value.is-long {
  font-size: 24px; font-size: clamp(16px, 10cqi, 28px); font-stretch: 100%; line-height: 1.45;
  white-space: nowrap; overflow: visible;
}
.kpi-note { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kpi-hi { background: var(--volt); border-color: var(--volt); color: #0B0B0C; }
.kpi-hi .kpi-label, .kpi-hi .kpi-note { color: #3A4500; }
/* Quadro que abre a lista do que soma (Agenda de contas, 04/12). */
.kpi-det { position: relative; min-width: 0; }
.kpi-det > summary { list-style: none; cursor: pointer; height: 100%; }
.kpi-det > summary::-webkit-details-marker { display: none; }
.kpi-det > summary:hover, .kpi-det[open] > summary { border-color: var(--ink, #0B0B0C); }
.kpi-ver { text-decoration: underline; }
.kpi-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  width: min(560px, 92vw); max-height: 420px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18); padding: 10px 12px;
}
.kpi-det-dir .kpi-pop { left: auto; right: 0; }
.kpi-pop-tab { margin: 0; font-size: 13px; }

.rule-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 20px;
  color: var(--ink-2); font-size: 13px;
}
.rule-legend .icon { color: var(--muted); }

/* Cards e blocos */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; font-stretch: 112%; }
.card-sub { color: var(--muted); margin-top: 4px; font-size: 13px; max-width: 72ch; }
.block { margin-bottom: 32px; }
.block-head { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.block-title { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; font-stretch: 125%; text-transform: uppercase; }
.block-sub { color: var(--muted); margin-top: 4px; }

/* Alertas */
.alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 8px;
  margin-bottom: 14px; border: 1px solid transparent;
}
/* Devoluções: de onde é o pacote bipado (02/12) */
.dev-pacote p { margin: 0 0 6px; }
.dev-pacote .dev-pacote-titulo { font-size: 1.15rem; }
.alert .icon { margin-top: 1px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-crit { background: var(--crit-bg); color: var(--crit); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert span { color: var(--ink); }
.lista-erros { margin: 4px 0 14px 20px; padding: 0; font-size: 13px; color: var(--ink); }
.lista-erros li { margin: 2px 0; }

/* Pílulas de status: texto + cor, nunca só cor */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-critico { background: var(--crit-bg); color: var(--crit); }
.pill-atencao { background: var(--warn-bg); color: var(--warn); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }

/* Formulários */
.toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.field small { color: var(--muted); font-weight: 400; }
.field.grow { flex: 1 1 240px; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.field-inline input { width: 96px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-height: 40px; width: 100%;
}
select { padding-right: 32px; }
.field-inline select { width: auto; }
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(212, 255, 58, .55); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; cursor: pointer; }
.hint { color: var(--muted); font-size: 12px; }
.toolbar .hint { align-self: center; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.inline-form { margin: 0; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--volt); color: #0B0B0C; border-color: var(--volt); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--zebra); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Tabelas */
.table-wrap { position: relative; overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 8px; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface);
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:nth-child(even) td { background: var(--zebra); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .sku { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; font-weight: 600; }
.table .prod { min-width: 200px; }
.table .lojas { color: var(--ink-2); min-width: 160px; }
.table .modelos { min-width: 210px; white-space: nowrap; line-height: 1.35; }
.table .modelos div + div { margin-top: 2px; }
.table .chk { width: 44px; text-align: center; }
.table tr.is-done td { color: var(--muted); }
.table tr.is-done .sku { text-decoration: line-through; }
.table-sep tr.is-done td { opacity: .55; }
.table-sep .prod-nome { font-weight: 600; }
.table-sep td.tam { font-weight: 700; }
.table-sep td.lojas-chips { line-height: 1; }
.loja-chip { display: inline-flex; align-items: center; gap: 6px; margin: 2px 4px 2px 0; padding: 4px 10px 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface, #fff); font-size: 13px; white-space: nowrap; cursor: pointer; }
.loja-chip b { font-weight: 700; }
.loja-chip.is-auto { cursor: default; }
input.is-mudou { border-color: var(--warn); background: var(--warn-bg); }
.tot-row td { border-top: 2px solid var(--line); }
.ordem-pecas { margin-top: 12px; }
.alert-inline { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--warn); }
.alert-inline:empty { display: none; }
.table-sep td.lojas-chips { min-width: 160px; }
.sep-canc { color: var(--crit); font-weight: 600; }
.sep-sit { font-size: 13px; line-height: 1.5; min-width: 110px; }
.sep-sit .badge { white-space: normal; }
.sep-up { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; }
.table-sep .prod .badge { background: var(--zebra); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.loja-chip input { margin: 0; }
.loja-chip:has(input:checked) { background: #EAF6EE; border-color: #BFE3CB; color: #2F6B43; text-decoration: line-through; }
@media (prefers-color-scheme: dark) { .loja-chip:has(input:checked) { background: #16301F; border-color: #2C5A3B; color: #9AD3AE; } }
.table-compact td { padding: 6px 10px; }
.table-foot { color: var(--muted); font-size: 12px; margin-top: 8px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; font-size: 13px; }
.sep-form .table-wrap { max-height: 68vh; }

/* Separação */
.sep-status { padding: 16px 20px; }
.progress-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
progress {
  -webkit-appearance: none; appearance: none; flex: 1 1 260px; height: 12px;
  border: 0; border-radius: 99px; background: var(--zebra); overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--zebra); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--ink); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--ink); border-radius: 99px; }
.progress-text { white-space: nowrap; }
.sep-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.sep-row form { margin: 0; }
.ref-date { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }

.pending > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.pending > summary::-webkit-details-marker { display: none; }
.pending > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-weight: 800; }
.pending[open] > summary::before { content: "−"; }
.pending-day { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pending-title { font-size: 14px; font-weight: 800; margin-bottom: 10px; }

/* Estados vazios */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 16px; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; }
.empty-text { color: var(--ink); font-weight: 600; }
.empty-hint { font-size: 13px; }

/* Layout dividido (gráfico + tabela) */
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.split .table-wrap { max-height: 560px; }

/* Configurações */
.config-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-size: 14px; font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; padding: 0; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
fieldset .hint { margin-top: 8px; }
.config-side .kpi { margin-bottom: 16px; }
.rule-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; font-size: 13px; }
.rule-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Migração e erros */
.migration, .error-box { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; }
.migration > .icon, .error-box > .icon { width: 32px; height: 32px; }
.migration p, .error-box p { color: var(--ink-2); max-width: 60ch; }

/* Gráficos SVG */
.chart { display: block; overflow: visible; font-family: var(--font); }
.chart .bar, .chart .col { fill: var(--ink); }
.chart .bar-hi, .chart .col-hi { fill: var(--volt); stroke: var(--ink); stroke-width: 1; }
.chart .col-missing { fill: var(--line); }
.chart .col-marca { fill: var(--ink); stroke: var(--volt); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart g:hover .bar, .chart g:hover .col { opacity: .8; }
.chart .lbl { fill: var(--ink-2); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.chart .val { fill: var(--ink); font-size: 12px; font-weight: 700; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .axis-y { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; font-weight: 600; }

/* ---------- Estoque (abas, grade, edição em tabela) ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.tab { padding: 10px 12px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--volt); font-weight: 800; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.chip:hover { border-color: var(--ink); }
.chip.is-active, .chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip.on .muted { color: inherit; opacity: .75; }
button.chip { cursor: pointer; font-family: inherit; }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-height: 40px; }
.checks .check { min-height: 0; font-weight: 500; }
.table td input[type=text], .table td input[type=number], .table td input[type=date], .table td select { min-width: 72px; padding: 6px 8px; font-size: 13px; }
.table td input.w-s { width: 80px; }
.table td input.w-m { width: 130px; }
.table td input.w-l { min-width: 180px; width: 100%; }
.table tr.is-total td { font-weight: 800; background: var(--zebra); }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { display: inline; margin: 0; }
input[type=date], input[type=month], input[type=search], textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-height: 40px; }
textarea { width: 100%; min-height: 72px; resize: vertical; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn-danger { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--ink); text-decoration: underline; font-weight: 600; cursor: pointer; }
.pill-none, .pill-pendente, .pill-criada { background: var(--zebra); color: var(--muted); }
.pill-warn, .pill-parcial, .pill-cortador { background: var(--warn-bg); color: var(--warn); }
.pill-crit, .pill-cancelada { background: var(--crit-bg); color: var(--crit); }
.pill-costureira { background: var(--info-bg); color: var(--info); }
.pill-galpao { background: var(--ok-bg); color: var(--ok); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.form-grid .field.span-2 { grid-column: span 2; }
.detail { margin-top: 20px; border-top: 3px solid var(--ink); padding-top: 16px; }
.detail h3 { font-size: 16px; font-weight: 800; font-stretch: 112%; margin: 18px 0 10px; }
details.box { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 14px; }
details.box > summary { cursor: pointer; font-weight: 700; }
.mais-faltas > summary { cursor: pointer; list-style: none; }
.mais-faltas > summary::-webkit-details-marker { display: none; }
.mais-faltas > summary strong { text-decoration: underline; }
.mais-faltas[open] > summary strong::after { content: " (recolher)"; font-weight: 400; }
.alert-link { text-decoration: none; cursor: pointer; transition: border-color .15s; }
.alert-link:hover, .alert-link:focus-visible { border-color: currentColor; }
.alert-link .alert-mais { font-weight: 700; text-decoration: underline; white-space: nowrap; }
.modal {
  width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.modal-body { padding: 20px; }
.modal::backdrop { background: rgba(0, 0, 0, .45); }
.modal:target:not([open]) { display: block; position: fixed; inset: 24px; margin: auto; z-index: 50; overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-kpis { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.modal-kpis > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; min-width: 120px; }
.modal-kpis span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.modal-kpis strong { font-size: 20px; }
.modal .table-wrap { max-height: 55vh; }
.cap-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.stack > * + * { margin-top: 10px; }
.mono { font-family: var(--mono); }
@media (max-width: 1279px) {
  .kpis-5, .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .kpis-5, .kpis-6, .kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .field.span-2 { grid-column: auto; }
}

/* ---------- Login / telas sem menu ---------- */
body.auth { min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 36px 32px; box-shadow: 0 10px 30px rgba(11, 11, 12, .06);
  border-top: 6px solid var(--volt);
}
.auth-card .error-box { padding: 0; align-items: stretch; text-align: left; }
.auth-logo { display: block; width: 180px; height: auto; margin-bottom: 28px; }
.auth-title { font-size: 22px; font-weight: 800; font-stretch: 125%; text-transform: uppercase; margin-bottom: 4px; }
.auth-sub { color: var(--muted); margin-bottom: 20px; }
.auth-form { display: grid; gap: 14px; margin-bottom: 16px; }
.auth-help { color: var(--muted); font-size: 13px; text-align: center; }
.auth-foot { color: var(--muted); font-size: 12px; margin-top: 18px; letter-spacing: .04em; }
.demo-hint { margin-top: 20px; padding: 12px 14px; border-radius: 8px; background: var(--zebra); font-size: 13px; }
.demo-hint ul { margin: 6px 0 0; padding-left: 18px; }

@media (prefers-color-scheme: dark) {
  .auth-logo { filter: invert(1); }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .config-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 899px) {
  .sidebar { position: sticky; top: 0; inset: auto; width: auto; height: auto; }
  .sidebar-top { padding: 12px 16px; }
  .brand img { width: 112px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
    border: 1px solid #333338; border-radius: 8px; background: none; color: var(--sidebar-ink); cursor: pointer;
  }
  .js .sidebar-body { display: none; }
  .js .nav-open .sidebar-body { display: flex; }
  .sidebar-body { max-height: calc(100vh - 66px); overflow-y: auto; border-top: 1px solid #222226; }
  .nav { padding: 8px 12px; }
  .main { margin-left: 0; }
  body.app { background: var(--paper); }
  .container { padding: 20px 16px 40px; }
  .page-title { font-size: 24px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 28px; font-size: clamp(20px, 15cqi, 28px); }
  .kpi-value.is-long { font-size: 20px; font-size: clamp(16px, 10cqi, 20px); }
  .card { padding: 16px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .toolbar .btn { flex: 1 1 auto; }
  .sep-row form, .sep-row form .btn { width: 100%; }
  .form-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 420px) {
  .auth-card { padding: 28px 20px; }
  .block-title { font-size: 17px; }
}
/* ---------- Sala de Estoque ---------- */
.sala-kpis .kpi-value { font-size: 30px; }
.sala-kpis .kpi-value.is-long { font-size: 20px; line-height: 1.5; }
.sala-ajuda ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.sala-ajuda { margin: 0 0 16px; }
kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
.sala-filtros .toolbar { margin-bottom: 10px; }
.sala-sel-field { flex: 0 1 220px; }
.sala-zoom { align-items: center; }
.sala-zoom-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.sala-zoom select { min-width: 64px; }
.sala-opcoes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 12px; }
.sala-opcoes .subtabs { margin: 0; }
.sala-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.sala-grid.is-baixo { grid-template-columns: minmax(0, 1fr); }
.sala-grid > .card { margin-bottom: 0; min-width: 0; }
.sala-mapa { padding: 12px; }
.sala-svg-wrap { width: 100%; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.sala-svg { display: block; width: 100%; height: auto; font-family: var(--font); user-select: none; -webkit-user-select: none; }
.sala-svg.is-selecionavel { cursor: crosshair; touch-action: none; }
.sala-svg.is-carregando { opacity: .6; }
.sala-svg .sala-fundo { fill: var(--surface); }
.sala-svg .sala-eixo text { fill: var(--muted); font-weight: 600; }
.sala-svg .sala-lbl-bloco { fill: #6B7480; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-linejoin: round; }
.sala-svg .sala-sel-rect { fill: rgba(227, 162, 26, .16); stroke: #E3A21A; stroke-width: 2px; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.sala-mapa-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.sala-mapa-foot .inline-form { display: inline-flex; gap: 8px; }
.sala-painel h2 { margin-bottom: 4px; }
.sala-painel .card-sub { margin-bottom: 12px; }
.sala-painel .stack .btn { align-self: flex-start; }
.sala-painel .stack { display: flex; flex-direction: column; }
.sala-painel details.box > summary { font-size: 14px; }
.sala-painel details.box > form, .sala-painel details.box > .stack { margin-top: 12px; }
.sala-form-title { font-weight: 800; font-size: 14px; }
.sala-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sala-setas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sala-setas .btn { font-size: 18px; padding: 6px 0; }
.sala-limpar { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sala-pilha-wrap { max-height: 52vh; }
.sala-pilha td { padding: 4px 6px; }
.sala-pilha td input[type=text], .sala-pilha td input[type=number], .sala-pilha td select { min-width: 0; min-height: 34px; padding: 4px 6px; }
.sala-pilha td select { width: 64px; padding-right: 18px; }
.sala-pilha td input.w-s { width: 64px; }
.sala-pilha td input.w-m { width: 120px; }
.sala-pilha td:nth-child(2) input { min-width: 120px; }
.sala-chao-extra { border-color: var(--ink); }
.sala-lista { max-height: 62vh; }
.sala-medidas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.sala-medidas-tab { max-height: 360px; margin-top: 8px; }
.sala-imp-opcoes { margin-top: 12px; }
.sala-legenda { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.sala-legenda .tam {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 24px; padding: 0 8px;
  border-radius: 4px; color: #fff; font-weight: 700; font-size: 12px;
}
.tam-p    { background: #93C47D; }
.tam-m    { background: #45818E; }
.tam-g    { background: #3C78D8; }
.tam-gg   { background: #6FA8DC; }
.tam-xg   { background: #5B3FA8; }
.tam-sem  { background: #8A94A0; }
.sala-legenda .tam-vazia { background: rgba(150,160,172,0.16); color: var(--muted); border: 1px solid rgba(150,160,172,0.55); }
/* 3D */
.sala-3d-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sala-3d { position: relative; width: 100%; height: min(70vh, 700px); min-height: 360px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(var(--surface), var(--paper)); overflow: hidden; }
.sala-3d-canvas, .sala-3d-labels { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sala-3d-canvas { touch-action: none; cursor: grab; }
.sala-3d-canvas:active { cursor: grabbing; }
.sala-3d-labels { pointer-events: none; }
.sala-3d-tip { position: absolute; z-index: 2; max-width: 320px; padding: 8px 10px; border-radius: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(11, 11, 12, .14); font-size: 13px; white-space: pre-line; pointer-events: none; }
.sala-3d-tip::first-line { font-weight: 700; }
.sala-3d-erro { position: absolute; inset: auto 16px 16px; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.sala-mapa > .hint { margin-top: 8px; }
@media (max-width: 1100px) {
  .sala-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .sala-medidas { grid-template-columns: minmax(0, 1fr); }
  .sala-sel-field { flex: 1 1 100%; }
  .sala-3d { height: 60vh; }
}
/* Lojas */
.loja-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loja-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; margin: 0; }
.loja-meta dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.loja-meta dd { margin: 2px 0 0; font-weight: 600; }
.loja-divider { border-top: 1px solid var(--line); margin: 16px 0; }
.loja-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.loja-actions .box { margin-top: 0; }
.loja-cookies textarea { width: 100%; font-family: var(--mono); font-size: 12px; }
.loja-passos { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0; }
.loja-passos li { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted, #666); font-size: 13px; }
.loja-passos li.feito { background: var(--ink); border-color: var(--ink); color: #fff; }
.loja-passos li.agora { background: var(--volt); border-color: #0B0B0C; color: #0B0B0C; font-weight: 600; }
.loja-letras { align-items: flex-end; }
.loja-letras-img { width: 208px; height: 64px; object-fit: contain; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.loja-saida { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12px; background: var(--zebra); padding: 10px; border-radius: 6px; margin: 8px 0 0; max-height: 240px; overflow: auto; }
.loja .form-actions .inline-form { display: inline-flex; }
@media (max-width: 899px) {
  .loja-actions { grid-template-columns: minmax(0, 1fr); }
}

/* Página de impressão (ordem de compra) */
.print-page { background: #fff; color: #0B0B0C; }
.print-sheet { max-width: 800px; margin: 24px auto; padding: 0 16px; }
.print-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 3px solid #0B0B0C; padding-bottom: 12px; margin-bottom: 16px; }
.print-head h1 { margin: 0; font-size: 22px; font-stretch: 115%; text-transform: uppercase; }
.print-head p { margin: 4px 0 0; color: #6B6B73; }
.print-foot { margin-top: 24px; color: #6B6B73; font-size: 12px; }
.print-total:first-child td { border-top: 2px solid #0B0B0C; }
@media print { .no-print { display: none !important; } .print-sheet { margin: 0; max-width: none; } }

/* Corte e distribuição: rodada + costureiras (cartões, recolher/abrir) */
.rodada-grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .rodada-grid { grid-template-columns: 1fr; } }
.mini-title { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rodada-grid .field { margin-bottom: 12px; }
.rodada-datas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rodada-prev { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--zebra); }
.rodada-prev strong { font-size: 20px; font-stretch: 120%; }
.costureiras { position: relative; }
.ver-todas { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.cost-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cost-head .mini-title { margin: 0; }
.cost-count { background: var(--volt); color: #0B0B0C; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 13px; }
.cost-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cost-busca { flex: 1; min-width: 180px; }
.cost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.cost-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.cost-card input { margin-top: 3px; }
.cost-card strong { display: block; }
.cost-card small { display: block; color: var(--muted); font-size: 12px; }
.cost-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cost-card[hidden] { display: none; }
.cost-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.cost-foot .btn-primary { margin-left: auto; }
.cost-vazio { display: none; margin: 4px 0 0; }
/* recolhido (padrão): as mais livres (.cost-top) e as marcadas; busca e botões ficam no "Mostrar todas" */
.ver-todas:not(:checked) ~ .cost-grid .cost-card:not(.cost-top):not(:has(input:checked)) { display: none; }
.ver-todas:not(:checked) ~ .cost-tools { display: none; }
.cost-livre { color: var(--ok); font-weight: 700; }
.cost-depois { border-style: dashed; }

/* Corte: atualiza sozinho (com JS) — os botões Recalcular ficam só para quem está sem JS */
.js .js-hide { display: none !important; }
.corte-status { position: sticky; top: 8px; z-index: 5; margin: 0 0 0 auto; width: max-content; max-width: 100%; min-height: 0; font-size: 12px; font-weight: 700; padding: 0; border-radius: 999px; }
.corte-status:not(:empty) { padding: 4px 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.corte-status.ok { color: var(--ok); }
.corte-status.erro { color: var(--crit); }
/* Nas tabelas novas, só o cabeçalho (thead) fica preso no topo ao rolar: os
   títulos de grupo, a coluna "Quem" e a linha de total rolam junto (senão
   grudam no topo e cobrem o cabeçalho). */
.plano tbody th, .dist tbody th, .pag-tabela tbody th { position: static; z-index: auto; }
/* o total da distribuição fica preso embaixo, para conferir com o espelho rolando */
.dist tfoot th, .dist tfoot td { position: sticky; top: auto; bottom: 0; z-index: 2; }
.plano thead th, .dist thead th, .pag-tabela thead th { z-index: 3; }
/* plano por rolo agrupado por modelo */
.plano-filtro { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.plano-busca { flex: 1; min-width: 200px; }
.plano tbody[hidden], .plano tr[hidden] { display: none; }
.plano tr.plano-grupo th, .plano tr.plano-grupo td { background: var(--zebra); text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); border-top: 1px solid var(--line); }
.plano tr.plano-grupo .peca-nome { display: inline; margin-right: 10px; }
.plano .peca-sku.plano-cod { display: inline; }
.plano .plano-grade { font-weight: 400; font-size: 13px; }
/* grade digitada no corte (19/11): linha própria embaixo do nome do modelo */
.plano .plano-prop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-weight: 400; font-size: 13px; }
.plano-prop-res .grade-tam { margin-right: 8px; white-space: nowrap; }
.plano td.plano-cor { padding-left: 24px; }
/* Plano por rolo mais apertado (03/12/2026, pedido do dono, coluna Falta (mensal)). */
.plano thead th { white-space: nowrap; }
.plano th.num, .plano td.num { padding-left: 6px; padding-right: 6px; }
.plano td input.w-s { width: 64px; }
.plano td small.muted { white-space: nowrap; }
.plano-nada { margin: 8px 0 0; }
/* grade da mesa: risco e quadro Precisamos / Vai sair / Resultado embaixo da cor */
.plano tr.plano-mesa td { padding-left: 24px; border-top: 0; }
.mesa-linha { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.mesa-risco { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.mesa-tam { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.mesa-tam input.w-xs { width: 56px; }
.mesa-aviso { margin: 0; font-size: 13px; color: var(--warn); }
.mesa-quadro { max-width: 560px; }
.mesa-quadro th[scope="row"] { font-weight: 500; text-transform: none; letter-spacing: 0; }
.mesa-sobra { color: var(--warn); }
.mesa-falta { color: var(--crit); }
.mesa-certo { color: var(--ok); }
.corte-cortador { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 12px; max-width: 520px; }
.corte-cortador .field { flex: 1; min-width: 220px; margin: 0; }
.dist .prod .dist-grade { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dist .prod .dist-risco { display: block; margin-top: 4px; font-size: 15px; }
.dist .prod .dist-risco strong { font-weight: 800; }
.plano-porgrade td.grade-campos { white-space: nowrap; }
.plano-porgrade td.grade-campos .mesa-tam { margin-right: 8px; }
.plano-porgrade td.grade-campos small { display: block; white-space: normal; }
.plano-porgrade .grade-falta { display: block; font-size: 12px; }
.plano-porgrade td.grade-res { min-width: 240px; }
.plano-porgrade .grade-tam { display: block; white-space: nowrap; font-size: 13px; }
.plano-porgrade td small.muted { display: block; }
.mesa-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
/* Quem costura o quê */
.placar-cost { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pc { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pc-nome { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pc-n { font-size: 22px; font-weight: 800; font-stretch: 120%; font-variant-numeric: tabular-nums; }
.pc-n small { font-size: 12px; font-weight: 500; font-stretch: 100%; color: var(--muted); }
.pc-txt { font-size: 12px; color: var(--muted); }
.pc-crit { border-color: var(--crit); }
.pc-crit .pc-txt strong { color: var(--crit); }
.pc-warn { border-color: var(--warn); }
.pc-bar { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pc-bar i { display: block; height: 100%; width: 0; background: var(--ok); }
.pc-bar i.pc-bar-warn { background: var(--warn); }
.pc-bar i.pc-bar-crit { background: var(--crit); }
.pc-bar i.w5{width:5%}.pc-bar i.w10{width:10%}.pc-bar i.w15{width:15%}.pc-bar i.w20{width:20%}.pc-bar i.w25{width:25%}.pc-bar i.w30{width:30%}.pc-bar i.w35{width:35%}.pc-bar i.w40{width:40%}.pc-bar i.w45{width:45%}.pc-bar i.w50{width:50%}
.pc-bar i.w55{width:55%}.pc-bar i.w60{width:60%}.pc-bar i.w65{width:65%}.pc-bar i.w70{width:70%}.pc-bar i.w75{width:75%}.pc-bar i.w80{width:80%}.pc-bar i.w85{width:85%}.pc-bar i.w90{width:90%}.pc-bar i.w95{width:95%}.pc-bar i.w100{width:100%}
/* Pagamentos: abas e um cartão por pessoa */
.pag-abas { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 16px; }
.pag-abas a { padding: 10px 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pag-abas a:hover { color: var(--ink); }
.pag-abas a.on { color: var(--ink); border-bottom-color: var(--ink); }
.pag-tabela td, .pag-tabela th { vertical-align: top; }
.pag-tabela tbody.pag-pessoa { border-top: 2px solid var(--ink); }
.pag-tabela th.pag-quem { width: 260px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--ink); white-space: normal; background: var(--zebra); }
.pag-tabela .pag-quem .pix { display: block; margin-top: 4px; }
.pag-tabela .pag-soma { display: block; margin-top: 8px; font-size: 13px; }
.pag-tabela .pag-explica { display: block; margin-top: 2px; font-size: 11px; }
.pag-tabela .lotes-pagar { margin: 0; }
.pag-tabela td.acao { white-space: nowrap; text-align: right; width: 1%; }
.pag-tabela td.acao .inline-form { display: inline-block; }
.pag-tabela td.num { white-space: nowrap; width: 1%; }

.compras-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Cortes e entregas: lista simples */
.ordens-lista td { vertical-align: middle; }
.ordens-data { display: block; font-size: 11px; font-family: var(--f, inherit); }
.ordens-lista td.ordens-sub { padding-left: 24px; }
.ordens-lista tbody.ordens-div { border-left: 3px solid var(--line); }
.ordens-lista tr.ordens-div-head td { background: var(--zebra); font-size: 13px; }
.ordens-etapa { white-space: nowrap; }
.passos { display: inline-flex; gap: 3px; vertical-align: middle; }
.passos i { width: 14px; height: 8px; border-radius: 3px; background: var(--line); }
.passos i.feito { background: var(--ink); }
.passos i.agora { background: var(--volt); box-shadow: inset 0 0 0 1.5px #0B0B0C; }
.mini-bar { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-bar .pc-bar { width: 70px; }
.dist .dist-sel { min-width: 170px; }
.dist-filtro { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.dist-filtro .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dist-filtro .chip .muted { font-weight: 400; }
.dist tbody[hidden] { display: none; }
.dist td.dist-tamcel input { width: 64px; text-align: right; }
.dist td.dist-tamcel.is-espelho input { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dist .dist-calc { display: block; font-size: 11px; }
.dist tfoot tr.dist-soma th, .dist tfoot tr.dist-soma td { border-top: 2px solid var(--ink); background: var(--zebra); font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.dist tfoot tr.dist-soma small { display: block; font-weight: 400; }
.dist tbody.dist-aberto { background: var(--zebra); }
.dist tr.dist-tam td { border-top: 0; font-size: 13px; }
.dist tr.dist-tam td.prod { padding-left: 24px; }
.dist-resumo { display: block; margin-top: 4px; }
.dist-num { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.dist-num label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.ver-todas:checked ~ .cost-foot .cost-abrir, .ver-todas:not(:checked) ~ .cost-foot .cost-fechar { display: none; }
.ver-todas:focus-visible ~ .cost-foot label { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Corte: peça com o SKU pequeno embaixo, para conferência */
.table .peca-nome { display: block; font-weight: 600; }
.table .peca-sku { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.nowrap { white-space: nowrap; }

/* Entrada sem ordem: sugestões da busca de peça */
.sugestoes { list-style: none; margin: -4px 0 12px; padding: 0; border: 1px solid var(--line); border-radius: 8px; max-height: 340px; overflow-y: auto; background: var(--surface); }
.sugestoes li { border-bottom: 1px solid var(--line); }
.sugestoes li:last-child { border-bottom: 0; }
.sugestoes li.muted { padding: 8px 10px; }
.sugestoes button { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sugestoes button:hover, .sugestoes button:focus-visible { background: var(--zebra); }
.sug-add { font-weight: 600; text-decoration: underline; white-space: nowrap; }
@media (max-width: 600px) { .sugestoes button { grid-template-columns: 1fr auto; } .sugestoes button .sku { display: none; } }

/* Oficinas de corte */
.chips.oficinas { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.chips.oficinas .chip { gap: 6px; }
.chips.oficinas .chip.is-active .muted { color: inherit; opacity: .75; }
.chips.oficinas .chip[hidden] { display: none; }
.chips.periodos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.oficinas-todas { margin-top: 4px; }
.oficinas-todas > .field { margin: 10px 0 8px; max-width: 320px; }
.oficinas-todas > .chips.oficinas { max-height: 280px; overflow-y: auto; }
details.cel-local { display: inline-block; text-align: right; }
details.cel-local > summary { cursor: pointer; list-style: none; text-decoration: underline dotted; text-underline-offset: 3px; }
details.cel-local > summary::-webkit-details-marker { display: none; }
details.cel-local ul { list-style: none; margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; white-space: nowrap; font-size: 13px; }
details.cel-local li { display: flex; justify-content: space-between; gap: 12px; }
/* Vendido × estoque físico: o número da oficina abre os cortes onde a peça está */
details.oficina-onde { display: inline-block; text-align: right; }
details.oficina-onde > summary { cursor: pointer; list-style: none; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
details.oficina-onde > summary::-webkit-details-marker { display: none; }
details.oficina-onde ul { list-style: none; margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; white-space: nowrap; font-size: 13px; }
details.oficina-onde li + li { margin-top: 4px; }
.txt-ok { color: var(--ok); font-weight: 700; }
.txt-crit { color: var(--crit); font-weight: 700; }

/* "Para produzir o quê": modelos que estão nos filtros */
.table tr.is-recorte td { background: var(--paper); }
.table tr.is-recorte td:first-child { box-shadow: inset 3px 0 0 var(--volt-ink); }

/* Gráfico de linhas (semana a semana) */
.chart .ln { stroke-width: 2; fill: none; }
.chart .dot { stroke-width: 2; }
.chart .s0, .legend .s0 { stroke: var(--muted); fill: var(--muted); color: var(--muted); }
.chart .s1, .legend .s1 { stroke: var(--info); fill: var(--info); color: var(--info); }
.chart .s2, .legend .s2 { stroke: var(--warn); fill: var(--warn); color: var(--warn); }
.chart .s3, .legend .s3 { stroke: var(--ink); fill: var(--volt); color: var(--ink); }
.chart .ln.s3 { stroke-width: 3; }
.chart .ln.s0 { stroke-dasharray: 5 4; }
.chart .ln.ln-parcial { stroke-dasharray: 3 4; }
.chart .dot-open { fill: var(--surface); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.legend .sw { width: 18px; height: 3px; background: currentColor; border-radius: 2px; }
.legend .s3 .sw { background: var(--ink); height: 4px; }
/* Gerencial → Semana a semana por loja (24/11): caixinhas, gráfico + tabelinha de % ao lado */
.sl-lojas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; }
.sl-rot { font-size: 13px; color: var(--muted); margin-right: 4px; }
.sl-loja { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.sl-loja small { color: var(--muted); }
.sl-loja:has(input:not(:checked)) { color: var(--muted); border-style: dashed; }
.sl-grade { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .sl-grade { grid-template-columns: minmax(0, 1fr); } }
.sl-rs { cursor: help; text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
.sl-lojas .btn[hidden], .sl-graf .table-foot[hidden] { display: none; }
.sl-mes-tit { margin: 22px 0 8px; }
.pos { color: var(--ok); font-size: 12px; font-weight: 600; }
.neg { color: var(--crit); font-size: 12px; font-weight: 600; }

/* Linha de Produção → Insumos: item na linha de corte */
.table tr.is-comprar td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
.table tr.is-comprar .qtd-ins { border-color: var(--crit); color: var(--crit); font-weight: 700; }
.alert .lista-compra { margin: .25rem 0 0; padding-left: 1.1rem; }
.table td input.w-xs { width: 56px; }
.ins-data { display: inline-block; margin-top: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.table td input.w-ms { width: 104px; }

/* Filtro de modelos: lista suspensa com caixinhas (sem JS) */
.dd-field { position: relative; }
.dd { position: relative; }
.dd-btn { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 200px; max-width: 260px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 500; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-btn::-webkit-details-marker { display: none; }
.dd-btn::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.dd[open] .dd-btn { border-color: var(--ink); }
.dd-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: min(680px, 90vw); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(11, 11, 12, .14); padding: 12px; }
.dd-hint { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.dd-list { columns: 2 240px; column-gap: 16px; max-height: 320px; overflow: auto; }
.dd-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 6px; font-weight: 400; break-inside: avoid; cursor: pointer; }
.dd-item:hover { background: var(--zebra); }
.dd-item small { color: var(--muted); margin-left: auto; }
.dd-item:has(input:checked) span { font-weight: 600; }
.dd-actions { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.conta-filtro { flex-basis: 100%; }
.table tfoot .total-row td { border-top: 2px solid var(--ink); background: var(--surface); }
.table tbody .total-row td { border-top: 1px solid var(--ink); background: var(--surface); }

/* "O que fazer" da Necessidade */
.sit { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.sit b { font-weight: 800; }
.sit-ja { background: var(--crit-bg); color: var(--crit); }
.sit-cortar { background: var(--warn-bg); color: var(--warn); }
.sit-dia { background: var(--ok-bg); color: var(--ok); }
.sit-sobra { background: var(--zebra); color: var(--muted); border: 1px solid var(--line); }
.sit-fora { background: var(--zebra); color: var(--muted); }
.sit-kit { background: var(--info-bg); color: var(--info); }
.sit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.sit-chips .chip { display: inline-flex; align-items: center; }
.sit-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.sit-dot.sit-ja { background: var(--crit); }
.sit-dot.sit-cortar { background: var(--warn); }
.sit-dot.sit-dia { background: var(--ok); }
.sit-dot.sit-sobra, .sit-dot.sit-fora { background: var(--muted); }

/* Previsão de vendas (estilo Placar): barra preta = vendido; traço = previsto; tracejado = futuro */
.chart .bv { fill: var(--ink); }
.chart .bv-sel { fill: var(--volt); stroke: var(--ink); stroke-width: 1.5; }
.chart .ghost { fill: transparent; stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .ghost-sel { fill: var(--volt); fill-opacity: .45; }
.chart .mk { stroke-width: 3; stroke-linecap: round; }
.chart .mk-alta, .chart .ghost-alta { stroke: var(--ok); }
.chart .mk-normal, .chart .ghost-normal, .chart .mk-prev, .chart .ghost-prev { stroke: var(--muted); }
.chart .mk-queda, .chart .ghost-queda { stroke: var(--crit); }
.chart .sel { fill: var(--zebra); }
.chart a { cursor: pointer; }
.chart a:hover .hit { fill: var(--zebra); }
.chart .axis-sel { fill: var(--ink); font-weight: 700; }
.chart .val-top { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--mono); }
.legenda-placar { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.legenda-placar span { display: inline-flex; align-items: center; gap: 6px; }
.legenda-placar .lv { width: 10px; height: 12px; border-radius: 2px; background: var(--ink); }
.legenda-placar .lt { width: 16px; height: 0; border-top: 3px solid var(--muted); border-radius: 2px; }
.legenda-placar .lt.alta { border-color: var(--ok); }
.legenda-placar .lt.queda { border-color: var(--crit); }
.legenda-placar .lg { width: 10px; height: 12px; border-radius: 2px; border: 1.5px dashed var(--muted); }
/* previsão viva no Placar (modo linha): barras + linha contínua + margem */
.chart .pl-fut { fill: var(--info); fill-opacity: .32; }
.chart .pl-margem { fill: #EF9F27; fill-opacity: .2; stroke: none; }
.chart .pl-linha { fill: none; stroke: var(--info); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .pl-ponto { fill: var(--info); stroke: var(--surface); stroke-width: 1.5; }
.chart .pl-alta { fill: var(--ok); }
.chart .pl-queda { fill: var(--crit); }
.chart-pl .val-top { font-size: 10px; }
.legenda-placar .lfx-v { width: 10px; height: 12px; border-radius: 2px; background: var(--ink); }
.legenda-placar .lfx-f { width: 10px; height: 12px; border-radius: 2px; background: var(--info); opacity: .4; }
.legenda-placar .lfx { width: 16px; height: 0; border-top: 2.5px solid var(--info); }
.legenda-placar .lfx-m { width: 12px; height: 10px; border-radius: 2px; background: #EF9F27; opacity: .35; }
.legenda-placar .lfx-pa { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.legenda-placar .lfx-pq { width: 8px; height: 8px; border-radius: 50%; background: var(--crit); }
.mes-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; }

/* Pagamentos: quem pagar, lotes de cada um, lançamento recolhido */
.pag-saldos td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.pag-saldos td.acao { text-align: right; white-space: nowrap; }
.lotes-pagar { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.valor-pagar { font-size: 17px; }
details.lancar { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-top: 28px; background: var(--surface, transparent); }
details.lancar > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-size: 15px; }
details.lancar > summary::-webkit-details-marker { display: none; }
details.lancar > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-weight: 800; flex: none; }
details.lancar[open] > summary::before { content: "\2212"; }
details.lancar > .block { margin-top: 18px; }

/* Preços de costura por modelo */
.preco-novo { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.preco-novo .field { margin: 0; }
.precos-costura tr.is-alerta td { background: var(--warn-bg); }
.hist-preco > summary { cursor: pointer; font-size: 13px; }
.hist-preco ul { margin: 6px 0 0; padding-left: 16px; font-size: 13px; }
.origem-preco { font-size: 11px; color: var(--muted, #777); }
.origem-preco.is-especial { color: var(--warn); font-weight: 700; }
.origem-preco.is-sem { color: var(--warn); }

/* Pagamentos: PIX, vales a pagar, comprovantes e nota do WhatsApp */
.pag-saldos .pix { font-size: 12px; color: var(--muted, #777); word-break: break-word; }
.pag-saldos tr.is-vale td { background: var(--warn-bg); }
.pag-saldos td.acao .btn + .btn, .pag-saldos td.acao form + .btn, .pag-saldos td.acao form + form { margin-left: 6px; }
.comprovante { font-size: 13px; }
.comprovante-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.comprovante-form input[type=file] { max-width: 210px; font-size: 12px; }
.nota-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.nota-texto { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; padding: 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; background: var(--surface, #fff); color: inherit; }
@media (max-width: 900px) { .nota-grid { grid-template-columns: 1fr; } }

/* TikTok (teste): avisos, barras de proporção, gráficos por canal */
.tt-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tt-topo .subtabs { margin: 0; }
.tt-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-acoes .inline-form { margin: 0; }
.tt-nota { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.tt-nota .icon { width: 15px; height: 15px; }
.tt-avisos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tt-aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.tt-aviso strong { display: block; font-size: 14px; line-height: 1.3; }
.tt-aviso p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.tt-aviso a { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.tt-aviso-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; }
.tt-aviso-ic .icon { width: 16px; height: 16px; }
.tt-crit { border-color: var(--crit); } .tt-crit .tt-aviso-ic { background: var(--crit-bg); color: var(--crit); }
.tt-warn { border-color: var(--warn); } .tt-warn .tt-aviso-ic { background: var(--warn-bg); color: var(--warn); }
.tt-info .tt-aviso-ic { background: var(--info-bg); color: var(--info); }
.tt-ok .tt-aviso-ic { background: var(--ok-bg); color: var(--ok); }
.tt-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
@media (max-width: 900px) { .tt-grid2 { grid-template-columns: 1fr; } }
.tt-card { margin-bottom: 16px; }
.tt-grid2 .tt-card { margin-bottom: 0; }
.tt-barras { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.tt-barras li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nome val" "barra barra"; gap: 6px 12px; align-items: baseline; }
.tt-b-nome { grid-area: nome; font-weight: 600; font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-b-val { grid-area: val; justify-self: end; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.tt-b-trilho { grid-area: barra; display: block; }
.tt-b-fundo { fill: var(--zebra); }
.tt-b-barra.k0, .chart .seg.k0 { fill: var(--ink); }
.tt-b-barra.k1, .chart .seg.k1 { fill: var(--volt); }
.tt-b-barra.k2, .chart .seg.k2 { fill: var(--info); }
.tt-b-barra.ok { fill: var(--ok); } .tt-b-barra.warn { fill: var(--warn); } .tt-b-barra.crit { fill: var(--crit); }
.chart .seg.k1 { stroke: var(--ink); stroke-width: .75; }
.chart-stack g:hover .seg { opacity: .85; }
.tt-legenda { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; font-size: 13px; color: var(--ink-2); }
.tt-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.tt-legenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tt-legenda .k0 { background: var(--ink); } .tt-legenda .k1 { background: var(--volt); border: 1px solid var(--ink); } .tt-legenda .k2 { background: var(--info); }
.tt-detalhe { margin-top: 12px; }
.tt-detalhe > summary { cursor: pointer; font-weight: 700; }
.tt-detalhe .table-wrap { margin-top: 10px; }
.tt-abas { margin-bottom: 16px; }
.tt-abas ~ .form-actions { margin: 0 0 18px; }
.tt-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tt-fotos figure { margin: 0; position: relative; }
.tt-fotos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--zebra); }
.tt-fotos figcaption { position: absolute; left: 6px; top: 6px; background: var(--volt); color: var(--ink); font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.tt-fotos label { position: absolute; display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; cursor: pointer; }
.tt-fotos .tt-foto-capa { left: 6px; top: 6px; }
.tt-fotos .tt-foto-usar { right: 6px; bottom: 6px; }
.tt-fotos .tt-foto-tirar { position: absolute; right: 6px; bottom: 6px; font-size: 11px; padding: 2px 6px; }
.tt-fotos figure:has(input[name="capa"]:checked) img { outline: 3px solid var(--volt); outline-offset: -3px; }
.tt-fotos figure:has(input[name="capa"]:checked) .tt-foto-capa { background: var(--volt); }
.tt-fotos figure:has(input[name="foto_usar"]:not(:checked)) img { opacity: .3; }
.tt-fotos-vazio[hidden] { display: none; }
.tt-hist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.tt-hist li { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tt-hist li.tt-hist-buyer { border-left-color: var(--warn); }
.tt-hist li.tt-hist-seller { border-left-color: var(--volt); }
.tt-hist .tt-fotos { margin: 8px 0 0; }
.tt-hist-cab { font-size: 13px; margin-bottom: 4px; }
/* Foto da peça (bipagem e devolução) */
.tt-foto-peca { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; flex: none;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--zebra); }
.tt-foto-peca img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-foto-peca.is-mini { width: 48px; height: 48px; border-radius: 6px; }
.tt-foto-peca.is-vazia { font-size: 11px; color: var(--muted); text-align: center; }
.tt-cod { font-family: var(--mono, ui-monospace, monospace); font-size: 11px; color: var(--muted); word-break: break-word; }
.tt-pecas { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-peca-mini { display: inline-flex; align-items: center; gap: 6px; }
.tt-pedidos { margin-top: 4px; font-size: 12px; }
.tt-pedidos summary { cursor: pointer; color: var(--muted); }
.tt-peca { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.tt-peca:last-child { margin-bottom: 0; }
.tt-hist-nota { margin: 6px 0 0; padding: 8px 10px; background: var(--zebra); border-radius: 6px; white-space: pre-wrap; }
.tt-fotos-vazio { display: flex; align-items: center; gap: 10px; padding: 18px; margin-bottom: 16px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.tt-anuncio .fields { margin-bottom: 12px; }
.tt-col2 { grid-column: span 2; }
@media (max-width: 700px) { .tt-col2 { grid-column: auto; } }
.tt-anuncio textarea { width: 100%; }
.tt-frescor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.tt-frescor .icon { width: 15px; height: 15px; }
.tt-frescor strong { color: var(--ink); }
.tt-frescor-erro { color: var(--warn); }
.tt-camera { margin: 4px 0 14px; }
.subtabs[data-camera-lidos][hidden] { display: none; }
.tt-camera video { display: block; width: 100%; max-width: 480px; max-height: 50vh; object-fit: cover; border-radius: 10px; background: var(--ink); }
.tt-kpis-in { margin-bottom: 18px; }
.tt-kpis-in .kpi { box-shadow: none; }
.card > h3.card-title { margin: 6px 0 10px; }

/* Desenvolvedor → Em desenvolvimento (telas simuladas) */
.sim-split { margin: 16px 0; }
.sim-json { max-height: 420px; overflow: auto; padding: 10px 12px; background: var(--zebra); border-radius: 6px; font-family: var(--mono); font-size: 12px; white-space: pre; }
.sim-bip { flex: 1 1 320px; }
.sim-bip input { font-family: var(--mono); font-size: 18px; min-height: 48px; }
.sim-etiqueta { width: 100%; max-width: 380px; padding: 16px; border: 2px solid #000; border-radius: 4px; background: #fff; color: #000; display: grid; gap: 10px; font-size: 13px; }
.sim-etq-topo { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.sim-etq-topo span { font-size: 11px; font-weight: 800; letter-spacing: .06em; border: 1px solid #000; padding: 2px 6px; }
.sim-barcode rect { fill: #000; }
.sim-etq-cod { font-family: var(--mono); font-size: 15px; font-weight: 700; text-align: center; letter-spacing: .08em; }
.sim-etq-bloco { display: grid; gap: 2px; border-top: 1px dashed #000; padding-top: 8px; }
.sim-etq-bloco span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

/* Anúncios da TikTok: histórico com uma mudança por linha */
.tt-hist-detalhe { white-space: pre-line; min-width: 220px; }

/* Novo anúncio da TikTok */
.tt-radio { display: block; padding: 4px 0; }
.tt-tabela { max-width: 220px; max-height: 220px; border: 1px solid var(--line, #ddd); border-radius: 8px; vertical-align: middle; }
.tt-previa { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 12px 16px; margin: 8px 0 12px; }
.tt-previa-desc ul { margin: 6px 0 6px 18px; }
.tt-previa-desc p { margin: 0 0 8px; }
.tt-fotos figcaption { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
/* no novo anúncio a legenda fica embaixo da foto (em cima, cobria a foto) */
.tt-card .tt-fotos figcaption { position: static; background: none; padding: 0; font-weight: 400; }
.tt-card .tt-fotos img { object-fit: contain; background: #fff; } /* mostra a foto como vai (enquadrada ou com borda) */
/* Enquadrar foto do anúncio (23/11/2026) */
.tt-enq-aviso { color: var(--warn, #a15c00); font-weight: 700; }
.tt-enq-ok { color: var(--ok, #2f7a2f); font-weight: 700; }
.tt-enq { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.tt-enq > summary { cursor: pointer; font-weight: 700; }
.tt-enq-corpo { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-top: 10px; }
.tt-enq-vista { position: relative; overflow: hidden; width: 240px; max-width: 100%; border-radius: 6px; background: var(--zebra); touch-action: none; user-select: none; }
.tt-enq-vista img { display: block; width: 100%; height: auto; }
.tt-enq-moldura { position: absolute; border: 2px solid var(--volt); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); cursor: grab; pointer-events: none; }
.tt-enq-vista.is-arrastando .tt-enq-moldura { cursor: grabbing; }
.tt-enq-moldura[hidden] { display: none; }
.tt-enq-controles { flex: 1; min-width: 240px; }
.tt-enq-controles input[type="range"] { width: 100%; }
.tt-enq-atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }


/* Linha de Produção → Prioridade de envio (19/11/2026) */
.prio-kpis a.kpi { text-decoration: none; color: inherit; display: block; }
.prio-kpis a.kpi:hover { border-color: var(--ink); }
.prio-kpis a.kpi.is-sel { outline: 3px solid var(--ink); outline-offset: -1px; }
.prio-kpis .prio-atrasado .kpi-value { color: var(--crit); }
.prio-kpis .prio-hoje .kpi-value { color: var(--warn); }
.prio-atrasado { color: var(--crit); font-weight: 800; }
.prio-hoje { color: var(--warn); font-weight: 800; }
.prio-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.prio-falta { color: var(--crit); font-weight: 700; }
.prio-tem { color: var(--ok); font-weight: 700; }
.prio-chip-atraso { color: var(--crit); font-weight: 700; margin-left: 4px; }
.chip.is-active .prio-chip-atraso { color: inherit; }
.prio-plat { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--line); color: var(--ink); }
.prio-plat-tiktok { background: #111; color: #fff; }
.prio-plat-shopee { background: #ee4d2d; color: #fff; }
@media (max-width: 900px) { .prio-kpis.kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Estoque → Previsões → Compra e corte pela previsão (19/11/2026) */
.row-strong td { font-weight: 700; }
.prev-neg { color: var(--crit); font-weight: 700; }
.print-sheet.print-largo { max-width: 1100px; }
/* PDF ajustável da ordem de compra (03/12/2026) */
.compra-ajuste { margin-bottom: 24px; }
.compra-mostrar { border: 0; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.compra-mostrar legend { font-weight: 700; margin-bottom: 4px; }
.compra-obs { white-space: pre-line; border-left: 3px solid #0B0B0C; padding-left: 10px; }
/* Necessidade / Material: colunas da previsão nova ao lado da regra de hoje (v225) */
.table .col-novo { background: rgba(37, 99, 235, 0.07); }
.print-largo .table { font-size: 11px; }
.print-largo .table-wrap { max-height: none; overflow: visible; }
@media print { .print-largo .alert { break-inside: avoid; } .print-largo tr { break-inside: avoid; } }
/* Meus cortes (cortador, 23/11/2026): um cartão por corte, abre e fecha */
.corte-cortador { margin-bottom: 12px; }
.corte-cortador summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.corte-cortador form { margin-top: 12px; }

/* Vendas > Marketing: comparar meses e caderneta (24/11) */
.mkt-lista { margin: 4px 0 0; padding-left: 18px; }
.mkt-lista li { margin: 2px 0; }
.mkt-meses { margin-bottom: 16px; }
.mkt-corrigir summary { cursor: pointer; }
.mkt-corrigir .form-grid { min-width: 520px; margin: 8px 0; }
.mkt-mais { margin-top: 8px; }
.mkt-mais summary { cursor: pointer; font-weight: 600; }

/* ---------- DRE (24/11/2026) ---------- */
.lista-simples { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.dre-tabela th[scope="row"] { white-space: nowrap; }
.dre-tabela td.num { white-space: nowrap; }
.dre-tabela tr.dre-l-titulo th, .dre-tabela tr.dre-l-titulo td { font-weight: 700; border-top: 1px solid var(--line); }
.dre-tabela tr.dre-l-resultado th, .dre-tabela tr.dre-l-resultado td { font-weight: 800; background: var(--zebra); }
.dre-tabela tr.dre-l-item th { font-weight: 400; padding-left: 1.25rem; }
.dre-tabela tr.dre-l-info th, .dre-tabela tr.dre-l-info td { color: var(--muted); font-weight: 400; }
.dre-comp { display: grid; gap: .75rem; }
.dre-comp-topo { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.dre-itens { display: grid; gap: .4rem; }
.dre-item { display: grid; grid-template-columns: minmax(12rem, 1fr) 9rem; gap: .5rem; }
.dre-acoes { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (max-width: 640px) { .dre-item { grid-template-columns: 1fr; } }.dre-tabela tbody th { text-transform: none; letter-spacing: normal; font-size: inherit; color: var(--ink); }
.dre-tabela tr.dre-l-info th { color: var(--muted); }
/* Plano de contas (24/11/2026) */
.plano-contas .plano-grupo th, .plano-contas .plano-grupo td { background: var(--zebra); font-weight: 700; border-top: 1px solid var(--line); }
.plano-contas .plano-cod { width: 6.5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plano-contas .plano-cod input { width: 5.5rem; }
.plano-contas .plano-nome input { width: 100%; min-width: 14rem; }
.plano-contas tr.is-inativa td { color: var(--muted); }
.plano-contas tr.is-inativa .plano-nome input { text-decoration: line-through; }
.plano-nova { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }

/* PALIATIVO (24/11/2026): bipar etiquetas em lista */
.pal-lotes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pal-bipar textarea { min-height: 48px; font-family: var(--mono, monospace); }
.kpi-warn { border-color: var(--warn); }
.kpi-warn .kpi-value { color: var(--warn); }
.pal-lista tr.pal-cancelado td { background: var(--crit-bg); }
.pal-lista tr.pal-naoachou td, .pal-lista tr.pal-semitens td { background: var(--warn-bg); }
.pal-saida { margin: 12px 0; }
.pal-saida summary { cursor: pointer; padding: 6px 0; }
.subtabs[data-pal-outros][hidden] { display: none; }
/* câmera baixa: o aviso de cada etiqueta e os números ficam na tela enquanto bipa */
.pal-camera video { max-height: 28vh; }
.pal-camera .card-sub { margin: 4px 0 0; font-size: 13px; }.pal-lido { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 14px; word-break: break-all; }
.pal-lista tr.pal-jaentrou td { background: var(--ok-bg); }
.pal-jaentrou code { font-weight: 700; }
.pal-num { font-size: 15px; font-variant-numeric: tabular-nums; }
.pal-partes { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
/* v175: Imprimir etiquetas sem lotes */
.pal-todas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.pal-todas form { margin: 0; }
.pal-resumo { margin: 8px 0 12px; padding-left: 20px; color: var(--muted); }
.pal-resumo li { margin: 2px 0; }
.pal-busca { margin: 8px 0; }
.sep-lido { margin: 0 0 10px; }
/* v182: Bipar — o último bip, grande */
.pal-quadro { margin: 12px 0; padding: 16px 18px; border-radius: 12px; border: 3px solid var(--ok); background: var(--ok-bg); }
.pal-quadro-warn { border-color: var(--warn); background: var(--warn-bg); }
.pal-quadro-crit { border-color: var(--crit); background: var(--crit-bg); }
.pal-quadro-topo { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-bottom: 6px; }
.pal-quadro-num { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pal-quadro-tit { font-size: 1.35rem; font-weight: 800; color: var(--ok); display: inline-flex; gap: 6px; align-items: center; }
.pal-quadro-warn .pal-quadro-tit { color: var(--warn); }
.pal-quadro-crit .pal-quadro-tit { color: var(--crit); }
.pal-quadro-peca { margin: 2px 0; font-size: 1.7rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pal-quadro-nota { margin: 8px 0 0; font-size: 1rem; }
.pal-voz { display: inline-flex; gap: 6px; align-items: center; }
.pal-voz select { max-width: 14rem; }
.pal-pecas strong { font-weight: 700; }
.pal-pecas small { display: block; }
@media (max-width: 600px) { .pal-quadro-peca { font-size: 1.3rem; } .pal-quadro-num { font-size: 1.3rem; } }
/* v181: andamento da Lista de separação */
.sep-andamento { padding: 14px 16px; }
.sep-andamento-topo { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.sep-andamento-topo strong { font-size: 1.05rem; }
.sep-barra { display: block; width: 100%; height: 14px; margin: 10px 0 6px; border: 0; border-radius: 7px; background: var(--line); overflow: hidden; appearance: none; -webkit-appearance: none; }
.sep-barra::-webkit-progress-bar { background: var(--line); border-radius: 7px; }
.sep-barra::-webkit-progress-value { background: var(--ok); border-radius: 7px; }
.sep-barra::-moz-progress-bar { background: var(--ok); border-radius: 7px; }
.sep-prontas { margin: 10px 0 0; }
.sep-prontas > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.sep-jaimprimi { display: inline-block; margin: 0 0 0 8px; }
/* v175: Fechamento do dia */
.fech-dia { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.fech-sits { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.fech-linha.fech-atras td:first-child { color: var(--crit); }
.fech-linha.fech-upseller td:first-child, .fech-linha.fech-falta td:first-child, .fech-linha.fech-sumiu td:first-child { color: var(--warn); }
.fech-linha.fech-hub td:first-child { color: var(--ok); }

/* PALIATIVO → Lista de separação (25/11, v151) */
.sep-filtro .card-title { margin-top: 12px; }
.sep-origem { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.sep-atalhos { margin: 0 0 16px; }
.sep-atalhos .is-active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.sep-cancel { margin: 6px 0; font-weight: 600; }
.sep-baixa { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.sep-confirmar .form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sep-folha { width: 100%; font-size: 13px; }
.sep-folha td { padding-top: 7px; padding-bottom: 7px; }
.sep-ok { width: 28px; }
/* foto em pé (3:4), inteira e grande o bastante para reconhecer a peça (v154) */
.sep-fotocol { width: 100px; min-width: 100px; }
.sep-foto { display: block; width: 84px; min-width: 84px; max-width: none; height: 112px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.sep-semfoto { background: var(--line); opacity: .5; }
.sep-folha .sep-foto { width: 60px; min-width: 60px; height: 80px; }
.sep-folha .sep-fotocol { width: 70px; min-width: 70px; }
.sep-naosepare { margin: 0 0 16px; }
.sep-rapida { align-items: center; flex-wrap: wrap; }
.sep-rapida > span { flex: 1 1 260px; }
.sep-rapida > .btn { flex: none; }
.sep-etiq { margin: 4px 0 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; }
.sep-etiq .pal-partes { margin: 6px 0 4px; }
.sep-etiq > .btn { margin-right: 8px; }
.sep-porleva { margin-top: 8px; }
.sep-porleva > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.sep-naosepare > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sep-naosepare > summary::-webkit-details-marker { display: none; }
.sep-naosepare[open] > summary { margin-bottom: 8px; }
.btn-danger-outline { border: 1.5px solid var(--crit); color: var(--crit); background: var(--crit-bg); font-weight: 600; }
.sep-naosepare-tit { font-size: 14px; margin: 20px 0 6px; }
.sep-caixa { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #111; border-radius: 3px; vertical-align: middle; }
@media print { .sep-folha tr { break-inside: avoid; } }

/* Cadastrar produto (25/11): cores e tamanhos em grade de botões com a bolinha da cor */
.cad-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.cad-grade.cad-tams { grid-template-columns: repeat(auto-fill, minmax(64px, 84px)); }
.cad-op { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 14px; line-height: 1.2; }
.cad-op:hover { border-color: var(--ink-2); }
.cad-op input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cad-op:has(input:focus-visible) { outline: 2px solid var(--info); outline-offset: 2px; }
.cad-op:has(input:checked) { border-color: var(--ink); background: var(--volt); color: #0B0B0C; font-weight: 700; }
.cad-tams .cad-op { justify-content: center; }
.cad-dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); background: #ccc; }
.cad-ja { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: auto; }
.cad-op:has(input:checked) .cad-ja { color: #2A2A2E; }
.cor-01 { background: #111; } .cor-02 { background: linear-gradient(135deg, #111 50%, #555 50%); }
.cor-03 { background: #fff; } .cor-04 { background: linear-gradient(135deg, #fff 50%, #ddd 50%); }
.cor-05 { background: #f3eee2; } .cor-06 { background: #6b4226; } .cor-07 { background: #6d1a2b; }
.cor-08 { background: #5b5d62; } .cor-09 { background: #2c5aa0; } .cor-10 { background: #a9cdf0; }
.cor-11 { background: #1f3fbf; } .cor-12 { background: #c8a27c; } .cor-13 { background: #cbb894; }
.cor-14 { background: #e46b9a; } .cor-15 { background: #f6c6d6; } .cor-16 { background: #2f7d3f; }
.cor-17 { background: #9fdcc0; } .cor-18 { background: #f2cd2e; } .cor-19 { background: #fbe9a6; }
.cor-20 { background: #b49ad8; } .cor-21 { background: #d22b2b; }
.cor-80 { background: radial-gradient(circle, #fff 18%, #111 20%); } .cor-81 { background: radial-gradient(circle, #111 18%, #fff 20%); }
.cor-82 { background: radial-gradient(circle, #fff 18%, #6b4226 20%); }
/* ---------- Ponto (25/11/2026): celular e conferência ---------- */
.ponto-nome { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.ponto-camera { position: relative; margin: 8px 0; border-radius: 12px; overflow: hidden; background: #000; }
.ponto-camera[hidden], .ponto-botao[hidden], .ponto-fila[hidden] { display: none; }
.ponto-camera video { display: block; width: 100%; max-height: 60vh; object-fit: cover; transform: scaleX(-1); }
.ponto-pede { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px; font-size: 20px; font-weight: 800; text-align: center; color: #fff; background: rgba(0, 0, 0, .6); }
.ponto-botao { min-height: 64px; font-size: 20px; margin: 8px 0; }
/* tipo da batida (02/12): opções grandes para o dedo */
.ponto-tipo { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.ponto-tipo legend { font-weight: 800; padding: 0 4px; }
.ponto-tipo-op { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 17px; }
.ponto-tipo-op input { width: 22px; height: 22px; }
.ponto-motivo[hidden] { display: none; }
.ponto-tipo-nota { font-size: 13px; margin: 6px 0 0; }
.ponto-fora { border-top: 1px solid var(--line, #ddd); padding: 10px 0; }
.ponto-fora.is-alerta p:first-child { font-weight: 600; }
.ponto-fora-lista { margin: 4px 0 8px; padding-left: 18px; }
.ponto-status { min-height: 1.4em; }
.ponto-sub { font-size: 15px; font-weight: 800; margin: 20px 0 8px; }
.ponto-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ponto-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.ponto-lista li.is-nova { border-color: var(--ok); background: var(--ok-bg); }
.ponto-hash { font-family: ui-monospace, monospace; margin-left: auto; }
.ponto-rodape { font-size: 12px; margin-top: 16px; }
.ponto-termo { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0; font-size: 13px; }
.ponto-termo p { margin: 6px 0; color: var(--ink-2); }
.ponto-ativar .field, .ponto .form .field { margin-bottom: 12px; }
.ponto-filtro { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ponto-filtro .field { min-width: 180px; margin: 0; }
.ponto-filtro .field.grow { flex: 1 1 240px; }
.ponto-filtro .form-actions { margin-top: 0; }
.ponto-oficial summary { cursor: pointer; }
.ponto-regra { margin: 0 0 16px; }
.ponto-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 12px 0; }
.ponto-card { margin: 0; }
.ponto-card.is-alerta { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.ponto-card.is-nao { opacity: .65; }
.ponto-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ponto-fotos { display: flex; gap: 6px; overflow-x: auto; }
.ponto-fotos figure { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.ponto-fotos img { display: block; width: 96px; height: 128px; object-fit: cover; border-radius: 6px; background: var(--line); }
.ponto-fotos figure:first-child img { outline: 2px solid var(--ink); }
.ponto-alertas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; }
.ponto-marcadas { display: grid; gap: 8px; }
.ponto-mini { width: 48px; height: 64px; object-fit: cover; border-radius: 4px; }
.ponto-codigo-novo { border: 2px solid var(--accent, #d4f53c); }
.ponto-codigo-grande { font-size: 2.4rem; letter-spacing: .12em; margin: .25rem 0 .5rem; }
.ponto-codigo-novo a { word-break: break-all; }
.ponto-linha { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.ponto-linha input[type=text] { width: auto; min-width: 120px; flex: 1 1 120px; }
.ponto-hora { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--line); font-variant-numeric: tabular-nums; }
.ponto-hora.is-alerta { background: var(--warn-bg); color: var(--warn); }
.ponto-hora.is-nao { text-decoration: line-through; opacity: .6; }
/* Ponto, Fases 2 e 3 (26/11/2026): correções, histórico, empresa */
s.ponto-hora { opacity: .6; }
.ponto-hora.is-incluida { border: 1px dashed currentColor; background: transparent; }
.ponto-corrigir summary { cursor: pointer; white-space: nowrap; }
.ponto-corrigir[open] { min-width: 320px; }
.ponto-trat { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.ponto-trat input[type=text] { flex: 1 1 160px; }
.ponto-hist ul, .ponto-feriados { margin: 4px 0 0; padding-left: 18px; }
.ponto-feriados li { margin: 4px 0; }
form.inline { display: inline; }
tr.ponto-fds th, tr.ponto-fds td { color: var(--muted); }

/* Vendas → Shopee (02/12/2026) */
.shp-thumb { display: block; width: 56px; min-width: 56px; max-width: none; height: 74px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.shp-thumb-lg { display: block; width: 120px; min-width: 120px; max-width: none; height: 160px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; margin-top: 12px; }
.shp-fotocol { width: 72px; min-width: 72px; }
html:not(.js) .js-only { display: none !important; }

/* ---------- Equipe: histórico de recebimentos, tarefas, mensagens, afiliadas (02/12/2026, v213) ---------- */
.txt-warn { color: var(--warn); }
tr.is-crit td { background: var(--crit-bg); }
.nav-conta { margin-left: auto; flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--volt); color: #0B0B0C; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.nav-conta.is-alerta { background: #F07171; color: #0B0B0C; }
.nav-item.is-active .nav-conta { background: #0B0B0C; color: var(--volt); }
.nav-item.is-active .nav-conta.is-alerta { color: #F07171; }
.nav-conta + .nav-tag { margin-left: 6px; }
.nav-min .nav-item { position: relative; }
.nav-min .nav-conta { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }

.receb-hist { margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 14px; }
.receb-hist > summary { cursor: pointer; padding: 4px 0; }
.receb-hist[open] > summary { margin-bottom: 8px; }
tr.receb-desfez td { color: var(--crit); }
.ordem-equipe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius); }
.ordem-equipe > p, .ordem-equipe > ul { flex-basis: 100%; margin: 0; }
.tq-lista-link { margin: 4px 0 8px; padding-left: 18px; }
.tq-lista-link li { margin: 2px 0; }

/* filtros e formulários */
.tq-filtro { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 16px; }
.tq-filtro .field { margin: 0; }
.tq-filtro .check { align-self: center; }
.tq-form { display: grid; gap: 10px; margin-top: 10px; align-content: start; }
.tq-form > .btn { justify-self: start; }
.tq-linha { display: flex; flex-wrap: wrap; gap: 10px; }
.tq-linha .field { flex: 1 1 160px; margin: 0; }
.tq-nova > summary, details.card > summary.btn { display: inline-flex; list-style: none; cursor: pointer; }
.tq-nova > summary::-webkit-details-marker, details.card > summary.btn::-webkit-details-marker { display: none; }
.tq-resumo { margin: 12px 0 8px; }
.tq-detalhe { display: grid; gap: 16px; max-width: 900px; }
.tq-apagar > summary { cursor: pointer; color: var(--crit); }

/* quadro */
.tq-quadro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tq-coluna { background: var(--zebra); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 120px; transition: outline-color .15s; outline: 2px dashed transparent; outline-offset: -2px; }
.tq-coluna.is-sobre { outline-color: var(--ink); }
.tq-col-titulo { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.tq-conta { min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; text-align: center; }
.tq-vazio, .tq-mais { margin: 8px 4px; font-size: 13px; }
.tq-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
.tq-card.is-atrasada { border-left-color: var(--crit); }
.tq-card.is-hoje { border-left-color: var(--warn); }
.tq-feito .tq-card { opacity: .75; }
.tq-card.is-arrastando { opacity: .4; }
.js .tq-card[draggable="true"] { cursor: grab; }
.tq-card-titulo { display: block; font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.tq-card-titulo:hover { text-decoration: underline; }
.tq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.tq-meta .icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.tq-card.is-atrasada .tq-prazo { color: var(--crit); font-weight: 700; }
.tq-card.is-hoje .tq-prazo { color: var(--warn); font-weight: 700; }
.tq-link { overflow-wrap: anywhere; }
.tq-mover { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tq-mover .btn { padding: 2px 8px; font-size: 12px; }
.tq-mover [hidden], .tq-vazio[hidden] { display: none !important; }
.tq-etq { font-size: 11px; }
.tq-comentarios { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.tq-comentarios li { border-left: 3px solid var(--line); padding-left: 10px; }
.tq-com-quem, .tq-com-texto { margin: 0; }
.tq-com-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .tq-quadro { grid-template-columns: 1fr; }
}

/* mensagens */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.chat-lista { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 8px; max-height: calc(100vh - 180px); overflow-y: auto; }
.chat-convs { list-style: none; margin: 0; padding: 0; }
.chat-conv { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.chat-conv:hover { background: var(--zebra); }
.chat-conv.is-active { background: var(--ink); color: var(--paper); }
.chat-conv.is-active .chat-conv-ult, .chat-conv.is-active .chat-conv-em { color: inherit; opacity: .8; }
.chat-conv-nome { font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conv-nome .icon { width: 14px; height: 14px; flex: none; }
.chat-conv.is-nova .chat-conv-nome { color: inherit; }
.chat-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--info); flex: none; }
.chat-conv-ult { grid-column: 1 / -1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conv-em { grid-row: 1; grid-column: 2; color: var(--muted); font-size: 11px; }
.chat-nova { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.chat-nova > summary { cursor: pointer; font-weight: 700; padding: 4px 2px; }
.chat-nova form { display: grid; gap: 8px; margin-top: 8px; }
.chat-membros { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.chat-membros legend { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.chat-vazio { padding: 8px; }
.chat-painel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; height: calc(100vh - 180px); min-height: 420px; }
.chat-topo { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-titulo { margin: 0; font-size: 16px; }
.chat-voltar { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.chat-msg { max-width: min(78%, 620px); align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 6px 10px; }
.chat-msg.is-minha { align-self: flex-end; background: var(--ok-bg); border-color: transparent; border-radius: 12px 12px 4px 12px; }
.chat-msg p { margin: 0; }
.chat-msg-quem { font-size: 12px; font-weight: 700; color: var(--muted); }
.chat-msg-quem small { font-weight: 400; }
.chat-msg-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg-link { margin-top: 4px !important; font-size: 13px; overflow-wrap: anywhere; }
.chat-aviso { text-align: center; font-size: 13px; margin: 0; }
.chat-enviar { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: end; padding: 10px 14px; border-top: 1px solid var(--line); }
.chat-clip { position: relative; padding-left: 10px; padding-right: 10px; cursor: pointer; }
.chat-clip input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.chat-clip:focus-within { outline: 3px solid var(--volt); outline-offset: 2px; }
.chat-msg-fotos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chat-msg-fotos img { width: 160px; height: 160px; }

/* fotos da equipe (tarefas, comentários, mensagens) */
.anexo-fotos { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.anexo-fotos li { display: grid; gap: 4px; justify-items: start; }
.anexo-foto { display: block; line-height: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--zebra); }
.anexo-foto img { width: 96px; height: 96px; object-fit: cover; }
.anexo-fotos-grandes .anexo-foto img { width: 140px; height: 140px; }
.anexo-tirar .btn { padding: 2px 8px; font-size: 12px; }
.tq-capa { position: relative; display: block; margin: -2px -4px 8px; border-radius: 6px; overflow: hidden; line-height: 0; }
.tq-capa img { width: 100%; height: 120px; object-fit: cover; }
.tq-capa-n { position: absolute; right: 6px; bottom: 6px; line-height: 1.4; padding: 0 6px; border-radius: 10px; font-size: 11px; background: rgba(0, 0, 0, .65); color: #fff; }
dialog.foto-grande { padding: 12px; border: 0; border-radius: var(--radius); background: var(--surface); max-width: 96vw; max-height: 96vh; }
dialog.foto-grande[open] { display: grid; gap: 8px; justify-items: center; }
dialog.foto-grande::backdrop { background: rgba(0, 0, 0, .75); }
dialog.foto-grande img { max-width: 92vw; max-height: 80vh; object-fit: contain; }
.foto-grande-fechar { justify-self: end; }
.foto-grande-abrir { font-size: 13px; }
.chat-enviar textarea { resize: vertical; min-height: 44px; max-height: 200px; }
.chat-anexo { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.chat-status { margin: 4px 14px 8px; font-size: 12px; min-height: 1em; }
.chat-som { margin-left: auto; padding: 2px 10px; font-size: 12px; }
.chat-som[aria-pressed="false"] { color: var(--muted); }
.chat-minis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chat-mini { display: grid; gap: 4px; justify-items: center; }
.chat-mini img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.chat-mini-tirar { padding: 2px 8px; font-size: 12px; }
/* aviso de mensagem nova no canto da tela (qualquer tela do Hub) */
.chat-avisos { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.chat-aviso-card { pointer-events: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--volt); border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); animation: chat-aviso-entra .25s ease-out; }
.chat-aviso-card p { margin: 0; }
.chat-aviso-tit { font-size: 13px; }
.chat-aviso-texto { margin-top: 4px !important; font-size: 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chat-aviso-acoes { display: flex; gap: 8px; margin-top: 8px !important; }
.chat-aviso-acoes .btn { padding: 4px 10px; font-size: 13px; }
@keyframes chat-aviso-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chat-aviso-card { animation: none; } }
@media print { .chat-avisos { display: none; } }
.chat-escolha { margin: auto; text-align: center; padding: 30px; max-width: 420px; }
.chat-escolha .icon { width: 36px; height: 36px; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; }
  .chat.chat-aberta .chat-lista { display: none; }
  .chat:not(.chat-aberta) .chat-painel { display: none; }
  .chat-voltar { display: inline; }
  .chat-lista { max-height: none; }
  .chat-painel { height: calc(100vh - 140px); }
  .chat-msg { max-width: 90%; }
}

/* afiliadas */
.af-kpis a.kpi { color: inherit; text-decoration: none; }
.af-kpis a.kpi:hover { border-color: var(--ink); }
.af-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.af-sit { white-space: nowrap; }
.af-sit-amostra { background: var(--info-bg); color: var(--info); }
.af-sit-postou, .af-sit-parceira { background: var(--ok-bg); color: var(--ok); }
.af-sit-parou { opacity: .6; }
.af-anotar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.af-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.af-ev { border-left: 3px solid var(--line); padding-left: 10px; }
.af-ev p { margin: 0; }
.af-ev-amostra { border-left-color: var(--info); }
.af-ev-situacao { border-left-color: var(--volt); }
.af-ev-texto { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Ranking (v218) */
.rk-regras { color: var(--muted); font-size: 14px; max-width: 90ch; }
.rk-podio { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 8px 0 20px; flex-wrap: wrap; }
.rk-degrau { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px; }
.rk-lugar-1 { order: 2; } .rk-lugar-2 { order: 1; } .rk-lugar-3 { order: 3; }
.rk-foto { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid #C9CCD3; background: var(--surface); }
.rk-lugar-1 .rk-foto { width: 120px; height: 120px; border-color: #E0A100; }
.rk-lugar-3 .rk-foto { border-color: #B87333; }
.rk-nome { font-weight: 700; text-align: center; }
.rk-pontos { color: var(--muted); font-size: 13px; }
.rk-base { width: 100%; text-align: center; font-weight: 800; font-size: 22px; color: #fff; background: #8A8F99; border-radius: 8px 8px 0 0; padding: 10px 0; }
.rk-lugar-1 .rk-base { background: #E0A100; padding: 26px 0; }
.rk-lugar-2 .rk-base { padding: 16px 0; }
.rk-lugar-3 .rk-base { background: #B87333; }
.rk-pessoa { display: inline-flex; align-items: center; gap: 8px; }
.rk-mini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.rk-eu td { background: var(--ok-bg); }
.rk-sobe { color: var(--ok); font-weight: 600; }
.rk-sobe::before { content: "\25B2 "; }
.rk-desce { color: var(--crit); font-weight: 600; }
.rk-desce::before { content: "\25BC "; }
.rk-erros .rk-texto { max-width: 42ch; white-space: normal; }
.rk-erros .rk-texto span { color: var(--muted); }
.rk-decidir { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.rk-decidir select { max-width: 16rem; }

/* Campeão do mês: só CSS. A foto sobe em espiral girando (os anéis mostram o
   movimento), a coroa cai e as asas saem de trás da foto. */
.camp-palco { position: relative; height: 560px; overflow: hidden; border-radius: 16px; background: radial-gradient(ellipse at 50% 35%, #3B2A6B 0%, #1B1438 55%, #0D0A1E 100%); color: #fff; perspective: 900px; }
.camp-aneis { position: absolute; left: 50%; bottom: 16px; width: 0; height: 0; animation: camp-some .6s 3.2s forwards; }
.camp-aneis span { position: absolute; left: -90px; top: -24px; width: 180px; height: 48px; border: 3px solid #F5C542; border-radius: 50%; opacity: 0; animation: camp-anel 1.1s ease-out infinite; }
.camp-aneis span:nth-child(2) { animation-delay: .37s; }
.camp-aneis span:nth-child(3) { animation-delay: .74s; }
.camp-voo { position: absolute; left: 50%; bottom: 20px; animation: camp-espiral 3.2s cubic-bezier(.35,.1,.3,1) both; }
.camp-heroi { position: relative; width: 180px; height: 180px; }
.camp-giro { position: relative; z-index: 2; width: 180px; height: 180px; animation: camp-gira 3.2s cubic-bezier(.2,.6,.3,1) both; transform-style: preserve-3d; }
.camp-foto { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 6px solid #F5C542; box-shadow: 0 0 30px rgba(245,197,66,.6); background: #fff; }
.camp-brilho { position: absolute; z-index: 0; left: -90px; top: -90px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(255,215,90,.55) 0%, rgba(255,215,90,0) 65%); opacity: 0; animation: camp-aparece .8s 3.9s both, camp-pulsa 2.4s 4.7s ease-in-out infinite; }
.camp-asa { position: absolute; z-index: 1; top: 10px; width: 210px; height: 147px; opacity: 0; }
.camp-asa-dir { left: 120px; transform-origin: 4% 40%; animation: camp-abre .8s 3.9s cubic-bezier(.2,1.4,.4,1) both, camp-bate-d 1.6s 4.7s ease-in-out infinite; }
.camp-asa-esq { right: 120px; transform-origin: 96% 40%; animation: camp-abre .8s 3.9s cubic-bezier(.2,1.4,.4,1) both, camp-bate-e 1.6s 4.7s ease-in-out infinite; }
.camp-pena { fill: #FFFFFF; stroke: #D9DCE6; stroke-width: 2; }
.camp-pena-linha { fill: none; stroke: #C9CEDB; stroke-width: 2; stroke-linecap: round; }
.camp-coroa { position: absolute; z-index: 3; left: 50%; top: -62px; width: 110px; height: 80px; opacity: 0; animation: camp-coroa .9s 3.2s ease-in both; }
.camp-coroa-ouro { fill: #F5C542; stroke: #B8860B; stroke-width: 2; }
.camp-coroa-base { fill: #E0A100; }
.camp-coroa-pedra { fill: #D64545; }
.camp-texto { position: absolute; left: 0; right: 0; bottom: 28px; text-align: center; padding: 0 16px; opacity: 0; animation: camp-aparece .7s 4.4s both; }
.camp-titulo { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: #F5C542; }
.camp-nome { font-size: 40px; font-weight: 800; line-height: 1.15; margin: 4px 0; }
.camp-pts { color: #D7D3EA; }
.camp-confete { position: absolute; inset: 0; pointer-events: none; }
.camp-confete .cf { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: camp-cai 3.4s linear infinite; }
.cf0 { left: 5%; background: #F5C542; animation-delay: 4.2s !important; }
.cf1 { left: 12%; background: #4CC17E; animation-delay: 4.9s !important; }
.cf2 { left: 19%; background: #F07171; animation-delay: 5.6s !important; }
.cf3 { left: 26%; background: #7CB2FF; animation-delay: 4.5s !important; }
.cf4 { left: 33%; background: #F5C542; animation-delay: 6.1s !important; }
.cf5 { left: 40%; background: #E58CF5; animation-delay: 4.3s !important; }
.cf6 { left: 47%; background: #4CC17E; animation-delay: 5.2s !important; }
.cf7 { left: 54%; background: #F07171; animation-delay: 4.7s !important; }
.cf8 { left: 61%; background: #7CB2FF; animation-delay: 5.9s !important; }
.cf9 { left: 68%; background: #F5C542; animation-delay: 4.4s !important; }
.cf10 { left: 75%; background: #E58CF5; animation-delay: 5.4s !important; }
.cf11 { left: 82%; background: #4CC17E; animation-delay: 4.8s !important; }
.cf12 { left: 89%; background: #F07171; animation-delay: 6.3s !important; }
.cf13 { left: 95%; background: #7CB2FF; animation-delay: 5s !important; }
.camp-acoes { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
@keyframes camp-espiral {
  0%   { transform: translate(-50%, 0) translateX(0) scale(.2); }
  15%  { transform: translate(-50%, -50px) translateX(-120px) scale(.3); }
  30%  { transform: translate(-50%, -110px) translateX(0) scale(.42); }
  45%  { transform: translate(-50%, -165px) translateX(110px) scale(.56); }
  60%  { transform: translate(-50%, -215px) translateX(0) scale(.7); }
  78%  { transform: translate(-50%, -255px) translateX(-55px) scale(.86); }
  100% { transform: translate(-50%, -280px) translateX(0) scale(1); }
}
@keyframes camp-gira { from { transform: rotateY(0); } to { transform: rotateY(1440deg); } }
@keyframes camp-anel { 0% { opacity: .9; transform: translateY(0) scale(.4); } 100% { opacity: 0; transform: translateY(-70px) scale(1.4); } }
@keyframes camp-some { to { opacity: 0; } }
@keyframes camp-aparece { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes camp-pulsa { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes camp-coroa {
  0%   { opacity: 1; transform: translate(-50%, -360px) rotate(-25deg); }
  70%  { opacity: 1; transform: translate(-50%, 8px) rotate(6deg); }
  85%  { opacity: 1; transform: translate(-50%, -10px) rotate(-10deg); }
  100% { opacity: 1; transform: translate(-50%, 0) rotate(-8deg); }
}
@keyframes camp-abre { from { opacity: 0; transform: scale(0) rotate(25deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes camp-bate-d { 0%, 100% { opacity: 1; transform: rotate(0); } 50% { opacity: 1; transform: rotate(-12deg); } }
@keyframes camp-bate-e { 0%, 100% { opacity: 1; transform: rotate(0); } 50% { opacity: 1; transform: rotate(12deg); } }
@keyframes camp-cai { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 1; transform: translateY(600px) rotate(540deg); } }
@media (max-width: 600px) {
  .camp-palco { height: 480px; }
  .camp-heroi { transform: scale(.62); }
  .camp-nome { font-size: 30px; }
  @keyframes camp-espiral {
    0%   { transform: translate(-50%, 0) translateX(0) scale(.2); }
    30%  { transform: translate(-50%, -90px) translateX(-60px) scale(.42); }
    60%  { transform: translate(-50%, -170px) translateX(50px) scale(.7); }
    100% { transform: translate(-50%, -230px) translateX(0) scale(1); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .camp-palco * { animation: none !important; }
  .camp-aneis, .camp-confete { display: none; }
  .camp-voo { transform: translate(-50%, -280px); }
  .camp-coroa { opacity: 1; transform: translate(-50%, 0) rotate(-8deg); }
  .camp-asa, .camp-brilho, .camp-texto { opacity: 1; }
}
/* ---------------------------------------------------------------- Ficha de corte (v218) */
.ficha-dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 16px; margin-bottom: 8px; }
.ficha-dados p { margin: 0; }
.ficha-modelo { margin: 20px 0 6px; font-size: 17px; }
.ficha-tabela td, .ficha-tabela th { padding: 6px 8px; }
.ficha-outros { margin: 6px 0 0; }
@media print { .ficha-modelo { break-after: avoid; } .ficha-tabela { break-inside: avoid; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Agenda de contas: oficinas a pagar (03/12, pedido do dono: "tá feio", "unir td em um lugar só") */
.pagx-partes { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.pagx-lista { display: grid; gap: 10px; }
.pagx { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.pagx-nome { font-size: 16px; font-weight: 700; }
.pagx-nome a { color: var(--ink); text-decoration: none; }
.pagx-nome a:hover { text-decoration: underline; }
.pagx-tipo { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.pagx-resumo { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pagx-pix { font-size: 13px; margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagx-pix.is-sem { color: var(--warn); }
.pagx-pix-chave { font: inherit; font-family: var(--mono); font-size: 13px; color: var(--ink); background: var(--zebra); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; max-width: 100%; min-width: 0; }
.pagx-det { margin-top: 8px; font-size: 13px; }
.pagx-det summary { cursor: pointer; color: var(--muted); }
.pagx-det .lotes-pagar { margin-top: 6px; }
.pagx-menos { font-weight: 600; }
.pagx-valor { text-align: right; white-space: nowrap; }
.pagx-valor strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pagx-valor small { display: block; font-size: 12px; color: var(--muted); }
.pagx-acoes { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 96px; }
.pagx-acoes .inline-form, .pagx-acoes .btn { width: 100%; }
.pagx-acoes .btn { justify-content: center; text-align: center; }
.pagx-vale { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  border-top: 1px dashed var(--line); padding-top: 8px; font-size: 13px; }
.pagx-vale .inline-form { display: inline-block; }
.pagx-nota { margin-top: 10px; }
.pagx-adiant { margin-top: 14px; }
.pagx-adiant summary { cursor: pointer; font-weight: 600; }
.pagx-feitos td { vertical-align: top; }
@media (max-width: 720px) {
  .pagx { grid-template-columns: minmax(0, 1fr) auto; }
  .pagx-acoes { grid-column: 1 / -1; flex-direction: row; }
  .pagx-acoes .inline-form, .pagx-acoes .btn { width: auto; flex: 1; }
}

/* Bipar a peça e imprimir (04/12): a etiqueta é impressa por um quadro fora da tela (display:none não imprime o PDF) */
.peca-frame { position: absolute; left: -10000px; top: 0; width: 400px; height: 600px; border: 0; }

/* Ponto: folha de ponto impressa (04/12, igual à planilha do formulário) */
.ponto-folha-titulo { text-align: center; font-size: 18px; text-transform: uppercase; margin: 0 0 8px; border: 2px solid #0B0B0C; padding: 6px; background: #E6E6E6; }
.ponto-folha-cab { font-size: 11px; margin-bottom: 8px; }
.ponto-folha-cab th { background: #E6E6E6; white-space: nowrap; }
.ponto-folha-dias { font-size: 11px; }
.ponto-folha-dias td, .ponto-folha-dias th { padding: 3px 6px; }
.ponto-folha-dias thead th { background: #E6E6E6; text-transform: uppercase; }
.ponto-folha-assina { display: flex; justify-content: space-around; gap: 24px; margin-top: 32px; text-align: center; font-size: 12px; }
@media print { .ponto-folha-quebra { break-before: page; } .ponto-folha-dias tr { break-inside: avoid; } }
.ponto-extras { margin: 4px 0 0; padding-left: 18px; font-size: 12px; }

/* Escala do dia (04/12/2026): colunas Sem posto + postos, cartões com a foto */
.esc-dia { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.esc-dia .field { margin: 0; }
.esc-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.esc-titulo { margin: 0; font-size: 18px; }
.esc-copiar { margin: 0; }
.esc-tambem { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.esc-msg { margin-bottom: 12px; }
.esc-quadro { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.esc-coluna { background: var(--zebra); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 140px; outline: 2px dashed transparent; outline-offset: -2px; transition: outline-color .15s; }
.esc-coluna.is-sobre { outline-color: var(--ink); }
.esc-sem { border-style: dashed; }
.esc-col-titulo { display: flex; align-items: center; gap: 8px; margin: 2px 4px 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.esc-conta { min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; text-align: center; }
.esc-telas { margin: 0 4px 10px; font-size: 12px; color: var(--muted); }
.esc-vazio { margin: 8px 4px; font-size: 13px; }
.esc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 8px; }
.esc-card.is-semlogin { border-left: 4px solid var(--warn); }
.esc-card.is-arrastando { opacity: .4; }
.js .esc-card[draggable="true"] { cursor: grab; }
.esc-card-topo { display: flex; align-items: center; gap: 10px; }
.esc-foto { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--line); }
.esc-ini { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 17px; }
.esc-av-0 { background: #2563eb; } .esc-av-1 { background: #7c3aed; } .esc-av-2 { background: #db2777; } .esc-av-3 { background: #ea580c; }
.esc-av-4 { background: #059669; } .esc-av-5 { background: #0891b2; } .esc-av-6 { background: #4f46e5; } .esc-av-7 { background: #b45309; }
.esc-card-txt { display: flex; flex-direction: column; min-width: 0; }
.esc-nome { overflow-wrap: anywhere; }
.esc-card-txt small { font-size: 11px; }
.esc-semlogin { color: var(--warn); font-weight: 600; }
.esc-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.esc-acoes form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.esc-acoes select { min-height: 32px; padding: 2px 6px; font-size: 13px; width: auto; max-width: 140px; }
.esc-acoes .esc-tambem { font-size: 11px; }
.esc-dica { margin-top: 8px; font-size: 13px; }
.esc-postos { margin-top: 18px; }
.esc-postos summary { cursor: pointer; }
.esc-posto-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.esc-posto-form .field { margin: 0; }
.esc-ordem input { width: 80px; }
.esc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.esc-telas-op { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 0; }
.esc-telas-op legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.esc-hist { margin-top: 18px; }
.esc-hist-dia { padding: 8px 0; border-top: 1px solid var(--line); }
.esc-hist-dia h3 { margin: 0 0 4px; font-size: 14px; }
.esc-hist-dia ul { margin: 0; padding-left: 18px; font-size: 13px; }[data-escala-live].is-carregando { opacity: .6; pointer-events: none; }

/* Tarefas: faixa "Escala de hoje" (04/12) */
.escala-hoje { margin: 0 0 1rem; padding: .6rem .9rem; border: 1px solid var(--line, #e3e3e3); border-radius: 10px; }
.escala-hoje-tit { font-size: 1rem; margin: 0 0 .4rem; }
.escala-hoje-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.escala-hoje-posto.is-meu strong { color: var(--accent, #0a7); }
