:root {
  --tinta: #120D10;
  --tinta-2: #3A2F35;
  --cinza: #6D5E64;
  --cinza-2: #9A8A90;
  --linha: #EADCDF;
  --linha-2: #F3E9EB;
  --fundo: #FBF6F5;
  --branco: #FFFFFF;
  --roxo: #FF2B5E;
  --roxo-escuro: #C81A47;
  --roxo-claro: #FFE3EA;
  --laranja: #F7701E;
  --laranja-escuro: #A2420A;
  --laranja-claro: #FFF0E6;
  --verde: #1E6B3E;
  --verde-claro: #E3F4EA;
  --vermelho: #9B2317;
  --vermelho-claro: #FDE8E6;
  --placeholder: #F1E4E7;
  --raio: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: var(--tinta);
  background: var(--fundo);
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 800; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.sm { width: 16px; height: 16px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex-shrink: 0; background: var(--branco); border-right: 1px solid var(--linha);
  padding: 24px 14px; display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh;
}
.marca { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.marca-a { width: 34px; height: 34px; border-radius: 10px; background: var(--roxo); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.marca b { font-size: 17px; font-weight: 800; display: block; line-height: 1.1; }
.marca div span { font-size: 12px; color: var(--cinza); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 18px; }
.nav-grp { display: flex; flex-direction: column; gap: 2px; }
.nav-grp > span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cinza-2); padding: 0 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 0 12px; min-height: 44px; border-radius: 12px; font-weight: 600; font-size: 15px; color: var(--tinta-2); }
.nav a:hover { background: var(--fundo); }
.nav a.on { background: var(--roxo-claro); color: var(--roxo-escuro); }
.nav .badge { margin-left: auto; background: var(--laranja); color: var(--tinta); font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.eu { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--linha); border-radius: 14px; }
.eu b { font-size: 14px; display: block; }
.eu span { font-size: 12px; color: var(--cinza); }
.eu button { margin-left: auto; }

.main { flex-grow: 1; min-width: 0; padding: 30px 40px 60px; display: flex; flex-direction: column; gap: 20px; }
.topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.topo .lbl { display: block; margin-bottom: 4px; }
.acoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- peças ---------- */
.card { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); }
.pad { padding: 18px 22px; }
.lbl { font-size: 13px; color: var(--cinza); font-weight: 500; }
.mini { font-size: 12px; color: var(--cinza); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.vazio { padding: 28px; text-align: center; color: var(--cinza); line-height: 1.6; }
.aviso { background: var(--laranja-claro); border: 1px solid #FFD5BA; color: #5c2a07; border-radius: 14px; padding: 12px 16px; line-height: 1.5; }

.btn {
  min-height: 40px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
  border: 1px solid #DCD8E4; background: var(--branco);
}
.btn:hover { background: var(--fundo); }
.btn.big { min-height: 46px; padding: 0 18px; font-size: 14px; border-radius: 12px; }
.btn.pri { background: var(--roxo); color: #fff; border-color: var(--roxo); }
.btn.pri:hover { background: var(--roxo-escuro); }
.btn.perigo { color: var(--vermelho); }
.btn.link { border: none; background: none; color: var(--roxo-escuro); padding: 0 4px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ic { width: 40px; justify-content: center; padding: 0; }

.chip { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.c-verde { background: var(--verde-claro); color: var(--verde); }
.c-laranja { background: var(--laranja-claro); color: var(--laranja-escuro); }
.c-roxo { background: var(--roxo-claro); color: var(--roxo-escuro); }
.c-cinza { background: #F4F3F7; color: var(--tinta-2); }
.c-vermelho { background: var(--vermelho-claro); color: var(--vermelho); }

.seg { display: inline-flex; gap: 4px; background: #F1EFF6; border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.seg button, .seg a { min-height: 38px; padding: 0 14px; border-radius: 9px; border: none; background: transparent; font-weight: 700; font-size: 14px; color: var(--tinta-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg .on { background: var(--branco); color: var(--tinta); box-shadow: 0 1px 2px rgba(17,16,20,.06); }
.seg.escuro .on { background: var(--tinta); color: #fff; }

.av { width: 36px; height: 36px; border-radius: 18px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: #FFE3D1; }
.logo { width: 52px; height: 52px; border-radius: 14px; background: var(--placeholder); object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: var(--tinta-2); }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; }
label.f .mini { font-weight: 500; }
.inp, select.inp, textarea.inp {
  min-height: 42px; border: 1px solid #DCD8E4; border-radius: 10px; padding: 0 12px;
  font-size: 14px; font-weight: 500; background: var(--branco); width: 100%;
}
textarea.inp { padding: 10px 12px; min-height: 80px; resize: vertical; line-height: 1.5; }
.inp:focus { outline: 2px solid var(--roxo); outline-offset: -1px; border-color: transparent; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--roxo); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #DCD8E4; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.pill.on { border-color: var(--roxo); background: var(--roxo-claro); color: var(--roxo-escuro); }

table.t { border-collapse: collapse; width: 100%; }
.t th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cinza-2); padding: 0 10px 10px; text-align: left; white-space: nowrap; }
.t td { padding: 11px 10px; border-top: 1px solid var(--linha-2); vertical-align: middle; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--fundo); }

/* ---------- KPIs ---------- */
.kpi { background: var(--fundo); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

/* barras do faturamento */
.barras { height: 200px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: end; }
.barra { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.barra .pilha { width: 100%; display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; min-height: 2px; background: #F1EFF6; }
.barra span { font-size: 11px; font-weight: 700; }
.leg { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tinta-2); }
.leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- quadro ---------- */
.quadro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; overflow-x: auto; }
.coluna { background: #F4F3F7; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.coluna.alvo { outline: 2px dashed var(--roxo); outline-offset: -4px; }
.coluna h3 { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 4px 2px; }
.cartao { background: #fff; border: 1px solid var(--linha); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; text-align: left; width: 100%; }
.cartao:hover { border-color: #F5A3B8; }
.cartao .num { color: var(--roxo-escuro); font-weight: 800; font-size: 13px; }
.cartao .tit { font-weight: 700; font-size: 14px; line-height: 1.35; }

/* ---------- controle diário ---------- */
.cd-wrap { overflow-x: auto; }
table.cd { border-collapse: separate; border-spacing: 3px; width: 100%; table-layout: fixed; }
.cd th { font-size: 11px; font-weight: 700; color: var(--cinza-2); text-align: center; padding-bottom: 4px; }
.cd th.loja { width: 210px; text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.cd td { height: 32px; border-radius: 6px; font-size: 11px; font-weight: 700; text-align: center; cursor: pointer; position: relative; }
.cd td.loja { cursor: pointer; text-align: left; font-size: 13px; padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd td.vazio-d { background: #F4F3F7; }
.cd .cd-nome { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cd .cd-nome b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd .cd-logo { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; object-fit: cover; background: #ECECF1; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--cinza-2); }
.cd td .nt { position: absolute; top: 1px; right: 3px; font-size: 9px; color: var(--roxo-escuro); }

/* ---------- modal ---------- */
.fundo-modal { position: fixed; inset: 0; background: rgba(17,16,20,.42); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 620px; padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 60px rgba(17,16,20,.25); }
.modal.largo { max-width: 920px; }
.modal-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.coment { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.coment .av { width: 30px; height: 30px; font-size: 12px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: 90vw; }
#toast.on { opacity: 1; }
#toast.erro { background: var(--vermelho); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .card { width: 100%; max-width: 420px; padding: 30px; display: flex; flex-direction: column; gap: 18px; }

.carregando { padding: 40px; text-align: center; color: var(--cinza); }


/* ===================== identidade Viraliza (22/10) ===================== */
:root { --disp: 'Unbounded', 'Arial Black', system-ui, sans-serif; --mono: 'DM Mono', ui-monospace, monospace; }
h1 { font-family: var(--disp); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-family: var(--disp); font-weight: 700; font-size: 16px; letter-spacing: 0; }
.kpi b, .modal h1, .modal h2 { font-family: var(--disp); }
.lbl, .nav-grp > span, .t th, .coluna h3 { font-family: var(--mono); font-weight: 500; letter-spacing: .1em; }
.lbl { letter-spacing: .02em; }
/* menu lateral preto, como no protótipo */
.side { background: var(--tinta); border-right: 0; color: #fff; }
.marca { padding: 2px 10px 6px; }
.marca img { height: 30px; width: auto; display: block; }
.marca small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: #9A8A90; margin-top: 6px; text-transform: uppercase; }
.nav-grp > span { color: #7d6d73; }
.nav a { color: #E4D7DB; }
.nav a:hover { background: #241b20; }
.nav a.on { background: var(--roxo); color: #fff; }
.nav a.on .ic { color: #fff; }
.nav .badge { background: #fff; color: var(--tinta); }
.nav a.on .badge { background: var(--tinta); color: #fff; }
.eu { border-color: #2e2429; background: #1b1418; }
.eu span { color: #9A8A90; }
.eu .btn { background: transparent; border-color: #3a2f35; color: #fff; }
.eu .btn:hover { background: #2a2025; }
/* botões e peças com o jeito chapado do site */
.btn.pri { box-shadow: 3px 3px 0 var(--tinta); border-color: var(--tinta); }
.btn.pri:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--tinta); }
.card { border-color: var(--linha); }
.seg { background: #F3E9EB; }
.inp:focus { outline-color: var(--roxo); }
/* login */
.login { background: var(--fundo); background-image: radial-gradient(circle at 1px 1px, rgba(18,13,16,.08) 1px, transparent 0); background-size: 22px 22px; }
.login .card { border: 1.5px solid var(--tinta); box-shadow: 6px 6px 0 var(--tinta); border-radius: 22px; }
.login .marca img { height: 36px; }
/* planilha das lojas */
.pl-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pl-res { background: var(--branco); border: 1px solid var(--linha); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pl-res b { font-family: var(--disp); font-size: 24px; color: var(--verde); }
.pl-res.alerta b { color: var(--roxo-escuro); }
.pl-res span { font-size: 12px; color: var(--cinza); }
.pl-rolar { overflow-x: auto; }
table.pl th { text-align: center; }
table.pl th:first-child, table.pl th:last-child { text-align: left; }
.pl-abrir { border: none; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.pl-abrir:hover b { color: var(--roxo-escuro); text-decoration: underline; }
.pl-loja { min-width: 200px; }
.pl-cel { text-align: center; }
.pl-num { text-align: center; white-space: nowrap; }
.pl-precisa { min-width: 240px; }
.pl-precisa textarea { width: 100%; resize: none; min-height: 38px; font-size: 13px; line-height: 1.4; }
.pl-et { width: 32px; height: 32px; border-radius: 9px; border: 1.5px solid transparent; font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pl-et.fixo { cursor: default; width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
td .pl-et.fixo { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
button.pl-et:hover { border-color: var(--tinta); }
.e-falta { background: var(--vermelho-claro); color: var(--vermelho); }
.e-fazendo { background: var(--laranja-claro); color: var(--laranja-escuro); }
.e-ok { background: var(--verde-claro); color: var(--verde); }
.e-na { background: #F4F3F7; color: var(--cinza-2); }
.pl-leg { gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.pl-precisa textarea { overflow: hidden; }
.e-fazendo { font-size: 10px; letter-spacing: -1px; }
