/* ═══════════════════════════════════════════════════════════════════
   SkinVault — tema.css  (E0 do redesenho, 21/11/2026)
   Carregado DEPOIS de styles.css. Contém:
   1. Fonte Inter local (sem internet) e números alinhados (tabular-nums).
   2. Cores de área (uma por área) e o destaque que acompanha a área aberta.
   3. Raios, grade de espaço e densidade.
   4. A moldura nova: trilho de áreas, menu da área, abas com ícone,
      painel de detalhe e paleta de comandos (Ctrl+K).
   Contraste conferido (WCAG): cada cor de área como texto sobre --bg-1 e
   --bg-0 ≥ 4,5:1, e o texto de --on-accent sobre a cor ≥ 4,5:1, nos dois temas.
═══════════════════════════════════════════════════════════════════ */

/* ── 1. Fonte ─────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations'), url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations'), url(fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root { --font-ui: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
/* Números com largura fixa: colunas de valores alinham linha a linha */
body { font-variant-numeric: tabular-nums; }
.mono, .value, .sf-big, .dkpi-val { font-variant-numeric: tabular-nums; }

/* ── 2. Cores de área (passo 9 da escala) ─────────────────────────── */
:root {
  --a-inicio: #8b93ff;        /* índigo  · 6,7:1 sobre --bg-1 */
  --a-carteira: #4aa8ff;      /* azul    · 7,3:1 */
  --a-negociar: #ff7a2e;      /* laranja · 7,0:1 (o destaque de antes) */
  --a-oficina: #b197fc;       /* violeta · 7,6:1 */
  --a-atualizacoes: #22c3d6;  /* ciano   · 8,6:1 */
  --a-ajustes: #9aa4b5;       /* cinza   · 7,3:1 */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;
  --trilho-w: 72px; --menu-w: 220px; --painel-w: 320px;
}
:root[data-theme="light"] {
  --a-inicio: #4f46e5;        /* 6,3:1 sobre branco; branco sobre a cor 6,3:1 */
  --a-carteira: #1d5fd1;      /* 5,8:1 */
  --a-negociar: #b93d0b;      /* 5,6:1 */
  --a-oficina: #7c3aed;       /* 5,7:1 */
  --a-atualizacoes: #0e7490;  /* 5,4:1 */
  --a-ajustes: #4b5563;       /* 7,6:1 */
}
/* A área aberta define o destaque (botão principal, item ativo, foco) */
body[data-area="inicio"] { --accent: var(--a-inicio); }
body[data-area="carteira"] { --accent: var(--a-carteira); }
body[data-area="negociar"] { --accent: var(--a-negociar); }
body[data-area="oficina"] { --accent: var(--a-oficina); }
body[data-area="atualizacoes"] { --accent: var(--a-atualizacoes); }
body[data-area="ajustes"] { --accent: var(--a-ajustes); }
body[data-area] { --accent-2: color-mix(in srgb, var(--accent) 78%, #ffffff); }
:root[data-theme="light"] body[data-area] { --accent-2: color-mix(in srgb, var(--accent) 80%, #000000); }

/* ── 3. Raios ─────────────────────────────────────────────────────── */
.card, .cfg-card, .inv-kpi, .pn-card, .dkpi-card, .se-sum-card, .se-syscard, .dov-card, .mo-card, .in-bloco,
.ds-table-wrap, .hidden-modal, .cs-modal, .in-hoje, .fx-bell, .in-sino-pop, .user-dropdown { border-radius: var(--r-lg); }
.btn-primary, .btn-secondary, .btn-ghost, .icon-btn, .pill-select, .search-wrap input, .unrec-input, .cfg-input,
.flt-input, .mv-select, .filter-btn-advanced, .monitor-btn, .dqa-btn, .seg, .range-tabs { border-radius: var(--r-md); }
.range-tab, .seg button { border-radius: var(--r-sm); }
.fx-chip, .meta-chip, .badge, .notif-badge, .pro-badge { border-radius: var(--r-pill); }
.avatar { border-radius: 50%; }

/* ── 4. Moldura ───────────────────────────────────────────────────── */
/* O menu antigo (logo, lista e rodapé) dá lugar ao trilho + menu da área */
.sidebar.mo-on { flex-direction: row; width: auto; padding: 0; }
.sidebar.mo-on > :not(.mo-trilho):not(.mo-menu) { display: none !important; }
.topbar #inSino, .topbar #btnBell { display: none; }

/* Trilho de áreas (64 px) */
.mo-trilho {
  width: var(--trilho-w); flex: 0 0 var(--trilho-w);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0 12px; background: var(--bg-0); border-right: 1px solid var(--border);
  height: 100%; overflow-y: auto; overflow-x: hidden;
}
.mo-logo { width: 36px; height: 36px; margin: 0 0 10px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--a-negociar); flex: 0 0 36px; }
.mo-logo svg { width: 20px; height: 20px; }
.mo-area {
  position: relative; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 5px; border: none; background: none; color: var(--text-muted); cursor: pointer;
  border-radius: var(--r-md); font: 500 10px/1.15 var(--font-ui);
}
.mo-area > span:not(.mo-app):not(.mo-n) { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-area .mo-app {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 16%, var(--bg-1)); color: var(--c); transition: background .12s, box-shadow .12s;
}
.mo-area .mo-app svg { width: 24px; height: 24px; }
.mo-area:hover .mo-app { background: color-mix(in srgb, var(--c) 26%, var(--bg-1)); }
.mo-area:hover { color: var(--text-primary); }
.mo-area.active { color: var(--text-primary); font-weight: 600; }
.mo-area.active .mo-app { background: color-mix(in srgb, var(--c) 30%, var(--bg-1)); box-shadow: inset 0 0 0 1.5px var(--c); }
.mo-area.active::before { content: ''; position: absolute; left: -3px; top: 14px; width: 3px; height: 24px; border-radius: 2px; background: var(--c); }
.mo-area:focus-visible, .mo-btn:focus-visible, .mo-item:focus-visible, .mo-aba:focus-visible { outline: 2px solid var(--c, var(--accent)); outline-offset: 1px; }
.mo-area[data-area="inicio"] { --c: var(--a-inicio); }
.mo-area[data-area="carteira"] { --c: var(--a-carteira); }
.mo-area[data-area="negociar"] { --c: var(--a-negociar); }
.mo-area[data-area="oficina"] { --c: var(--a-oficina); }
.mo-area[data-area="atualizacoes"] { --c: var(--a-atualizacoes); }
.mo-area[data-area="ajustes"] { --c: var(--a-ajustes); }
.mo-n {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--red); color: #0b0e13; font: 700 10.5px/18px var(--font-ui); text-align: center;
}
:root[data-theme="light"] .mo-n { color: #ffffff; }
.mo-n[hidden] { display: none; }
.mo-area .mo-n { position: absolute; top: 1px; right: 2px; }
.mo-fim { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 10px; }
.mo-btn {
  position: relative; width: 40px; height: 40px; border-radius: 10px; border: none; background: none;
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mo-btn svg { width: 22px; height: 22px; }
.mo-btn:hover { background: var(--bg-2); color: var(--text-primary); }
.mo-btn.on { background: color-mix(in srgb, var(--accent) 16%, var(--bg-1)); color: var(--text-primary); }
.mo-btn .mo-n { position: absolute; top: 0; right: -2px; }
.mo-motor[data-rodando="1"] { color: var(--a-atualizacoes); }
.mo-motor[data-rodando="1"] svg { animation: mo-gira 2.4s linear infinite; }
.mo-motor[data-erro="1"]::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@keyframes mo-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mo-motor[data-rodando="1"] svg { animation: none; } }

/* Menu da área (220 px) */
.mo-menu {
  width: var(--menu-w); flex: 0 0 var(--menu-w); height: 100%; overflow-y: auto;
  padding: 14px 10px 16px; background: var(--bg-1); display: flex; flex-direction: column;
}
.mo-menu[hidden] { display: none; }
.mo-menu-h { display: flex; align-items: center; gap: 10px; padding: 0 6px 6px; }
.mo-menu-h .mo-app { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 16%, var(--bg-1)); color: var(--accent); flex: 0 0 32px; }
.mo-menu-h .mo-app svg { width: 20px; height: 20px; }
.mo-menu-h b { font-size: calc(15px * var(--tx, 1)); font-weight: 600; color: var(--text-primary); letter-spacing: -.01em; }
.mo-grupo { margin-top: 10px; }
.mo-grupo-t { font-size: calc(11.5px * var(--tx, 1)); font-weight: 600; color: var(--text-muted); padding: 4px 8px 2px; }
.mo-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 8px; margin: 1px 0;
  border: none; border-radius: var(--r-md); background: none; color: var(--text-secondary);
  font: 500 13px/1.25 var(--font-ui); text-align: left; cursor: pointer;
}
.mo-item svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--accent); }
.mo-item:hover { background: var(--bg-2); color: var(--text-primary); }
.mo-item.active { background: color-mix(in srgb, var(--accent) 15%, var(--bg-1)); color: var(--text-primary); font-weight: 600; }
.mo-item .mo-n { margin-left: auto; }
.mo-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-area="inicio"] .mo-menu { display: none; }

/* Topo: a busca vira o gatilho da paleta de comandos */
.topbar .pill-select { white-space: nowrap; }
/* com o painel aberto, o topo fica mais estreito: some o que é só informativo */
.app:has(> .mo-painel:not([hidden])) .topbar .pill-select { display: none; }
.search-wrap input { cursor: pointer; }
.search-wrap input::placeholder { color: var(--text-secondary); }

