/* Grupo Sheki · mesma base visual do Painel de Campanhas da Sheki Marketing. */
:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --surface-2: #f0efec; --text: #0b0b0b; --text-2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --border: rgba(11, 11, 11, 0.1); --hover: rgba(11, 11, 11, 0.045);
  --accent: #0b0b0b; --accent-ink: #ffffff;
  --good: #0ca30c; --good-text: #006300; --good-bg: rgba(12, 163, 12, 0.1);
  --warning: #fab219; --warning-text: #8a5a00; --warning-bg: rgba(250, 178, 25, 0.16);
  --critical: #d03b3b; --critical-text: #b42a2a; --critical-bg: rgba(208, 59, 59, 0.1);
  --info-text: #1d5fb0; --info-bg: rgba(42, 120, 214, 0.1);
  --radius: 14px; --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.05);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mk: #0b0b0b; --tp: #f5c400; --h3: #7b2bff;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #242422; --text: #f0efec; --text-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --border: rgba(255, 255, 255, 0.1); --hover: rgba(255, 255, 255, 0.06);
    --accent: #f0efec; --accent-ink: #0b0b0b;
    --good-text: #3fcf3f; --warning-text: #fab219; --critical-text: #f07a7a; --info-text: #6aa8f0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --mk: #f0efec;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--page); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 28px; letter-spacing: -0.02em; }
