/* Painel Pipolê — tema claro de propósito (fundo branco, como o Dashboard). Cada loja troca a paleta pelo atributo data-marca. */
:root {
  --bg: #ffffff; --surface: #ffffff; --surface2: #F4F6FB; --fg: #14213D; --muted: #5A6685; --line: #E2E7F2;
  --navy: #002972; --navy2: #0B3F9A; --rosa: #E61062; --amarelo: #F5B700; --menino: #2457C5; --menina: #E61062;
  --titulo: #002972; --btn: #0B3F9A; --btn-fg: #ffffff; --rosa-fg: #ffffff;
  --grad: linear-gradient(90deg, #0B3F9A, #E61062); --sombra-cor: 0, 41, 114; --tom-claro: rgba(11, 63, 154, .07);
  --ok: #17864E; --ok-bg: #E4F5EC; --alerta: #A86A00; --alerta-bg: #FFF4D6; --critico: #C81E36; --critico-bg: #FDE6EA;
  --sombra: 0 6px 24px rgba(var(--sombra-cor), .10);
  --fonte: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", "Varela Round", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
/* Ninaná Baby: creme, lilás, rosa, amarelo e azul claro da logo */
:root[data-marca="ninana"] {
  --bg: #F7EFE4; --surface: #ffffff; --surface2: #FBF5EE; --fg: #3A2546; --muted: #7A6585; --line: #EBDDEA;
  --navy: #7B3FA0; --navy2: #B068D6; --rosa: #E0479E; --amarelo: #EFCB3F; --menino: #2F9BCB; --menina: #E0479E;
  --titulo: #6B2F8A; --btn: #A659CF; --btn-fg: #ffffff; --rosa-fg: #ffffff;
  --grad: linear-gradient(90deg, #C27BE3, #FF83CF); --sombra-cor: 123, 63, 160; --tom-claro: rgba(212, 139, 231, .10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--fonte); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--rosa); border-radius: 18px; padding: 28px 24px; box-shadow: var(--sombra); display: grid; gap: 14px; }
.login-card h1 { margin: 0; color: var(--titulo); font-size: 1.5rem; text-align: center; }
.login-card .logo { margin: 0 auto; width: 72px; height: 72px; }
.login-card p { margin: 0; text-align: center; }
label.campo { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.campo input, .campo select, .campo textarea { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface2); }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--navy2); outline: none; }
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 800; background: var(--btn); color: var(--btn-fg); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.rosa { background: var(--rosa); color: var(--rosa-fg); }
.btn.leve { background: var(--surface2); color: var(--fg); border: 1.5px solid var(--line); }
.btn.peq { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- menu lojas ---------- */
.menu h4 { margin: 2px 6px 6px; color: var(--titulo); }
.menu .item-loja { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px; border-radius: 12px; border: 1.5px solid transparent; background: var(--surface2); }
.menu .item-loja[aria-current="true"] { border-color: var(--navy2); }
.menu .item-loja small { display: block; color: var(--muted); }
.pt { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--line); }
.pt.on { background: var(--ok); }
.menu form { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface2); }

/* ---------- janelas ---------- */
main { padding-block: 18px 96px; }
.janela h2 { margin: 0 0 6px; font-size: 1.45rem; font-weight: 800; color: var(--titulo); text-wrap: balance; display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 3px dotted var(--amarelo); }
.janela h2::before { content: ""; flex: none; width: 10px; height: 22px; border-radius: 6px; background: var(--c-h2, var(--rosa)); }
.janela > .sub { margin: 0 0 16px; color: var(--muted); }
.grade { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; border-left: 5px solid var(--c, var(--navy2)); }
.kpi span { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; }
.kpi b { font-size: 1.55rem; color: var(--titulo); font-variant-numeric: tabular-nums; }
.kpi small { display: block; color: var(--muted); font-size: .78rem; }
.cartao { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c, var(--navy2)); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.cartao h3 { margin: 0 0 12px; font-size: 1.02rem; color: var(--titulo); padding-bottom: 6px; border-bottom: 2.5px dotted var(--amarelo); display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.cartao.largo { grid-column: 1 / -1; }
.c-rosa { --c: var(--rosa); } .c-amarelo { --c: var(--amarelo); } .c-menino { --c: var(--menino); } .c-menina { --c: var(--menina); } .c-navy { --c: var(--navy); }

.vazio { text-align: center; padding: 40px 16px; border: 2px dashed var(--line); border-radius: 16px; color: var(--muted); }
.vazio b { display: block; font-size: 1.2rem; color: var(--titulo); margin-bottom: 6px; }

.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.pausado td { color: var(--muted); }

.chip { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.alerta { background: var(--alerta-bg); color: var(--alerta); }
.chip.critico { background: var(--critico-bg); color: var(--critico); }
.chip.neutro { background: var(--surface2); color: var(--muted); }
.chip.menino { background: var(--surface2); color: var(--menino); }
.chip.menina { background: var(--surface2); color: var(--menina); }

.seletor { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface2); border-radius: 12px; border: 1px solid var(--line); flex-wrap: wrap; }
.seletor button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 800; color: var(--muted); }
.seletor button[aria-pressed="true"] { background: var(--surface); color: var(--titulo); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.seletor button[data-g="Menino"][aria-pressed="true"] { color: var(--menino); }
.seletor button[data-g="Menina"][aria-pressed="true"] { color: var(--menina); }
.barra-acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* estoque: célula de saldo */
.est td.s { text-align: center; }
.saldo { display: inline-grid; min-width: 64px; padding: 4px 8px; border-radius: 10px; line-height: 1.15; }
.saldo b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.saldo small { font-size: .7rem; font-weight: 700; }
.saldo.ok { background: var(--ok-bg); color: var(--ok); }
.saldo.alerta { background: var(--alerta-bg); color: var(--alerta); }
.saldo.critico { background: var(--critico-bg); color: var(--critico); }
.saldo.parado { background: var(--surface2); color: var(--muted); }
.legenda { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--muted); margin-top: 10px; }

.lista { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lista li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface2); }
.lista li > div { min-width: 0; flex: 1; }
.lista .ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: .9rem; }
.ic.sai { background: var(--critico-bg); color: var(--critico); }
.ic.ent { background: var(--ok-bg); color: var(--ok); }
.ic.av { background: var(--alerta-bg); color: var(--alerta); }