/* Abas com ícone (vistas da mesma tela) */
.in-abas.mo-abas-bar { display: block; border: none; margin: 0 0 14px; overflow: visible; }
.in-abas.mo-abas-bar[hidden] { display: none; }
.mo-abas { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.mo-aba {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 7px; margin-bottom: -1px;
  border: none; border-bottom: 2px solid transparent; background: none; color: var(--text-secondary);
  font: 500 13px var(--font-ui); white-space: nowrap; cursor: pointer;
}
.mo-aba svg { width: 16px; height: 16px; color: var(--text-muted); }
.mo-aba:hover { color: var(--text-primary); }
.mo-aba.active { color: var(--text-primary); border-bottom-color: var(--accent); font-weight: 600; }
.mo-aba.active svg { color: var(--accent); }

/* Painel de detalhe (320 px, recolhível) */
.mo-painel {
  width: var(--painel-w); flex: 0 0 var(--painel-w); height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; background: var(--bg-1); border-left: 1px solid var(--border); z-index: 60;
}
.mo-painel[hidden] { display: none; }
.mo-painel-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--border); }
.mo-painel-h .mo-app { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 16%, var(--bg-1)); color: var(--accent); flex: 0 0 32px; }
.mo-painel-h .mo-app svg { width: 20px; height: 20px; }
.mo-painel-h b { flex: 1; min-width: 0; font-size: calc(15px * var(--tx, 1)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-painel-c { flex: 1; overflow-y: auto; padding: 12px 16px 16px; }
.mo-painel-r { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.mo-painel-r:empty { display: none; }
.mo-sec-t { font-size: calc(11.5px * var(--tx, 1)); font-weight: 600; color: var(--text-muted); margin: 14px 0 6px; }
.mo-sec-t:first-child { margin-top: 0; }
/* Avisos dentro do painel: a lista de preço reaproveita o desenho do sino */
.mo-painel #fxBell { position: static; width: auto; max-height: none; box-shadow: none; border: none; padding: 0; background: none; display: block; }
.mo-painel .fx-bell-head { padding: 0 0 8px; }
.mo-painel .in-hoje-l { padding: 8px 0; flex-wrap: wrap; row-gap: 6px; }
.mo-painel .in-hoje-t { flex: 1 1 180px; }
.mo-painel .in-hoje-l .btn-secondary { margin-left: auto; }
.mo-painel .fx-bell-head > b { display: none; }               /* o painel já tem o título "Avisos" */
.mo-painel .fx-bell-head .mv-muted { flex: 1; }
@media (max-width: 1280px) {
  .mo-painel { position: fixed; right: 0; top: 0; bottom: 0; height: 100vh; box-shadow: var(--shadow-float); z-index: 9300; }
}

/* Paleta de comandos (Ctrl+K) */
.mo-cmd { position: fixed; inset: 0; z-index: 9800; background: var(--overlay); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.mo-cmd[hidden] { display: none; }
.mo-cmd-box { width: min(640px, 92vw); max-height: 72vh; display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-float); overflow: hidden; }
.mo-cmd-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mo-cmd-in svg { width: 20px; height: 20px; color: var(--text-muted); flex: 0 0 20px; }
.mo-cmd-in input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text-primary); font: 400 15px var(--font-ui); }
.mo-cmd-in kbd, .mo-cmd-pe kbd { font: 600 11px var(--font-ui); color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 4px; padding: 1px 5px; }
.mo-cmd-l { overflow-y: auto; padding: 6px; }
.mo-cmd-g { font-size: calc(11.5px * var(--tx, 1)); font-weight: 600; color: var(--text-muted); padding: 8px 10px 4px; }
.mo-cmd-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 10px; border: none; border-radius: var(--r-md); background: none; color: var(--text-primary); font: 500 13px var(--font-ui); text-align: left; cursor: pointer; }
.mo-cmd-i .mo-app { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--bg-1)); color: var(--c, var(--accent)); flex: 0 0 28px; overflow: hidden; }
.mo-cmd-i .mo-app svg { width: 18px; height: 18px; }
.mo-cmd-i .mo-app img { width: 28px; height: 28px; object-fit: contain; }
.mo-cmd-i span { display: flex; flex-direction: column; min-width: 0; }
.mo-cmd-i small { color: var(--text-muted); font-size: calc(11.5px * var(--tx, 1)); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-cmd-i em { margin-left: auto; font-style: normal; color: var(--text-muted); font-size: calc(11.5px * var(--tx, 1)); white-space: nowrap; }
.mo-cmd-i.sel, .mo-cmd-i:hover { background: var(--bg-3); }
.mo-cmd-i.sel small, .mo-cmd-i:hover small, .mo-cmd-i.sel em, .mo-cmd-i:hover em { color: var(--text-secondary); }  /* apagado sobre --bg-3 ficaria em 4,47:1 */
.mo-cmd-v { padding: 18px 12px; color: var(--text-muted); text-align: center; font-size: calc(13px * var(--tx, 1)); }
.mo-cmd-pe { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: calc(11.5px * var(--tx, 1)); }
.mo-cmd-i[data-c="inicio"] { --c: var(--a-inicio); } .mo-cmd-i[data-c="carteira"] { --c: var(--a-carteira); }
.mo-cmd-i[data-c="negociar"] { --c: var(--a-negociar); } .mo-cmd-i[data-c="oficina"] { --c: var(--a-oficina); }
.mo-cmd-i[data-c="atualizacoes"] { --c: var(--a-atualizacoes); } .mo-cmd-i[data-c="ajustes"] { --c: var(--a-ajustes); }

/* Ícones Phosphor no restante do sistema (blocos do Início etc.) */
svg.ph { flex-shrink: 0; }

/* Computador: menu da área recolhível pelo botão do topo */
@media (min-width: 1025px) {
  :root[data-nav="mini"] .sidebar.mo-on { width: auto; }
  :root[data-nav="mini"] .mo-menu { display: none; }
  .sidebar.mo-on { width: auto; }
}
/* Tablet e celular: trilho + menu abrem juntos como gaveta */
@media (max-width: 1024px) {
  .sidebar.mo-on { width: auto; max-width: 92vw; }
  body[data-area="inicio"] .mo-menu { display: none; }
  .mo-painel { width: min(var(--painel-w), 100vw); }
}

/* ═══ E1 · Início (36-inicio.js) ═══════════════════════════════════════ */
.ib-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 14px; flex-wrap: wrap; }
.ib-oi { font-size: calc(22px * var(--tx, 1)); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.ib-data { color: var(--text-muted); font-size: calc(12px * var(--tx, 1)); margin-top: 2px; text-transform: lowercase; }
.ib-data::first-letter { text-transform: uppercase; }
.ib-per { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.ib-per button { border: none; background: none; color: var(--text-secondary); font: 600 12px var(--font-ui); padding: 5px 10px; border-radius: var(--r-sm); cursor: pointer; }
.ib-per button:hover { color: var(--text-primary); }
.ib-per button.on { background: var(--bg-1); color: var(--text-primary); box-shadow: 0 0 0 1px var(--border-strong); }
.ib-grade { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.ib-b { --c: var(--a-carteira); min-width: 0; display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px 12px; }
.ib-p { grid-column: span 2; } .ib-m { grid-column: span 4; } .ib-g { grid-column: span 6; } .ib-gg { grid-column: span 8; } .ib-t { grid-column: span 12; }
.ib-b[data-b="vendas"], .ib-b[data-b="compras"], .ib-b[data-b="boasvendas"] { --c: var(--a-negociar); }
.ib-b[data-b="atualizacoes"] { --c: var(--a-atualizacoes); }
.ib-b[data-b="hoje"] { --c: var(--a-inicio); }
.ib-h { display: flex; align-items: center; gap: 8px; min-height: 26px; margin-bottom: 8px; }
.ib-h > b { font-size: calc(13px * var(--tx, 1)); font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-ic { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 16%, var(--bg-1)); color: var(--c); }
.ib-ic svg { width: 17px; height: 17px; }
.ib-hx { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; font-size: calc(12px * var(--tx, 1)); font-weight: 600; white-space: nowrap; }
.ib-c { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Indicadores */
.ib-kpi { cursor: pointer; transition: border-color .12s, background .12s; }
.ib-kpi:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.ib-kpi:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.ib-kpi .ib-h { margin-bottom: 6px; }
.ib-kpi .ib-h > b { font-size: calc(12px * var(--tx, 1)); font-weight: 500; color: var(--text-secondary); }
.ib-v { font-size: calc(22px * var(--tx, 1)); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-s { margin-top: 4px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); line-height: 1.35; }
.ib-v.up, .ib-s .up, .ib-l-v .up, .ib-hx .up, .ib-rod .up { color: var(--green); }
.ib-v.down, .ib-s .down, .ib-l-v .down, .ib-hx .down, .ib-rod .down { color: var(--red); }
/* Listas dentro dos blocos */
.ib-l { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 6px 6px; margin: 0 -6px; width: calc(100% + 12px);
  border: none; background: none; border-radius: var(--r-md); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.ib-l:hover { background: var(--bg-2); }
.ib-mo { grid-template-columns: minmax(0, 1fr) auto; }
.ib-img { width: 30px; height: 30px; border-radius: 7px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 30px; }
.ib-img img { width: 30px; height: 30px; object-fit: contain; }
.ib-img svg { width: 22px; height: 22px; }
.ib-l-t { display: flex; flex-direction: column; min-width: 0; }
.ib-l-t b { font-size: calc(13px * var(--tx, 1)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-l-t small { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-l-v { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.ib-l-v b { font-size: calc(13px * var(--tx, 1)); font-weight: 600; }
.ib-l-v small { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.ib-prog { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--bg-3); overflow: hidden; }
.ib-prog span { display: block; height: 100%; background: var(--c); border-radius: 2px; }
.ib-rod { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); flex-wrap: wrap; }
.ib-rod .ib-ir { margin-left: auto; }
.ib-ir { padding: 4px 10px; font-size: calc(12px * var(--tx, 1)); min-height: 0; }
.ib-vazio { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 8px 0; color: var(--text-muted); font-size: calc(12.5px * var(--tx, 1)); line-height: 1.45; }
.ib-sk { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.ib-sk .sk-bar { height: 10px; border-radius: 4px; }
.ib-2c { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.ib-sub-t { font-size: calc(11.5px * var(--tx, 1)); font-weight: 600; color: var(--text-muted); margin: 0 0 2px; }
.ib-hoje { padding: 0; border: none; background: none; }
.ib-hoje .in-hoje-l { padding: 7px 0; flex-wrap: wrap; row-gap: 6px; }
.ib-hoje .in-hoje-t { flex: 1 1 160px; }
/* Gráfico */
.ib-graf { flex: 1; min-height: 210px; }
.ib-leg { display: flex; gap: 14px; margin-top: 6px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.ib-leg i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.ib-leg i.dash { background: repeating-linear-gradient(90deg, var(--text-secondary) 0 4px, transparent 4px 7px); }
/* Distribuição */
.ib-dist { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 6px 0; border: none; background: none; color: var(--text-primary); font: 13px var(--font-ui); text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.ib-dist:hover:not([disabled]) .ib-dist-n { color: var(--c); }
.ib-dist[disabled] { cursor: default; }
.ib-dist-n { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-dist-n i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.ib-dist-b { height: 8px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.ib-dist-b span { display: block; height: 100%; border-radius: 4px; }
.ib-dist-v { font-weight: 600; white-space: nowrap; } .ib-dist-v em { font-style: normal; font-weight: 400; color: var(--text-muted); font-size: calc(11.5px * var(--tx, 1)); }
/* Personalizar (como no iCloud) */
.ib-pe { display: flex; justify-content: center; margin: 18px 0 8px; }
.ib-personalizar { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px dashed var(--border-strong); border-radius: var(--r-pill); background: none; color: var(--text-secondary); font: 500 13px var(--font-ui); cursor: pointer; }
.ib-personalizar:hover { color: var(--text-primary); border-color: var(--text-muted); }
.ib-personalizar svg { width: 16px; height: 16px; }
.ib-editando .ib-b { border-style: dashed; border-color: var(--border-strong); }
@media (prefers-reduced-motion: no-preference) {
  .ib-editando .ib-b { animation: ib-treme .32s ease-in-out infinite alternate; }
  .ib-editando .ib-b:nth-child(2n) { animation-delay: .16s; }
}
@keyframes ib-treme { from { transform: rotate(-.25deg); } to { transform: rotate(.25deg); } }
.ib-ctl { margin-left: auto; display: inline-flex; gap: 2px; }
.ib-ctl button { height: 24px; min-width: 24px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-2); color: var(--text-secondary); font: 600 11px var(--font-ui); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ib-ctl button:hover:not([disabled]) { color: var(--text-primary); border-color: var(--border-strong); }
.ib-ctl button[disabled] { opacity: .35; cursor: default; }
.ib-ctl svg { width: 14px; height: 14px; }
.ib-editando .ib-hx { display: none; }
.ib-edit-pe { margin: 16px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.ib-ocultos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }
.ib-ocultos b { font-size: calc(12px * var(--tx, 1)); color: var(--text-muted); margin-right: 4px; }
.ib-ocultos .btn-secondary { display: inline-flex; align-items: center; gap: 6px; }
.ib-ocultos svg { width: 16px; height: 16px; }
.ib-edit-acoes { display: flex; justify-content: center; gap: 8px; }
/* Telas menores: blocos se reacomodam */
@media (max-width: 1180px) { .ib-p { grid-column: span 4; } .ib-m { grid-column: span 6; } .ib-gg { grid-column: span 12; } .ib-g { grid-column: span 6; } }
@media (max-width: 900px) { .ib-p { grid-column: span 6; } .ib-m, .ib-g, .ib-gg, .ib-t { grid-column: span 12; } .ib-2c { grid-template-columns: 1fr; } }
.ib-seta { font-size: .62em; vertical-align: .18em; margin-right: .3em; }
.ib-v { font-size: clamp(17px, 1.4vw, 22px); letter-spacing: -.015em; }
/* blocos pequenos em edição: os controles descem para uma linha própria e o nome fica visível */
.ib-editando .ib-p .ib-h { flex-wrap: wrap; row-gap: 6px; }
.ib-editando .ib-p .ib-ctl { order: 3; width: 100%; margin-left: 0; }

/* ═══ E2 · Carteira (37-carteira.js) ═══════════════════════════════════ */
/* Painel do item */
.ct-it-topo { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ct-it-img { width: 72px; height: 72px; flex: 0 0 72px; border-radius: var(--r-md); background: var(--bg-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ct-it-img img { width: 72px; height: 72px; object-fit: contain; }
.ct-it-nome { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ct-it-nome b { font-size: calc(13px * var(--tx, 1)); line-height: 1.35; word-break: break-word; }
.ct-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.ct-n { display: flex; flex-direction: column; min-width: 0; }
.ct-n span { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.ct-n b { font-size: calc(13px * var(--tx, 1)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-n b.up { color: var(--green); } .ct-n b.down { color: var(--red); } .ct-n b.ct-warn { color: var(--yellow); }
.ct-n b.up::before, .ct-n b.down::before { font-size: .7em; margin-right: 3px; vertical-align: .1em; }
.ct-spark { min-height: 64px; }
.ct-spark-r { display: flex; gap: 10px; justify-content: space-between; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); margin-top: 4px; }
.ct-spark-r b.up { color: var(--green); } .ct-spark-r b.down { color: var(--red); }
.ct-onde { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: calc(12.5px * var(--tx, 1)); flex-wrap: wrap; }
.ct-onde > span:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ct-onde svg { width: 16px; height: 16px; color: var(--accent); }
.mo-painel-r a.btn-secondary { text-decoration: none; display: inline-flex; align-items: center; }
/* Inventário: vistas */
.view[data-view="inventario"][data-modo="grade"] .inv-table-card { display: none; }
.view[data-view="inventario"]:not([data-modo="grade"]) #invGrade { display: none; }
.ct-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin: 0 0 12px; }
.ct-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-1); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s; }
.ct-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.ct-card-img { width: 100%; height: 96px; border-radius: var(--r-md); background: var(--bg-2); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 6px; }
.ct-card-img img { max-height: 96px; }
.ct-card b { font-size: calc(12.5px * var(--tx, 1)); font-weight: 600; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-card small { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.ct-card-v { display: flex; justify-content: space-between; width: 100%; margin-top: 4px; font-size: calc(12.5px * var(--tx, 1)); font-weight: 600; gap: 6px; }
.ct-card-v em { font-style: normal; font-weight: 500; font-size: calc(11.5px * var(--tx, 1)); } .ct-card-v em.up { color: var(--green); } .ct-card-v em.down { color: var(--red); }
.ct-mais { grid-column: 1 / -1; justify-self: center; }
/* Contas */
.ct-contas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ct-conta { --c: var(--a-carteira); display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); }
.ct-conta header { display: flex; align-items: center; gap: 8px; }
.ct-conta header b { font-size: calc(14px * var(--tx, 1)); }
.ct-conta .ct-nums { margin-top: 6px; }
.ct-h2 { font-size: calc(15px * var(--tx, 1)); font-weight: 600; margin: 4px 0 10px; }
.ct-tbl tbody tr { cursor: pointer; }
.ct-tit { display: flex; align-items: center; gap: 8px; }
.ct-tit .ib-img { width: 26px; height: 26px; flex: 0 0 26px; }
.ct-nota { color: var(--text-muted); font-size: calc(11.5px * var(--tx, 1)); margin-top: 10px; }
/* Histórico de preços */
.ct-pr-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ct-pr-q { flex: 1 1 360px; min-width: 240px; }
.ct-pr-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ct-pr-graf { padding: 12px; }
.ct-pr-g { height: 340px; }

/* ── 7. Negociar (E3) ─────────────────────────────────────────────── */
.fx-chip.info { color: var(--accent); border-color: currentColor; }
/* Ficha do item */
.ng-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.ng-topo > div:nth-child(2) { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.ng-nome { font-size: calc(16px * var(--tx, 1)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-sinal { align-self: flex-start; height: auto; min-height: 22px; padding: 2px 8px; border-radius: var(--r-pill); white-space: normal; }
.ng-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ng-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .ng-grade { grid-template-columns: 1fr; } }
.ng-b { padding: 14px 16px; border-radius: var(--r-lg); min-width: 0; }
.ng-b h3 { font-size: calc(13px * var(--tx, 1)); font-weight: 600; margin: 0 0 10px; color: var(--text-secondary); }
.ng-faixa { margin-bottom: 10px; }
.ng-faixa-b { position: relative; display: block; height: 8px; border-radius: var(--r-pill); background: linear-gradient(90deg, color-mix(in srgb, var(--green) 55%, transparent), var(--bg-3) 50%, color-mix(in srgb, var(--yellow) 55%, transparent)); }
.ng-faixa-b i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-1); box-shadow: 0 0 0 1px var(--accent); }
.ng-faixa-r { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ng-faixa-r span:nth-child(2) { color: var(--text-primary); font-weight: 600; }
.ng-esc { font-size: calc(12.5px * var(--tx, 1)); }
.ng-esc td, .ng-esc th { padding: 4px 8px; }
.ng-sim { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ng-sim label, .ng-sub label { display: flex; flex-direction: column; gap: 4px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.ng-sim input, .ng-campos input, .ng-campos select { width: 100%; min-width: 0; box-sizing: border-box; }
.ng-b .ct-spark-r { display: none; }   /* a faixa de 90 dias já mostra mínima e máxima */
/* Estratégias */
.ng-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; margin-bottom: 14px; align-items: start; }
.ng-est { padding: 14px 16px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--border-strong); }
.ng-est.on { border-left-color: var(--accent); }
.ng-est header { display: flex; align-items: center; gap: 10px; }
.ng-est header b { flex: 1; font-size: calc(14px * var(--tx, 1)); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-est .ib-ic { --c: var(--accent); }
.ng-sw { min-width: 0; }
.ng-frase { margin: 0; font-size: calc(13px * var(--tx, 1)); line-height: 1.6; color: var(--text-secondary); }
.ng-frase b { color: var(--text-primary); font-weight: 600; }
.ng-q { display: inline-block; font-size: calc(10.5px * var(--tx, 1)); font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); vertical-align: .1em; }
.ng-q2 { background: var(--bg-3); color: var(--text-secondary); }
.ng-lim { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.ng-est-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ng-rem { margin-left: auto; color: var(--text-muted); }
.ng-teste:empty { display: none; }
.ng-teste-h { font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); margin: 4px 0 8px; }
.ng-modelos { padding: 14px 16px; border-radius: var(--r-lg); }
.ng-modelos h3 { font-size: calc(13px * var(--tx, 1)); font-weight: 600; margin: 0 0 10px; color: var(--text-secondary); }
.ng-mod-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ng-mod { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-1); color: var(--text-primary); cursor: pointer; font: inherit; }
.ng-mod:hover, .ng-mod:focus-visible { border-color: var(--accent); outline: none; }
.ng-mod b { font-size: calc(13px * var(--tx, 1)); }
.ng-mod span { font-size: calc(12px * var(--tx, 1)); line-height: 1.55; color: var(--text-secondary); }
.ng-ed { padding: 16px 18px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 12px; }
.ng-ed-h { display: flex; gap: 12px; align-items: center; }
.ng-ed-h input { flex: 1; font-size: calc(14px * var(--tx, 1)); }
.ng-pt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ng-pt .ng-q { min-width: 64px; text-align: center; padding: 3px 6px; }
.ng-sub { align-items: flex-end; flex-wrap: nowrap; }
.ng-q0 { visibility: hidden; }
.ng-campos { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 900px; }
.ng-hora { width: 110px; }
.ng-conds { display: flex; flex-direction: column; gap: 8px; padding-left: 74px; align-items: flex-start; }
.ng-cond { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 8px; width: 100%; max-width: 820px; align-items: center; }
.ng-cond > * { min-width: 0; width: 100%; box-sizing: border-box; }
.ng-cond > button { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; }
.ng-ed-pe { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; }
@media (max-width: 760px) { .ng-conds { padding-left: 0; } .ng-campos { grid-template-columns: 1fr 1fr; } .ng-q0 { display: none; } .ng-cond { grid-template-columns: 1fr 1fr; } .ng-sim { grid-template-columns: 1fr; } .ng-lista { grid-template-columns: 1fr; } }
/* Resultados */
.ng-pend { padding: 14px 16px; border-radius: var(--r-lg); margin-bottom: 14px; border-left: 3px solid var(--yellow); }
.ng-pend h3 { font-size: calc(13px * var(--tx, 1)); font-weight: 600; margin: 0 0 8px; }
.ng-pl { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.ng-pl:first-of-type { border-top: 0; }
.ng-pl .ib-l-t { flex: 1; }
.ng-res-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
#ngRes tr[data-item] { cursor: pointer; }
/* Trocas: ofertas ordenáveis */
.ft-ord { cursor: pointer; user-select: none; white-space: nowrap; }
.ft-ord:hover, .ft-ord.on { color: var(--text-primary); }
.ft-of-res { font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); margin: 6px 0 8px; }
.ft-of-res b.up { color: var(--green); }

/* ── 8. Atualizações (E4) ─────────────────────────────────────────── */
.at-b { padding: 14px 16px; border-radius: var(--r-lg); margin-bottom: 12px; min-width: 0; }
.at-b h3 { font-size: calc(13px * var(--tx, 1)); font-weight: 600; margin: 0 0 10px; color: var(--text-secondary); }
.at-txt { font-size: calc(13px * var(--tx, 1)); line-height: 1.55; color: var(--text-secondary); margin: 0 0 12px; }
.at-txt b { color: var(--text-primary); }
/* fila por site */
.at-mo-sites { margin: 4px 0 6px; }
.at-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 12px; }
.at-site { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg-1); color: var(--text-primary); font: inherit; cursor: pointer; min-width: 0; }
.at-site:hover, .at-site:focus-visible { border-color: var(--accent); outline: none; }
.at-site-h { display: flex; align-items: center; gap: 8px; }
.at-site-h b { flex: 1; font-size: calc(13px * var(--tx, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-site-n { display: flex; align-items: baseline; gap: 6px; }
.at-site-n b { font-size: calc(22px * var(--tx, 1)); font-weight: 600; font-variant-numeric: tabular-nums; }
.at-site-n span { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.at-spark { display: flex; align-items: flex-end; gap: 1px; height: 26px; }
.at-spark i { flex: 1; min-height: 2px; background: var(--accent); border-radius: 1px; opacity: .8; }
.at-spark i.z { background: var(--bg-3); opacity: 1; }
.at-site-r { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.at-site-r .down { color: var(--red); }
.mo-perfil b { font-weight: 600; }
/* regras e ritmo */
.at-perfis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.at-perfil { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-1); color: var(--text-primary); font: inherit; cursor: pointer; }
.at-perfil span { font-size: calc(12px * var(--tx, 1)); color: var(--text-secondary); line-height: 1.45; }
.at-perfil.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.at-perfil:hover, .at-perfil:focus-visible { border-color: var(--accent); outline: none; }
.at-janela { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: calc(13px * var(--tx, 1)); }
.at-janela input { width: 76px; }
.at-rh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.at-rh h3 { margin: 0; flex: 1; }
.at-sw { min-width: 0; }
.at-meter { margin-bottom: 14px; }
.at-meter-b { height: 10px; border-radius: var(--r-pill); background: var(--bg-3); overflow: hidden; }
.at-meter-b i { display: block; height: 100%; background: var(--green); border-radius: var(--r-pill); }
.at-meter.over .at-meter-b i { background: var(--red); }
.at-meter-t { font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); margin-top: 6px; font-variant-numeric: tabular-nums; }
.at-meter-t b { color: var(--text-primary); }
.at-meter-e { font-size: calc(12.5px * var(--tx, 1)); color: var(--red); margin-top: 4px; font-weight: 600; }
.at-regras { display: flex; flex-direction: column; gap: 10px; }
.at-regra { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; background: var(--bg-1); display: flex; flex-direction: column; gap: 8px; }
.at-resto { background: transparent; border-style: dashed; }
.at-rg-h { display: flex; align-items: center; gap: 8px; }
.at-n { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: calc(12px * var(--tx, 1)); font-weight: 700; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.at-nome { flex: 1; min-width: 0; font-weight: 600; }
input.at-nome { font-size: calc(13.5px * var(--tx, 1)); }
.at-h { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); white-space: nowrap; }
.at-h input { width: 64px; text-align: right; }
.at-rg-h .btn-ghost { width: 30px; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center; }
.at-crit { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 10px; align-items: end; padding-left: 32px; }
.at-crit label { display: flex; flex-direction: column; gap: 4px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); min-width: 0; }
.at-crit input, .at-crit select { width: 100%; min-width: 0; box-sizing: border-box; }
.at-faixa { display: flex; align-items: center; gap: 4px; }
.at-faixa i { font-style: normal; color: var(--text-muted); }
.at-ck { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); cursor: pointer; }
.at-crit .at-ck { flex-wrap: wrap; align-self: center; }
.at-crit .at-ck .fx-help { flex-basis: 100%; margin-left: 22px; }
.at-st { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-left: 32px; font-size: calc(12px * var(--tx, 1)); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.at-st b { color: var(--text-primary); font-weight: 600; }
.at-st .warn b { color: var(--yellow); }
.at-ex { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-pe { display: flex; align-items: center; gap: 8px; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
/* log */
.at-log-sites .at-sites { margin-bottom: 10px; }
.at-filtros, .at-filtros2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.at-filtros select { max-width: 200px; }
.at-busca { flex: 1 1 220px; min-width: 180px; }
.at-seg button { padding: 0 10px; }
.at-chip { height: auto; padding: 2px 8px; border-radius: var(--r-pill); gap: 4px; }
.at-chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: calc(14px * var(--tx, 1)); line-height: 1; padding: 0 2px; }
.at-tab { font-size: calc(12.5px * var(--tx, 1)); }
.at-tab td, .at-tab th { padding: 6px 8px; }
.at-tab tbody tr { cursor: pointer; }
.at-tab tr.at-erro td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.at-tab tr.at-aviso td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.at-q { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.at-fr { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-tp { display: inline-flex; align-items: center; gap: 4px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-secondary); }
.at-tp.erro { color: var(--red); } .at-tp.aviso { color: var(--yellow); }
.at-tp svg { width: 13px; height: 13px; }
.at-obj { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-align: left; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-obj:hover { text-decoration: underline; }
.at-tab .warn { color: var(--yellow); }
.at-mais { display: flex; justify-content: center; margin: 12px 0; }
.at-pfr { font-size: calc(13.5px * var(--tx, 1)); line-height: 1.5; margin: 0 0 10px; }
.at-code, .at-code0 { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: calc(11.5px * var(--tx, 1)); }
.at-code { display: block; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-2); word-break: break-all; }
.at-pre { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: calc(11.5px * var(--tx, 1)); padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-2); max-height: 300px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.at-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.at-ret { display: flex; flex-direction: column; gap: 8px; font-size: calc(12.5px * var(--tx, 1)); }
.at-ret label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.at-ret input { width: 76px; }
.at-av { flex-wrap: wrap; margin-bottom: 8px; }
.at-av .fx-help { flex-basis: 100%; margin-left: 22px; }
/* auditoria */
.at-int { display: flex; align-items: center; gap: 12px; }
.at-int > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.at-int > div span { font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); }
.at-int-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.at-int.ok .at-int-ic { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.at-int.bad { border-left: 3px solid var(--red); }
.at-int.bad .at-int-ic { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
/* banco */
.at-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.at-grade > .at-b { margin-bottom: 0; }
.at-grade > .at-b:last-child { grid-column: 1 / -1; }
@media (max-width: 1100px) { .at-grade { grid-template-columns: 1fr; } .at-perfis { grid-template-columns: 1fr; } }
.at-rec { display: flex; flex-direction: column; }
.at-rec-i { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 8px 4px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text-primary); font: inherit; cursor: pointer; }
.at-rec-i:first-child { border-top: 0; }
.at-rec-i:hover { background: var(--bg-2); }
.at-rec-i b { color: var(--red); font-variant-numeric: tabular-nums; }
.at-rec-i span { font-size: calc(12.5px * var(--tx, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-rec-i i { font-style: normal; color: var(--text-muted); margin-right: 4px; }
.at-rec-i small { font-size: calc(11px * var(--tx, 1)); color: var(--text-muted); }
/* importações: prévia */
.imp-pv-tot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.imp-pv-tot > div { display: flex; flex-direction: column; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-2); }
.imp-pv-tot b { font-size: calc(22px * var(--tx, 1)); font-weight: 600; font-variant-numeric: tabular-nums; }
.imp-pv-tot b.up { color: var(--green); } .imp-pv-tot b.down { color: var(--red); }
.imp-pv-tot span { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.imp-pv-n { font-size: calc(12px * var(--tx, 1)); color: var(--text-secondary); line-height: 1.5; margin: 6px 0; }
.imp-pv-l { margin: 6px 0 0; padding-left: 18px; font-size: calc(12.5px * var(--tx, 1)); line-height: 1.6; }
.imp-pv-c li { color: var(--red); }
/* ajustes finos (E4) */
.at-seg button { white-space: nowrap; width: auto; min-width: 44px; padding: 0 10px; }
.at-filtros select { flex: 0 1 190px; max-width: 220px; }
.at-crit input[type="checkbox"] { width: auto; flex: 0 0 auto; }
.at-rg-h .at-h input.unrec-input { width: 72px; flex: 0 0 72px; min-width: 0; text-align: right; }
.at-rg-h input.at-nome { flex: 1 1 auto; max-width: 420px; }
.at-rg-h .at-h { margin-left: auto; }
.at-filtros select.unrec-input { width: 180px; flex: 0 0 180px; }
/* .unrec-input (styles.css) pede 260 px mínimos; nas telas novas a largura vem do layout */
#atRegras .unrec-input, #atLog .unrec-input, #atAud .unrec-input, #atBanco .unrec-input, .at-ret .unrec-input { min-width: 0; }
.at-janela input.unrec-input { width: 76px; flex: 0 0 76px; }
.at-busca.unrec-input { flex: 1 1 220px; min-width: 180px; }


/* ── 9. Ajustes (E5) ──────────────────────────────────────────────── */
/* Tamanho do texto (Ajustes → Aparência): escala os tamanhos do styles.css e os deste arquivo */
:root[data-texto="grande"] { --tx: 1.1; --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14.5px; --fs-lg: 16.5px; --fs-xl: 20px; --fs-2xl: 24px; }
:root[data-texto="maior"] { --tx: 1.2; --fs-xs: 13px; --fs-sm: 14.5px; --fs-md: 15.5px; --fs-lg: 18px; --fs-xl: 21.5px; --fs-2xl: 26.5px; }
/* Cor de destaque: por área (padrão) ou uma só para o sistema inteiro; as cores são as já conferidas (4,5:1) */
:root[data-destaque="inicio"] body[data-area] { --accent: var(--a-inicio); }
:root[data-destaque="carteira"] body[data-area] { --accent: var(--a-carteira); }
:root[data-destaque="negociar"] body[data-area] { --accent: var(--a-negociar); }
:root[data-destaque="oficina"] body[data-area] { --accent: var(--a-oficina); }
:root[data-destaque="atualizacoes"] body[data-area] { --accent: var(--a-atualizacoes); }
.aj-cor { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.aj-seg-cor { flex-wrap: wrap; }
.aj { display: flex; flex-direction: column; gap: 12px; max-width: 980px; }   /* busca alinhada com os cartões */
.aj .aj-g, .aj .aj-res { max-width: none; }
.aj-topo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.aj-gic { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 16%, var(--bg-1)); color: var(--accent); }
.aj-gic svg { width: 26px; height: 26px; }
.aj-tit { flex: 1; min-width: 200px; }
.aj-tit .view-title { margin: 0; }
.aj-tit .view-sub { margin: 2px 0 0; }
.aj-busca { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-1); color: var(--text-muted); width: min(360px, 100%); }
.aj-busca:focus-within { border-color: var(--accent); }
.aj-busca input { flex: 1; min-width: 0; height: 100%; color: var(--text-primary); font-size: var(--fs-md); }
.aj-busca svg { width: 16px; height: 16px; }
.aj-res { display: flex; flex-direction: column; gap: 4px; }
.aj-ri { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-1); color: var(--text-primary); font: inherit; cursor: pointer; }
.aj-ri:hover, .aj-ri:focus-visible { border-color: var(--accent); outline: none; }
.aj-ri b { display: block; font-size: var(--fs-md); }
.aj-ri small { color: var(--text-muted); font-size: var(--fs-sm); }
.aj-ric { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--bg-2); color: var(--accent); }
.aj-ric svg { width: 18px; height: 18px; }
.aj-g { display: flex; flex-direction: column; gap: 12px; max-width: 980px; }
.aj-sec { padding: 14px 18px; border-radius: var(--r-lg); }
.aj-sec > h3 { font-size: var(--fs-md); font-weight: 600; margin: 0 0 6px; color: var(--text-secondary); }
.aj-sec .cfg-card { border: 0; padding: 0; margin: 0; background: none; box-shadow: none; }
.aj-sec .cfg-card-head { display: none; }
.aj-nota { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; margin: 10px 0 0; }
.aj-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.aj-sec > h3 + .aj-row, .aj-sec > h3 + div > .aj-row:first-child, .aj-perm > .aj-row:first-child, .aj-av-c > .aj-row:first-child { border-top: 0; }
.aj-row-col { flex-direction: column; align-items: stretch; }
.aj-lab { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aj-lab b { font-size: var(--fs-md); font-weight: 500; }
.aj-lab span { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.45; }
.aj-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.aj-ctl em { font-style: normal; font-size: var(--fs-sm); color: var(--text-muted); }
.aj-ctl .aj-fixo { font-size: var(--fs-sm); color: var(--text-muted); }   /* Etapa 2: fonte que não desliga */
.aj-ctl .unrec-input, .aj-tg .unrec-input, .aj-hora .unrec-input, .aj-busca input { min-width: 0; }
.aj-n.unrec-input { width: 100px; text-align: right; }
.aj-w.unrec-input { width: 320px; }
.aj-ctl select.unrec-input { width: 230px; }
.aj-hora { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-secondary); }
.aj-hora .unrec-input { width: 110px; }
.aj-pic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--bg-2); color: var(--accent); }
.aj-pic svg { width: 20px; height: 20px; }
.aj-av { border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg-1); }
.aj-av > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 18px; font-size: var(--fs-md); font-weight: 600; color: var(--text-secondary); }
.aj-av > summary::-webkit-details-marker { display: none; }
.aj-av > summary svg { width: 14px; height: 14px; transition: transform .15s; }
.aj-av[open] > summary svg { transform: rotate(90deg); }
.aj-av > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-lg); }
.aj-av-c { padding: 0 18px 14px; }
.aj-h4 { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 4px; }
.aj-pe { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.aj-perigo { color: var(--red); }
.aj-contas { display: flex; flex-direction: column; }
.aj-conta { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.aj-conta:first-child { border-top: 0; }
.aj-cic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); color: var(--accent); }
.aj-c1 { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.aj-c1 span { font-size: var(--fs-sm); color: var(--text-muted); }
.aj-tg { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.aj-tg label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--text-muted); }
.aj-tg #ajTgTok { width: 280px; } .aj-tg #ajTgChat { width: 140px; }
.aj-tbl td.c, .aj-tbl th.c { text-align: center; }
.aj-atalhos td:first-child { width: 160px; white-space: nowrap; }
.aj-atalhos kbd { display: inline-block; min-width: 22px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--bg-2); font-family: inherit; font-size: var(--fs-sm); text-align: center; }
.aj-srv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aj-keys { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.aj-alvo { animation: ajAlvo 2.4s ease-out; border-radius: var(--r-md); }
@keyframes ajAlvo { 0%, 30% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; background: transparent; } }
@media (prefers-reduced-motion: reduce) { .aj-alvo { animation: none; outline: 2px solid var(--accent); } }
.aj-desf { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 16px; border-radius: var(--r-lg); background: var(--bg-3, #222); color: var(--text-primary); border: 1px solid var(--border-strong); box-shadow: 0 8px 30px rgba(0, 0, 0, .35); z-index: 3000; font-size: var(--fs-md); transition: opacity .18s, transform .18s; max-width: min(560px, 92vw); }
.aj-desf.on { opacity: 1; transform: translate(-50%, 0); }
.aj-desf button { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 2px 4px; }
@media (max-width: 760px) { .aj-row { flex-direction: column; align-items: stretch; } .aj-ctl { justify-content: flex-start; } .aj-w.unrec-input, .aj-ctl select.unrec-input { width: 100%; } }
/* As abas de ajuste da Organização foram para Ajustes → Carteira; Alvos e Metas já estão nas abas da moldura */
.view[data-view="organizacao"] #orgTabs { display: none; }
/* O botão "Salvar" das taxas e da fila sai: salvam sozinhos */
#feeSave, #sqSaveBtn { display: none; }


/* ── 10. Oficina (E6) ───────────────────────────────────────────────── */
.ox { display: flex; flex-direction: column; gap: 14px; }
.ox-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ox-seg button { white-space: nowrap; }
.ox-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-secondary); }
.ox-n { width: 104px; flex: 0 0 104px; min-width: 0; text-align: right; }
.ox-largo { flex: 1 1 320px; min-width: 0; }
.ox-sub { margin: 0; font-size: var(--fs-sm); color: var(--text-secondary); max-width: 900px; }
.ox-h { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; font-size: var(--fs-md); font-weight: 600; }
.ox-h small { color: var(--text-muted); font-weight: 400; }
.ox-h svg { color: var(--accent); }
.ox-fonte { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: var(--fs-xs); color: var(--text-muted); }
.ox-fonte svg { flex: 0 0 auto; color: var(--green); }
.ox-semimg { display: inline-block; width: 40px; height: 30px; border-radius: var(--r-sm); background: var(--bg-2); }
.ox-vazio { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 16px; text-align: center; border: 1px dashed var(--border); border-radius: var(--r-lg); color: var(--text-secondary); }
.ox-vazio svg { color: var(--accent); }
.ox-vazio b { color: var(--text-primary); font-size: var(--fs-md); }
.ox-vazio span { max-width: 520px; font-size: var(--fs-sm); }
/* busca com sugestões */
.ox-busca { position: relative; flex: 1 1 300px; min-width: 0; max-width: 520px; }
.ox-busca .unrec-input { width: 100%; min-width: 0; }
.ox-sug { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; max-height: 360px; overflow: auto; background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); padding: 4px; }
.ox-sug-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: var(--r-sm); text-align: left; }
.ox-sug-i:hover, .ox-sug-i:focus-visible { background: var(--bg-2); }
.ox-sug-i img, .ox-sug-i .ox-semimg { width: 48px; height: 36px; object-fit: contain; flex: 0 0 48px; }
.ox-sug-i span { display: flex; flex-direction: column; min-width: 0; }
.ox-sug-i b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-sug-i small, .ox-sug-v { font-size: var(--fs-xs); color: var(--text-muted); }
.ox-sug-v { padding: 10px; }
/* listas em cartões */
.ox-lista { display: flex; flex-direction: column; gap: 8px; }
.ox-card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-1); overflow: hidden; }
.ox-card.aberto { border-color: var(--border-strong); }
.ox-card-h { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px; text-align: left; }
.ox-card-h > svg { flex: 0 0 auto; color: var(--text-muted); transition: transform .15s; }
.ox-card.aberto .ox-card-h > svg { transform: rotate(90deg); }
.ox-card-h:hover { background: var(--bg-2); }
.ox-ents { display: flex; gap: 4px; flex: 0 0 auto; }
.ox-ent { position: relative; display: inline-flex; width: 64px; height: 48px; border-radius: var(--r-sm); background: var(--bg-2); align-items: center; justify-content: center; }
.ox-ent img { width: 60px; height: 44px; object-fit: contain; }
.ox-ent b { position: absolute; right: 2px; bottom: 1px; font-size: var(--fs-xs); background: var(--bg-1); border-radius: 6px; padding: 0 4px; }
.ox-card-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.ox-card-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-card-t small { font-size: var(--fs-xs); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-kpi { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; min-width: 92px; }
.ox-kpi b { font-size: calc(17px * var(--tx, 1)); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ox-kpi small { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }
.ox-kpi b.up, .ox .up { color: var(--green); } .ox-kpi b.down, .ox .down { color: var(--red); }
.ox-kpis { display: flex; flex-wrap: wrap; gap: 18px; margin: 6px 0; }
.ox-kpis .ox-kpi { align-items: flex-start; }
.ox-card-c { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.ox-card-c .of-saidas { margin-top: 10px; }
.ox-simb { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; }
.ox-sim:not(:empty) { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ox-graf2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ox-graf { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-1); }
.ox-graf figcaption { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 6px; }
.ox-graf svg { width: 100%; height: auto; display: block; overflow: visible; }
.ox-ax { font-size: 10px; fill: var(--text-muted); }
/* reverso */
.ox-rev { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-1); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ox-rev header { display: flex; align-items: center; gap: 12px; }
.ox-rev header img, .ox-rev header .ox-semimg { width: 72px; height: 52px; object-fit: contain; }
.ox-rev header div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ox-rev header small { font-size: var(--fs-xs); color: var(--text-muted); }
.ox-cel { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ox-cel img, .ox-cel .ox-semimg { width: 44px; height: 32px; object-fit: contain; flex: 0 0 44px; }
/* craft */
.ox-craft { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.ox-craft-f { display: flex; flex-direction: column; gap: 8px; }
.ox-craft-f .ox-busca { max-width: none; flex: 0 0 auto; }
.ox-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ox-ads { display: flex; flex-direction: column; gap: 6px; }
.ox-ad { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--r-lg); }
.ox-ad img, .ox-ad .ox-semimg { width: 44px; height: 34px; object-fit: contain; }
.ox-ad span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ox-ad small { font-size: var(--fs-xs); color: var(--text-muted); }
.ox-craft-r { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 64px; }
.ox-previa { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--border); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 12%, var(--bg-1)), var(--bg-1) 70%); }
.ox-pskin { width: 100%; max-width: 360px; height: 180px; object-fit: contain; }
.ox-pads { display: flex; gap: 8px; margin-top: -8px; }
.ox-pad { width: 54px; height: 44px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--bg-2) 70%, transparent); display: inline-flex; align-items: center; justify-content: center; }
.ox-pad.vazio { border: 1px dashed var(--border); background: transparent; }
.ox-pad img { width: 52px; height: 42px; object-fit: contain; }
.ox-previa small { font-size: var(--fs-xs); color: var(--text-muted); }
.ox-link { display: flex; gap: 8px; flex-wrap: wrap; }
.ox-link .unrec-input { flex: 1 1 240px; min-width: 0; font-family: ui-monospace, monospace; font-size: var(--fs-xs); }
/* adesivos aplicados, padrões, caixas */
.ox-apl, .ox-cx { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-1); }
.ox-apl-i, .ox-cx-i { width: 84px; height: 60px; object-fit: contain; flex: 0 0 84px; }
.ox-apl-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.ox-apl-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-apl-t small { font-size: var(--fs-xs); color: var(--text-muted); }
.ox-apl-a { display: flex; gap: 4px; margin-top: 4px; }
.ox-apl-a span { width: 40px; height: 32px; border-radius: var(--r-sm); background: var(--bg-2); display: inline-flex; align-items: center; justify-content: center; }
.ox-apl-a img { width: 38px; height: 30px; object-fit: contain; }
.ox-pad-r { padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-1); display: flex; flex-direction: column; gap: 8px; }
.ox-pad-h { display: flex; flex-direction: column; }
.ox-pad-h small { font-size: var(--fs-xs); color: var(--text-muted); }
.ox-barra-r { position: relative; display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--bg-2); max-width: 420px; }
.ox-barra-r i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--red); opacity: .75; }
.ox-barra-r i.up { background: var(--green); }
.ox-barra-r em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-secondary); }
/* faixas de float */
.ox-faixa { position: relative; display: flex; height: 34px; border-radius: var(--r-sm); overflow: visible; margin: 18px 0 8px; }
.ox-fx { position: relative; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 30%, var(--bg-2)); border-right: 1px solid var(--bg-1); }
.ox-fx:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); } .ox-fx:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-right: 0; }
.ox-fx.fora { background: repeating-linear-gradient(135deg, var(--bg-2) 0 4px, transparent 4px 8px); opacity: .6; }
.ox-fx.atual { background: color-mix(in srgb, var(--c) 60%, var(--bg-2)); }
.ox-fx i { font-style: normal; font-size: var(--fs-xs); font-weight: 600; color: var(--text-primary); }
.ox-fm { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-left: -1px; background: var(--text-primary); border-radius: 2px; box-shadow: 0 0 0 2px var(--bg-1); }
.ox-fr { position: absolute; bottom: -6px; height: 3px; background: var(--accent); border-radius: 2px; }
/* taxa */
.ox-taxa { display: flex; flex-direction: column; gap: 14px; }
.ox-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; max-width: 900px; }
.ox-campo { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--text-secondary); }
.ox-in { display: flex; align-items: center; gap: 6px; }
.ox-in em { font-style: normal; color: var(--text-muted); width: 22px; }
.ox-in .unrec-input { flex: 1; min-width: 0; font-size: calc(18px * var(--tx, 1)); text-align: right; }
/* comparar */
.ox-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 10px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); font-size: var(--fs-sm); }
.ox-tag button { display: inline-flex; color: var(--text-muted); }
.ox-cmp-h { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.ox-cmp-h img, .ox-cmp-h .ox-semimg { width: 96px; height: 68px; object-fit: contain; }
.ox-cmp td.ox-melhor { font-weight: 700; color: var(--green); }
@media (max-width: 900px) {
  .ox-craft { grid-template-columns: 1fr; }
  .ox-craft-r { position: static; }
  .ox-card-h, .ox-apl, .ox-cx { flex-wrap: wrap; }
  .ox-kpi { min-width: 0; align-items: flex-start; }
}

/* ── 11. Revisão (E7) ───────────────────────────────────────────────── */
.aj-warn { color: var(--yellow); }
.aj-lento { color: var(--red); }
.aj-acoes { display: flex; gap: 8px; margin-top: 8px; }
/* Com as atualizações pausadas, o aviso fixo fica embaixo, no meio: o "Desfazer" sobe para não ficar coberto */
body:has(> .dd-ctl-badge) .aj-desf { bottom: 68px; }

/* ── 12. Lançador (E9 · 43-lancador.js) ─────────────────────────────── */
/* Ícone de app: quadrado arredondado com degradê (cores em --g1/--g2) */
.la-sq { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 104px; height: 104px; border-radius: 26px;
  background: linear-gradient(145deg, var(--g1), var(--g2)); color: #fff;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--g2) 38%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.la-sq svg { width: 54px; height: 54px; }
.la-sq.la-sm { width: 46px; height: 46px; border-radius: 13px; box-shadow: 0 4px 10px color-mix(in srgb, var(--g2) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.3); }
.la-sq.la-sm svg { width: 24px; height: 24px; }
.la-sq.la-logo { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 12px; }
.la-sq.la-logo svg { width: 38px; height: 38px; }
.la-bdg { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #E5484D; color: #fff;
  font: 700 12px/24px var(--font-ui); text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.la-sm .la-bdg { top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; }

/* Páginas de lançador (Início e página da área): fundo suave, conteúdo centrado */
.view[data-view="modulo"] .content, .view[data-view="inicio"] .content {
  background: radial-gradient(900px 480px at 12% -6%, color-mix(in srgb, var(--a-inicio) 11%, transparent), transparent 70%),
              radial-gradient(900px 520px at 96% 2%, color-mix(in srgb, #ec4899 8%, transparent), transparent 70%); }
.la-pag { max-width: 1240px; margin: 0 auto; }
.la-hd { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 10px 0 30px; }
.la-hd h1 { margin: 0; font-size: calc(30px * var(--tx, 1)); font-weight: 700; letter-spacing: -.02em; color: var(--text-primary); }
.la-hd p { margin: 6px 0 0; color: var(--text-secondary); font-size: calc(14px * var(--tx, 1)); }
.la-chip { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: var(--bg-1); color: var(--text-primary); font: 500 12.5px var(--font-ui); cursor: pointer; }
.la-chip:hover { background: var(--bg-2); }
.la-sec { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 14px; font-size: calc(16px * var(--tx, 1)); font-weight: 700; color: var(--text-primary); }
.la-sec span { font-size: calc(12.5px * var(--tx, 1)); font-weight: 500; color: var(--text-muted); }

/* Cartões das áreas (Início) */
.la-mods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-bottom: 34px; }
.la-mod, .la-app { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 22px 14px 18px; border-radius: 24px; cursor: pointer;
  background: color-mix(in srgb, var(--bg-1) 78%, transparent); border: 1px solid var(--border); backdrop-filter: blur(12px);
  color: var(--text-primary); font: inherit; text-align: center; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.la-mod:hover, .la-app:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20,22,60,.14); border-color: var(--border-strong); }
.la-mod:focus-visible, .la-app:focus-visible, .la-mini:focus-visible, .la-sb-h:focus-visible, .la-sb-todas:focus-visible { outline: 2px solid var(--a-inicio); outline-offset: 2px; }
.la-mod b, .la-app b { font-size: calc(17px * var(--tx, 1)); font-weight: 700; line-height: 1.25; }
.la-s { font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); line-height: 1.4; min-height: 34px; }
.la-lins { align-self: stretch; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border); text-align: left; }
.la-lin { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; font-size: calc(13px * var(--tx, 1)); }
.la-lin span { color: var(--text-secondary); min-width: 0; }
.la-lin b { font-weight: 700; white-space: nowrap; color: var(--text-primary); }
.la-lin b.ok { color: var(--green); } .la-lin b.neg { color: var(--red); } .la-lin b.warn { color: var(--yellow); }
@media (prefers-reduced-motion: reduce) { .la-mod, .la-app { transition: none; } .la-mod:hover, .la-app:hover { transform: none; } }

/* Página da área: ícones grandes, menores e cartões com números */
.la-apps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; margin-bottom: 30px; }
.la-minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
.la-mini { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 16px; cursor: pointer; text-align: left;
  background: color-mix(in srgb, var(--bg-1) 75%, transparent); border: 1px dashed var(--border-strong); color: var(--text-primary); font: inherit; }
.la-mini:hover { border-style: solid; border-color: var(--text-secondary); }
.la-mini > span:last-child { min-width: 0; }
.la-mini b { display: block; font-size: calc(13.5px * var(--tx, 1)); line-height: 1.25; }
.la-mini small { display: block; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la-wdgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.la-wdg { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--bg-1) 88%, transparent);
  border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(20,22,60,.07); }
