@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
/* =====================================================================
   TEMA UserVoz (claro) - cores, fontes, espacamentos, raios e sombras.
   Tudo o que define a aparencia fica AQUI; o resto do arquivo so usa estas variaveis.
   Aprovado em 08/10/2026 (previa docs/previa-tema). Contraste conferido (WCAG AA).
   ===================================================================== */
:root {
  /* superficies */
  --bg: #F4F7FB;            /* fundo da pagina */
  --surface: #FFFFFF;       /* cartoes, menu, modais */
  --surface-2: #F8FAFD;     /* faixas e areas secundarias dentro de cartoes */
  --border: #E5EDF5;        /* bordas discretas */
  --border-strong: #D3DEEA; /* campos de formulario */
  /* texto */
  --text: #0B1B3A;          /* titulos e texto principal (17:1) */
  --text-2: #5B6B87;        /* texto secundario pequeno (5:1) */
  --muted: #5B6B87;         /* nome antigo do texto secundario (mantido para compatibilidade) */
  --icon: #7183A0;          /* icones, eixos e rotulos grandes */
  /* cor principal (turquesa) */
  --primary: #00B3A4;       /* icones, graficos, indicadores, item selecionado */
  --primary-ink: #00857A;   /* texto e botoes turquesa (4,5:1) */
  --primary-soft: #E8FAF7;  /* fundo de item selecionado */
  --accent: var(--primary-ink);   /* nome antigo: links e destaques (a cor da marca em Configuracoes sobrescreve) */
  --accent2: var(--primary-ink);  /* nome antigo: botao principal */
  /* estados: cor de preenchimento (barras, legendas, bordas) + tom escuro para texto + fundo suave */
  --ok: #10B981;   --ok-ink: #047857;   --ok-soft: #E8F8F1;
  --bad: #FF6B6B;  --bad-ink: #C93A3A;  --bad-soft: #FFF0F0;
  --warn: #F5A524; --warn-ink: #8A5300; --warn-soft: #FFF6E5;
  --info: #5B7BD5; --info-ink: #3A57AD; --info-soft: #EEF2FC;
  /* series dos graficos (validadas para daltonismo) */
  --series-allowed: var(--primary);
  --series-blocked: var(--bad);
  --series-rejected: var(--info);
  /* nomes antigos usados pelo portal e por estilos inline */
  --panel: var(--surface); --panel2: var(--surface-2); --bg2: var(--surface);
  /* tipografia */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 26px; --fs-hero: 32px;
  /* espacamentos */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  /* forma */
  --radius: 16px; --radius-sm: 10px; --radius-xs: 8px; --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(11, 27, 58, .04), 0 6px 20px rgba(11, 27, 58, .06);
  --shadow-lg: 0 12px 40px rgba(11, 27, 58, .16);
  --focus: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--primary-ink);
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-md); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); }
h1 { font-size: var(--fs-2xl); margin: 0 0 var(--s5); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: var(--fs-lg); margin: 0 0 var(--s3); font-weight: 700; color: var(--text); letter-spacing: -.01em; }
h3 { font-size: var(--fs-md); margin: var(--s4) 0 var(--s2); font-weight: 700; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-xs); }
.right { text-align: right; }
.mono { font-family: var(--mono); font-size: .95em; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.err { color: var(--bad-ink); font-size: var(--fs-sm); min-height: 18px; margin-bottom: 8px; }
.ok-txt { color: var(--ok-ink); }
code { background: var(--bg); padding: 2px 6px; border-radius: 6px; font-size: var(--fs-xs); font-family: var(--mono); }
pre { background: var(--bg); padding: 12px; border-radius: var(--radius-xs); overflow: auto; font-size: var(--fs-xs); font-family: var(--mono); border: 1px solid var(--border); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; box-shadow: var(--shadow); }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- estrutura e menu lateral */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--surface); border-right: 1px solid var(--border); padding: var(--s5) var(--s3) 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 30; }
.brand { font-weight: 800; font-size: var(--fs-lg); letter-spacing: -.01em; padding: 4px 10px 16px; }
.brand small { display: block; color: var(--text-2); font-weight: 500; font-size: var(--fs-xs); margin-top: 2px; }
.brand-logo { background: var(--surface); border-radius: var(--radius-sm); padding: 4px 6px; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 6px; }
.brand-logo img { max-width: 100%; max-height: 64px; display: block; }
.nav { flex: 1 0 auto; padding-bottom: var(--s2); }
.nav .sec { margin: 18px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--icon); font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; margin-bottom: 2px; text-decoration: none; }
.nav a .ic { width: 20px; min-width: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--icon); }
.nav a .ic svg { width: 18px; height: 18px; }
.nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.nav a.active .ic { color: var(--primary); }
.sidefoot { position: sticky; bottom: 0; background: var(--surface); padding: 12px 6px 14px; margin-top: 8px; border-top: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-xs); }
.sidefoot button { width: 100%; margin-top: 8px; }
.main { flex: 1; min-width: 0; padding: var(--s6) var(--s8) var(--s8); max-width: 1560px; }
.mobilebar { display: none; }
.sidebar-backdrop { display: none; }