h2 { font-size: 18px; letter-spacing: -0.01em; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0 0 4px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- topo ---------- */
.topo { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topo-in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.lockup svg { width: 32px; height: 32px; }
.lockup-text { display: flex; flex-direction: column; line-height: 1.05; }
.wm-1 { font-weight: 800; letter-spacing: 0.14em; font-size: 15px; }
.wm-2 { font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2); margin-top: 3px; }
.abas { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.abas a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 9px; text-decoration: none; font-weight: 550; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.abas a:hover { background: var(--hover); color: var(--text); }
.abas a.on { background: var(--accent); color: var(--accent-ink); }
.bolinha { width: 8px; height: 8px; border-radius: 50%; background: var(--grid); flex-shrink: 0; }
.bolinha.ok { background: var(--good); } .bolinha.atencao { background: var(--warning); } .bolinha.critico { background: var(--critical); }
.sair { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; padding: 8px; border-radius: 8px; flex-shrink: 0; }
.sair:hover { background: var(--hover); color: var(--text); }

main { max-width: 1240px; margin: 0 auto; padding: 28px 20px 72px; }
.cabeca { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cabeca .acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sub { color: var(--text-2); margin-top: 6px; }
.resumo-dia { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, .abas a:focus-visible, input:focus-visible, select:focus-visible, .check:focus-visible { outline: 2px solid var(--info-text); outline-offset: 2px; }
.btn.pri { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.pri:hover { opacity: 0.88; }
.btn.mini { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.fantasma { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.fantasma:hover { background: var(--hover); color: var(--text); }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* ---------- selos ---------- */
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.selo::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.selo.ok { background: var(--good-bg); color: var(--good-text); }
.selo.atencao { background: var(--warning-bg); color: var(--warning-text); }
.selo.critico { background: var(--critical-bg); color: var(--critical-text); }
.selo.off, .selo.neutro { background: var(--surface-2); color: var(--text-2); }
.selo.info { background: var(--info-bg); color: var(--info-text); }

/* ---------- cartões das empresas ---------- */
.empresas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (min-width: 1440px) { .empresas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.empresa { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.empresa:hover { transform: translateY(-2px); }
.faixa { position: relative; height: 112px; display: flex; align-items: center; padding: 0 22px; gap: 14px; color: #fff; text-decoration: none; }
.faixa .selo { position: absolute; top: 14px; right: 14px; background: rgba(255, 255, 255, 0.94); }
.faixa .selo.ok { color: #006300; } .faixa .selo.atencao { color: #8a5a00; } .faixa .selo.critico { color: #b42a2a; } .faixa .selo.off { color: #52514e; }
.faixa.marketing { background: radial-gradient(120% 140% at 0% 0%, #2b2b2b 0%, #0b0b0b 60%); }
.faixa.tapepro { background: linear-gradient(135deg, #07070c 0%, #14141f 70%, #26240a 100%); }
.faixa.adega { background: linear-gradient(130deg, #2a0a12 0%, #5c1427 55%, #8e2a3c 100%); }
.simbolo-adega { width: 62px; height: 62px; border-radius: 14px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 34px; }
.empresa-nota { display: flex; align-items: center; gap: 10px; padding: 0 22px 18px; flex-wrap: wrap; }
.notas-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.nota-item { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.nota-item .btn.mini { align-self: flex-start; }
.tag.adega { box-shadow: inset 3px 0 0 #8e2a3c; }
.faixa.harp3d { background: linear-gradient(120deg, #0b1d3f 0%, #2a2a8f 45%, #7b2bff 75%, #ff1f6d 115%); }
.faixa .marca-svg { width: 46px; height: 46px; }
.faixa img.logo-tp { height: 30px; width: auto; }
.faixa .simbolo-h3 { width: 62px; height: 62px; border-radius: 14px; background: #fff; display: grid; place-items: center; }
.faixa .simbolo-h3 img { width: 46px; height: auto; }
.faixa-nome { display: flex; flex-direction: column; line-height: 1.1; }
.faixa-nome b { font-size: 19px; letter-spacing: 0.06em; font-weight: 800; }
.faixa-nome span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; margin-top: 4px; }
.empresa-corpo { padding: 18px 20px 8px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.trio div { min-width: 0; }
.trio b { display: block; font-size: 17px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trio span { font-size: 12px; color: var(--text-2); }
.empresa-pe { display: flex; gap: 8px; padding: 14px 22px 12px; flex-wrap: wrap; }
.empresa-pe .btn { flex: 1; }

/* ---------- alertas ---------- */
.alertas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alerta { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: start; padding: 10px 12px 10px 0; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.alerta::before { content: ''; align-self: stretch; border-radius: 0 3px 3px 0; background: var(--muted); }
.alerta.critico::before { background: var(--critical); } .alerta.atencao::before { background: var(--warning); } .alerta.oportunidade::before { background: var(--info-text); }
.alerta.critico { background: var(--critical-bg); } .alerta.atencao { background: var(--warning-bg); }
.alerta b { display: block; font-size: 14px; font-weight: 650; }
.alerta .onde { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }
.alerta p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.alerta .faca { color: var(--text); }
.tudo-certo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--good-bg); color: var(--good-text); font-weight: 600; font-size: 14px; }
.falta { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; }

/* ---------- blocos ---------- */
.bloco { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.bloco + .bloco, .grade-2 + .bloco, .bloco + .grade-2, .kpis + .bloco, .kpis + .grade-2 { margin-top: 18px; }
.bloco-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.grade-2 > .bloco { margin-top: 0; }
.secao { margin-top: 30px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi span { font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.kpi b { display: block; font-size: 24px; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12.5px; color: var(--text-2); }
.kpi.ruim b { color: var(--critical-text); } .kpi.aviso b { color: var(--warning-text); }
.sobe { color: var(--critical-text); } .desce { color: var(--good-text); }
.var { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.var.bom { color: var(--good-text); } .var.ruim { color: var(--critical-text); } .var.neutro { color: var(--muted); }

/* ---------- rotina e pontos ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.lista li:first-child { border-top: 0; }
.lista .txt { flex: 1; min-width: 0; }
.lista .feito .txt { color: var(--muted); text-decoration: line-through; }
.check { appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--muted); background: transparent; cursor: pointer; flex-shrink: 0; display: grid; place-items: center; margin: 0; }
.check:checked { background: var(--good); border-color: var(--good); }
.check:checked::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-1px); }
.tag { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag.marketing { box-shadow: inset 3px 0 0 var(--mk); } .tag.tapepro { box-shadow: inset 3px 0 0 var(--tp); } .tag.harp3d { box-shadow: inset 3px 0 0 var(--h3); }
.tag.urgente { background: var(--critical-bg); color: var(--critical-text); }
.progresso { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 12px; }
.progresso i { display: block; height: 100%; background: var(--good); border-radius: 3px; transition: width 0.3s ease; }
.linha-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.linha-form input[type=text] { flex: 1; min-width: 160px; }

/* ---------- formulários ---------- */
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea { min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
input[type=color] { width: 44px; height: 38px; padding: 2px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
label.campo { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.campos .largo { grid-column: 1 / -1; }
dialog { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); padding: 22px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h2 { margin-bottom: 16px; }
.janela-pe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.erro-form { color: var(--critical-text); font-size: 13.5px; margin-top: 10px; min-height: 18px; }

/* ---------- tabelas ---------- */
.tabela-rolo { overflow-x: auto; margin: 0 -6px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 6px; white-space: nowrap; }
td { padding: 9px 6px; border-top: 1px solid var(--border); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .acoes { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- marketing ---------- */
.conta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-top: 14px; }
.conta-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.conta-topo h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.conta-nums { display: flex; gap: 26px; flex-wrap: wrap; margin: 14px 0; }
.conta-nums div span { display: block; font-size: 12px; color: var(--text-2); }
.conta-nums div b { font-size: 18px; font-variant-numeric: tabular-nums; }
.relatorio { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin: 12px 0; font-size: 13.5px; }
.relatorio.vencido { background: var(--warning-bg); }
details > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text-2); padding: 6px 0; }
details[open] > summary { margin-bottom: 6px; }

/* ---------- HARP3D ---------- */
.filamentos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fil { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.fil.baixo { border-color: var(--warning); } .fil.zerado { border-color: var(--critical); }
.fil-topo { display: flex; align-items: center; gap: 10px; }
.rolo { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--border); box-shadow: inset 0 0 0 9px rgba(0, 0, 0, 0.14), inset 0 0 0 11px rgba(255, 255, 255, 0.25); position: relative; }
.rolo::after { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); }
.fil-topo b { display: block; font-size: 14.5px; } .fil-topo span { font-size: 12px; color: var(--text-2); }
.fil-qtd { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fil-qtd small { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.barra { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 3px; background: var(--good); }
.fil.baixo .barra i { background: var(--warning); } .fil.zerado .barra i { background: var(--critical); }
.fil-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.etapas { display: flex; gap: 6px; flex-wrap: wrap; }
.vazio { padding: 26px; text-align: center; color: var(--text-2); border: 1px dashed var(--grid); border-radius: 12px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-cartao { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 34px 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.login-cartao .lockup svg { width: 52px; height: 52px; }
.login-cartao .wm-1 { font-size: 22px; } .login-cartao .wm-2 { font-size: 11px; }
.login-cartao form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

#aviso { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.2s ease; z-index: 20; max-width: calc(100vw - 32px); }
#aviso.on { opacity: 1; transform: translateX(-50%); }
.carregando { padding: 60px 0; text-align: center; color: var(--text-2); }
.gira { animation: gira 0.9s linear infinite; display: inline-block; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media (max-width: 980px) {
  .empresas { grid-template-columns: 1fr; }
  .grade-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  main { padding: 20px 16px 60px; }
  .topo-in { padding: 8px 16px; gap: 8px; flex-wrap: wrap; }
  .abas { order: 3; flex-basis: 100%; margin-left: 0; }
  h1 { font-size: 23px; }
  .campos { grid-template-columns: 1fr; }
  .bloco { padding: 16px; }
}