.la-wdg h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: calc(14px * var(--tx, 1)); font-weight: 700; color: var(--text-primary); }
.la-wdg h3 i { width: 20px; height: 20px; border-radius: 6px; display: inline-block; }
.la-wdg .la-lin { border-top: 1px solid var(--border); padding: 6px 0; }
.la-wdg .la-lin:first-of-type { border-top: 0; }
.la-abrir { align-self: flex-start; margin-top: auto; padding-top: 0; }
.la-wdg .la-abrir { margin-top: 10px; }
@media (max-width: 1280px) { .la-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); } .la-mods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .la-apps, .la-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } .la-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .la-wdgs { grid-template-columns: 1fr; } .la-sq { width: 84px; height: 84px; border-radius: 22px; } .la-sq svg { width: 44px; height: 44px; } }
@media (max-width: 520px) { .la-minis { grid-template-columns: 1fr; } }

/* O trilho sai; o menu da área ganha a cor da área (como um aplicativo) */
.la-on .mo-trilho { display: none !important; }
.la-on .mo-menu { --la-sb: color-mix(in srgb, var(--la-g2, #3730A3) 86%, #000); background: linear-gradient(180deg, var(--la-sb), color-mix(in srgb, var(--la-sb) 88%, #000));
  color: #fff; padding: 0 10px 14px; border-right: 0; width: 236px; flex-basis: 236px; }
.la-sb-h { display: flex; align-items: center; gap: 12px; width: calc(100% + 20px); margin: 0 -10px 6px; padding: 16px 14px 14px; border: 0; border-bottom: 1px solid rgba(255,255,255,.16);
  background: none; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.la-sb-h:hover { background: rgba(255,255,255,.06); }
.la-sq.la-sb-ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.la-sq.la-sb-ic svg { width: 24px; height: 24px; }
.la-sb-h b { display: block; font-size: calc(16px * var(--tx, 1)); line-height: 1.2; }
.la-sb-h small { display: block; font-size: calc(11.5px * var(--tx, 1)); opacity: .75; margin-top: 2px; }
.la-sb-g { margin-top: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.la-sb-g:last-of-type { border-bottom: 0; }
.la-sb-gt { display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px; font-size: calc(11px * var(--tx, 1)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.la-sb-num { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; letter-spacing: 0; }
.la-on .mo-menu .mo-item { color: rgba(255,255,255,.88); }
.la-on .mo-menu .mo-item svg { color: rgba(255,255,255,.9); }
.la-on .mo-menu .mo-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.la-on .mo-menu .mo-item.active { background: #fff; color: var(--la-g2, #3730A3); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.la-on .mo-menu .mo-item.active svg { color: var(--la-g2, #3730A3); }
.la-on .mo-menu .mo-item:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.la-on .mo-menu .mo-n { background: #E5484D; color: #fff; }
.la-sb-todas { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
  background: none; color: #fff; font: 500 13px var(--font-ui); cursor: pointer; }
.la-sb-todas:hover { background: rgba(255,255,255,.08); }
/* nas páginas de lançador não há menu lateral (a página é o menu) */
body[data-la-modo="hub"] .sidebar.mo-on { display: none; }
body[data-la-modo="hub"] .topbar .nav-toggle, body[data-la-modo="hub"] .topbar .mobile-menu-btn, body[data-la-modo="hub"] .la-top-volta { display: none; }
/* menu recolhido: só os ícones */
@media (min-width: 1025px) {
  :root[data-nav="mini"].la-x, :root[data-nav="mini"] .la-on .mo-menu { display: flex; width: 64px; flex-basis: 64px; padding: 0 8px 12px; }
  :root[data-nav="mini"] .la-on .mo-menu .mo-item span, :root[data-nav="mini"] .la-sb-h > span:last-child, :root[data-nav="mini"] .la-sb-gt, :root[data-nav="mini"] .la-sb-todas span { display: none; }
  :root[data-nav="mini"] .la-on .mo-menu .mo-item, :root[data-nav="mini"] .la-sb-todas { justify-content: center; padding: 8px 0; }
  :root[data-nav="mini"] .la-sb-h { width: calc(100% + 16px); margin: 0 -8px 6px; justify-content: center; padding: 14px 0 12px; }
  :root[data-nav="mini"] .la-on .mo-menu .mo-n { position: absolute; margin: -18px 0 0 22px; }
  :root[data-nav="mini"] .la-on .mo-menu .mo-item { position: relative; }
}

/* Topo: Módulos, Voltar e o caminho */
.la-top { display: flex; align-items: center; gap: 6px; min-width: 0; margin-right: 10px; }
.la-top-b { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: var(--r-md); border: 1px solid var(--border-strong);
  background: var(--bg-1); color: var(--text-primary); font: 600 13px var(--font-ui); cursor: pointer; white-space: nowrap; }
.la-top-b:hover { background: var(--bg-2); }
.la-top-volta { border-color: transparent; background: none; color: var(--text-secondary); font-weight: 500; }
.la-trilha { display: flex; align-items: center; gap: 6px; min-width: 0; padding-left: 10px; margin-left: 4px; border-left: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.la-trilha b { font-size: calc(15px * var(--tx, 1)); font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }
.la-trilha-a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 0; border-radius: 6px; background: none; color: var(--c); font: 600 13px var(--font-ui); cursor: pointer; }
:root:not([data-theme="light"]) .la-trilha-a { color: color-mix(in srgb, var(--c) 45%, #fff); }
.la-trilha-a:hover { background: var(--bg-2); }
.la-trilha-sep { color: var(--text-muted); }
.topbar .la-top-ic { width: 34px; height: 34px; }
.topbar .la-top-ic svg { width: 18px; height: 18px; }
@media (max-width: 1100px) { .la-top-b span, .la-trilha-a span { display: none; } .topbar .search-wrap { max-width: 220px; } }
@media (max-width: 1024px) { .la-on .mo-menu { width: min(260px, 86vw); } }
/* Início: o resumo de antes fica embaixo dos módulos, na mesma largura; a saudação vira só o seletor de período */
.view[data-view="inicio"] #inBody { max-width: 1240px; margin: 0 auto; }
.view[data-view="inicio"] .ib-topo h1, .view[data-view="inicio"] .ib-topo .ib-data { display: none; }
.view[data-view="inicio"] .ib-topo { margin-top: -46px; justify-content: flex-end; pointer-events: none; }
.view[data-view="inicio"] .ib-topo > * { pointer-events: auto; }
/* Topo no estilo do lançador: [Módulos][Voltar] Área › Tela ........ [Buscar] [fonte][moeda][ícones] */
.la-on .topbar > * { order: 3; }
.la-on .topbar > .mobile-menu-btn, .la-on .topbar > .nav-toggle, .la-on .topbar > .la-top { order: 0; }
.la-on .topbar > .la-top { flex: 1 1 auto; }
.la-on .topbar > .spacer { order: 1; flex: 0 0 0; }
.la-on .topbar > .search-wrap { order: 2; flex: 0 1 240px; min-width: 150px; }
.la-top-volta span { display: none; }
.la-top-volta { padding: 0 8px; }
.la-top { flex-shrink: 1; }
.la-trilha { flex: 1 1 auto; }
.la-on .topbar > .search-wrap { flex: 0 1 200px; min-width: 120px; }
@media (max-width: 1500px) { .la-on .topbar .search-wrap .kbd { display: none; } }
/* Menu da tela (E9.1): partes, abas e seções da tela aberta */
.la-pt { width: 18px; flex: 0 0 18px; display: inline-flex; justify-content: center; }
.la-pt::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }
.la-on .mo-menu .mo-item.active .la-pt::before { opacity: 1; }
.la-sb-fim { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.la-sb-fim .la-sb-todas { margin-top: 0; }
.la-sb-todas2 { border-color: transparent; opacity: .85; }
.view h3, .view .mo-g { scroll-margin-top: 72px; }
/* abas e partes espelhadas no menu: no computador, com o menu aberto, ficam só no menu */
@media (min-width: 1025px) {
  :root:not([data-nav="mini"]) .la-on .la-espelho { display: none !important; }
  :root:not([data-nav="mini"]) body.la-on[data-la-modo="tela"] .in-abas.mo-abas-bar { display: none; }
}
.la-on .mo-menu .mo-item.la-sub2 { padding-left: 26px; min-height: 28px; font-size: 12.5px; }
.la-on .mo-menu .mo-item.la-sub2 .la-pt::before { width: 4px; height: 4px; }
/* com o menu da tela aberto, o nome da tela já está no topo do menu: no caminho fica só a área */
@media (min-width: 1025px) {
  :root:not([data-nav="mini"]) body.la-on[data-la-modo="tela"] .la-trilha-sep, :root:not([data-nav="mini"]) body.la-on[data-la-modo="tela"] .la-trilha > b { display: none; }
}

/* ── 13. Janela "resolver ali mesmo" (E10 · 44-janela.js) ─────────────── */
.ja { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; }
.ja[hidden] { display: none; }
.ja-fundo { position: absolute; inset: 0; background: var(--overlay, rgba(8,10,20,.55)); backdrop-filter: blur(2px); }
.ja-caixa { position: relative; width: min(1240px, 94vw); height: min(90vh, 980px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-0); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.ja-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-1); flex: none; }
.ja-ic { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff;
  background: linear-gradient(145deg, var(--g1, #818CF8), var(--g2, #3730A3)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.ja-tt { flex: 1; min-width: 0; }
.ja-tt b { display: block; font-size: calc(16px * var(--tx, 1)); font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ja-tt small { display: block; font-size: calc(12px * var(--tx, 1)); color: var(--text-muted); }
.ja-x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ja-x:hover { background: var(--bg-2); }
.ja-x:focus-visible, .ja-ir:focus-visible { outline: 2px solid var(--a-inicio); outline-offset: 2px; }
.ja-corpo { flex: 1; overflow: auto; overscroll-behavior: contain; }
.ja-corpo > .view { display: block; }
.ja-corpo > .view > .content { background: none; }
/* dentro da janela, as partes e abas da tela aparecem na própria tela (não há menu lateral dela) */
.ja-corpo .la-espelho { display: flex !important; }
.ja-corpo .in-abas.mo-abas-bar:not([hidden]) { display: block !important; }
html.ja-aberta { overflow: hidden; }
@media (max-width: 760px) { .ja-caixa { width: 100vw; height: 100vh; border-radius: 0; } .ja-ir { display: none; } }
@media (prefers-reduced-motion: no-preference) { .ja:not([hidden]) .ja-caixa { animation: ja-entra .16s ease-out; } }
@keyframes ja-entra { from { transform: translateY(10px) scale(.99); opacity: 0; } }

/* ── 14. Menus suspensos e painéis rápidos (E10 · 45-acoes.js) ─────────── */
.ac-pop { position: fixed; z-index: 9500; width: 300px; max-width: calc(100vw - 16px); max-height: min(70vh, 560px); overflow: auto; padding: 6px;
  background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.28); color: var(--text-primary); }
.ac-pop-t { padding: 8px 10px 6px; font-size: calc(12px * var(--tx, 1)); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.ac-sec { padding: 10px 10px 4px; font-size: calc(11.5px * var(--tx, 1)); font-weight: 700; color: var(--text-muted); }
.ac-op { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ac-op:hover, .ac-op:focus-visible { background: var(--bg-2); outline: none; }
.ac-op:focus-visible { box-shadow: inset 0 0 0 2px var(--a-inicio); }
.ac-op[disabled] { opacity: .55; cursor: progress; }
.ac-ok { width: 16px; flex: 0 0 16px; color: var(--accent, var(--a-inicio)); font-weight: 700; line-height: 1.35; }
.ac-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-txt b { font-size: calc(13.5px * var(--tx, 1)); font-weight: 600; }
.ac-txt small { font-size: calc(12px * var(--tx, 1)); color: var(--text-secondary); line-height: 1.35; }
.ac-op.on .ac-txt b { color: var(--text-primary); }
.ac-nota { padding: 8px 10px; font-size: calc(12px * var(--tx, 1)); color: var(--text-secondary); line-height: 1.45; }
.ac-nota.warn { color: var(--yellow); }
.ac-pe { border-top: 1px solid var(--border); margin-top: 6px; padding: 6px 4px 2px; display: flex; justify-content: flex-end; }
.ac-link { border: 0; background: none; color: var(--accent, var(--a-inicio)); font: 600 12.5px var(--font-ui); cursor: pointer; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.ac-link:hover { background: var(--bg-2); }
.ac-seta { margin-left: 4px; font-size: 10px; opacity: .7; }
.ac-valor { display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--bg-1); color: var(--text-primary); font: 700 13px var(--font-ui); cursor: pointer; }
.ac-valor:hover { background: var(--bg-2); }
.ac-jan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); margin-top: 4px; font-size: 12.5px; }
.ac-jan[hidden] { display: none; }
.ac-jan > span { width: 100%; color: var(--text-secondary); }
.ac-jan input { width: 64px; }
/* painel de motores */
.ac-mot-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 10px 8px; font-size: 12.5px; color: var(--text-secondary); }
.ac-mot-r b { color: var(--text-primary); font-size: 15px; }
.ac-mot-r .bad b, .ac-mot-r .bad { color: var(--red); }
.ac-mot-ctl { margin-left: auto; }
.ac-mot-l { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.ac-mot-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ac-mot-i:last-child { border-bottom: 0; }
.ac-mot-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-mot-n b { font-size: 13px; font-weight: 600; }
.ac-mot-n small { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-pt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-muted); }
.ac-pt.ok { background: var(--green); } .ac-pt.bad { background: var(--red); } .ac-pt.warn { background: var(--yellow); }
.dd-ctl-badge { cursor: pointer; }

/* ── 15. Controle dos motores (E11) ───────────────────────────────────── */
.ac-pop.ac-mot { width: 460px; }
.ac-mot .ac-mot-l { max-height: min(60vh, 520px); overflow: auto; }
.ac-mot-i { display: block; padding: 10px 10px 8px; }
.ac-mot-h { display: flex; align-items: center; gap: 8px; }
.ac-mot-h b { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-chip { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg-2); color: var(--text-secondary); white-space: nowrap; }
.ac-chip.ok { color: var(--green); } .ac-chip.bad { color: var(--red); } .ac-chip.warn { color: var(--yellow); }
.ac-mot-d { display: block; margin: 3px 0 0 16px; font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-mot-d.bad { color: var(--red); white-space: normal; }
.ac-mot-b { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 16px; }
.ac-mot-b:empty { display: none; }
.ac-prog { margin: 6px 0 0 16px; }
.ac-bar { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.ac-bar span { display: block; height: 100%; border-radius: 3px; background: var(--green); transition: width .6s ease; }
.ac-prog.pausa .ac-bar span, .ac-prog.pausado .ac-bar span { background: var(--yellow); }
.ac-prog.erro .ac-bar span { background: var(--red); }
.ac-prog small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-secondary); line-height: 1.35; }
.ac-prog small b { color: var(--text-primary); }
.ac-mb { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-1); color: var(--text-primary); font: 600 12px var(--font-ui); cursor: pointer; }
.ac-mb:hover { background: var(--bg-2); }
.ac-mb:focus-visible { outline: 2px solid var(--a-inicio); outline-offset: 1px; }
.ac-mb[disabled] { opacity: .55; cursor: progress; }
.ac-mb svg, .ac-mot-ctl svg { flex: none; }
.ac-mot-ctl { display: inline-flex; align-items: center; gap: 6px; }
.ac-mb-zero { color: var(--text-secondary); }
.ac-mb-conf { border-color: var(--red); color: var(--red); }
.ac-vivo { float: right; font-size: 10.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--green); }
@media (prefers-reduced-motion: reduce) { .ac-bar span { transition: none; } }
/* tela Motores: os mesmos controles */
.mo-c3 .ac-mb { height: 30px; }
.mo-card .ac-prog { margin-left: 0; }

/* ── 16. Radar contínuo (E12) ─────────────────────────────────────────── */
.rd-est .rd-est2 { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rd-est-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-est-top .rd-prox { flex: 1; min-width: 200px; font-size: var(--fs-sm); color: var(--text-secondary); }
.rd-est-top .rd-est-b { margin-left: auto; }
.rd-ks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.rd-k { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); min-width: 0; }
.rd-k b { font-size: 20px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rd-k span { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.rd-k small { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-bqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.rd-bq { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.rd-bq.atual { border-color: var(--green); }
.rd-bq-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.rd-bq-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-bq-h span { font-size: 11.5px; white-space: nowrap; }
.rd-bq small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-secondary); }
.rd-aviso { font-size: 12px; }

/* ── 17. Motores refeitos (E13) ───────────────────────────────────────── */
.mt-nav { display: none; gap: 4px; margin: 0 0 12px; flex-wrap: wrap; }
.ja .mt-nav { display: flex; }
.mt-nav button { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-secondary); font: 600 12.5px var(--font-ui); cursor: pointer; }
.mt-nav button.on { background: var(--text-primary); color: var(--bg-1); border-color: var(--text-primary); }
#mtBody { display: flex; flex-direction: column; gap: 12px; }
.mt-s { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mt-sh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-st { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.mt-st2 { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-top: 6px; display: flex; gap: 12px; align-items: center; }
.mt-sp { flex: 1; }
.mt-link { margin-left: auto; background: none; border: 0; color: var(--a-inicio, var(--accent)); font: 600 12.5px var(--font-ui); cursor: pointer; padding: 2px 4px; }
.mt-link:hover { text-decoration: underline; }
.mt-vazio { font-size: 13px; color: var(--text-muted); padding: 6px 0; }
.mt-det { font-size: 12px; color: var(--text-muted); }
.mt-det.bad { color: var(--red); }
small.mt-det, small.mt-d { display: block; }
.mt-d { font-size: 12.5px; color: var(--text-secondary); margin: 0; }
.mt-pt { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex: none; }
.mt-pt.ok { background: var(--green); } .mt-pt.bad { background: var(--red); } .mt-pt.warn { background: var(--yellow); }
.mt-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.mt-cols > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 1100px) { .mt-cols { grid-template-columns: 1fr; } }
/* visão geral */
.mt-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-1); }
.mt-hero.ok { border-left: 4px solid var(--green); } .mt-hero.warn { border-left: 4px solid var(--yellow); } .mt-hero.bad { border-left: 4px solid var(--red); }
.mt-hero-t { flex: 1 1 320px; font-size: 17px; font-weight: 650; color: var(--text-primary); line-height: 1.35; }
.mt-ctls { display: flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.mt-ctl { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; padding: 7px 12px; background: var(--bg-1); border: 0; border-right: 1px solid var(--border); color: var(--text-primary); cursor: pointer; text-align: left; font: inherit; }
.mt-ctl:last-child { border-right: 0; }
.mt-ctl b { font-size: 13px; } .mt-ctl small { grid-column: 2; font-size: 11px; color: var(--text-muted); }
.mt-ctl.on { background: var(--text-primary); color: var(--bg-1); cursor: default; }
.mt-ctl.on small { color: inherit; opacity: .75; }
.mt-ctl:focus-visible { outline: 2px solid var(--a-inicio, var(--accent)); outline-offset: -2px; }
.mt-precos { font-size: 12px; color: var(--text-secondary); display: flex; gap: 6px; align-items: center; flex-basis: 100%; }
.mt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 800px) { .mt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mt-tile { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-1); cursor: pointer; font: inherit; text-align: left; color: var(--text-primary); }
.mt-tile b { font-size: 30px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.mt-tile span { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }
.mt-tile:hover { border-color: var(--border-strong); }
.mt-tile.rodando.tem b { color: var(--green); } .mt-tile.espera.tem b { color: var(--yellow); } .mt-tile.erro.tem b { color: var(--red); }
.mt-li { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.mt-li:first-of-type { border-top: 0; }
.mt-li-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mt-li-h > b { font-size: 13.5px; }
.mt-li .ac-prog, .mt-row .ac-prog, .mt-dp .ac-prog { margin-left: 0; }
.mt-bts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mt-lim { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.mt-lim > div { display: flex; flex-direction: column; }
.mt-lim b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-lim span { font-size: 11.5px; color: var(--text-muted); }
.mt-bars { display: flex; align-items: flex-end; gap: 2px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.mt-bars i { flex: 1; min-width: 2px; background: var(--a-atualizacoes, var(--green)); border-radius: 2px 2px 0 0; position: relative; display: flex; align-items: flex-end; opacity: .85; }
.mt-bars i.z { background: var(--border); opacity: 1; }
.mt-bars i b { display: block; width: 100%; background: var(--red); border-radius: 2px 2px 0 0; }
.mt-eixo { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.mt-leg { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--text-muted); }
.mt-leg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; } .mt-leg i.n { background: var(--a-atualizacoes, var(--green)); } .mt-leg i.e { background: var(--red); }
.mt-prox { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mt-prox li { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.mt-prox li:first-child { border-top: 0; }
.mt-prox b { min-width: 48px; font-variant-numeric: tabular-nums; }
/* lista */
.mt-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mt-q { min-width: 220px; flex: 0 1 280px; }
.mt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-chipf { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-secondary); font: 600 12.5px var(--font-ui); cursor: pointer; }
.mt-chipf i { font-style: normal; font-weight: 700; color: var(--text-primary); margin-left: 4px; }
.mt-chipf.on { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-1); }
.mt-chipf.on i { color: inherit; }
.mt-gh { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); margin-top: 4px; }
.mt-rows { display: flex; flex-direction: column; gap: 8px; }
.mt-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px auto; gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 12px; background: var(--bg-1); }
.mt-row.ok { border-left-color: var(--green); } .mt-row.bad { border-left-color: var(--red); } .mt-row.warn { border-left-color: var(--yellow); }
.mt-r1 { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mt-r2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mt-r2 span, .mt-dl dt { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.mt-r2 b { font-size: 12.5px; font-weight: 600; }
.mt-r3 { justify-self: end; }
@media (max-width: 1000px) { .mt-row { grid-template-columns: 1fr; } .mt-r3 { justify-self: start; } }
/* painel do motor */
.mt-dp { display: flex; flex-direction: column; gap: 10px; }
.mt-dp .mt-st { margin-top: 8px; }
.mt-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.mt-dl dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.mt-dl-w { grid-column: 1 / -1; }
.mt-dp .aj-row { padding: 8px 0; }
/* consultas */
.mt-areas { display: flex; flex-direction: column; gap: 6px; }
.mt-area { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 54px 74px; gap: 10px; align-items: center; font-size: 12.5px; }
.mt-area > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-area b { text-align: right; font-variant-numeric: tabular-nums; } .mt-area em { font-style: normal; font-size: 11.5px; }
.mt-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-left: auto; }
.mt-bar .mt-seg { margin-left: 0; }
.mt-seg button { height: 28px; padding: 0 10px; border: 0; border-right: 1px solid var(--border); background: var(--bg-1); color: var(--text-secondary); font: 600 12px var(--font-ui); cursor: pointer; }
.mt-seg button:last-child { border-right: 0; }
.mt-seg button.on { background: var(--text-primary); color: var(--bg-1); }
.mt-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mt-tab th { text-align: left; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); padding: 4px 6px; border-bottom: 1px solid var(--border); }
.mt-tab td { padding: 6px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.mt-tab th:not(:first-child), .mt-tab td:not(:first-child) { text-align: right; }
/* agenda */
.mt-perfis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 800px) { .mt-perfis { grid-template-columns: 1fr; } }
.mt-perfil { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-primary); font: inherit; cursor: pointer; }
.mt-perfil b { font-size: 14px; } .mt-perfil span { font-size: 12px; color: var(--text-secondary); }
.mt-perfil.on { border: 2px solid var(--a-atualizacoes, var(--green)); padding: 11px 13px; cursor: default; }
.mt-janela { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.mt-janela input { width: 70px; }
.mt-tl { display: flex; flex-direction: column; gap: 6px; }
.mt-tl-eixo { position: relative; height: 16px; margin: 0 60px 0 190px; font-size: 10.5px; color: var(--text-muted); }
.mt-tl-eixo span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.mt-tl-r { display: grid; grid-template-columns: 180px minmax(0, 1fr) 50px; gap: 10px; align-items: center; font-size: 12.5px; }
.mt-tl-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-tl-l { position: relative; height: 8px; border-radius: 4px; background: var(--bg-2); }
.mt-tl-l i { position: absolute; top: -3px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--a-atualizacoes, var(--green)); border: 2px solid var(--bg-1); }
.mt-tl-l i.agora { margin-left: 0; width: 22px; border-radius: 7px; background: var(--green); }
.mt-tl-r b { text-align: right; font-variant-numeric: tabular-nums; }
/* ajustes */
.mt-grp { padding: 0; }
.mt-grp > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.mt-grp > summary::-webkit-details-marker { display: none; }
.mt-grp > summary::before { content: '›'; font-weight: 700; color: var(--text-muted); transition: transform .15s; }
.mt-grp[open] > summary::before { transform: rotate(90deg); }
.mt-grp-c { padding: 0 16px 10px; }
/* registro */
.mt-regbar select { max-width: 240px; }
.mt-vivo { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-secondary); }
a.ac-mb { text-decoration: none; }
.mt-regt { font-size: 12px; color: var(--text-muted); }
.mt-log { padding: 4px 0; max-height: 70vh; overflow: auto; font-size: 12.5px; }
.mt-log.sm { max-height: 340px; border: 1px solid var(--border); border-radius: 10px; }
.mt-lg > summary { display: flex; align-items: center; gap: 8px; padding: 5px 12px; cursor: pointer; list-style: none; min-width: 0; border-bottom: 1px solid var(--border); }
.mt-lg > summary::-webkit-details-marker { display: none; }
.mt-lg > summary:hover { background: var(--bg-2); }
.mt-lg time { font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; font-size: 11.5px; }
.mt-lg em { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--bg-2); color: var(--text-secondary); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.mt-lg-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-lg.bad .mt-lg-t { color: var(--red); } .mt-lg.warn .mt-lg-t { color: var(--yellow); }
.mt-lg small { color: var(--text-muted); white-space: nowrap; }
.mt-lg[open] > summary { background: var(--bg-2); }
.mt-lg .mt-dl { padding: 8px 12px 10px; grid-template-columns: 1fr; }
.mt-janela input.unrec-input { width: 84px; flex: none; }

/* ── 18. Erros no ciclo (E14b) ────────────────────────────────────────── */
.se-sum-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.se-sum-btn:hover { border-color: var(--red); }
.se-sum-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.se-err-l { display: flex; flex-direction: column; max-height: 360px; overflow: auto; }
.se-err { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.se-err b { font-size: 12.5px; overflow-wrap: anywhere; }
.se-err span { font-size: 11px; color: var(--text-muted); }
.se-err small { font-size: 12px; color: var(--red); overflow-wrap: anywhere; }
.se-sum-adi { font-size: 11px; color: var(--yellow); margin-top: -4px; }

/* ── 19. Organizar: estratégia e Execução (E15) ─────────────────────────── */
.org-est { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.org-estc { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-1); color: var(--text-primary); font: inherit; cursor: pointer; min-height: 44px; }
.org-estc:hover { background: var(--bg-2); }
.org-estc:focus-visible { outline: 2px solid var(--a-inicio, var(--accent)); outline-offset: 2px; }
.org-estc.active { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.org-estt { display: flex; align-items: center; gap: 8px; }
.org-estt i { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.org-estn { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.org-esth { font-size: 12px; color: var(--text-secondary); }
.org-estc small { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.ox-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ox-topo b { font-size: 15px; }
.ox-est { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); }
.ox-est i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.ox-est.ok i { background: var(--green); } .ox-est.aviso i { background: var(--yellow); } .ox-est.info i { background: var(--accent); } .ox-est.erro i { background: var(--red); }
.ox-est.vivo i { animation: ox-pulso 1.6s ease-in-out infinite; }
@keyframes ox-pulso { 50% { opacity: .35; } }
.ox-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.ox-kpis .value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ox-kpis > * { min-width: 0; margin: 0; }
.ox-kpis .value.ox-kf { color: var(--red); }
.ac-prog.ox-prog { margin: 0; width: 100%; }
.ox-chk { gap: 8px 20px; margin-top: 8px; }
.ox-agora { font-size: 13px; margin: 4px 0 8px; overflow-wrap: anywhere; }
.ox-ctl { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ox-b { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; }
.ox-b svg { width: 13px; height: 13px; }
.ox-desc { margin-left: auto; color: var(--text-secondary); }
.ox-evs { margin: 6px 0; font-size: 12.5px; }
.ox-evs summary { cursor: pointer; color: var(--text-secondary); }
.ox-evs ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 200px; overflow: auto; }
.ox-evs li { padding: 3px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.ox-evs li.aviso { color: var(--yellow); } .ox-evs li.erro { color: var(--red); } .ox-evs li.ok { color: var(--green); }
.ox-evs time { color: var(--text-muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.ox-cfg { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 6px 0 14px; }
.ox-cfg > summary { cursor: pointer; font-weight: 600; min-height: 28px; display: flex; align-items: center; }
.ox-vel { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 10px 0; }
.ox-velc { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; }
.ox-velc input { position: absolute; opacity: 0; pointer-events: none; }
.ox-velc.active { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.ox-velc:focus-within { outline: 2px solid var(--a-inicio, var(--accent)); outline-offset: 2px; }
.ox-velc small { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.ox-cfg .dd-cfg-v input.unrec-input { width: 80px; }
.ox-cfg .dd-cfg-v select.unrec-input { width: auto; }
.ox-filtros { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.ox-filtros .fx-chip { cursor: pointer; font: inherit; font-size: 12.5px; height: auto; min-height: 30px; padding: 4px 10px; background: var(--bg-1); gap: 5px; }
.ox-filtros .fx-chip.active { border-color: var(--green); color: var(--text-primary); }
.ox-filtros input[type=search] { flex: 1; min-width: 180px; }
.ox-filtros select { width: auto; }
.ox-tbl td { vertical-align: top; }
.ox-tipo { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ox-tipo svg { display: inline-block; flex: none; }
.ox-tipo.guardar svg { color: var(--green); } .ox-tipo.retirar svg { color: var(--accent); } .ox-tipo.renomear svg { color: var(--yellow); }
.ox-s { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg-2); color: var(--text-secondary); white-space: nowrap; }
.ox-s.ok { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.ox-s.erro { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.ox-s.vivo { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ox-atual td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ox-mais { margin-top: 8px; }
.ox-mini { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; text-align: left; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-1); color: var(--text-primary); font: inherit; font-size: 13px; cursor: pointer; }
.ox-mini:hover { background: var(--bg-2); }
.ox-mini-ir { margin-left: auto; color: var(--text-secondary); }
@media (prefers-reduced-motion: reduce) { .ox-est.vivo i { animation: none; } }

/* ── 20. Organizar: Ao vivo (E16) ───────────────────────────────────────── */
.av-bar label.lv-radio { font-size: 12.5px; }
.av-bar a.btn-secondary { text-decoration: none; display: inline-flex; align-items: center; }
.av-con { height: min(56vh, 560px); overflow: auto; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 6px 0; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 12px; line-height: 1.5; }
.av-l { padding: 1px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent); }
.av-l > summary { list-style: none; cursor: pointer; }
.av-l > summary::-webkit-details-marker { display: none; }
.av-l > summary::before { content: '▸'; color: var(--text-muted); margin-right: 4px; }
.av-l[open] > summary::before { content: '▾'; }
.av-l > summary, div.av-l { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
div.av-l::before { content: ' '; margin-right: 4px; white-space: pre; }
.av-l time { color: var(--text-muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.av-l em { font-style: normal; font-weight: 600; display: inline-block; min-width: 92px; margin-right: 6px; }
.av-env { color: var(--accent); } .av-rec, .av-evt { color: #8b6cf0; } .av-dec { color: var(--text-primary); } .av-ok { color: var(--green); }
.av-erro { color: var(--red); } .av-ritmo, .av-info { color: var(--text-muted); } .av-org { color: var(--yellow); }
.av-l pre { margin: 4px 0 6px 20px; padding: 8px 10px; background: var(--bg-2); border-radius: 8px; font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.av-vazio { padding: 24px; color: var(--text-muted); font-family: inherit; }
.av-rodape { margin-top: 6px; font-size: 12px; }
@media (max-width: 640px) { .av-con { height: 60vh; font-size: 11px; } .av-l em { min-width: 0; } }
.org-ov .cs-m-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.org-ov .cs-m-tabs button { white-space: nowrap; flex: none; }
.ox-causas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; font-size: 12.5px; }
.ox-causas .fx-chip { cursor: pointer; font: inherit; font-size: 12px; height: auto; min-height: 28px; padding: 3px 10px; background: var(--bg-1); gap: 5px; }
.ox-causas .fx-chip.active { border-color: var(--green); }
.ox-s.aviso { color: var(--yellow); background: color-mix(in srgb, var(--yellow) 14%, transparent); }

/* ── 21. Motor de preços no orderbook novo (E19) ─────────────────────────── */
.mk-ritmo { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.mk-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.mk-form input[type=text] { flex: 1 1 220px; min-width: 0; min-height: 36px; }
.mk-sw, .mk-sel { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; }
.mk-sel select { margin-left: auto; min-height: 32px; }
.mk-tst { margin-top: 6px; font-size: 13px; }
.mk-tst.bad { color: var(--red); }
.mk-tst-g { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0; }
.mk-tst-g > div { display: flex; flex-direction: column; }
.mk-tst-g span, .mk-tst-g small { color: var(--text-2, var(--muted)); font-size: 12px; }
.mk-tst-g b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* ── 22. Atualizações › Preços (E20) ─────────────────────────────────────── */
.pr-nav { margin-bottom: 14px; }
.pr-topo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.pr-topo-n { font-variant-numeric: tabular-nums; color: var(--text-2, var(--muted)); font-size: 13px; }
.pr-topo .btn-primary, .pr-topo .btn-secondary { min-height: 36px; }
.pr-s { margin-bottom: 14px; }
.pr-hero { margin-bottom: 14px; }
.pr-hero-h { display: flex; gap: 14px; align-items: center; }
.pr-hero-h > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pr-hero-h b { font-size: 18px; }
.pr-hero-h span { color: var(--text-2, var(--muted)); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-hero-ic, .pr-modo-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--green, #34D399) 16%, transparent); color: var(--green, #34D399); flex: none; }
.pr-prog { margin-top: 14px; }
.pr-prog .ac-bar { height: 8px; }
.pr-prog-t { margin-top: 6px; font-size: 13px; color: var(--text-2, var(--muted)); font-variant-numeric: tabular-nums; }
.pr-prog-t b { color: var(--text); }
.pr-bts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.pr-bts .btn-primary, .pr-bts .btn-secondary, .pr-bts .btn-ghost { min-height: 40px; }
.pr-avisos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pr-aviso { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; background: var(--bg-1); border: 1px solid var(--line, rgba(127,127,127,.2)); }
.pr-aviso span { flex: 1; }
.pr-aviso.warn { border-color: color-mix(in srgb, var(--yellow) 45%, transparent); }
.pr-aviso.bad { border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.pr-cobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pr-cob { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line, rgba(127,127,127,.2)); background: var(--bg-1); cursor: pointer; font: inherit; color: inherit; border-left-width: 4px; }
.pr-cob span { font-size: 12.5px; color: var(--text-2, var(--muted)); }
.pr-cob b { font-size: 22px; font-variant-numeric: tabular-nums; }
.pr-cob b em { font-style: normal; font-size: 13px; color: var(--text-2, var(--muted)); font-weight: 500; }
.pr-cob small { font-size: 12px; color: var(--text-2, var(--muted)); }
.pr-cob.day { border-left-color: var(--green); } .pr-cob.week { border-left-color: #5B8CFF; } .pr-cob.old { border-left-color: var(--yellow); } .pr-cob.never { border-left-color: var(--red); }
.pr-cobbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin: 12px 0 4px; gap: 2px; }
.pr-cobbar i.day { background: var(--green); } .pr-cobbar i.week { background: #5B8CFF; } .pr-cobbar i.old { background: var(--yellow); } .pr-cobbar i.never { background: var(--red); }
.pr-old { display: flex; flex-direction: column; }
.pr-linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pr-lim-s b { font-size: 20px; }
.pr-modos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pr-modo { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line, rgba(127,127,127,.2)); background: var(--bg-1); cursor: pointer; }
.pr-modo input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.pr-modo.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.pr-modo-t { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.pr-modo-t small { color: var(--text-2, var(--muted)); font-size: 12.5px; }
.pr-modo-t select, .pr-modo-t .pr-ta { margin-top: 6px; width: 100%; }
.pr-modo-n { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-in { display: flex; gap: 8px; align-items: center; font-size: 12.5px; margin-top: 6px; }
.pr-in input { width: 90px; min-height: 34px; }
.pr-op { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.pr-op input { margin-top: 4px; }
.pr-op span { display: flex; flex-direction: column; gap: 2px; }
.pr-op small { color: var(--text-2, var(--muted)); font-size: 12.5px; }
.pr-it-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pr-it-bar input { flex: 1 1 260px; min-height: 38px; }
.pr-it-bar select { min-height: 38px; }
.pr-chips .fx-chip b { margin-left: 4px; }
.pr-tab-w { overflow-x: auto; }
.pr-tab { min-width: 860px; }
.pr-tab td { vertical-align: middle; }
.pr-tab .r { text-align: right; font-variant-numeric: tabular-nums; }
.pr-nm { max-width: 340px; }
.pr-nm small { display: block; color: var(--text-2, var(--muted)); font-size: 12px; }
.pr-lk { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.pr-lk:hover { text-decoration: underline; }
.pr-row .aj-ctl em { font-style: normal; color: var(--text-2, var(--muted)); font-size: 12.5px; margin: 0 4px; }
.pr-ritmo-h { margin-bottom: 14px; }
.pr-ritmo-h .pr-aviso, .pr-ritmo-h .mt-det { margin-top: 12px; }
.pr-fontes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pr-fonte { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line, rgba(127,127,127,.2)); background: var(--bg-1); }
.pr-fonte > div { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pr-fonte small { color: var(--text-2, var(--muted)); font-size: 12.5px; }
.pr-fonte:not(.on) { opacity: .7; }
.pr-prov { display: flex; flex-direction: column; }
.pr-det { margin-top: 10px; border-top: 1px solid var(--line, rgba(127,127,127,.2)); padding-top: 10px; }
.pr-det summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.pr-det .cfg-tab-panel { display: block; }
.pr-log { display: flex; flex-direction: column; max-height: 640px; overflow: auto; }
.pr-log-l { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.12)); font-size: 13px; }
.pr-log-h { font-variant-numeric: tabular-nums; color: var(--text-2, var(--muted)); flex: none; }
.pr-log-m { flex: 1; min-width: 0; }
.pr-log-m small { color: var(--text-2, var(--muted)); }
.pr-nota { margin-top: 10px; }
@media (max-width: 720px) { .pr-topo { justify-content: flex-start; } .pr-hero-h span { white-space: normal; } }
.mt-tab.pr-tab th:not(:first-child), .mt-tab.pr-tab td:not(:first-child) { text-align: left; }
.mt-tab.pr-tab th.r, .mt-tab.pr-tab td.r { text-align: right; }
.pr-tab th:first-child, .pr-tab td:first-child { width: 34px; }
.pr-s > .btn-secondary, .pr-s > .btn-primary { align-self: flex-start; width: auto; margin-top: 8px; }

/* ── Central 3.0, Etapa 5: regras com E/OU/NÃO, agenda e configuração por item ── */
.rg-se { display: flex; flex-direction: column; gap: 6px; padding-left: 32px; }
.rg-entao { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); font-weight: 600; letter-spacing: .02em; }
.rg-g { border-left: 2px solid var(--border); padding: 4px 0 4px 10px; display: flex; flex-direction: column; gap: 6px; }
.rg-g.raiz { border-left-color: var(--accent, #4c8bf5); }
.rg-gh { display: flex; align-items: center; gap: 8px; }
.rg-gh select { width: auto; }
.rg-c { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rg-c select, .rg-c input { width: auto; min-width: 90px; max-width: 220px; }
.rg-c .rg-v { width: 110px; min-width: 70px; }
.rg-c.nao > select, .rg-c.nao > input { opacity: .85; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--down, #e5484d) 60%, transparent); }
.rg-nao { border: 1px solid var(--border); background: transparent; color: var(--text-muted); border-radius: 6px; padding: 2px 7px; font-size: calc(11px * var(--tx, 1)); font-weight: 700; cursor: pointer; }
.rg-nao.on { background: var(--down, #e5484d); border-color: var(--down, #e5484d); color: #fff; }
.rg-opfixo { font-size: calc(12px * var(--tx, 1)); color: var(--text-muted); }
.rg-x { padding: 2px 8px; }
.rg-add { display: flex; gap: 6px; }
.rg-vazio { font-size: calc(12px * var(--tx, 1)); color: var(--text-muted); }
.rg-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-left: 32px; }
.rg-pr { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--tx, 1)); }
.rg-pr select { width: auto; }
.rg-ac { display: inline-flex; align-items: center; gap: 5px; font-size: calc(12.5px * var(--tx, 1)); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.rg-ac.on { border-color: var(--accent, #4c8bf5); background: color-mix(in srgb, var(--accent, #4c8bf5) 12%, transparent); }
.rg-vers, .rg-evs { display: flex; flex-direction: column; gap: 6px; }
.rg-ver, .rg-ev { display: grid; grid-template-columns: 52px 150px 1fr auto; gap: 10px; align-items: center; font-size: calc(12.5px * var(--tx, 1)); }
.rg-ev { grid-template-columns: 150px 160px 140px 1fr; }
.rg-mot { color: var(--text-muted); }
.ag-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.ag-nav { display: flex; align-items: center; gap: 6px; }
.ag-nav span { min-width: 180px; text-align: center; font-weight: 600; text-transform: capitalize; }
.ag-li { display: flex; gap: 12px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: calc(13px * var(--tx, 1)); }
.ag-q { color: var(--text-muted); min-width: 150px; font-variant-numeric: tabular-nums; }
.ag-h3 { margin: 16px 0 6px; font-size: calc(13px * var(--tx, 1)); }
.ag-lacos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 16px; }
.ag-barras { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.ag-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.ag-bar i { display: block; width: 100%; background: var(--accent, #4c8bf5); border-radius: 3px 3px 0 0; min-height: 2px; }
.ag-bar span { font-size: 10px; color: var(--text-muted); }
.ag-dia { display: flex; flex-direction: column; }
.ag-hr { display: grid; grid-template-columns: 56px 1fr; gap: 8px; border-bottom: 1px solid var(--border); padding: 4px 0; min-height: 22px; }
.ag-hr span { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ag-hr em, .ag-col em { font-style: normal; display: inline-block; background: var(--bg-2, rgba(127,127,127,.12)); border-radius: 6px; padding: 1px 7px; margin: 0 6px 4px 0; font-size: calc(12px * var(--tx, 1)); }
.ag-sem { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ag-col { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px; min-height: 120px; }
.ag-mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ag-mes > b { text-align: center; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
.ag-cel { border: 1px solid var(--border); border-radius: 8px; min-height: 54px; padding: 4px 6px; display: flex; justify-content: space-between; align-items: flex-start; }
.ag-cel.fora { opacity: .4; }
.ag-cel em { font-style: normal; background: var(--accent, #4c8bf5); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; }
.ag-linha { position: relative; display: flex; flex-direction: column; gap: 6px; padding-bottom: 18px; }
.ag-ln { display: grid; grid-template-columns: 160px 1fr; gap: 10px; align-items: center; }
.ag-trilho { position: relative; height: 14px; background: var(--bg-2, rgba(127,127,127,.12)); border-radius: 7px; }
.ag-trilho i { position: absolute; top: 2px; width: 4px; height: 10px; margin-left: -2px; background: var(--accent, #4c8bf5); border-radius: 2px; }
.ag-escala { position: relative; height: 14px; margin-left: 170px; }
.ag-escala span { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--text-muted); }
.ag-rt { border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px 10px; margin-bottom: 6px; }
.ag-rt summary { display: flex; gap: 12px; align-items: baseline; cursor: pointer; }
.ag-rt summary span { color: var(--text-muted); font-size: calc(12.5px * var(--tx, 1)); }
.ag-form { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.ag-form label { display: flex; flex-direction: column; gap: 4px; font-size: calc(12px * var(--tx, 1)); color: var(--text-muted); }
.ag-dias { display: flex; flex-wrap: wrap; gap: 10px; }
.ag-dias label { flex-direction: row; align-items: center; gap: 4px; color: inherit; }
.ag-bt { display: flex; gap: 8px; }
.cf-ctx { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cf-ctx select { width: auto; }
.cf-ctx input { flex: 1; min-width: 220px; }
.cf-ac { display: flex; gap: 6px; justify-content: flex-end; }
.cf-ac input { width: 90px; }
.cf-dif td { background: color-mix(in srgb, var(--accent, #4c8bf5) 8%, transparent); }
@media (max-width: 760px) { .ag-sem { grid-template-columns: 1fr; } .rg-ver, .rg-ev { grid-template-columns: 1fr; } .ag-ln { grid-template-columns: 1fr; } .ag-escala { margin-left: 0; } }

/* ── Central 3.0, Etapa 10: área Atualizações (cantos de 4 px, espaçamento em múltiplos de 8, ícones grandes) ── */
.view.c3 { --c3r: 4px; --c3g: 8px; }
.c3 .c3-corpo { display: flex; flex-direction: column; gap: calc(var(--c3g) * 2); }
.c3-modo { display: inline-flex; border: 1px solid var(--border); border-radius: var(--c3r, 4px); overflow: hidden; }
.c3-modo button { border: 0; background: transparent; color: var(--text-secondary); padding: 6px 12px; font-size: calc(12.5px * var(--tx, 1)); cursor: pointer; }
.c3-modo button.on { background: var(--a-atualizacoes, var(--accent)); color: #fff; }
.c3-card { border: 1px solid var(--border); border-radius: var(--c3r); background: var(--bg-2, rgba(127,127,127,.04)); padding: 16px; }
.c3-card > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.c3-card > header h3 { margin: 0; font-size: calc(13px * var(--tx, 1)); letter-spacing: .02em; text-transform: uppercase; color: var(--text-secondary); }
.c3-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.c3-kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.c3-kpi { display: flex; gap: 8px; align-items: center; min-width: 136px; padding: 8px 16px 8px 8px; border: 1px solid var(--border); border-radius: var(--c3r); }
.c3-kpi > div { display: flex; flex-direction: column; }
.c3-kpi b { font-size: calc(20px * var(--tx, 1)); font-variant-numeric: tabular-nums; line-height: 1.2; }
.c3-kpi span { font-size: calc(12px * var(--tx, 1)); color: var(--text-secondary); }
.c3-kpi small { font-size: calc(11px * var(--tx, 1)); color: var(--text-muted); }
.c3-kpi-ic { color: var(--a-atualizacoes, var(--accent)); display: flex; }
.c3-kpi.t-bom b, .t-bom > .c3-ess-ic { color: var(--green); }
.c3-kpi.t-aviso b { color: var(--yellow); }
.c3-kpi.t-erro b { color: var(--red); }
.c3-chip { display: inline-block; padding: 1px 8px; border-radius: var(--c3r, 4px); border: 1px solid var(--border); font-size: calc(11.5px * var(--tx, 1)); white-space: nowrap; color: var(--text-secondary); }
.c3-chip.t-bom { border-color: color-mix(in srgb, var(--green) 50%, transparent); color: var(--green); }
.c3-chip.t-aviso { border-color: color-mix(in srgb, var(--yellow) 50%, transparent); color: var(--yellow); }
.c3-chip.t-erro { border-color: color-mix(in srgb, var(--red) 50%, transparent); color: var(--red); }
.c3-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.c3-lista li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: calc(13px * var(--tx, 1)); }
.c3-lista li:last-child { border-bottom: 0; }
.c3-lista li > span { color: var(--text-secondary); flex: 1; min-width: 160px; }
.c3-prob li.t-erro { border-left: 3px solid var(--red); padding-left: 8px; }
.c3-prob li.t-aviso { border-left: 3px solid var(--yellow); padding-left: 8px; }
.c3-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-align: left; }
.c3-link:hover, .c3-link:focus-visible { text-decoration: underline; }
.c3-vazio { color: var(--text-muted); font-size: calc(13px * var(--tx, 1)); padding: 8px 0; }
.c3-ok { color: var(--green); margin: 0; }
.c3-erro { color: var(--red); margin: 0 0 8px; }
.c3-nota { color: var(--text-muted); font-size: calc(12px * var(--tx, 1)); margin: 8px 0 0; }
.c3-motivo { margin: 8px 0 0; padding: 8px; border-left: 3px solid var(--yellow); background: color-mix(in srgb, var(--yellow) 8%, transparent); border-radius: 0 var(--c3r) var(--c3r) 0; }
.c3-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.c3-estado { font-size: calc(12px * var(--tx, 1)); color: var(--green); }
.c3-filtros, .c3-periodo { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.c3-filtros label, .c3-periodo label, .c3-nr label { display: flex; flex-direction: column; gap: 4px; font-size: calc(11.5px * var(--tx, 1)); color: var(--text-secondary); }
.c3-periodo { margin-top: 8px; align-items: end; }
.c3-inl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c3-inl select, .c3-inl input { width: auto; }
.c3-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--c3r); overflow: hidden; }
.c3-seg button { border: 0; background: transparent; color: var(--text-secondary); padding: 8px 16px; cursor: pointer; }
.c3-seg button.on { background: var(--a-atualizacoes, var(--accent)); color: #fff; }
/* tabela */
.c3-tb-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.c3-tb-barra select, .c3-tb-barra input { width: auto; min-width: 120px; }
.c3-tb-busca { min-width: 200px !important; }
.c3-tb-cols { position: relative; }
.c3-tb-cols summary { cursor: pointer; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--c3r); list-style: none; font-size: calc(12.5px * var(--tx, 1)); }
.c3-tb-cols > div { position: absolute; z-index: 30; top: 100%; left: 0; background: var(--bg-1, #111); border: 1px solid var(--border); border-radius: var(--c3r); padding: 8px; display: grid; gap: 4px; min-width: 200px; max-height: 320px; overflow: auto; }
.c3-tb-cols label { display: flex; gap: 8px; align-items: center; font-size: calc(12.5px * var(--tx, 1)); }
.c3-tb-selinfo { font-size: calc(12px * var(--tx, 1)); color: var(--text-secondary); }
.c3-tb-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: var(--c3r); }
.c3-tb { width: 100%; border-collapse: collapse; font-size: calc(12.5px * var(--tx, 1)); table-layout: auto; }
.c3-tb th, .c3-tb td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.c3-tb th { position: sticky; top: 0; background: var(--bg-1, #111); z-index: 2; white-space: nowrap; }
.c3-tb th .c3-tb-ord { background: none; border: 0; color: var(--text-secondary); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.c3-tb th { position: sticky; }
.c3-tb-res { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; }
.c3-tb th[data-k] { position: sticky; }
.c3-tb .r { text-align: right; font-variant-numeric: tabular-nums; }
.c3-tb tr.sel td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.c3-tb tr.c3-tb-g td { background: color-mix(in srgb, var(--text-muted) 10%, transparent); font-weight: 600; }
.c3-tb-ck { width: 28px; }
.c3-tb-pag { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; font-size: calc(12px * var(--tx, 1)); color: var(--text-secondary); }
.c3-tb-pag select { width: auto; }
/* painel personalizável */
.c3-painel-barra { display: flex; gap: 8px; justify-content: flex-end; }
.c3-painel-barra select { width: auto; }
.c3-painel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.c3-w.w2 { grid-column: span 2; } .c3-w.w3 { grid-column: span 3; }
.c3-painel.editando .c3-card { outline: 1px dashed var(--border-strong, var(--border)); }
.c3-w-ctl { display: inline-flex; gap: 4px; }
.c3-w-ctl button { border: 1px solid var(--border); background: transparent; color: var(--text-secondary); border-radius: var(--c3r); width: 28px; height: 28px; cursor: pointer; }
.c3-spark { width: 100%; height: 40px; color: var(--a-atualizacoes, var(--accent)); display: block; }
.c3-evol { display: grid; gap: 8px; }
.c3-evol span { font-size: calc(11.5px * var(--tx, 1)); color: var(--text-muted); }
/* modo essencial */
.c3-ess-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.c3-ess { display: flex; gap: 16px; border: 1px solid var(--border); border-radius: var(--c3r); padding: 16px; }
.c3-ess.t-erro { border-color: color-mix(in srgb, var(--red) 60%, transparent); }
.c3-ess.t-aviso { border-color: color-mix(in srgb, var(--yellow) 60%, transparent); }
.c3-ess-ic { width: 64px; height: 64px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 0; cursor: pointer; background: color-mix(in srgb, var(--a-atualizacoes, var(--accent)) 16%, transparent); color: var(--a-atualizacoes, var(--accent)); }
.c3-ess-c { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.c3-ess-c > b { font-size: calc(15px * var(--tx, 1)); }
.c3-ess-m { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: calc(12.5px * var(--tx, 1)); }
.c3-ess-m > span { flex: 1; min-width: 120px; }
.c3-ess-m small { flex-basis: 100%; color: var(--text-muted); }
.c3-barra { height: 6px; background: color-mix(in srgb, var(--text-muted) 20%, transparent); border-radius: 3px; overflow: hidden; }
.c3-barra.grande { height: 10px; margin-top: 8px; }
.c3-barra i { display: block; height: 100%; background: var(--a-atualizacoes, var(--accent)); }
.c3-sw { position: relative; display: inline-block; width: 40px; height: 24px; flex: none; }
.c3-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.c3-sw span { position: absolute; inset: 0; background: color-mix(in srgb, var(--text-muted) 35%, transparent); border-radius: 12px; transition: background .15s; cursor: pointer; }
.c3-sw span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .15s; }
.c3-sw input:checked + span { background: var(--green); }
.c3-sw input:checked + span::after { transform: translateX(16px); }
.c3-sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* motores */
.c3-motores { display: flex; flex-wrap: wrap; gap: 8px; }
.c3-mchip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--c3r); background: transparent; color: inherit; cursor: pointer; }
.c3-mchip small { color: var(--text-muted); }
.c3-mchip.on { border-color: var(--a-atualizacoes, var(--accent)); box-shadow: inset 0 -2px 0 var(--a-atualizacoes, var(--accent)); }
.c3-mchip.t-erro small { color: var(--red); } .c3-mchip.t-aviso small { color: var(--yellow); } .c3-mchip.t-bom small { color: var(--green); }
.c3-abas { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border); }
.c3-abas button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 16px; color: var(--text-secondary); cursor: pointer; font-size: calc(13px * var(--tx, 1)); }
.c3-abas button.on { color: var(--text-primary); border-bottom-color: var(--a-atualizacoes, var(--accent)); }
.c3-abas button:focus-visible, .c3-ferr-b:focus-visible, .c3-modo-b:focus-visible, .c3-mchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#c3Aba { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.c3-filtro-at { font-size: calc(12.5px * var(--tx, 1)); color: var(--text-secondary); }
.c3-grafo { overflow: auto; }
.c3-grafo rect { fill: var(--bg-1, #111); stroke: var(--border-strong, var(--border)); }
.c3-grafo .c3-no { cursor: pointer; } .c3-grafo .c3-no:hover rect, .c3-grafo .c3-no:focus rect { stroke: var(--accent); }
.c3-grafo text { fill: var(--text-primary); font-size: 12px; } .c3-grafo text.s { fill: var(--text-muted); font-size: 10.5px; }
.c3-setas path { fill: none; stroke: var(--text-muted); stroke-width: 1.5; } #c3seta path { fill: var(--text-muted); }
.c3-modos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.c3-modo-b { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border: 1px solid var(--border); border-radius: var(--c3r); background: transparent; color: inherit; cursor: pointer; }
.c3-modo-b span { color: var(--text-secondary); font-size: calc(12px * var(--tx, 1)); }
.c3-modo-b.on { border-color: var(--a-atualizacoes, var(--accent)); box-shadow: inset 3px 0 0 var(--a-atualizacoes, var(--accent)); }
.c3-modo-b:disabled { opacity: .5; cursor: default; }
.c3-ferr { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.c3-ferr-b { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 16px; border: 1px solid var(--border); border-radius: var(--c3r); background: transparent; color: inherit; cursor: pointer; }
.c3-ferr-b > span { color: var(--text-secondary); font-size: calc(12px * var(--tx, 1)); }
.c3-res { margin: 0; font-size: calc(12.5px * var(--tx, 1)); }
dl.c3-res { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
dl.c3-res dt { color: var(--text-secondary); }
dl.c3-res dd { margin: 0; overflow-wrap: anywhere; }
.c3-pre { max-height: 360px; overflow: auto; background: var(--bg-1, #111); border: 1px solid var(--border); border-radius: var(--c3r); padding: 8px; font-size: 11.5px; white-space: pre-wrap; }
.c3-evs { display: flex; flex-direction: column; font-size: calc(12px * var(--tx, 1)); }
.c3-evs > div { display: grid; grid-template-columns: 56px 200px 100px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.c3-evs code { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c3-nregras { display: flex; flex-direction: column; gap: 8px; }
.c3-nr { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 8px; border: 1px solid var(--border); border-radius: var(--c3r); }
.c3-nr input.unrec-input, .c3-nr select { width: auto; }
.c3-nr-nome { min-width: 220px; }
.c3-orig-modal { margin-top: 16px; border: 1px solid var(--border); border-radius: 4px; padding: 8px 16px; }
.c3-orig-modal summary { cursor: pointer; font-weight: 600; }
.c3-origem td small { display: block; color: var(--text-muted); }
@media (max-width: 900px) { .c3-painel { grid-template-columns: 1fr; } .c3-w.w2, .c3-w.w3 { grid-column: auto; } .c3-evs > div { grid-template-columns: 1fr; } }
.c3-flags { display: flex; flex-direction: column; gap: 8px; }
.c3-flag { display: grid; grid-template-columns: 260px 1fr auto; gap: 8px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.c3-flag > span { color: var(--text-secondary); font-size: calc(12px * var(--tx, 1)); }
.c3-card h4 { margin: 16px 0 8px; font-size: calc(13px * var(--tx, 1)); }
@media (max-width: 900px) { .c3-flag { grid-template-columns: 1fr; } }