/* ---------------------------------------------------------------- cartoes e caixas */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s5); margin-bottom: var(--s5); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s5) var(--s6); box-shadow: var(--shadow); min-width: 0; }
.card .label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }
.card .value { font-size: 28px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; line-height: 1.15; }
.card .sub { color: var(--text-2); font-size: var(--fs-sm); margin-top: 4px; }
.card.ok .value { color: var(--ok-ink); } .card.bad .value { color: var(--bad-ink); } .card.warn .value { color: var(--warn-ink); }
.card.info .value { color: var(--text); }
.card.clickable { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.clickable:hover { border-color: var(--primary); }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s6); margin-bottom: var(--s5); box-shadow: var(--shadow); min-width: 0; }
.box > h2:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
.warnbox { border-color: #FFE1A8; background: var(--warn-soft); color: var(--warn-ink); }
.howto { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: var(--radius-xs); font-size: var(--fs-sm); color: var(--text-2); }
.howto b { color: var(--text); }
.small-cards .card .value { font-size: var(--fs-xl); }

/* ---------------------------------------------------------------- dashboard (novo layout) */
.page-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--text-2); font-size: var(--fs-sm); }
.page-head .grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); font-weight: 600; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); margin-bottom: var(--s5); }
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .label { color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.kpi .value { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0; color: var(--text); }
.kpi .foot { font-size: var(--fs-sm); color: var(--text-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); }
.ico svg { width: 20px; height: 20px; }
.ico.ok { background: var(--ok-soft); color: var(--ok-ink); }
.ico.bad { background: var(--bad-soft); color: var(--bad-ink); }
.ico.info { background: var(--info-soft); color: var(--info-ink); }
.ico.warn { background: var(--warn-soft); color: var(--warn-ink); }
.delta { font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--fs-xs); }
.delta.up { background: var(--ok-soft); color: var(--ok-ink); }
.delta.down { background: var(--bad-soft); color: var(--bad-ink); }
.delta.flat { background: var(--bg); color: var(--text-2); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s5); margin-bottom: var(--s5); }
.dash-grid.half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dash-grid > .box { margin-bottom: 0; }
.hint { color: var(--text-2); font-size: var(--fs-sm); margin: -6px 0 var(--s4); }
.svgchart { position: relative; }
.svgchart svg { width: 100%; height: 260px; display: block; overflow: visible; }
.svgchart .hb { cursor: default; outline: none; }
.svgchart .hb:focus-visible rect.hit { stroke: var(--primary-ink); stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; background: var(--text); color: #fff; font-size: var(--fs-xs); border-radius: 8px; padding: 8px 10px; white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .1s; z-index: 5; line-height: 1.6; }
.chart-tip.on { opacity: 1; }
.stackbar { display: flex; height: 14px; border-radius: var(--radius-pill); overflow: hidden; gap: 2px; background: var(--bg); margin: 4px 0 14px; }
.stackbar span { display: block; height: 100%; }
.dist-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.dist-row:first-of-type { border-top: 0; }
.dist-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dist-row .n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.dist-row .p { color: var(--text-2); font-size: var(--fs-sm); min-width: 56px; text-align: right; }
.mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s4); }
.mini b { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.mini span { color: var(--text-2); font-size: var(--fs-sm); }
.bar-track { height: 8px; background: var(--bg); border-radius: var(--radius-pill); overflow: hidden; margin-top: var(--s3); }
.bar-track span { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-pill); }
details.defs > summary { cursor: pointer; font-weight: 700; color: var(--text); }
details.defs dl { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; margin: 14px 0 0; font-size: var(--fs-sm); }
details.defs dt { font-weight: 700; }
details.defs dd { margin: 0; color: var(--text-2); }
.who b { display: block; }
.who span { color: var(--text-2); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------- grafico antigo (Ao vivo, portal) */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.chart .bar { flex: 1; display: flex; flex-direction: column-reverse; min-width: 3px; height: 100%; position: relative; gap: 1px; }
.chart .bar div { width: 100%; border-radius: 3px; }
.chart .bar .a { background: var(--series-allowed); }
.chart .bar .b { background: var(--series-blocked); }
.chart .bar .r { background: var(--series-rejected); }
.chart .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 6px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; z-index: 5; }
.legend { display: flex; gap: 16px; font-size: var(--fs-sm); color: var(--text-2); margin-top: 10px; flex-wrap: wrap; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------------------------------------------------------------- tabelas */
.table-scroll { overflow-x: auto; }
.box > table, .box .table-scroll { margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
th, td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--text-2); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; padding-top: 10px; padding-bottom: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tr:hover td { background: #FAFCFE; }
th.right, td.right { text-align: right; }
tr.sel-row td { background: var(--primary-soft); }
tr.total td { border-top: 2px solid var(--border-strong); font-weight: 600; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--primary-soft); }
tr.loss td { background: var(--bad-soft); }
tr.row-off td { background: var(--bad-soft); }
tr.new td { animation: liveflash 2.5s ease-out; }
@keyframes liveflash { from { background: var(--primary-soft); } to { background: transparent; } }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--text-2); }

