/* castelar · tema grafite e azul */
:root {
  --bg: #0D1117;
  --surface: #151B24;
  --surface-2: #1A2B4A;
  --border: #232C38;
  --text: #E6EDF3;
  --muted: #8B98A8;
  --accent: #4C8DFF;
  --accent-soft: #27395A;
  --accent-text: #6EA8FF;
  --nav-active: #1B2330;
  --warn-bg: #2A1F08;
  --warn-border: #5C4310;
  --warn-text: #FDE68A;
  --danger: #F87171;
  --ok: #5BD69A;
  --radius: 12px;
  --accent-hover-text: #9CC3FF;
  --accent-text-soft: #A9C8FF;
  --bar-hover: #3A5A8C;
  --border-accent: #2B4166;
  --border-strong: #2D3846;
  --chip-text: #C3CCD8;
  --danger-bg: #2A1214;
  --danger-border-2: #5C2226;
  --danger-border: #4A1F23;
  --danger-text: #FCA5A5;
  --grid-line: #263040;
  --input-bg: #0F141B;
  --input-readonly: #131A23;
  --label: #C2CCD6;
  --muted-2: #4B5768;
  --ok-bg: #10291F;
  --ok-border: #1F5A43;
  --ok-text: #6EE7B7;
  --on-accent: #071226;
  --row-checked: #16243A;
  --row-hover: #151C26;
  --row-line: #1A2230;
  --row-selected: #18202B;
  --roxo-bg: #251D40;
  --roxo-text: #C4B5FD;
  --surface-accent: #111A28;
  --surface-sunk: #111821;
  --toast-bg: #1F2A3A;
  --warn-border-2: #4A3A12;
  --warn: #FBBF24;
  --barra-bg: rgba(14, 19, 27, .96);
  --sombra: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-hover-text); }