.estrelas { color: var(--amarelo); letter-spacing: 1px; white-space: nowrap; }
.barra-h { display: grid; grid-template-columns: 34px 1fr 40px; align-items: center; gap: 8px; font-size: .85rem; }
.barra-h .t { height: 10px; border-radius: 6px; background: var(--surface2); overflow: hidden; }
.barra-h .t i { display: block; height: 100%; background: var(--amarelo); border-radius: 6px; }

.grafico { width: 100%; height: auto; display: block; }
.grafico text { fill: var(--muted); font-size: 10px; font-family: var(--fonte); }

/* calendário */
.cal-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-topo strong { font-size: 1.15rem; color: var(--titulo); text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dsem { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal .dia { min-height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 4px; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal .dia.fora { visibility: hidden; }
.cal .dia.fds { background: var(--surface2); }
.cal .dia.hoje { border: 2px solid var(--rosa); }
.cal .dia.sel { box-shadow: inset 0 0 0 2px var(--navy2); }
.cal .dia b { font-size: .8rem; font-variant-numeric: tabular-nums; }
.cal .tag { font-size: .62rem; font-weight: 800; line-height: 1.15; border-radius: 5px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.feriado { background: var(--navy); color: var(--bg); }
.tag.comercial { background: var(--rosa); color: #fff; }
.tag.dupla { background: var(--amarelo); color: #2b2100; }
.tag.sazonal { background: var(--menino); color: #fff; }
.ponto-cat { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.rec { margin: 6px 0 0; padding-left: 18px; }
.rec li, .lista .rec li { display: list-item; margin-bottom: 3px; padding: 0; background: none; border-radius: 0; }

/* formulário de entrada */
dialog { border: 0; padding: 0; border-radius: 18px; width: min(460px, calc(100vw - 24px)); background: var(--surface); color: var(--fg); box-shadow: var(--sombra); }
dialog::backdrop { background: rgba(0, 20, 60, .45); }
.form-entrada { display: grid; gap: 12px; padding: 20px; border-top: 5px solid var(--ok); border-radius: 18px; }
.form-entrada h3 { margin: 0; color: var(--titulo); }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcoes { display: flex; gap: 8px; flex-wrap: wrap; }
.opcoes label { flex: 1; min-width: 110px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 800; background: var(--surface2); }
.opcoes label:has(input:checked) { border-color: var(--navy2); }
.previa { padding: 10px 12px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: .9rem; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); transform: translateX(-50%); background: var(--navy); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 700; box-shadow: var(--sombra); max-width: calc(100vw - 32px); }
.aviso-exemplo { font-size: .8rem; padding: 6px 10px; border-radius: 10px; background: var(--alerta-bg); color: var(--alerta); font-weight: 700; display: inline-block; margin-bottom: 12px; }

@media (max-width: 560px) {
  .usuario { display: none; }
  .cal .dia { min-height: 50px; }
  .cal .tag { font-size: 0; padding: 0; height: 6px; }
  .duas { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .janela { animation: entra .18s ease-out; }
  @keyframes entra { from { transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* ---------- cabeçalho no estilo do Dashboard ---------- */
.topo-area { padding-block: 14px 0; }
.hero { position: relative; display: flex; gap: 18px; align-items: center; padding: 20px 22px 34px; border-radius: 24px; background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--rosa) 14%, transparent) 0 130px, transparent 131px), var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra); }
.hero::before { content: ""; position: absolute; left: 22px; right: 22px; bottom: 14px; border-bottom: 3px dotted var(--amarelo); }
.logo { width: 84px; height: 84px; border-radius: 50%; flex: none; background: #fff; box-shadow: 0 4px 14px rgba(var(--sombra-cor), .18); overflow: hidden; display: grid; place-items: center; }
.logo img, .logo svg { width: 100%; height: 100%; object-fit: cover; }
.hero-t { flex: 1; min-width: 0; padding-right: 56px; }
.hero h1 { margin: 0 0 4px; font-size: 1.7rem; font-weight: 800; color: var(--titulo); line-height: 1.15; }
.hero h1 .plat-txt { font-size: .58em; font-weight: 700; color: var(--rosa); white-space: nowrap; }
.hero p { margin: 0; color: var(--muted); font-size: .9rem; }
.hero p button { background: none; border: 0; padding: 0; color: var(--rosa); font-weight: 800; }
.hamb { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 3px 10px rgba(var(--sombra-cor), .18); }
.hamb span { display: block; width: 20px; height: 3px; border-radius: 3px; background: var(--navy2); transition: width .2s; }
.hamb span:nth-child(2) { background: var(--rosa); width: 14px; }
.hamb span:nth-child(3) { background: var(--amarelo); }
.hamb[aria-expanded="true"] span:nth-child(2) { width: 20px; }
.menu { position: absolute; z-index: 70; top: 72px; right: 16px; width: min(310px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px rgba(var(--sombra-cor), .25); padding: 10px; display: grid; gap: 4px; }
.menu h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rosa); margin: 2px 6px 6px; }
.menu .item-loja { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; }
.menu .item-loja:hover { background: var(--tom-claro); }
.menu .item-loja[aria-current="true"] { background: var(--grad); color: #fff; }
.menu .item-loja[aria-current="true"] small { color: rgba(255, 255, 255, .88); }
.menu .item-loja small { display: block; color: var(--muted); }
.menu .item-loja img { width: 30px; height: 30px; border-radius: 50%; flex: none; background: #fff; object-fit: cover; }
.menu details { border: 1.5px dashed var(--amarelo); border-radius: 12px; margin-top: 4px; }
.menu summary { padding: 10px; text-align: center; font-weight: 800; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu form { display: grid; gap: 8px; padding: 0 10px 10px; }

.abas { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 30; display: flex; gap: 6px; overflow-x: auto; margin-top: 14px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: 0 2px 10px rgba(var(--sombra-cor), .08); scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.aba { flex: none; border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.aba:hover { color: var(--fg); background: var(--tom-claro); }
.aba[aria-selected="true"] { background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(var(--sombra-cor), .28); }
.aba.nova::after { content: "novo"; font-size: .62rem; margin-left: 6px; padding: 1px 5px; border-radius: 6px; background: var(--amarelo); color: #2b2100; vertical-align: 2px; }

/* paginador no fim de cada janela, como no Dashboard */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.passo { font-weight: 800; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 9px 20px; }
.passo:hover { border-color: var(--navy2); color: var(--navy2); }
.pager .onde { font-size: .82rem; color: var(--muted); font-weight: 800; text-align: center; }

/* balão de mensagens com 2 setores */
.balao { position: fixed; z-index: 50; right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); width: 60px; height: 60px; border-radius: 50%; border: 0; color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(var(--sombra-cor), .36); display: grid; place-items: center; transition: transform .15s; }
.balao:hover { transform: scale(1.07); }
.balao svg { width: 26px; height: 26px; }
.balao .cont { position: absolute; top: -5px; right: -5px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #12B76A; color: #fff; font-size: .75rem; font-weight: 900; display: grid; place-items: center; border: 2px solid var(--bg); }
.painel-avisos { position: fixed; z-index: 55; right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); width: min(430px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 44px rgba(var(--sombra-cor), .3); overflow: hidden; }
.msg-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #fff; background: var(--grad); border-bottom: 4px dotted var(--amarelo); font-weight: 800; }
.msg-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .22); color: #fff; font-size: 18px; line-height: 1; }
.msg-abas { display: flex; border-bottom: 1px solid var(--line); }
.msg-aba { flex: 1; font-weight: 800; font-size: .85rem; padding: 11px 8px; border: 0; border-bottom: 3px solid transparent; background: var(--surface); color: var(--muted); }
.msg-aba[aria-selected="true"] { color: var(--titulo); border-bottom-color: var(--rosa); }
.msg-aba .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: color-mix(in srgb, var(--amarelo) 35%, transparent); color: var(--fg); font-size: .72rem; }
.msg-b { padding: 14px 16px 6px; min-height: 140px; }
.msg-b h3 { margin: 0 0 4px; color: var(--titulo); font-size: 1rem; }
.msg-b p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.msg-b .chip { margin-bottom: 6px; }
.msg-f { display: flex; justify-content: space-between; align-items: center; padding: 6px 16px 14px; }
.msg-f span { font-size: .82rem; font-weight: 800; color: var(--muted); }
.msg-f button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--navy2); font-weight: 900; font-size: 16px; }
.msg-f button:hover:not(:disabled) { background: var(--amarelo); border-color: var(--amarelo); color: #14213D; }

@media (max-width: 560px) {
  .hero { padding: 16px 16px 30px; gap: 12px; }
  .logo { width: 60px; height: 60px; }
  .hero h1 { font-size: 1.3rem; }
  .hamb { top: 12px; right: 12px; width: 44px; height: 44px; }
  .passo { padding: 8px 14px; }
}

/* ---------- Precificação ML ---------- */
.pr-tab td { white-space: nowrap; }
.pr-tab td:first-child { white-space: normal; min-width: 150px; }
.pr-tab th small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.pr-in { width: 92px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface2); text-align: right; font-variant-numeric: tabular-nums; }
.pr-in:focus, .pr-sel:focus { border-color: var(--navy2); outline: none; }
.pr-sel { padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface2); font-weight: 700; font-size: .85rem; max-width: 100%; }
.pr-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.pr-sim-topo { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.pr-sim-topo input[type="range"] { width: 100%; accent-color: var(--rosa); padding: 0; background: none; border: 0; }
.pr-res { display: grid; justify-items: end; gap: 2px; }
.pr-res b { font-size: 1.5rem; color: var(--titulo); }
.pr-barra { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--surface2); }
.pr-barra i { display: block; height: 100%; }
.pr-leg b { color: var(--fg); }
.pr-pt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.pr-check { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-weight: 700; font-size: .9rem; }
.pr-check input { margin-top: 3px; accent-color: var(--rosa); width: 18px; height: 18px; flex: none; }
.pr-check small { display: block; font-weight: 600; }
.pr-mini { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pr-mini input { accent-color: var(--rosa); width: 16px; height: 16px; }
.pr-x { border: 0; background: var(--surface2); color: var(--muted); width: 22px; height: 22px; border-radius: 50%; font-weight: 900; line-height: 1; margin-left: 4px; }
.pr-x:hover { background: var(--critico-bg); color: var(--critico); }
/* ---------- aviso de item novo sem custo ---------- */
.alerta-topo { display: grid; gap: 8px; margin-bottom: 16px; padding: 12px 14px; border-radius: 14px; background: var(--critico-bg); color: var(--critico); border: 1.5px solid color-mix(in srgb, var(--critico) 35%, transparent); }
.alerta-topo > span { color: var(--fg); font-size: .9rem; }
.alerta-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alerta-linha > span { flex: 1; min-width: 160px; font-weight: 800; color: var(--fg); }
.alerta-linha input { width: 120px; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); }
.ni-tams { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0; }
.ni-tams legend { font-weight: 700; font-size: .9rem; color: var(--muted); padding: 0 4px; }
.ni-tams label { display: inline-flex; gap: 4px; align-items: center; font-weight: 800; }
.ni-erro { background: var(--critico-bg) !important; color: var(--critico) !important; }
.pr-falta { border-color: var(--critico) !important; background: var(--critico-bg) !important; }
/* botão amarelo de destaque ("+ Novo item"): amarelo suave, não amarelo-ovo */
:root { --amarelo-btn: linear-gradient(135deg, #FFE7A3 0%, #FFD36E 100%); --amarelo-btn-fg: #5A3E00; --amarelo-btn-borda: #F2C25A; }
:root[data-marca="ninana"] { --amarelo-btn: linear-gradient(135deg, #FBF1B8 0%, #F6E176 100%); --amarelo-btn-fg: #5B4A00; --amarelo-btn-borda: #E9D35E; }
.btn.amarelo { background: var(--amarelo-btn); color: var(--amarelo-btn-fg); border: 1.5px solid var(--amarelo-btn-borda); box-shadow: 0 3px 10px rgba(240, 180, 40, .25); }
.btn.amarelo:hover { filter: brightness(1.03); box-shadow: 0 4px 14px rgba(240, 180, 40, .35); }
.alerta-preco { background: var(--alerta-bg); color: var(--alerta); border-color: color-mix(in srgb, var(--alerta) 35%, transparent); }
.ni-precos { display: grid; gap: 6px; }
.ni-precos table td, .ni-precos table th { padding: 4px 6px; }
.ni-tams input[type="text"], #ni-tam-outro { flex: 1; min-width: 140px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface2); }
#dlg-novo-item { max-height: calc(100vh - 24px); overflow: auto; }

/* estoque v3: totais claros por unidade, saiu/entrou por célula, movimentações por dia */
.est-faixa { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0 0 10px; }
.est-faixa > div { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--navy2); border-radius: 14px; padding: 10px 14px; }
.est-faixa > div.s { border-left-color: var(--critico); }
.est-faixa > div.e { border-left-color: var(--ok); }
.est-faixa span { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; }
.est-faixa b { font-size: 1.3rem; color: var(--titulo); font-variant-numeric: tabular-nums; }
.est-faixa .s b { color: var(--critico); } .est-faixa .e b { color: var(--ok); }
.est-tot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.est-tot > div { background: var(--surface2); border-radius: 10px; padding: 6px 8px; text-align: center; line-height: 1.15; }
.est-tot span { display: block; font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.est-tot b { font-size: 1.2rem; color: var(--titulo); font-variant-numeric: tabular-nums; }
.est-tot .s b { color: var(--critico); } .est-tot .e b { color: var(--ok); }
.est-tot small { display: block; font-size: .7rem; color: var(--muted); }
.est-unid { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
.mov7 { display: flex; gap: 4px; justify-content: center; margin-top: 3px; font-size: .7rem; font-weight: 800; font-style: normal; }
.mov7 i { font-style: normal; padding: 0 5px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.mov7 i.s { color: var(--critico); background: var(--critico-bg); }
.mov7 i.e { color: var(--ok); background: var(--ok-bg); }
.mov7 i.z { opacity: .35; }
.legenda .mov7 { display: inline-flex; margin: 0; }
.lista.movs li.mov-dia { background: none; padding: 6px 2px 0; font-weight: 800; color: var(--titulo); font-size: .85rem; border-bottom: 2px dotted var(--amarelo); border-radius: 0; }
.mov-q { flex: none; min-width: 64px; text-align: center; font-weight: 900; font-size: 1.15rem; border-radius: 10px; padding: 4px 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mov-q small { display: block; font-size: .66rem; font-weight: 700; }
.mov.sai .mov-q { background: var(--critico-bg); color: var(--critico); }
.mov.ent .mov-q { background: var(--ok-bg); color: var(--ok); }
.ni-excluir { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; }
.ni-excluir summary { cursor: pointer; font-weight: 800; color: var(--critico); }
.ni-exc-linha { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 8px; }
.ni-exc-linha select { flex: 1; min-width: 0; }
.ni-exc-linha select { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface2); }

/* resumo: panorama das outras janelas */
.pano-tit { margin: 22px 0 10px; color: var(--titulo); font-size: 1.1rem; padding-bottom: 6px; border-bottom: 2.5px dotted var(--amarelo); }
.pano-num { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pano-num b { font-size: 1.6rem; color: var(--titulo); font-variant-numeric: tabular-nums; }
.pano-num small { color: var(--muted); font-size: .8rem; width: 100%; }
.pano-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pano-lista li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 7px 10px; background: var(--surface2); border-radius: 10px; font-size: .9rem; }
.pano-lista li span:first-child { color: var(--muted); font-weight: 700; }
.pano-lista small { color: var(--muted); font-weight: 600; }
.txt-critico { color: var(--critico); } .txt-ok { color: var(--ok); }

/* notícias: tema por cor, quanto vale ler, link da fonte */
.nt-temas { flex-wrap: wrap; }
.nt-temas small { opacity: .7; font-weight: 700; }
.nt-bola { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: middle; }
.cartao.nt { display: flex; flex-direction: column; gap: 8px; }
.cartao.nt h3 { margin: 0; }
.nt-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-tema { font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 3px 10px; border-radius: 99px; }
.nt-meta { margin: 0; font-size: .8rem; color: var(--muted); }
.nt-res { margin: 0; line-height: 1.5; }
.nt-box { background: var(--surface2); border-left: 4px solid var(--c); border-radius: 10px; padding: 8px 12px; font-size: .92rem; line-height: 1.45; }
.nt-box b { display: block; font-size: .78rem; color: var(--titulo); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.nt-acao { margin: 0; font-size: .92rem; line-height: 1.45; }
.nt-link { align-self: flex-start; margin-top: auto; text-decoration: none; }

/* datas: campanhas pesquisadas e agenda de vocês */
.tag.campanha { background: #8E5BD6; color: #fff; }
.tag.agenda { background: #12A07A; color: #fff; }
.ic.ag { background: #DDF5EC; color: #0B7A5C; font-size: .7rem; width: auto; min-width: 30px; padding: 0 5px; }
.ag-tit { display: block; font-size: .85rem; color: var(--titulo); margin: 6px 0; }
.ag-form { display: grid; gap: 8px; border-top: 2px dotted var(--line); padding-top: 8px; margin-top: 8px; }
.ag-linha { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.ag-form input { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface2); min-width: 0; font: inherit; }
.ag-form .btn { justify-self: start; }
.ag-aviso { margin: 0; font-size: .82rem; font-weight: 700; color: var(--alerta); background: var(--alerta-bg); border-radius: 8px; padding: 6px 10px; }
.cal-pesq { margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
.cal-pesq a { color: var(--navy2); font-weight: 700; }
.cal-pesq.falta { color: var(--alerta); font-weight: 700; }

/* rodapé "Saiba mais" com referências de cada janela */
.saiba { margin-top: 18px; border-top: 2.5px dotted var(--amarelo); padding-top: 12px; }
.saiba summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .9rem; padding: 8px 14px; border-radius: 99px; background: var(--amarelo-btn); color: var(--amarelo-btn-fg); border: 1.5px solid var(--amarelo-btn-borda); box-shadow: 0 3px 10px rgba(240,180,40,.2); }
.saiba summary::-webkit-details-marker { display: none; }
.saiba summary svg { transition: transform .2s; }
.saiba[open] summary svg { transform: rotate(180deg); }
.saiba-corpo { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.saiba-corpo b { display: block; color: var(--titulo); font-size: .85rem; margin: 4px 0; }
.saiba-corpo ul { margin: 0 0 8px; padding-left: 18px; }
.saiba-links a { color: var(--navy2); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.saiba-links a:hover { text-decoration: underline; }
.pr-sub { margin-top: 14px; padding-top: 10px; border-top: 2px dotted var(--line); display: grid; gap: 4px; }
.pr-sub > b { color: var(--titulo); font-size: .9rem; }
.pr-sub .campo small { font-weight: 600; font-size: .75rem; }
.pr-sub .pr-check { margin-top: 6px; }

/* módulos móveis (Resumo, Estoque, Anúncios, Precificação): linhas de 1 a 4 módulos */
.mods { display: flex; flex-direction: column; gap: 14px; }
.mod-linha { display: grid; gap: 14px; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); align-items: stretch; }
.mod-linha[data-n="2"] { --n: 2; } .mod-linha[data-n="3"] { --n: 3; } .mod-linha[data-n="4"] { --n: 4; }
@media (max-width: 1000px) { .mod-linha[data-n="3"], .mod-linha[data-n="4"] { --n: 2; } }
@media (max-width: 640px) { .mod-linha { --n: 1 !important; } }
.mod { min-width: 0; position: relative; display: flex; flex-direction: column; border-radius: 16px; transition: transform .18s ease, box-shadow .18s ease; }
.mod > .cartao { flex: 1; }
.mod > .kpis, .mod > .est-faixa, .mod > .legenda { margin: 0; }
.mod > .legenda { padding-right: 70px; }
/* botão de lápis (ajustar layout) ao lado do título da janela */
.btn-layout { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 9px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--navy2); cursor: pointer; font: inherit; font-size: .8rem; font-weight: 800; }
.btn-layout:hover { border-color: var(--navy2); }
.btn-layout[aria-pressed="true"] { background: var(--amarelo-btn); color: var(--amarelo-btn-fg); border-color: var(--amarelo-btn-borda); }
/* modo ajuste: módulos com contorno, alfinete no canto, arrasta segurando em qualquer lugar */
.mods.editando .mod { outline: 2px dashed var(--line); outline-offset: 4px; cursor: grab; touch-action: pan-y; }
.mods.editando .mod.fixo { cursor: default; outline-color: var(--amarelo-btn-borda); }
.mods.editando .mod > :not(.mod-pin) { user-select: none; }
.mod-pin { position: absolute; top: -12px; right: -8px; z-index: 5; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: 0 2px 8px rgba(0,0,0,.14); cursor: pointer; padding: 0; }
.mod-pin[aria-pressed="true"] { background: var(--amarelo-btn); color: var(--amarelo-btn-fg); border-color: var(--amarelo-btn-borda); }
body.layout-editando .aba { cursor: grab; }
body.layout-editando #abas { outline: 2px dashed var(--line); outline-offset: 3px; border-radius: 99px; }
body.mod-arrastando, body.mod-arrastando * { user-select: none; cursor: grabbing !important; }
.mod.arrastando, .aba.arrastando { z-index: 30; opacity: .85; box-shadow: 0 18px 50px rgba(0,0,0,.25); transition: none; position: relative; }
.mod[data-drop]::after { content: ""; position: absolute; z-index: 25; border-radius: 16px; pointer-events: none;
  background: color-mix(in srgb, var(--navy2) 14%, transparent); border: 2px dashed var(--navy2); }
.mod[data-drop="cima"]::after { inset: -8px -4px 50% -4px; }
.mod[data-drop="baixo"]::after { inset: 50% -4px -8px -4px; }
.mod[data-drop="esq"]::after { inset: -4px 50% -4px -8px; }
.mod[data-drop="dir"]::after { inset: -4px -8px -4px 50%; }
.mod[data-drop="bloqueado"]::after { inset: -4px; background: color-mix(in srgb, var(--critico) 12%, transparent); border-color: var(--critico); }
.mod[data-drop="cima"] { transform: translateY(14px); } .mod[data-drop="baixo"] { transform: translateY(-14px); }
.mod[data-drop="esq"] { transform: translateX(14px); } .mod[data-drop="dir"] { transform: translateX(-14px); }
.aba[data-drop="esq"] { box-shadow: inset 4px 0 0 var(--rosa); } .aba[data-drop="dir"] { box-shadow: inset -4px 0 0 var(--rosa); }
/* barra Salvar / Cancelar no rodapé */
.layout-barra { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(0,0,0,.2); max-width: calc(100vw - 32px); }
.layout-barra span { font-weight: 800; color: var(--titulo); font-size: .9rem; white-space: nowrap; }
.layout-barra[hidden] { display: none; }
.layout-barra.chama { animation: chama .45s ease; }
@keyframes chama { 0%, 100% { transform: translateX(-50%); } 25% { transform: translateX(calc(-50% - 8px)); } 75% { transform: translateX(calc(-50% + 8px)); } }
@media (max-width: 640px) { .layout-barra { bottom: 12px; left: 16px; right: 16px; transform: none; justify-content: flex-end; } .layout-barra span { margin-right: auto; } @keyframes chama { 0%, 100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } } }

/* ---------- balão Suporte (acima do balão de Mensagens) ---------- */
.balao.balao-suporte { bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); width: 50px; height: 50px; right: max(21px, calc(env(safe-area-inset-right, 0px) + 17px)); }
.balao.balao-suporte svg { width: 23px; height: 23px; }
.painel-suporte { bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); display: flex; flex-direction: column; max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); }
.sup-corpo { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: auto; }
.sup-chat { padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 120px; }
.sup-msg { display: flex; flex-direction: column; max-width: 86%; }
.sup-msg .b { padding: 9px 12px; border-radius: 14px; font-size: .9rem; white-space: pre-wrap; }
.sup-msg .h { font-size: .68rem; color: var(--muted); margin: 2px 6px 0; }
.sup-msg.bot { align-self: flex-start; }
.sup-msg.bot .b { background: var(--surface2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.sup-msg.eu { align-self: flex-end; align-items: flex-end; }
.sup-msg.eu .b { background: var(--btn); color: var(--btn-fg); border-bottom-right-radius: 4px; }
.sup-rod { padding: 8px 14px 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.sup-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-op { border: 1.5px solid var(--navy2); color: var(--navy2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .82rem; }
.sup-op:hover { background: var(--tom-claro); }
.sup-form { display: flex; gap: 8px; align-items: flex-end; }
.sup-form textarea { flex: 1; resize: none; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface2); max-height: 120px; }
.sup-form .btn { padding: 10px 14px; }
.sup-rev { display: grid; gap: 8px; }
.sup-rev-h, .sup-li-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; }
.sup-ass { margin: 0; font-weight: 800; color: var(--titulo); }
.sup-urg, .sup-st { font-size: .72rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--surface2); }
.sup-urg.hoje { background: var(--critico-bg); color: var(--critico); }
.sup-urg.semana { background: var(--alerta-bg); color: var(--alerta); }
.sup-st.enviado { background: var(--ok-bg); color: var(--ok); }
.sup-st.fila { background: var(--alerta-bg); color: var(--alerta); }
.sup-st.claude { background: var(--tom-claro); color: var(--navy2); }
.sup-diag { background: var(--surface2); border-radius: 12px; padding: 10px 12px; font-size: .82rem; }
.sup-diag ul { margin: 6px 0; padding-left: 18px; }
.sup-diag p { margin: 0; font-size: .75rem; }
.sup-print { max-width: 100%; max-height: 140px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); justify-self: start; }
.sup-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.sup-acoes .btn { padding: 9px 13px; font-size: .88rem; }
.sup-lista { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 10px; overflow: auto; }
.sup-lista li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.sup-lista p { margin: 0; font-size: .85rem; }
.sup-lista .btn { justify-self: start; margin-top: 4px; }
.sup-vazio { padding: 20px 16px; text-align: center; }
.sup-aviso { margin: 12px 14px 0; padding: 8px 12px; border-radius: 10px; background: var(--alerta-bg); color: var(--alerta); font-size: .82rem; font-weight: 700; }
body.layout-editando .balao-suporte { display: none; }

/* ---------- Vendas por período (Estoque) ---------- */
.pd-acum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 14px; background: var(--grad); color: #fff; margin-bottom: 12px; }
.pd-acum-t { grid-column: 1 / -1; font-size: .78rem; font-weight: 800; opacity: .9; text-transform: uppercase; letter-spacing: .03em; }
.pd-acum div { display: grid; gap: 2px; }
.pd-acum div span { font-size: .75rem; opacity: .85; }
.pd-acum b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pd-acum small { font-size: .7rem; opacity: .9; }
.pd-filtro { display: grid; gap: 8px; margin-bottom: 6px; }
.pd-datas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pd-datas label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; color: var(--muted); }
.pd-datas input { padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface2); font-weight: 700; }
.pd-atalhos, .pd-lojas { display: flex; flex-wrap: wrap; gap: 6px; }
.pd .sup-op[aria-pressed="true"] { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }
.pd .sup-op small { font-weight: 600; opacity: .75; }
.pd .sup-op.sem { border-style: dashed; opacity: .75; }
.pd-per { margin: 4px 0 10px; font-size: .82rem; color: var(--muted); font-weight: 700; }
.pd-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pd-kpi { background: var(--surface2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.pd-kpi span { font-size: .75rem; color: var(--muted); font-weight: 700; }
.pd-kpi b { font-size: 1.1rem; color: var(--titulo); font-variant-numeric: tabular-nums; }
.pd-kpi small { font-size: .72rem; color: var(--muted); }
.pd-var { font-size: .72rem; font-weight: 800; }
.pd-var.ok { color: var(--ok); } .pd-var.critico { color: var(--critico); }
.pd-aviso { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--alerta-bg); color: var(--alerta); font-size: .82rem; font-weight: 700; }
.pd-blocos { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.pd-blocos h4 { margin: 0 0 6px; font-size: .9rem; color: var(--titulo); }
.pd-tab { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pd-tab th, .pd-tab td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pd-tab th { font-size: .72rem; color: var(--muted); text-align: left; }
.pd-tab .n { text-align: right; font-variant-numeric: tabular-nums; }
.pd-tot td { font-weight: 800; background: var(--surface2); }
.pd-nota { font-size: .75rem; margin: 6px 0 0; }
.pd-det { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pd-det summary { cursor: pointer; font-weight: 800; color: var(--titulo); }
.pd-hist { max-height: 420px; overflow: auto; margin-top: 8px; }
.pd-hist thead th { position: sticky; top: 0; background: var(--surface); }
.pd-zero td { color: var(--muted); }
.pd-barra { display: inline-block; width: 70px; height: 8px; border-radius: 99px; background: var(--surface2); margin-right: 8px; vertical-align: middle; overflow: hidden; }
.pd-barra i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.pd-rod { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: .8rem; }
.pd-imp { cursor: pointer; }
@media (max-width: 1000px) { .pd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pd-blocos { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .pd-acum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pd, .pd-blocos > div { min-width: 0; }
.pd .tabela-wrap { overflow-x: auto; max-width: 100%; }
.pd-tog { margin-left: auto; border: 1.5px solid var(--line); background: var(--surface); color: var(--navy2); border-radius: 999px; padding: 4px 12px; font-size: .78rem; font-weight: 800; cursor: pointer; }
.pd-tog:hover { border-color: var(--navy2); }
.pd-acum { margin-bottom: 0; }
.pd-corpo { margin-top: 12px; }
/* colunas: módulos empilhados dentro da mesma coluna, sem buraco */
.mod-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mod-col > .mod:only-child { flex: 1; }
.mod-col > .mod:not(:only-child) > .cartao { flex: none; }

.pd-acum { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ---------- login com cadastro ---------- */
.login-card textarea { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface2); resize: vertical; font: inherit; }
.login-card .campo small { font-weight: 600; }
.login-troca { font-size: .9rem; color: var(--muted); }
.link { border: 0; background: none; padding: 0; color: var(--rosa); font-weight: 800; text-decoration: underline; cursor: pointer; font: inherit; font-weight: 800; }
.login-msg { margin: 0; padding: 9px 12px; border-radius: 10px; font-size: .85rem; font-weight: 700; text-align: left !important; }
.login-msg.erro { background: var(--critico-bg); color: var(--critico); }
.login-msg.ok { background: var(--ok-bg); color: var(--ok); }
.login-msg.info { background: var(--alerta-bg, #FFF6DA); color: var(--titulo, #002972); }
.campo-tel { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.tel-box { display: grid; grid-template-columns: 92px 84px minmax(0, 1fr); gap: 6px; }
.tel-box select[hidden] + input { grid-column: span 2; }
.tel-box select, .tel-box input { min-width: 0; padding: 11px 4px 11px 8px; }
.senha-box { position: relative; display: block; }
.senha-box input { padding-right: 46px !important; }
.senha-olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.senha-olho:hover, .senha-olho[aria-pressed="true"] { color: var(--navy2); background: var(--tom-claro); }
/* logos das 3 lojas na entrada, com selo da plataforma */
.logo-trio { display: flex; justify-content: center; gap: 14px; margin: 0 auto; }
.lt-loja { position: relative; width: 64px; height: 64px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(var(--sombra-cor), .16); display: block; }
.lt-loja img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.lt-selo { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.lt-selo svg { width: 100%; height: 100%; display: block; }
.nt-manchetes a{color:var(--navy);text-decoration:none}.nt-manchetes a:hover{text-decoration:underline}

/* ---------- Débitos ---------- */
.form-debito { border-top-color: var(--navy2); max-height: calc(100vh - 40px); overflow: auto; }
#dlg-debito { width: min(520px, calc(100vw - 24px)); }
.acoes-form { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.acoes-form .btn { flex: 1 1 130px; }
.deb-erro { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--critico-bg); color: var(--critico); font-weight: 700; }
.deb-quem { margin: 0; font-size: .82rem; }
.deb-previa { list-style: none; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--surface2); display: grid; gap: 4px; font-size: .9rem; }
.deb-previa li { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; }
.deb-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.deb-filtros .deb-c { font-size: .8rem; gap: 4px; }
.deb-filtros .deb-c input, .deb-filtros .deb-c select { padding: 7px 10px; border-radius: 10px; }
.deb-grupo + .deb-grupo { margin-top: 14px; }
.deb-gh { display: flex; justify-content: space-between; gap: 10px; padding: 0 2px 6px; margin-bottom: 8px; border-bottom: 2px dotted var(--amarelo); color: var(--titulo); }
.deb-it { align-items: center !important; border-left: 4px solid var(--alerta); }
.deb-it.deb-pago { border-left-color: var(--ok); opacity: .8; }
.deb-it.deb-naopago { border-left-color: var(--critico); background: var(--critico-bg) !important; }
.deb-obs { font-size: .82rem; }
.deb-dir { flex: none !important; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; max-width: 60%; }
.deb-valor { font-size: 1.05rem; color: var(--titulo); min-width: 96px; text-align: right; }
select.deb-st { border: 0; border-radius: 999px; padding: 5px 10px; font-weight: 800; font-size: .78rem; cursor: pointer; }
.deb-bts { display: inline-flex; gap: 6px; }
.btn.deb-x:hover { background: var(--critico-bg); color: var(--critico); }
.deb-total { display: flex; justify-content: space-between; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 800; color: var(--titulo); }
@media (max-width: 640px) {
  .deb-it { flex-wrap: wrap; }
  .deb-dir { max-width: none; width: 100%; justify-content: space-between; }
  .deb-valor { text-align: left; min-width: 0; }
}
.deb-prox .lista .ic { width: auto; min-width: 52px; padding: 0 6px; font-size: .8rem; }

/* Avaliações: Nota por anúncio (v44) */
.txt-menino { color: var(--menino); font-weight: 700; } .txt-menina { color: var(--menina); font-weight: 700; }
.av-filtros input[type=search] { flex: 1; min-width: 180px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; }
.av-lista { display: grid; gap: 8px; }
.av-anuncio { border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
.av-anuncio[hidden] { display: none; }
.av-anuncio > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 120px 110px 150px 130px; gap: 10px; align-items: center; padding: 10px 12px; }
.av-anuncio > summary::-webkit-details-marker { display: none; }
.av-anuncio[open] > summary { border-bottom: 1px solid var(--line); }
.av-tit { display: grid; gap: 2px; min-width: 0; } .av-tit b { overflow-wrap: anywhere; } .av-tit .muted { font-size: .8rem; }
.av-anuncio > summary > .chip { justify-self: end; }
.av-nota b { font-size: 1.15rem; color: var(--titulo); }
.av-num { display: grid; font-size: .82rem; } .av-info { font-size: .8rem; }
.av-det { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; padding: 12px; }
.av-det .lista li { background: var(--surface); }
.av-det-vazio { padding: 10px 12px; margin: 0; }
@media (max-width: 760px) {
  .av-anuncio > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .av-anuncio > summary > .chip { justify-self: start; }
  .av-tit { grid-column: 1 / -1; }
  .av-info { grid-column: 1 / -1; }
  .av-det { grid-template-columns: 1fr; }
}

/* Equipe e troca de empresa (modo Supabase) */
.eq-menu { padding: .2rem 0 .6rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
#dlg-equipe .form-entrada { max-height: 85vh; overflow: auto; }
.eq-pessoa p { margin: 0; }
.eq-lojas { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; margin: .3rem 0; }
.eq-loja { display: inline-flex; gap: .3rem; align-items: center; font-size: .9rem; }
#dlg-equipe hr { border: 0; border-top: 1px solid var(--line); margin: .8rem 0; }

/* Estoque: período das saídas/entradas + "robô vivo" (v46) */
.est-per { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 12px; display: grid; gap: 8px; }
.est-per-linha { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.est-per-tit { color: var(--titulo); font-size: .92rem; }
.est-per .sup-op[aria-pressed="true"] { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }
.est-vivo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .82rem; color: var(--muted); }
.est-vivo b { color: var(--titulo); }
.est-vivo .btn { margin-left: auto; }
.pulso { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulso 2s infinite; flex: none; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(34, 160, 90, .5); } 70% { box-shadow: 0 0 0 8px rgba(34, 160, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 160, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .pulso { animation: none; } }
.est-faixa > div.neg b, .est-tot > div.neg b { color: var(--critico); }
.est-neg-aviso { display: block; font-size: .72rem; color: var(--critico); font-weight: 700; margin-top: 2px; }
@media (max-width: 560px) { .est-vivo .btn { margin-left: 0; } .pd-datas input { max-width: 150px; } }