/* ---------------------------------------------------------------- etiquetas */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; line-height: 1.5; }
.badge.ALLOWED, .badge.on, .badge.allow, .badge.ctype-both, .badge.disk-normal { background: var(--ok-soft); color: var(--ok-ink); }
.badge.BLOCKED, .badge.block, .badge.disk-critico { background: var(--bad-soft); color: var(--bad-ink); }
.badge.REJECTED, .badge.warnc, .badge.disk-atencao { background: var(--warn-soft); color: var(--warn-ink); }
.badge.disk-alerta { background: #FFEDE0; color: #9A3D00; }
.badge.ERROR, .badge.info, .badge.ctype-mobile { background: var(--info-soft); color: var(--info-ink); }
.badge.ctype-fixed { background: var(--primary-soft); color: var(--primary-ink); }
.badge.off { background: var(--bg); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; margin: 2px 4px 2px 0; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-pill); font-size: var(--fs-sm); white-space: nowrap; }
.chip a { text-decoration: none; opacity: .7; }
.chip a:hover { opacity: 1; }
.chip.off { opacity: .5; text-decoration: line-through; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.status-dot.ok { background: var(--ok); } .status-dot.bad { background: var(--bad); }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 4px var(--ok-soft); animation: livepulse 1.4s infinite; }
.live-dot.off { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); animation: none; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------------------------------------------------------- botoes e formularios */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s; }
button:hover, .btn:hover { border-color: var(--primary); background: var(--surface-2); text-decoration: none; }
button.primary { background: var(--accent2); border-color: var(--accent2); color: #fff; }
button.primary:hover { filter: brightness(1.08); background: var(--accent2); }
button.danger { background: var(--bad-soft); border-color: #FFC9C9; color: var(--bad-ink); }
button.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
button.small { padding: 5px 10px; font-size: var(--fs-xs); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 12px; font: inherit; font-size: var(--fs-sm); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=file] { padding: 6px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary-ink); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.row.end { justify-content: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.field label { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; }
.form .wide { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
details.adv { margin-top: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface-2); }
details.adv > summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 24px; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(11,27,58,.2); }
.switch input:checked + span { background: var(--primary-ink); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }

/* ---------------------------------------------------------------- abas */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: var(--s4); }
.tabs .tab, .tabs > button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 14px; color: var(--text-2); font-weight: 600; }
.tabs .tab:hover, .tabs > button:hover { background: none; color: var(--text); }
.tabs .tab.active, .tabs > button.active, .tabs > button.primary { color: var(--primary-ink); border-bottom-color: var(--primary); background: none; }