h1, h2 { margin: 0; letter-spacing: -0.02em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* --- estrutura ----------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }
.nav { width: 248px; flex: none; border-right: 1px solid var(--border); padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; }
.nav .logo { padding: 4px 12px 20px; }
.nav .logo img { display: block; height: 24px; }
.nav a.item { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a.item:hover { background: var(--nav-active); color: var(--text); }
.nav a.item.ativo { background: var(--nav-active); color: var(--text); font-weight: 600; }
.nav .tag { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; }
.nav .rodape { margin-top: auto; padding: 16px 12px 0; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }

.seletor { position: relative; margin-bottom: 14px; }
.seletor summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.seletor summary::-webkit-details-marker { display: none; }
.seletor .ini { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: none; }
.seletor .nome { display: flex; flex-direction: column; min-width: 0; }
.seletor .nome strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seletor .nome span { font-size: 11px; color: var(--muted); }
.seletor .lista { position: absolute; z-index: 10; top: 58px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.4); }
.seletor .lista a { display: block; padding: 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.seletor .lista a:hover { background: var(--nav-active); }
.seletor .lista a.gerenciar { color: var(--accent-text); border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; }

.conteudo { flex: 1; min-width: 0; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 18px; }
.topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.topo h1 { font-size: 30px; font-weight: 600; }
.topo .sub { font-size: 13px; color: var(--muted); margin-bottom: 4px; }

.faixa-ambiente { background: #3B2A05; color: var(--warn-text); text-align: center; font-size: 12px; font-weight: 600; padding: 6px; letter-spacing: 0.02em; }
.aviso { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); font-size: 13px; }
.erro { padding: 12px 16px; border-radius: var(--radius); background: var(--danger-bg); border: 1px solid var(--danger-border-2); color: var(--danger-text); font-size: 13px; }

/* --- cartões ------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--sombra); }
.card.pad { padding: 22px 24px; }
.linha { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .rot { font-size: 12px; color: var(--muted); }
.kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.hero { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero .cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hero .grandes { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.grande { display: flex; flex-direction: column; gap: 8px; }
.grande .val { font-size: 46px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.grande .val.lucro { color: var(--accent-text); }
.grandes.linha3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.grandes.linha3 .grande { padding: 0 16px; border-left: 1px solid var(--border); min-width: 0; }
.grandes.linha3 .grande:first-child { padding-left: 0; border-left: 0; }
.hero { container-type: inline-size; }
.grandes.linha3 .grande .val { font-size: clamp(22px, 4.2cqi, 46px); white-space: nowrap; }
@media (max-width: 760px) {
  .grandes.linha3 { grid-template-columns: 1fr; }
  .grandes.linha3 .grande { padding: 14px 0; border-left: 0; border-top: 1px solid var(--border); }
  .grandes.linha3 .grande:first-child { padding-top: 0; border-top: 0; }
  .grandes.linha3 .grande .val { font-size: 34px; }
}
.periodos { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.periodos a { min-height: 36px; min-width: 72px; padding: 0 14px; display: flex; align-items: center; justify-content: center; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 13px; }
.periodos a.ativo { background: var(--nav-active); color: var(--text); font-weight: 600; }
.barras { display: flex; align-items: flex-end; gap: 6px; height: 104px; }
.barras span { flex: 1; border-radius: 3px 3px 0 0; background: var(--accent-soft); min-height: 2px; }
.barras span.atual { background: var(--accent); }
.eixo { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
/* gráfico de barras com valores e eixo */
.grafico { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; }
.g-eixo-y { display: flex; flex-direction: column; justify-content: space-between; height: 160px; margin-top: 20px; font-size: 10px; color: var(--muted); text-align: right; transform: translateY(-6px); font-variant-numeric: tabular-nums; }
.g-area { position: relative; min-width: 0; }
.g-linhas { position: absolute; left: 0; right: 0; top: 20px; height: 160px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.g-linhas i { display: block; border-top: 1px dashed var(--grid-line); }
.g-linhas i:last-child { border-top-style: solid; border-color: var(--border); }
.g-barras { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 160px; margin-top: 20px; }
.g-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; }
.g-col:hover .g-barra { background: var(--bar-hover); }
.g-col:hover .g-barra.atual { background: var(--accent-text); }
.g-val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 4px; font-size: 10px; line-height: 1; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-val.atual { color: var(--text); font-weight: 600; }
.g-barra { position: relative; width: 100%; max-width: 44px; border-radius: 3px 3px 0 0; background: var(--accent-soft); min-height: 2px; flex: none; }
.g-barra.atual { background: var(--accent); }
.g-eixo-x { display: flex; gap: 4px; margin-top: 6px; font-size: 10px; color: var(--muted); }
.g-eixo-x span { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; }
@media (max-width: 760px) {
  .g-val { display: none; }
  .g-col:last-child .g-val { display: block; }
  .g-eixo-x span { overflow: visible; }
  .g-eixo-x span:nth-child(even) { visibility: hidden; }
}
.grande .sub-val { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.grande .sub-val strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.composicao { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.composicao .linhas > div { padding: 7px 0; font-size: 13px; color: var(--muted); }
.composicao .linhas > div.total { color: var(--text); font-weight: 600; }
.composicao .linhas > div.lucro { color: var(--accent-text); font-weight: 700; font-size: 15px; border-top: 1px solid var(--border); }
.indicadores { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.indicadores .val.lucro { color: var(--accent-text); }
.projecao { flex: 1 1 260px; min-width: 0; background: var(--surface-2); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.projecao .val { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* --- tabelas ------------------------------------------------------------- */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 12px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 18px; border-bottom: 1px solid var(--row-line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.dir, th.dir { text-align: right; }
td a { color: var(--text); text-decoration: none; font-weight: 500; }
td a:hover { color: var(--accent-text); }
tr.clicavel { cursor: pointer; }
tr.clicavel:hover td { background: var(--row-selected); }
.sub-linha { display: block; font-size: 12px; color: var(--muted); }
.selo { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--nav-active); color: var(--muted); }
.selo.alerta { background: var(--warn-bg); color: var(--warn-text); }
.vazio { padding: 40px 24px; text-align: center; color: var(--muted); }

/* --- formulários --------------------------------------------------------- */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; color: var(--label); }
.campo.largo { grid-column: 1 / -1; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=month], input[type=number], select {
  font: inherit; font-size: 15px; color: var(--text); min-height: 46px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--input-bg); width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); min-height: 44px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.botoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.prim { background: var(--accent); color: var(--on-accent); }
.btn.prim:hover { background: var(--accent-text); color: var(--on-accent); }
.btn.sec { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn.sec:hover { background: var(--nav-active); color: var(--text); }
.btn.link { background: none; color: var(--muted); padding: 0; min-height: 0; font-weight: 500; }

/* --- telas do ERP ---------------------------------------------------------- */
.ok { color: var(--ok); }
.alerta-txt { color: var(--warn); }
.selo.ok { background: var(--ok-bg); color: var(--ok-text); }
.selo.azul { background: var(--accent-soft); color: var(--accent-text-soft); }
.selo.perigo { background: var(--danger-bg); color: var(--danger-text); }
.selo.roxo { background: var(--roxo-bg); color: var(--roxo-text); }
.cab-nota { grid-template-columns: 2fr 1fr 1fr 1fr; }
.dividido { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.lateral { border-color: var(--border-accent); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.lateral .eyebrow, .eyebrow { font-size: 12px; color: var(--muted); }
.lateral h2 { font-size: 21px; line-height: 1.2; }
.sec-tit { font-size: 17px; }
.cab-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; background: none; font-family: inherit; cursor: pointer; }
.chip.ativo { background: var(--nav-active); color: var(--text); border-color: var(--nav-active); font-weight: 600; }
.chip.alerta { color: var(--warn); border-color: var(--warn-border-2); }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.abas a { padding: 10px 16px; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; }
.abas a.ativo { color: var(--text); font-weight: 600; border-color: var(--accent); }
.kpi .val.ok { color: var(--ok); }
.kpi .val.alerta { color: var(--warn); }
.kpi.destaque { border-color: var(--border-accent); }
.kpi .tipo { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kpi.destaque .tipo { color: var(--accent-text); }
.linhas { display: flex; flex-direction: column; }
.linhas > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--row-line); }
.linhas > div:last-child { border-bottom: 0; }
.resumo { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.resumo > div { display: flex; justify-content: space-between; gap: 12px; }
.mini-input { min-height: 40px !important; font-size: 14px !important; }
.dir-input { text-align: right; }
.passos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 11px; color: var(--muted); }
.passos span { border-top: 3px solid var(--border); padding-top: 6px; }
.passos span.feito { border-color: var(--accent); color: var(--text); }
.passos span.atual { border-color: var(--border-accent); color: var(--text); }
.anexo { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-accent); border-radius: 10px; background: var(--surface-accent); }
.anexo .tipo-arq { width: 40px; height: 40px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--accent-text); flex: none; }
.soltar { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.soltar strong { display: block; color: var(--text); font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.barra-h { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.barra-h span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.semanas { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px 16px; align-items: center; font-size: 13px; }
.sigla { width: 40px; height: 40px; border-radius: 10px; background: var(--nav-active); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; display: inline-block; }
.ponto.alerta { background: var(--warn); }
.ponto.cinza { background: var(--muted); }
.conta-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.conta-linha.alerta { border-color: var(--warn-border); }
.btn.amarelo { background: var(--warn); color: #1A1404; }
.btn.peq { min-height: 36px; padding: 0 14px; font-size: 13px; }
.chave { width: 44px; height: 26px; border-radius: 999px; background: var(--accent); position: relative; flex: none; }
.chave::after { content: ""; position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); background: var(--toast-bg); border: 1px solid var(--border-accent); color: var(--text); padding: 12px 18px; border-radius: 12px; font-size: 13px; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.toast[hidden] { display: none; }
@media (max-width: 1100px) {
  .cab-nota { grid-template-columns: 1fr 1fr !important; }
  .dividido { grid-template-columns: minmax(0, 1fr); }
}

/* --- login ---------------------------------------------------------------- */
.login { min-height: 100vh; display: flex; }
.login-marca { flex: 1 1 52%; min-width: 0; padding: 56px 48px 28px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 32px; }
.login-centro { flex: 1; width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; text-align: center; }
.login-logo { display: block; height: 64px; }
.login-vitrine { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.login-frase { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; max-width: 480px; }
.login-cards { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: left; }
.login-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.login-card.largo { grid-column: 1 / -1; }
.login-card .rot { font-size: 12px; color: var(--muted); }
.login-card .val { font-size: clamp(16px, 1.55vw, 22px); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.login-card .val.lucro { color: var(--accent-text); }
.login-barras { flex-direction: row; align-items: flex-end; gap: 5px; height: 96px; }
.login-barras span { flex: 1; border-radius: 2px 2px 0 0; background: var(--accent-soft); }
.login-barras span.atual { background: var(--accent); }
.login-ilustra { font-size: 11px; color: var(--muted); margin-top: -16px; }
.login-rodape { font-size: 12px; color: var(--muted); }
.login-lado { flex: 1 1 48%; min-width: 0; padding: 56px 24px; display: flex; align-items: center; justify-content: center; }
.login .caixa { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 18px; }
.login .caixa h1 { font-size: 28px; font-weight: 700; }
.login .caixa > div:first-child { text-align: center; }
.login .caixa input { min-height: 48px; }
.login .caixa .btn { min-height: 48px; font-size: 15px; }
@media (max-width: 900px) {
  .login { flex-direction: column; }
  .login-marca { flex: none; padding: 28px 20px; border-right: 0; border-bottom: 1px solid var(--border); }
  .login-centro { gap: 0; }
  .login-vitrine, .login-rodape { display: none; }
  .login-logo { height: 42px; }
  .login-lado { flex: 1; align-items: flex-start; padding: 36px 20px; }
}

/* --- celular ------------------------------------------------------------- */
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .nav { width: auto; border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: nowrap; overflow-x: auto; align-items: center; padding: 10px 12px; gap: 4px; }
  .nav .logo { padding: 0 8px 0 2px; flex: none; }
  .nav .logo img { height: 18px; }
  .nav a.item { white-space: nowrap; flex: none; min-height: 38px; }
  .nav .tag, .nav .rodape { display: none; }
  .seletor { margin: 0; flex: none; }
  .seletor summary { min-height: 38px; }
  .seletor .nome span { display: none; }
  .seletor .lista { position: fixed; top: 60px; left: 12px; right: 12px; }
  .conteudo { padding: 18px 16px 40px; }
  .grande .val { font-size: 36px; }
  .topo h1 { font-size: 24px; }
  .ocultar-cel { display: none; }
  td, th { padding: 12px 14px; }
}

/* valores e selos não quebram linha (evita "R$" sozinho em cima do número) */
td.num, .selo { white-space: nowrap; }
td .sub-linha { white-space: normal; }
td.largo-min { min-width: 170px; }

/* --- espaço Pessoal ------------------------------------------------------ */
.seletor .ini.pessoal { background: #E6EDF3; }
.data-box { width: 42px; height: 42px; border-radius: 10px; background: var(--nav-active); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.data-box strong { font-size: 15px; }
.data-box span { font-size: 9px; color: var(--muted); margin-top: 2px; }
.anel { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.anel span { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
tr.dia td { background: var(--surface-sunk); font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
.colunas { display: flex; align-items: flex-end; gap: 14px; height: 200px; }
.colunas > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; font-size: 12px; }
.colunas .col { width: 100%; max-width: 56px; background: var(--accent); border-radius: 6px 6px 0 0; }

.so-cel { display: none; }
@media (max-width: 760px) {
  .so-cel { display: inline; }
  .sub-linha.so-cel { display: block; }
  .prod-com-foto { gap: 10px; }
  .prod-com-foto .foto-prod { width: 32px !important; height: 32px !important; font-size: 11px !important; }
}
.cartao-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--text); }
.cartao-card:hover { border-color: var(--border-accent); color: var(--text); }
.cartao-card.inativo { opacity: .6; }
.sem-link { text-decoration: none; color: inherit; display: block; }
.sem-link:hover { color: inherit; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio:has(input:checked) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.chip-radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
a.chip { text-decoration: none; }

:root { color-scheme: dark; }
.kpi .val { white-space: nowrap; }
/* painel: se o cartão principal ficar estreito, os três números voltam a empilhar */
@container (max-width: 560px) {
  .grandes.linha3 { grid-template-columns: 1fr; }
  .grandes.linha3 .grande { padding: 14px 0; border-left: 0; border-top: 1px solid var(--border); }
  .grandes.linha3 .grande:first-child { padding-top: 0; border-top: 0; }
  .grandes.linha3 .grande .val { font-size: 34px; }
}

/* painel: produtos mais vendidos */
.top-produtos .part { display: flex; align-items: center; gap: 8px; }
.top-produtos .part .barra-h { flex: 1; height: 6px; }
.top-produtos .part .num { width: 44px; text-align: right; font-size: 12px; }
.top-produtos .lucro-txt { color: var(--accent-text); }
.top-produtos tr.outros td { border-top: 1px solid var(--border); }
.top-produtos tr.total td { background: var(--surface-sunk); }

/* painel: pedidos por estado */
.estados { display: flex; flex-direction: column; gap: 16px; }
.cab-estados { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.legenda-mapa { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.legenda-mapa i { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.legenda-mapa span { margin: 0 4px; }
.estados-corpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: center; }
.mapa-br { width: 100%; max-height: 360px; }
.mapa-br path { stroke: var(--surface); stroke-width: 1; transition: opacity .15s; }
.mapa-br path:hover { opacity: .75; }
.ranking-estados { display: flex; flex-direction: column; }
.r-linha { display: grid; grid-template-columns: 34px minmax(0, 1fr) 30% 52px 48px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--row-line); font-size: 13px; }
.r-linha:last-child { border-bottom: 0; }
.r-linha .barra-h { height: 6px; }
.r-uf { font-weight: 700; font-size: 12px; color: var(--accent-text); }
.r-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-linha strong, .r-pct { text-align: right; }
.r-pct { font-size: 12px; }
.r-linha.outros { color: var(--muted); }
.r-linha.outros .r-uf { color: var(--muted); }
@media (max-width: 900px) {
  .estados-corpo { grid-template-columns: 1fr; }
  .mapa-br { max-height: 280px; }
}
@media (max-width: 760px) {
  .r-linha { grid-template-columns: 34px minmax(0, 1fr) 52px 52px; }
  .r-linha .barra-h, .r-linha.outros > span:nth-child(3) { display: none; }
}

/* fotos de produto */
.foto-prod { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 8px; object-fit: contain; background: #F4F6F8; border: 1px solid var(--border); }
.foto-prod.vazia { background: var(--nav-active); color: var(--muted); font-weight: 700; letter-spacing: .02em; border-style: dashed; }
.prod-com-foto { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prod-txt { min-width: 0; display: flex; flex-direction: column; }
.foto-editar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.foto-editar .foto-prod { border-radius: 12px; }

/* Contas a pagar: busca e períodos */
.filtros-cp { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.busca-cp { display: flex; gap: 8px; flex: 1 1 320px; max-width: 480px; }
.busca-cp input[type=search] { flex: 1; min-width: 0; }
.navega-cp { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 36px; }
.navega-cp > strong { font-size: 16px; }
.navega-cp .seta { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 20px; line-height: 1; }
.navega-cp .seta:hover { background: var(--nav-active); }
.link-hoje { font-size: 13px; }
.busca-ativa { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text-soft); font-size: 13px; }
.busca-ativa a { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: inherit; text-decoration: none; font-size: 16px; }
.busca-ativa a:hover { background: rgba(255,255,255,.08); }
.aviso.neutro { background: var(--surface); border-color: var(--border); color: var(--muted); }
.aviso a { color: inherit; font-weight: 600; }
.tabela-cp tr { position: relative; }
.tabela-cp .data-cp { width: 64px; }
.tabela-cp .linha-link { color: var(--text); text-decoration: none; }
.tabela-cp .linha-link::after { content: ""; position: absolute; inset: 0; }
.tabela-cp tr:not(.total):hover { background: var(--row-hover); }
.tabela-cp tr.selecionada { background: var(--row-selected); box-shadow: inset 3px 0 0 var(--accent); }
.tabela-cp tr.total td { background: var(--surface-sunk); }
@media (max-width: 760px) { .busca-ativa { margin-left: 0; } .filtros-cp .periodos { width: 100%; } .filtros-cp .periodos a { flex: 1; min-width: 0; } }

/* Notas de entrada: lista */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filtros-ne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filtros-ne input[type=search] { flex: 1 1 280px; max-width: 440px; }
.filtros-ne .sel-periodo { width: auto; min-width: 170px; }
.filtros-ne .sel-periodo.mudado { border-color: var(--accent); color: var(--accent-text-soft); }
.abas-ne { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.abas-ne a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 96px; padding: 12px 14px 10px; color: var(--muted); text-decoration: none; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.abas-ne a strong { font-size: 15px; color: var(--text); font-weight: 600; }
.abas-ne a.ativo { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.abas-ne a:hover { color: var(--text); }
.barra-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 18px; background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.barra-sel[hidden] { display: none; }
.barra-sel-botoes { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.tabela-ne th a.ordenar { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.tabela-ne th a.ordenar.ativo { color: var(--text); }
.tabela-ne th.dir a.ordenar { justify-content: flex-end; }
.seta-ord { font-size: 11px; opacity: .55; }
.ordenar.ativo .seta-ord { opacity: 1; color: var(--accent); }
.tabela-ne .col-sel { width: 44px; padding-right: 0; }
.tabela-ne .col-sel input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.tabela-ne .col-acao { width: 48px; padding-left: 0; text-align: right; }
.tabela-ne tbody tr:hover { background: var(--row-hover); }
.tabela-ne tr.marcada { background: var(--row-checked); }
.tabela-ne tr.cancelada td:not(.col-sel):not(.col-acao) { opacity: .5; }
.tabela-ne tr.cancelada .num strong { text-decoration: line-through; }
.forn-ne { font-weight: 500; }
.marcador { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; margin: 2px 4px 2px 0; border-radius: 999px; background: var(--nav-active); color: var(--chip-text); font-size: 12px; text-decoration: none; }
.marcador:hover { background: var(--nav-active); color: var(--text); }
.lanc-ne { display: inline-flex; gap: 4px; }
.lanc { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px dashed var(--border-strong); color: var(--muted-2); font-size: 11px; font-weight: 700; }
.lanc.on { border: 1px solid var(--ok-border); background: var(--ok-bg); color: var(--ok-text); }
.menu-acao { position: relative; display: inline-block; }
.menu-acao summary { list-style: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: 18px; }
.menu-acao summary::-webkit-details-marker { display: none; }
.menu-acao summary:hover, .menu-acao[open] summary { background: var(--accent); color: var(--on-accent); }
.menu-acao-lista { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; padding: 6px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.menu-acao-lista button { font: inherit; font-size: 14px; text-align: left; padding: 10px 12px; border: 0; border-radius: 7px; background: none; color: var(--text); cursor: pointer; }
.menu-acao-lista button:hover { background: var(--nav-active); }
.rodape-ne { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); }
.legenda-ne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 18px 16px; font-size: 12px; }
.legenda-ne .lanc { width: 20px; height: 20px; font-size: 10px; margin-left: 6px; }
@media (max-width: 760px) { .abas-ne a { min-width: 0; padding: 10px; } .filtros-ne .sel-periodo { flex: 1; } }
@media (max-width: 760px) {
  .tabela-ne th, .tabela-ne td { padding-left: 8px; padding-right: 8px; }
  .tabela-ne .col-sel { width: 34px; }
  .tabela-ne .col-acao { width: 40px; }
  .tabela-ne .sub-linha .ocultar-cel { display: none; }
}

/* Incluir nota de entrada */
.nota-form { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.nota-form .sec-tit { margin-bottom: 14px; }
.campos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.campos .c1 { grid-column: span 1; } .campos .c2 { grid-column: span 2; } .campos .c3 { grid-column: span 3; }
.campos .c4 { grid-column: span 4; } .campos .c5 { grid-column: span 5; } .campos .c6 { grid-column: span 6; }
.campos .c8 { grid-column: span 8; } .campos .c12 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .campos .c1, .campos .c2 { grid-column: span 3; } .campos .c3 { grid-column: span 4; } .campos .c5, .campos .c4 { grid-column: span 6; } .campos .c8 { grid-column: 1 / -1; } }
@media (max-width: 760px) { .campos .c1, .campos .c2, .campos .c3 { grid-column: span 6; } .campos .c4, .campos .c5, .campos .c6, .campos .c8 { grid-column: 1 / -1; } }
.dica { font-size: 12px; font-weight: 400; color: var(--muted); }
.campo .dica b { color: var(--label); font-weight: 600; }
.aviso-campo { font-size: 12px; font-weight: 500; color: var(--warn); }
.aviso-campo.ok { color: var(--ok-text); }
.cab-sec { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.cab-sec .sec-tit { margin-bottom: 14px; }
textarea { font: inherit; font-size: 15px; color: var(--text); padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--input-bg); width: 100%; resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[readonly].calc, input[readonly]#t-nota { background: var(--input-readonly); border-color: var(--border); color: var(--label); }
.dir-input { text-align: right; }
details.mais { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
details.mais.sem-borda { margin-top: 0; border-top: 0; padding-top: 0; }
details.mais > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-weight: 600; font-size: 14px; min-height: 32px; }
details.mais > summary::-webkit-details-marker { display: none; }
details.mais > summary::before { content: "›"; display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; }
details.mais[open] > summary::before { transform: rotate(90deg); }
details.mais > summary .muted { font-weight: 400; font-size: 13px; }
details.mais > summary .sec-tit { margin: 0; }
details.mais[open] > .campos { margin-top: 14px; }
.total-nota { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.total-nota > div { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.total-nota .campo { width: 220px; }
.grande-input { font-size: 24px !important; font-weight: 700; width: 240px !important; font-variant-numeric: tabular-nums; }
.confere { font-size: 13px; font-weight: 600; min-height: 46px; display: inline-flex; align-items: center; }
.confere.ok { color: var(--ok-text); }
.com-botao { display: flex; gap: 8px; }
.com-botao .btn { min-height: 46px; white-space: nowrap; }
.parcelas { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.parcelas:empty { display: none; }
.parcela { display: grid; grid-template-columns: 48px 80px minmax(0, 200px) minmax(0, 180px); align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.parcelas + .confere { margin-top: 4px; min-height: 32px; }
.ao-lancar { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.ao-lancar .check { align-items: flex-start; min-height: 36px; padding-top: 6px; }
.ao-lancar .check input { margin-top: 1px; }
.tabela-itens td { padding: 8px 6px; vertical-align: top; }
.tabela-itens td:first-child { padding-left: 18px; padding-top: 18px; }
.tabela-itens th { padding: 10px 6px; }
.tabela-itens th:first-child { padding-left: 18px; }
.tabela-itens .col-prod { min-width: 280px; }
.tabela-itens .i-total, .tabela-itens td.num { padding-top: 18px; }
.tabela-itens input, .tabela-itens select { min-width: 0; }
.btn-x { width: 36px; height: 36px; margin-top: 2px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.btn-x:hover { background: var(--danger-bg); color: var(--danger-text); }
.barra-nota { position: sticky; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border: 1px solid var(--border-accent); border-radius: 14px; background: var(--barra-bg); backdrop-filter: blur(6px); box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
.barra-nota > div:first-child { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.barra-nota strong { font-size: 22px; }
@media (max-width: 760px) {
  .parcela { grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 1fr); padding: 8px; gap: 8px; }
  .parcela .p-dias { display: none; }
  .total-nota .campo, .grande-input { width: 100% !important; }
  .barra-nota { padding: 12px; border-radius: 12px 12px 0 0; }
  .barra-nota .botoes .btn.sec:first-child { display: none; }
}

/* Popup de conferência dos custos */
.dialogo { width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border-accent); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.dialogo[open] { display: flex; flex-direction: column; }
.dialogo::backdrop { background: rgba(4, 7, 12, .72); }
.dialogo-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; }
.dialogo-cab h2 { font-size: 20px; margin-bottom: 4px; }
.dialogo-cab .muted { font-size: 13px; }
.dialogo > .aviso { margin: 0 22px 12px; }
.dialogo .tabela-wrap { overflow: auto; flex: 1; border-top: 1px solid var(--border); }
.tabela-cc td { vertical-align: middle; }
.tabela-cc tr.destaque td { background: rgba(251, 191, 36, .07); }
.tabela-cc tr.destaque td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.dialogo-rodape { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--border); }
.dialogo-rodape > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.dialogo-rodape strong { font-size: 18px; }
.cc-confere { font-size: 13px; font-weight: 600; }
.cc-confere.ok { color: var(--ok-text); }
.dialogo .aviso[hidden] { display: none; }
@media (max-width: 760px) {
  .dialogo { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .dialogo-cab { padding: 16px 14px 10px; }
  .dialogo > .aviso { margin: 0 14px 10px; }
  .tabela-cc th, .tabela-cc td { padding: 10px 8px; }
  .tabela-cc th:first-child, .tabela-cc td:first-child { padding-left: 14px; }
  .tabela-cc .prod-com-foto { gap: 8px; }
  .dialogo-rodape { padding: 12px 14px; }
  .dialogo-rodape .botoes { width: 100%; }
  .dialogo-rodape .botoes .btn { flex: 1; }
}

/* Cadastros */
.abas-cad { overflow-x: auto; }
.abas-cad a { white-space: nowrap; }
.abas-cad .selo { font-size: 10px; padding: 1px 7px; }
.filtros-prod { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filtros-prod input[type=search] { flex: 1 1 260px; max-width: 360px; }
.filtros-prod select { width: auto; min-width: 200px; }
.filtros-prod select.mudado { border-color: var(--accent); color: var(--accent-text-soft); }
.nova-cat { display: flex; gap: 10px; max-width: 560px; }
.nova-cat input { flex: 1; }
.tabela-cat td { vertical-align: middle; }
.tabela-cat .nome-cat { font-weight: 500; }
.tabela-cat td a { text-decoration: none; }
.tabela-cat .acoes-cat { white-space: nowrap; width: 1%; }
.acoes-cat details { display: inline-block; position: relative; margin-left: 6px; }
.acoes-cat summary { list-style: none; }
.acoes-cat summary::-webkit-details-marker { display: none; }
.acoes-cat .pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 340px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.45); white-space: normal; text-align: left; font-size: 13px; }
.acoes-cat .pop input[type=text] { flex: 1; min-width: 0; }
.renomear:not(.pop) { display: flex; gap: 8px; align-items: center; }
.btn.perigo { color: var(--danger-text); border-color: var(--danger-border); }
.btn.perigo-cheio { background: #DC2626; color: #fff; }
.btn.perigo-cheio:hover { background: #EF4444; }
.tabela-cat tr.sem-cat td { background: var(--surface-sunk); }
@media (max-width: 760px) { .acoes-cat .pop { width: min(300px, calc(100vw - 48px)); } .filtros-prod select { flex: 1; } }

/* Abas da área (Cadastros, Suprimentos, Vendas, Finanças) no topo das telas */
.abas-area { align-items: center; overflow-x: auto; margin-top: -6px; }
.abas-area a { white-space: nowrap; }
.abas-area .selo { font-size: 10px; padding: 1px 7px; }
.abas-area .area-nome { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-right: 12px; margin-right: 4px; border-right: 1px solid var(--border); white-space: nowrap; }
@media (max-width: 760px) { .abas-area .area-nome { display: none; } }
.tabela-cat-wrap { overflow: visible; }
.tabela-cat tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
@media (max-width: 760px) {
  .tabela-cat th, .tabela-cat td { padding-left: 14px; padding-right: 10px; }
  .acoes-cat details { margin-left: 4px; }
  .acoes-cat summary.btn { padding: 0 10px; }
}

/* Ícones do menu (aparecem nos temas novos) */
.nav .ico { display: none; width: 18px; height: 18px; flex: none; }
.nav a.item .rot-item { display: flex; align-items: center; gap: 10px; }

/* Logo: versão clara (padrão), escura e ícone — cada layout mostra a que combina */
.nav .logo .logo-escuro, .nav .logo .logo-icone { display: none; }
/* Sub-itens das áreas no menu lateral (usados por alguns layouts) */
.nav .sub-itens { display: none; }

/* Produto: excluir e área de custos */
.tabela-prod { overflow: visible; }
@media (max-width: 760px) { .tabela-prod { overflow-x: auto; } }
.tabela-prod .col-acao { width: 52px; text-align: right; }
.tabela-prod .excluir-det summary.btn-x { display: inline-flex; align-items: center; justify-content: center; }
.aviso.ok-aviso { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-text); }
.custos-prod { display: flex; flex-direction: column; gap: 18px; }
.custos-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .custos-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-mini { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-sunk); min-width: 0; }
.kpi-mini .rot { font-size: 12px; color: var(--muted); }
.kpi-mini strong { font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custo-graf { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 8px 4px 0; border-bottom: 1px solid var(--border); }
.cg-col { flex: 1; max-width: 72px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.cg-barra { width: 100%; max-width: 44px; border-radius: 6px 6px 0 0; background: var(--accent-soft); border: 1px solid var(--border-accent); border-bottom: 0; }
.cg-barra.atual { background: var(--accent); border-color: var(--accent); }
.cg-barra.manual { background: repeating-linear-gradient(45deg, var(--surface-sunk), var(--surface-sunk) 4px, var(--border) 4px, var(--border) 6px); border-color: var(--border-strong); }
.cg-val { font-size: 11px; color: var(--muted); }
.cg-rot { font-size: 11px; color: var(--muted); padding: 4px 0 6px; }
.excluir-prod { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.excluir-prod .excluir-det { position: relative; }
.excluir-prod .excluir-det summary { list-style: none; }
.excluir-prod .excluir-det summary::-webkit-details-marker { display: none; }
.excluir-prod .pop { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 340px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); font-size: 13px; }