/* ---------------------------------------------------------------- avisos, modal, login */
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-left: 4px solid var(--primary); padding: 12px 16px; border-radius: var(--radius-sm); max-width: 420px; z-index: 70; box-shadow: var(--shadow-lg); white-space: pre-line; }
.toast.err { border-left-color: var(--bad); } .toast.ok { border-left-color: var(--ok); }
.modal-bg { position: fixed; inset: 0; background: rgba(11, 27, 58, .45); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s6); width: 680px; max-width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal.wide { width: 1180px; }
.modal h3 { margin: 0 0 16px; font-size: var(--fs-xl); letter-spacing: -.01em; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg); }
.login { width: 400px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.login h1 { text-align: center; margin-bottom: 4px; }
.login p { text-align: center; color: var(--text-2); margin: 0 0 22px; }
.login input { width: 100%; margin-bottom: 12px; }
.login button { width: 100%; padding: 11px; }
.login-brand { background: var(--surface); border-radius: 12px; padding: 6px 12px 14px; display: flex; justify-content: center; margin-bottom: 8px; }
.login-brand img { max-width: 100%; max-height: 110px; display: block; }
.brand-prev { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; display: inline-flex; min-width: 64px; min-height: 40px; align-items: center; justify-content: center; }
.brand-prev img { max-height: 70px; max-width: 220px; display: block; }
.result-box { padding: 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; }
.result-box.ALLOWED { background: var(--ok-soft); color: var(--ok-ink); }
.result-box.BLOCKED { background: var(--bad-soft); color: var(--bad-ink); }
.standby-banner { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 65; max-width: min(900px, 92vw); background: var(--warn-soft); border: 1px solid #FFD28A; color: var(--warn-ink); padding: 10px 16px; border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-lg); }
.standby-banner a { color: var(--warn-ink); text-decoration: underline; }

/* ---------------------------------------------------------------- Classe 4: etapas, ordem, chaves */
.policy { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); margin-bottom: 10px; background: var(--surface-2); }
.policy .big { font-size: var(--fs-lg); font-weight: 700; }
.policy.open .big { color: var(--warn-ink); } .policy.closed .big { color: var(--bad-ink); }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 8px 12px; font-size: var(--fs-sm); }
.kv .k { color: var(--text-2); }
.steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 var(--s5); }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); text-decoration: none; box-shadow: var(--shadow); }
.step:hover { text-decoration: none; border-color: var(--primary); }
.step b { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: var(--bg); color: var(--text); font-size: var(--fs-sm); }
.step .st { display: block; color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.step small { font-size: var(--fs-xs); }
.step.cur { border-color: var(--primary); background: var(--primary-soft); }
.step.cur b { background: var(--primary-ink); color: #fff; }
.step-arrow { color: var(--icon); font-size: 20px; }
.ord { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; background: var(--surface); }
.ord-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ord-row:last-of-type { border-bottom: 0; }
.ord-n { display: inline-flex; min-width: 38px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; }
.ord-name { flex: 1; }
.ord-btns { display: flex; gap: 4px; }
.exc { margin: 10px 0; }
.ipline { padding: 2px 0; white-space: nowrap; }
.ipline a { margin-left: 4px; text-decoration: none; opacity: .75; }

/* ---------------------------------------------------------------- Custo e Lucro / Armazenamento */
.fin-hl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.fin-hl .label { color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.diskbar { height: 22px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; margin: 10px 0 4px; }
.diskbar > div { height: 100%; background: var(--ok); transition: width .4s; }
.diskbar.warn > div { background: var(--warn); }
.diskbar.alert > div { background: #F97316; }
.diskbar.bad > div { background: var(--bad); }
td .diskbar { height: 10px; margin: 0; }
.disk-pct { font-size: 28px; font-weight: 800; margin-bottom: 10px; letter-spacing: -.02em; }

/* ---------------------------------------------------------------- celular e telas menores */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid, .dash-grid.half { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .layout { display: block; }
  .mobilebar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 25; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .mobilebar b { font-size: var(--fs-lg); }
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.on { display: block; position: fixed; inset: 0; background: rgba(11, 27, 58, .35); z-index: 29; }
  .main { padding: var(--s4); }
  h1 { font-size: var(--fs-xl); }
  .box, .card { padding: var(--s4); }
  .box { overflow-x: auto; }
  .kv, details.defs dl { grid-template-columns: 1fr; }
  .kpi .value { font-size: var(--fs-2xl); }
  .modal { padding: var(--s4); }
}
@media (max-width: 520px) { .kpis { grid-template-columns: minmax(0, 1fr); } .cards { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
