/* ==========================================================================
   XD FPS ADMIN — folha de estilo única
   Preto, azul, branco. Sem estilo inline em lugar nenhum: a Content Security
   Policy do painel bloqueia `style="..."`, então tudo é classe daqui.
   ========================================================================== */

:root {
  /* Superfícies — do mais fundo ao mais alto */
  --void: #05070c;
  --surface: #0a0e16;
  --surface-2: #0f1420;
  --surface-3: #141b29;
  --line: #18202f;
  --line-lit: #223049;

  /* Marca */
  --blue: #2f6bff;
  --blue-lit: #63a0ff;
  --blue-deep: #16327d;

  /* Texto */
  --text: #eef3fb;
  --text-2: #8b9ab4;
  --text-3: #5a6b85;

  /* Cores de dado — significado, nunca decoração */
  --ok: #22c98a;
  --warn: #f0a742;
  --bad: #ff4d63;
  --info: #63a0ff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(900px 520px at 88% -12%, rgba(47, 107, 255, .10), transparent 62%),
    linear-gradient(180deg, #070a11 0%, var(--void) 40%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue-lit);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- Tipografia de números ------------------------------------------------
   Toda cifra usa numeral tabular. É o que faz colunas de dinheiro alinharem
   dígito com dígito — a razão de existir de um painel financeiro.           */
.money, td .money, .metric-value, .kpi-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
  letter-spacing: -.02em;
}

.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ==========================================================================
   Estrutura
   ========================================================================== */
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(7, 10, 17, .92);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

/* Dimensões travadas nos dois eixos: a logo nunca escapa do lugar,
   mesmo se o CSS chegar antes da imagem. */
.brand-logo {
  display: block;
  width: 38px; height: 38px;
  min-width: 38px; max-width: 38px;
  min-height: 38px; max-height: 38px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-lit);
}

.brand-name { font-size: 13px; font-weight: 800; letter-spacing: .08em; display: block; }
.brand-sub { font-size: 8.5px; letter-spacing: .2em; color: var(--text-3); display: block; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 20px; }

.nav a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-2);
  transition: background .16s, color .16s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }

.nav a.active {
  background: linear-gradient(90deg, rgba(47, 107, 255, .16), rgba(47, 107, 255, .03));
  color: #dce7ff;
}
.nav a.active::before {
  content: "";
  position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 2px; border-radius: 2px;
  background: var(--blue-lit);
}

.nav-icon { width: 15px; text-align: center; opacity: .8; font-size: 13px; }

.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }

.session-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; color: var(--text-3); margin-bottom: 10px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.logout {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line-lit);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: .16s;
}
.logout:hover { color: var(--text); border-color: #2e405f; background: var(--surface-3); }

.main { padding: 26px 30px 64px; min-width: 0; }

.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 22px;
}
.topbar h1 { margin: 6px 0 0; font-size: 26px; letter-spacing: -.035em; font-weight: 700; }
.topbar-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); }

.user-pill {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 30px;
  flex-shrink: 0;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-deep), #24305c);
  color: #b6cdff; font-weight: 800; font-size: 12px;
}
.user-email { display: block; font-size: 11.5px; font-weight: 600; }
.user-role { display: block; font-size: 8.5px; letter-spacing: .14em; color: var(--text-3); text-transform: uppercase; }

/* ==========================================================================
   Painéis
   ========================================================================== */
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 4px 0 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.panel-head h3 { margin: 0; font-size: 13px; font-weight: 650; }
.panel-body { padding: 16px 18px; }
.panel-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ==========================================================================
   Métricas
   ========================================================================== */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  position: relative;
  padding: 15px 16px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
/* Trilho lateral: a cor diz a direção do dinheiro sem precisar ler o rótulo. */
.metric::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--line-lit);
}
.metric.is-gross::before { background: var(--blue); }
.metric.is-net::before { background: var(--ok); }
.metric.is-refund::before { background: var(--warn); }
.metric.is-chargeback::before { background: var(--bad); }
.metric.is-recovered::before { background: var(--ok); }

.metric-label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
}
.metric-value {
  display: block; margin: 9px 0 5px;
  font-size: 25px; font-weight: 700;
}
.metric-note { display: block; font-size: 11px; color: var(--text-2); line-height: 1.45; }

.metric.is-net .metric-value { color: #6fe4b4; }
.metric.is-refund .metric-value { color: #ffc978; }
.metric.is-chargeback .metric-value { color: #ff8593; }

/* --- Assinatura: a barra de composição do faturamento --------------------
   Uma barra fixa mostrando o bruto se dividindo em líquido + perdas.
   Aparece sempre, na mesma largura, então a forma de um mês bom e a de um
   mês ruim viram reconhecíveis de relance.                                  */
.ledger {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.ledger-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 15px;
}
.ledger-figure { display: block; font-size: 34px; font-weight: 750; letter-spacing: -.045em; margin-top: 6px; }
.ledger-arrow { color: var(--text-3); font-size: 13px; padding-bottom: 8px; }
.ledger-net { text-align: right; }
.ledger-net .ledger-figure { color: #6fe4b4; font-size: 28px; }
.split-chart { display: block; width: 100%; height: 30px; }

.ledger-legend {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 13px; font-size: 11px; color: var(--text-2);
}
.ledger-legend span { display: flex; align-items: center; gap: 7px; }
.swatch { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.swatch-net { background: var(--ok); }
.swatch-refund { background: var(--warn); }
.swatch-chargeback { background: var(--bad); }
.swatch-gross { background: var(--blue); }

/* ==========================================================================
   Gráficos
   ========================================================================== */
.chart { display: block; width: 100%; height: auto; }
.chart-wrap { padding: 14px 16px 8px; }
.chart-axis { fill: #55657e; font-size: 9px; font-family: var(--mono); }
.chart-empty { fill: var(--text-3); font-size: 12px; font-family: var(--sans); }

.chart-legend { display: flex; gap: 14px; font-size: 10px; color: var(--text-2); }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 12px; height: 2px; border-radius: 2px; }
.legend-gross { background: #3b7bff; }
.legend-net { background: #22c98a; }
.legend-loss { background: #ff4d63; }

.chart-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* ==========================================================================
   Tabelas
   ========================================================================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }

th {
  text-align: left; padding: 10px 16px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-top: 1px solid #131a27;
  font-size: 12.5px; color: var(--text-2);
  vertical-align: top;
}
tbody tr:hover td { background: rgba(20, 27, 41, .55); }
td strong { color: var(--text); font-weight: 600; }
td small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--text-3); }
td a:hover strong { color: var(--blue-lit); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { text-align: center; padding: 46px 16px; color: var(--text-3); }
.empty strong { display: block; margin-bottom: 5px; }

/* ==========================================================================
   Badges e etiquetas
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 20px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  white-space: nowrap;
}
.badge.ok { background: rgba(34, 201, 138, .10); color: #6fe4b4; border: 1px solid rgba(34, 201, 138, .24); }
.badge.warn { background: rgba(240, 167, 66, .10); color: #ffc978; border: 1px solid rgba(240, 167, 66, .24); }
.badge.bad { background: rgba(255, 77, 99, .10); color: #ff8593; border: 1px solid rgba(255, 77, 99, .26); }
.badge.info { background: rgba(99, 160, 255, .10); color: #9dc2ff; border: 1px solid rgba(99, 160, 255, .24); }
.badge.muted { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line-lit); }

.tag {
  display: inline-flex; padding: 3px 7px; border-radius: 6px;
  font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--surface-3); color: #9db5e5; border: 1px solid var(--line-lit);
}

.text-ok { color: #6fe4b4; }
.text-warn { color: #ffc978; }
.text-bad { color: #ff8593; }
.text-muted { color: var(--text-3); }

/* ==========================================================================
   Botões, filtros e formulários
   ========================================================================== */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #fff; font-size: 12px; font-weight: 650;
  cursor: pointer; transition: .16s;
}
.button:hover { background: #4a80ff; }
.button.ghost { background: var(--surface-2); border-color: var(--line-lit); color: var(--text-2); }
.button.ghost:hover { background: var(--surface-3); color: var(--text); }
.button.tiny { padding: 5px 10px; font-size: 11px; }

.search { display: flex; gap: 7px; }
.search input, .field input, .field select {
  width: 100%;
  background: var(--void);
  border: 1px solid var(--line-lit);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 12.5px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.search input { min-width: 260px; }
.search input:focus, .field input:focus, .field select:focus {
  border-color: #3d63b8;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}
.search input::placeholder { color: var(--text-3); }

.filters {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.filters-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3);
  padding: 0 6px 0 4px;
}
.filters a {
  padding: 6px 10px; border-radius: 7px;
  font-size: 11px; font-weight: 650; color: var(--text-2);
  border: 1px solid transparent; transition: .16s;
}
.filters a:hover { background: var(--surface-2); color: var(--text); }
.filters a.active { background: rgba(47, 107, 255, .14); color: #cfe0ff; border-color: rgba(47, 107, 255, .32); }
.filters-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--text-3);
}
.pagination .pages { display: flex; gap: 6px; }

/* ==========================================================================
   Ficha do cliente e do pedido
   ========================================================================== */
.hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 26px; flex-wrap: wrap;
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.hero h2 { margin: 6px 0 6px; font-size: 25px; letter-spacing: -.035em; }
.hero-contact { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.hero-contact a:hover { color: var(--blue-lit); }
.hero-figures { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-figure { text-align: right; }
.hero-figure span { display: block; font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--text-3); }
.hero-figure strong { display: block; margin-top: 5px; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.data-list { margin: 0; padding: 4px 18px 12px; }
.data-list > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid #131a27;
}
.data-list > div:last-child { border-bottom: 0; }
.data-list dt { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.data-list dd { margin: 0; font-size: 12.5px; color: var(--text); text-align: right; word-break: break-word; }

/* --- Trilha do pedido -----------------------------------------------------
   A regra "nunca apagar a história financeira" fica visível: a venda original
   permanece como o primeiro nó e cada evento entra abaixo, em ordem.        */
.trail { padding: 6px 18px 16px; position: relative; }
.trail::before {
  content: ""; position: absolute;
  left: 24px; top: 18px; bottom: 26px;
  width: 1px; background: var(--line-lit);
}
.trail-item { position: relative; display: flex; gap: 16px; padding: 12px 0; }
.trail-mark {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 13px; height: 13px; margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--void);
  background: var(--line-lit);
}
.trail-mark.ok { background: var(--ok); }
.trail-mark.warn { background: var(--warn); }
.trail-mark.bad { background: var(--bad); }
.trail-mark.info { background: var(--info); }
.trail-body { flex: 1; min-width: 0; }
.trail-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.trail-meta { margin-top: 4px; font-size: 11px; color: var(--text-3); }
.trail-amount { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ==========================================================================
   Integrações
   ========================================================================== */
.integration {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.integration:last-child { border-bottom: 0; }
.integration-name { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; }
.integration-note { margin: 6px 0 0; font-size: 11.5px; color: var(--text-3); }
.integration-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stat span { display: block; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.stat strong { display: block; margin-top: 4px; font-size: 14px; font-variant-numeric: tabular-nums; }

.callout {
  display: flex; gap: 11px;
  padding: 13px 15px; margin: 0 18px 16px;
  border: 1px solid rgba(240, 167, 66, .22);
  background: rgba(240, 167, 66, .06);
  border-radius: var(--radius-sm);
  font-size: 12px; color: #ffd9a3; line-height: 1.55;
}

/* ==========================================================================
   Login
   ========================================================================== */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 60px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 32px;
}

.login-pitch { max-width: 470px; }
.login-logo {
  display: block;
  width: 84px; height: 84px;
  min-width: 84px; max-width: 84px;
  min-height: 84px; max-height: 84px;
  object-fit: contain;
  border-radius: 20px;
  border: 1px solid var(--line-lit);
  background: var(--surface);
  margin-bottom: 26px;
}
.login-pitch h1 { font-size: 40px; line-height: 1.08; letter-spacing: -.045em; margin: 10px 0 16px; }
.login-pitch p { color: var(--text-2); font-size: 14px; line-height: 1.65; margin: 0; }

.login-facts { display: flex; flex-direction: column; gap: 9px; margin-top: 28px; }
.login-facts span { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--text-2); }

.login-card {
  border: 1px solid var(--line-lit);
  background: var(--surface);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.login-card h2 { margin: 8px 0 4px; font-size: 20px; letter-spacing: -.02em; }
.login-card > p { margin: 0 0 22px; font-size: 12px; color: var(--text-3); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; color: var(--text-2); margin-bottom: 6px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 62px; }
.toggle-password {
  position: absolute; right: 6px; top: 6px;
  padding: 4px 8px; border: 0; border-radius: 6px;
  background: var(--surface-3); color: var(--text-2);
  font-size: 10px; cursor: pointer;
}
.toggle-password:hover { color: var(--text); }
.login-card .button { width: 100%; margin-top: 8px; padding: 11px; font-size: 13px; }
.login-hint { display: block; margin-top: 14px; text-align: center; font-size: 10px; color: var(--text-3); }

.alert {
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid rgba(255, 77, 99, .26);
  background: rgba(255, 77, 99, .08);
  color: #ff9aa6;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* ==========================================================================
   Página de erro
   ========================================================================== */
.error-page {
  min-height: 100vh; display: grid; place-items: center; padding: 40px; text-align: center;
}
.error-code { font-size: 78px; font-weight: 800; letter-spacing: -.06em; color: var(--surface-3); line-height: 1; }
.error-page h1 { font-size: 24px; margin: 14px 0 8px; letter-spacing: -.03em; }
.error-page p { color: var(--text-2); font-size: 13.5px; margin: 0 0 24px; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1280px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .brand { padding-bottom: 14px; }
  .nav { flex-direction: row; overflow-x: auto; margin-top: 14px; padding-bottom: 4px; }
  .nav a { white-space: nowrap; }
  .nav a.active::before { top: auto; bottom: 0; left: 12px; right: 12px; width: auto; height: 2px; }
  .sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
  .logout { width: auto; padding: 8px 14px; }
  .main { padding: 20px 18px 48px; }
  .login-page { grid-template-columns: 1fr; max-width: 460px; gap: 30px; padding: 32px 20px; }
  .login-pitch { display: none; }
  .chart-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .metrics, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .user-pill { display: none; }
  .panel-head { flex-direction: column; align-items: stretch; }
  .search input { min-width: 0; }
  .hero-figures { gap: 18px; }
  .hero-figure { text-align: left; }
  .ledger-figure { font-size: 27px; }
  .ledger-arrow { display: none; }
  .ledger-net { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .sidebar, .panel-actions, .filters, .pagination { display: none; }
  body { background: #fff; color: #000; }
}

/* ========================================================================== 
   XD FPS ADMIN 4.0 — CINEMATIC COMMAND CENTER
   Camada visual de produção. Mantém as classes legadas das telas internas,
   mas eleva contraste, alinhamento, densidade e leitura da dashboard.
   ========================================================================== */

:root {
  --void: #03060b;
  --surface: #080d15;
  --surface-2: #0b111c;
  --surface-3: #101827;
  --line: #162134;
  --line-lit: #22324e;
  --blue: #4c7cff;
  --blue-lit: #7fa4ff;
  --blue-deep: #172c66;
  --text: #f4f7fd;
  --text-2: #91a0ba;
  --text-3: #596a86;
  --ok: #2bd59b;
  --warn: #f4ad4d;
  --bad: #ff5d73;
  --info: #72a2ff;
  --cyan: #45c8e8;
  --violet: #8c76ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 26px 80px rgba(0, 0, 0, .46);
}

html { color-scheme: dark; }

body {
  background:
    radial-gradient(900px 500px at 84% -10%, rgba(69, 102, 255, .13), transparent 66%),
    radial-gradient(760px 440px at 18% 18%, rgba(30, 79, 170, .08), transparent 68%),
    linear-gradient(180deg, #050913 0%, #03060b 42%, #02050a 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 82%);
  z-index: -1;
}

.shell { grid-template-columns: 218px minmax(0, 1fr); }

.sidebar {
  padding: 20px 14px;
  background:
    linear-gradient(180deg, rgba(7, 12, 22, .96), rgba(4, 8, 15, .94)),
    radial-gradient(360px 260px at 10% 0%, rgba(76,124,255,.08), transparent 70%);
  border-right-color: rgba(62, 82, 118, .24);
  box-shadow: 18px 0 55px rgba(0, 0, 0, .16);
}

.brand {
  padding: 2px 3px 20px;
  border-bottom-color: rgba(62, 82, 118, .22);
}

.brand-logo {
  width: 40px; height: 40px; min-width: 40px; max-width: 40px;
  min-height: 40px; max-height: 40px;
  border-radius: 12px;
  border-color: rgba(93, 128, 194, .35);
  box-shadow: 0 8px 24px rgba(30, 75, 170, .16), inset 0 0 20px rgba(87,126,255,.06);
}

.brand-name { font-size: 12.5px; letter-spacing: .09em; }
.brand-sub { color: #526683; font-size: 8px; }

.nav { gap: 4px; margin-top: 18px; }
.nav a {
  min-height: 39px;
  padding: 9px 11px;
  color: #8291aa;
  border: 1px solid transparent;
}
.nav a:hover {
  background: rgba(15, 24, 39, .76);
  border-color: rgba(44, 62, 92, .35);
}
.nav a.active {
  background: linear-gradient(90deg, rgba(74, 119, 255, .16), rgba(21, 39, 76, .05));
  border-color: rgba(67, 101, 172, .18);
  color: #edf3ff;
  box-shadow: inset 0 0 28px rgba(76,124,255,.035);
}
.nav a.active::before {
  width: 3px;
  box-shadow: 0 0 14px rgba(95, 139, 255, .65);
}
.nav-icon { color: #7186a9; }

.sidebar-foot { border-top-color: rgba(62, 82, 118, .22); }
.logout {
  background: rgba(14, 22, 36, .76);
  border-color: rgba(46, 67, 103, .5);
}

.main {
  width: 100%;
  max-width: 1780px;
  margin: 0 auto;
  padding: 24px 28px 64px;
}

.topbar {
  align-items: center;
  margin-bottom: 18px;
}
.topbar h1 {
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 720;
  letter-spacing: -.043em;
}
.topbar-sub { color: #7f8da6; font-size: 12.5px; }

.user-pill {
  padding: 5px 12px 5px 5px;
  border-color: rgba(57, 77, 111, .34);
  background: rgba(8, 13, 22, .66);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.avatar {
  background: linear-gradient(145deg, #1c3f91, #1b2645);
  box-shadow: inset 0 0 18px rgba(100,146,255,.14);
}

.panel,
.ledger,
.metric,
.hero {
  border-color: rgba(44, 62, 92, .62);
  background: linear-gradient(180deg, rgba(10,16,27,.96), rgba(7,12,20,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.012);
}

.panel { overflow: hidden; }
.panel-head { border-bottom-color: rgba(39, 56, 85, .52); }
.panel-head h2 { color: #eff4fc; }
.table-wrap { background: rgba(5, 9, 16, .28); }
th { background: rgba(11, 17, 29, .92); }
td { border-top-color: rgba(29, 42, 65, .5); }
tbody tr:hover td { background: rgba(16, 26, 43, .58); }

/* --- Command hero ------------------------------------------------------- */
.command-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 112px;
  margin-bottom: 14px;
  padding: 22px 24px;
  /* O calendário é um popover absoluto e precisa escapar do hero. */
  overflow: visible;
  z-index: 40;
  border: 1px solid rgba(54, 78, 120, .55);
  border-radius: 18px;
  background:
    radial-gradient(640px 210px at 84% 20%, rgba(76, 124, 255, .18), transparent 72%),
    linear-gradient(118deg, rgba(10, 18, 31, .98), rgba(8, 15, 27, .96) 56%, rgba(15, 28, 57, .92));
  box-shadow: 0 18px 54px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.025);
}
.command-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .4;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0 68%, rgba(255,255,255,.018) 68% 68.15%, transparent 68.15%);
}
.command-hero-copy h2 {
  margin: 7px 0 5px;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -.04em;
}
.command-hero-copy p { margin: 0; color: #7f8da5; font-size: 12px; }
.live-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7687a5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px rgba(43,213,155,.75);
}
.dashboard-filter-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.period-switch {
  display: flex;
  flex-shrink: 0;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(43, 60, 92, .65);
  border-radius: 11px;
  background: rgba(4, 8, 15, .54);
}
.period-switch a {
  min-width: 42px;
  padding: 7px 10px;
  border-radius: 8px;
  text-align: center;
  color: #687995;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: .16s ease;
}
.period-switch a:hover { color: #dbe6fb; background: rgba(20,31,51,.68); }
.period-switch a.active {
  color: #fff;
  background: linear-gradient(135deg, #527eff, #715cff);
  box-shadow: 0 7px 22px rgba(74, 101, 255, .28);
}
.date-picker-form {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(43, 60, 92, .65);
  border-radius: 11px;
  background: rgba(4, 8, 15, .54);
  transition: .16s ease;
}
.date-picker-form:hover { border-color: rgba(82,126,255,.72); }
.date-picker-form.active {
  border-color: rgba(96,111,255,.88);
  background: linear-gradient(135deg, rgba(82,126,255,.18), rgba(113,92,255,.14));
  box-shadow: 0 7px 22px rgba(74, 101, 255, .13);
}
.date-picker-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 136px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dce7fb;
  font: inherit;
  cursor: pointer;
}
.date-picker-trigger:focus-visible {
  outline: 2px solid rgba(111,145,255,.9);
  outline-offset: 2px;
}
.date-picker-icon {
  color: #7f98c4;
  font-size: 11px;
  line-height: 1;
}
.date-picker-label {
  flex: 1;
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .02em;
  text-align: left;
}
.date-picker-chevron {
  color: #7386a7;
  font-size: 13px;
  line-height: 1;
  transition: transform .16s ease;
}
.date-picker-trigger[aria-expanded="true"] .date-picker-chevron { transform: rotate(180deg); }

.xd-calendar {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 9px);
  right: 0;
  width: 314px;
  padding: 12px;
  border: 1px solid rgba(66, 88, 128, .78);
  border-radius: 16px;
  background:
    radial-gradient(260px 150px at 100% 0%, rgba(74,104,220,.16), transparent 70%),
    linear-gradient(160deg, rgba(12,19,31,.995), rgba(6,11,19,.995));
  box-shadow: 0 24px 70px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform-origin: top right;
  animation: xd-calendar-in .14s ease both;
}
.xd-calendar[hidden] { display: none !important; }
@keyframes xd-calendar-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.xd-calendar-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.xd-calendar-head strong {
  color: #f1f5ff;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-transform: capitalize;
  letter-spacing: .01em;
}
.xd-calendar-nav {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(51,70,103,.62);
  border-radius: 9px;
  background: rgba(14,23,38,.78);
  color: #a8b9d5;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: .14s ease;
}
.xd-calendar-nav:hover:not(:disabled) {
  border-color: rgba(93,127,218,.72);
  background: rgba(31,49,82,.74);
  color: #fff;
}
.xd-calendar-nav:disabled {
  opacity: .22;
  cursor: default;
}
.xd-calendar-week,
.xd-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.xd-calendar-week {
  margin-bottom: 4px;
  color: #60728f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}
.xd-calendar-week span { padding: 4px 0; }
.xd-calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #cbd7eb;
  font: inherit;
  font-size: 10px;
  font-weight: 760;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.xd-calendar-day:hover:not(:disabled) {
  border-color: rgba(76,107,180,.52);
  background: rgba(43,65,108,.46);
  color: #fff;
  transform: translateY(-1px);
}
.xd-calendar-day.is-outside { color: #50617d; }
.xd-calendar-day.is-today:not(.is-selected)::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #62ccff;
  box-shadow: 0 0 8px rgba(98,204,255,.72);
}
.xd-calendar-day.is-selected {
  border-color: rgba(129,153,255,.9);
  background: linear-gradient(135deg, #4e7aff, #735dff);
  color: #fff;
  box-shadow: 0 7px 18px rgba(71,93,225,.3), inset 0 1px rgba(255,255,255,.14);
}
.xd-calendar-day:disabled,
.xd-calendar-day.is-future {
  color: #33415a;
  background: transparent;
  cursor: not-allowed;
  opacity: .46;
}
.xd-calendar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(42,57,84,.54);
}
.xd-calendar-foot span {
  color: #51627e;
  font-size: 7.5px;
  font-weight: 700;
}
.xd-calendar-foot button {
  padding: 6px 9px;
  border: 1px solid rgba(64,88,135,.62);
  border-radius: 8px;
  background: rgba(22,34,56,.72);
  color: #9fc1ff;
  font: inherit;
  font-size: 8.5px;
  font-weight: 850;
  cursor: pointer;
}
.xd-calendar-foot button:hover { color: #fff; background: rgba(44,68,112,.74); }

[data-live-dashboard] { transition: opacity .2s ease, filter .2s ease; }
[data-live-dashboard].live-refreshed {
  animation: dashboard-live-pulse .68s ease;
}
@keyframes dashboard-live-pulse {
  0% { opacity: .72; filter: brightness(1.08); }
  100% { opacity: 1; filter: brightness(1); }
}

/* --- KPIs --------------------------------------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi-card {
  position: relative;
  min-width: 0;
  min-height: 104px;
  padding: 14px 15px 13px;
  overflow: hidden;
  border: 1px solid rgba(43, 61, 92, .58);
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(12, 19, 31, .98), rgba(7, 12, 20, .98));
  box-shadow: inset 0 1px rgba(255,255,255,.016);
}
.kpi-card::after {
  content: "";
  position: absolute;
  width: 110px; height: 110px;
  right: -42px; bottom: -63px;
  border-radius: 50%;
  opacity: .22;
  filter: blur(16px);
  pointer-events: none;
}
.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #61728e;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.kpi-head i {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 6px;
  font-style: normal;
  background: rgba(255,255,255,.025);
  color: #7f91ad;
}
.kpi-number {
  display: block;
  margin: 9px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(18px, 1.55vw, 24px);
  font-weight: 760;
  letter-spacing: -.045em;
}
.kpi-card p {
  margin: 0;
  color: #657590;
  font-size: 9.5px;
  line-height: 1.4;
}
.tone-blue::after { background: #3c6fff; }
.tone-green::after { background: #1bcf91; }
.tone-amber::after { background: #e99f3f; }
.tone-red::after { background: #f14d65; }
.tone-cyan::after { background: #38b9dd; }
.tone-violet::after { background: #765eff; }
.tone-green .kpi-number { color: #72e4bb; }
.tone-amber .kpi-number { color: #ffd08a; }
.tone-red .kpi-number { color: #ff8a99; }

/* --- Dashboard grids ---------------------------------------------------- */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(270px, .8fr);
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-side-stack { display: grid; gap: 12px; min-width: 0; }
.cinematic-panel {
  margin-bottom: 0;
  border-color: rgba(44, 62, 92, .62);
  background:
    radial-gradient(480px 180px at 100% 0%, rgba(52, 87, 166, .055), transparent 70%),
    linear-gradient(180deg, rgba(9, 15, 25, .98), rgba(6, 11, 19, .98));
}
.cinematic-head { padding: 14px 16px; }
.cinematic-head h2 { margin-top: 4px; font-size: 14px; }
.cinematic-head p { margin: 4px 0 0; color: #5f708c; font-size: 9.5px; }
.chart-panel-main { min-height: 360px; }
.chart-wrap-main { min-height: 276px; display: grid; align-items: center; padding: 8px 12px 2px; }
.chart-wrap-main .chart { min-height: 250px; }
.chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 16px 11px;
  border-top: 1px solid rgba(37,53,80,.48);
  color: #62728b;
  font-size: 9.5px;
}
.chart-footer strong { color: #c7d4e9; }
.chart-legend { gap: 13px; font-size: 9px; }
.legend-line { width: 9px; }
.chart-empty { fill: #788aa7; font-size: 12px; font-weight: 650; font-family: var(--sans); }
.chart-empty-sub { fill: #4d5f7a; font-size: 8.5px; font-family: var(--sans); }
.chart-axis { fill: #4c5f7c; }

.compact-panel { min-height: 0; }
.compact-head { padding: 12px 14px; }
.micro-link {
  color: #8ba6dc;
  font-size: 9px;
  font-weight: 700;
  transition: color .15s;
}
.micro-link:hover { color: #d6e5ff; }
.gateway-list { padding: 2px 0; }
.gateway-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(34, 49, 75, .42);
}
.gateway-row:last-child { border-bottom: 0; }
.gateway-mark {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border: 1px solid rgba(87,113,165,.35);
  border-radius: 9px;
  background: #111c33;
  color: #b7c8ee;
  font-size: 10px;
  font-weight: 900;
}
.gateway-yampi { background: linear-gradient(145deg,#211f58,#151a35); color: #c6c1ff; }
.gateway-copy strong { display: block; font-size: 10px; letter-spacing: .05em; }
.gateway-copy small { display: block; margin-top: 3px; color: #596a84; font-size: 8.5px; }
.gateway-health { display: flex; align-items: center; gap: 5px; color: #5a6b86; font-size: 8px; white-space: nowrap; }
.health-dot { width: 5px; height: 5px; border-radius: 50%; background: #51627b; }
.health-dot.ok { background: var(--ok); box-shadow: 0 0 7px rgba(43,213,155,.45); }
.health-dot.bad { background: var(--bad); box-shadow: 0 0 7px rgba(255,93,115,.4); }
.compact-foot {
  padding: 8px 13px 10px;
  border-top: 1px solid rgba(34,49,75,.42);
  color: #485a75;
  font-size: 8px;
  line-height: 1.45;
}
.risk-panel { align-self: stretch; }
.risk-total { padding: 13px 14px 9px; }
.risk-total span { display: block; color: #5b6d88; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.risk-total strong { display: block; margin-top: 5px; font-size: 22px; color: #edf3fc; }
.risk-lines { padding: 0 14px 9px; }
.risk-lines div {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 7px 0;
  border-bottom: 1px solid rgba(34,49,75,.38);
  color: #64758f; font-size: 8.5px;
}
.risk-lines div:last-child { border-bottom: 0; }
.risk-lines strong { color: #d3dceb; font-size: 9px; }
.full-button { width: calc(100% - 28px); margin: 1px 14px 13px; font-size: 9px; padding: 7px 10px; }

.dashboard-table-grid,
.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-insight-grid { margin-bottom: 0; }
.table-compact th { padding: 8px 12px; font-size: 8px; }
.table-compact td { padding: 9px 12px; font-size: 10px; }
.table-compact td small { font-size: 8.5px; }
.compact-empty { padding: 31px 14px !important; line-height: 1.55; }

/* --- Login 4.0 ---------------------------------------------------------- */
.login-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  max-width: 1240px;
  grid-template-columns: minmax(0, 1.18fr) minmax(370px, .72fr);
  gap: 74px;
  padding: 56px 46px;
}
.login-page::before,
.login-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(4px);
}
.login-page::before {
  width: 680px; height: 680px;
  left: -270px; top: -280px;
  background: radial-gradient(circle, rgba(51, 101, 225, .16), transparent 68%);
}
.login-page::after {
  width: 640px; height: 640px;
  right: -250px; bottom: -320px;
  background: radial-gradient(circle, rgba(102, 70, 255, .12), transparent 68%);
}
.login-pitch { max-width: 610px; }
.login-logo {
  width: 96px; height: 96px; min-width: 96px; max-width: 96px;
  min-height: 96px; max-height: 96px;
  margin-bottom: 32px;
  border-radius: 24px;
  border-color: rgba(91, 126, 190, .38);
  background: linear-gradient(150deg, #0f1727, #080d16);
  box-shadow: 0 24px 60px rgba(0,0,0,.34), 0 0 50px rgba(55,101,230,.08);
}
.login-pitch h1 {
  max-width: 600px;
  font-size: clamp(40px, 4.1vw, 60px);
  line-height: 1.01;
  margin: 12px 0 20px;
  letter-spacing: -.058em;
  text-wrap: balance;
}
.login-pitch p {
  max-width: 540px;
  color: #8190a9;
  font-size: 14px;
  line-height: 1.68;
}
.login-facts {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 30px;
}
.login-facts span {
  padding: 7px 9px;
  border: 1px solid rgba(45,64,96,.48);
  border-radius: 9px;
  background: rgba(8,14,23,.6);
  color: #70809a;
  font-size: 9px;
}
.login-facts .dot { width: 5px; height: 5px; }
.login-card {
  position: relative;
  padding: 30px;
  overflow: hidden;
  border-color: rgba(67, 91, 137, .52);
  border-radius: 22px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(77, 103, 220, .15), transparent 70%),
    linear-gradient(180deg, rgba(11,18,31,.98), rgba(7,12,20,.98));
  box-shadow: 0 32px 90px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.025);
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(109,146,255,.4), transparent);
}
.login-card h2 { font-size: 25px; margin: 9px 0 6px; letter-spacing: -.04em; }
.login-card > p { margin-bottom: 24px; color: #657690; }
.field { margin-bottom: 15px; }
.field label { color: #7a8ba5; font-size: 10px; }
.field input,
.field select {
  min-height: 44px;
  padding: 10px 12px;
  border-color: rgba(49, 70, 106, .7);
  background: rgba(3, 7, 13, .72);
  border-radius: 11px;
  color: #e8eef8;
}
.field input:hover { border-color: rgba(71,97,143,.78); }
.field input:focus {
  border-color: #5579d8;
  box-shadow: 0 0 0 3px rgba(76,124,255,.11), 0 10px 28px rgba(0,0,0,.16);
}
.password-wrap input { padding-right: 72px; }
.toggle-password {
  right: 7px; top: 7px;
  min-width: 55px;
  min-height: 30px;
  background: rgba(18,29,48,.9);
  border: 1px solid rgba(49,70,106,.52);
  color: #8294b1;
}
.login-card .button {
  min-height: 45px;
  margin-top: 10px;
  border: 0;
  background: linear-gradient(135deg, #4c7cff, #725cff);
  box-shadow: 0 12px 32px rgba(72, 91, 255, .22);
}
.login-card .button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.login-card .button.is-loading { opacity: .78; cursor: wait; }
.login-hint { margin-top: 16px; color: #4d5f7a; }
.alert {
  padding: 11px 12px;
  border-color: rgba(255,93,115,.3);
  background: rgba(113, 25, 43, .18);
  color: #ff9cac;
}

/* --- Telas internas: acabamento ---------------------------------------- */
.filters {
  border-color: rgba(44,62,92,.56);
  background: rgba(8,14,23,.84);
}
.filters a.active {
  background: linear-gradient(135deg, rgba(72,119,255,.24), rgba(102,78,255,.16));
  border-color: rgba(82,116,204,.44);
  color: #e2ebff;
}
.button { background: linear-gradient(135deg, #4b79ef, #5d66ee); }
.button:hover { background: linear-gradient(135deg, #5a87f5, #6a72f4); }
.button.ghost { background: rgba(15,23,37,.72); }
.hero { background: radial-gradient(540px 180px at 100% 0%, rgba(70,103,211,.09), transparent 70%), linear-gradient(150deg,#0b121e,#070c14); }

/* --- Responsivo 4.0 ----------------------------------------------------- */
@media (max-width: 1500px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-card { min-height: 98px; }
}

@media (max-width: 1180px) {
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .dashboard-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-table-grid, .dashboard-insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; }
  .sidebar { position: static; width: 100%; min-width: 0; max-width: 100vw; height: auto; }
  .nav { width: 100%; min-width: 0; max-width: 100%; }
  .main { padding: 20px 18px 48px; }
  .login-page { grid-template-columns: 1fr; max-width: 500px; gap: 28px; padding: 34px 20px; }
  .login-pitch { display: block; text-align: center; margin: 0 auto; }
  .login-logo { margin-left: auto; margin-right: auto; width: 76px; height: 76px; min-width: 76px; min-height: 76px; }
  .login-pitch h1 { font-size: 31px; margin-bottom: 12px; }
  .login-pitch p { display: none; }
  .login-facts { display: none; }
}

@media (max-width: 760px) {
  .command-hero { align-items: flex-start; flex-direction: column; padding: 18px; }
  .dashboard-filter-bar { width: 100%; flex-wrap: wrap; }
  .period-switch { flex: 1 1 320px; overflow-x: auto; }
  .period-switch a { flex: 1; }
  .date-picker-form { flex: 1 1 150px; }
  .date-picker-trigger { width: 100%; }
  .xd-calendar { left: 0; right: auto; width: min(314px, calc(100vw - 40px)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-side-stack { grid-template-columns: 1fr; }
  .main { padding: 16px 12px 40px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .login-card { padding: 24px 20px; }
}

.login-card-logo {
  display: block;
  width: 42px; height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid rgba(91,126,190,.35);
  object-fit: cover;
  box-shadow: 0 8px 28px rgba(0,0,0,.24);
}

/* --- Conta administrativa ---------------------------------------------- */
.account-grid { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(0,1.4fr); gap: 14px; }
.account-summary { align-self: start; }
.account-identity { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid rgba(37,53,80,.48); }
.account-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(145deg,#2450ad,#1a2949); color:#dce7ff; font-size:16px; font-weight:800; }
.account-identity strong { display:block; font-size:13px; }
.account-identity small { display:block; margin-top:4px; color:var(--text-3); font-size:9px; letter-spacing:.08em; }
.account-form-body { max-width: 760px; }
.account-password-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.account-security-note { margin:14px 0 0; color:var(--text-3); font-size:9.5px; line-height:1.55; }
.success-alert { border-color:rgba(43,213,155,.28); background:rgba(25,110,82,.14); color:#89e8c5; }
@media(max-width:900px){ .account-grid{grid-template-columns:1fr}.account-password-grid{grid-template-columns:1fr} }
.legend-refund { background: var(--warn); }
.legend-chargeback { background: var(--bad); }

/* V4.3 — gráfico financeiro interativo */
.chart-interactive { overflow: visible; cursor: crosshair; }
.chart-hit-zone { fill: transparent; pointer-events: all; cursor: crosshair; }
.chart-crosshair {
  stroke: #6ba7ff; stroke-width: 1; stroke-dasharray: 3 4; opacity: 0;
  vector-effect: non-scaling-stroke; pointer-events: none;
}
.chart-crosshair.is-visible { opacity: .55; }
.chart-marker { transition: r .12s ease, opacity .12s ease; opacity: .82; pointer-events: none; }
.chart-marker.is-active { r: 5.4px; opacity: 1; }
.chart-line { pointer-events: none; }
.chart-line-gross { filter: drop-shadow(0 0 3px rgba(59,123,255,.28)); }
.chart-area-fill { pointer-events: none; }
.chart-tooltip { opacity: 0; pointer-events: none; transition: opacity .10s ease; }
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip-bg {
  fill: #09111e; fill-opacity: .97; stroke: #2d4263; stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.chart-tooltip-text { fill: #dbe8ff; font-size: 8.8px; font-family: var(--sans); }
.chart-tooltip-text .tooltip-title { fill: #ffffff; font-size: 10px; font-weight: 750; }
.chart-tooltip-text .tooltip-muted { fill: #8194b1; font-size: 7.8px; }
.chart-tooltip-text .tooltip-money { fill: #73c6ff; font-weight: 700; }
.chart-tooltip-text .tooltip-warn { fill: #f0b35c; }
.chart-tooltip-text .tooltip-bad { fill: #ff7083; }
.chart-tooltip-text .tooltip-sale { fill: #a9bbd5; font-size: 7.8px; }
.chart-interactive.chart-pulse .chart-line-gross { animation: chartPulse .55s ease-out; }
@keyframes chartPulse { 0% { opacity: .45; } 100% { opacity: 1; } }

.origin-cell strong { display: block; color: #d9e5f8; font-weight: 700; }
.origin-cell small { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.origin-cell .origin-ad-id { color: #536b8f; font-family: var(--mono); font-size: 9px; }

/* V4.5 — navegação instantânea / performance */
body.fast-nav-loading::before {
  content: "";
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 34%;
  height: 2px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #4c7dff, #7aa8ff);
  box-shadow: 0 0 16px rgba(76,125,255,.55);
  animation: fastNavBar .75s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes fastNavBar {
  from { transform: translateX(-45%); opacity: .62; }
  to { transform: translateX(235%); opacity: 1; }
}
.main.fast-nav-enter { opacity: .86; transform: translateY(2px); }
.main.fast-nav-enter.fast-nav-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .16s ease, transform .16s ease;
}
.nav a[data-fast-nav] { touch-action: manipulation; }
@media (prefers-reduced-motion: reduce) {
  body.fast-nav-loading::before { animation: none; width: 100%; opacity: .8; }
  .main.fast-nav-enter, .main.fast-nav-enter.fast-nav-enter-active { transition: none; transform: none; opacity: 1; }
}

/* V4.8.4 — paginação compacta e rápida */
.pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-top:1px solid var(--line,rgba(120,150,210,.16));color:var(--muted,#8fa1bf);font-size:12px}
.pagination .pages{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.pagination .page-number{min-width:34px;justify-content:center;text-align:center}
.pagination .page-number.active{background:linear-gradient(135deg,rgba(70,105,255,.95),rgba(105,95,255,.95));color:#fff;border-color:transparent;box-shadow:0 8px 22px rgba(71,92,255,.22)}
.pagination .page-ellipsis{padding:0 3px;color:var(--muted,#8fa1bf)}
@media(max-width:760px){.pagination{align-items:flex-start;flex-direction:column}.pagination .pages{justify-content:flex-start;width:100%}.pagination .page-number{min-width:32px}}

/* V4.8.5 — paginação sempre visível no topo e rodapé */
.pagination.pagination-top{border-top:0;border-bottom:1px solid var(--line,rgba(120,150,210,.16));background:rgba(7,13,25,.16)}
.pagination.pagination-top + .table-wrap{border-top:0}
@media(max-width:760px){.pagination.pagination-top{padding-top:10px;padding-bottom:10px}}


/* V4.8.7 — paginação fixa: Compras e Clientes usam 15 itens por página no backend. */

/* V4.8.8 — paginação visível no topo e rodapé */
.pagination-top {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.pagination .page-number.active {
  cursor: default;
  pointer-events: none;
}

/* ========================================================================== 
   V4.8.9 — COMPARAÇÃO PERSONALIZADA DE DOIS DIAS
   Mantém o filtro principal independente: o usuário escolhe A e B, confirma
   em Comparar e pode limpar a seleção sem afetar os dados históricos.
   ========================================================================== */
.command-hero { flex-wrap: wrap; }
.command-hero-copy { flex: 1 1 320px; min-width: 0; }

.compare-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(43, 60, 92, .65);
  border-radius: 11px;
  background: rgba(4, 8, 15, .54);
  color: #9aacc8;
  font: inherit;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .02em;
  cursor: pointer;
  transition: .16s ease;
}
.compare-toggle:hover {
  color: #fff;
  border-color: rgba(82,126,255,.72);
  background: rgba(20,31,51,.68);
}
.compare-toggle.active {
  color: #fff;
  border-color: rgba(96,111,255,.8);
  background: linear-gradient(135deg, rgba(82,126,255,.22), rgba(113,92,255,.18));
  box-shadow: 0 7px 22px rgba(74,101,255,.12);
}
.compare-toggle span { color: #82a4ff; font-size: 13px; }

.compare-panel {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(0, 2.2fr);
  align-items: center;
  gap: 16px 22px;
  padding-top: 15px;
  border-top: 1px solid rgba(44, 62, 92, .48);
}
.compare-panel[hidden] { display: none !important; }
.compare-panel-copy { min-width: 0; }
.compare-panel-copy strong {
  display: block;
  margin-top: 5px;
  color: #eef4ff;
  font-size: 13px;
  letter-spacing: -.01em;
}
.compare-panel-copy small {
  display: block;
  margin-top: 4px;
  color: #71829f;
  font-size: 9px;
  line-height: 1.45;
}
.compare-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.compare-picker { min-width: 158px; }
.compare-picker .date-picker-trigger { min-width: 156px; }
.compare-picker .xd-calendar { left: 0; right: auto; transform-origin: top left; }
.compare-arrow {
  flex: 0 0 auto;
  color: #566b8e;
  font-size: 14px;
  font-weight: 900;
}
.compare-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.compare-submit,
.compare-clear {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 7px 12px;
  font-size: 9.5px;
  font-weight: 850;
}
.compare-submit:disabled {
  opacity: .38;
  cursor: not-allowed;
  filter: saturate(.55);
}
.compare-help {
  grid-column: 2;
  margin: -7px 0 0;
  color: #657794;
  font-size: 8.5px;
  text-align: right;
}

.compare-results {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(62, 85, 128, .58);
  border-radius: 17px;
  background:
    radial-gradient(720px 250px at 92% 0%, rgba(73,103,230,.12), transparent 72%),
    linear-gradient(180deg, rgba(10,17,29,.98), rgba(7,12,20,.98));
  box-shadow: 0 18px 46px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.018);
}
.compare-results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}
.compare-results-head h2 {
  margin: 4px 0 3px;
  color: #f2f6ff;
  font-size: 17px;
  letter-spacing: -.025em;
}
.compare-results-head h2 span { color: #63769a; font-size: 11px; font-weight: 750; }
.compare-results-head p { margin: 0; color: #71829e; font-size: 9.5px; }
.compare-date-links { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.compare-date-links a {
  padding: 6px 9px;
  border: 1px solid rgba(50,69,104,.58);
  border-radius: 8px;
  background: rgba(12,20,34,.66);
  color: #91a9d0;
  font-size: 8.5px;
  font-weight: 750;
}
.compare-date-links a:hover { color: #fff; border-color: rgba(83,117,194,.7); }

.compare-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.compare-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(43,61,92,.52);
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(12,19,31,.92), rgba(7,12,20,.94));
}
.compare-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.compare-metric-head > span {
  color: #8ea0bd;
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.compare-delta {
  padding: 4px 6px;
  border-radius: 7px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.compare-delta.up { color: #63e7b9; background: rgba(43,213,155,.09); }
.compare-delta.down { color: #ff8796; background: rgba(255,77,99,.09); }
.compare-delta.flat { color: #91a1b9; background: rgba(122,142,172,.08); }
.compare-values {
  display: grid;
  grid-template-columns: minmax(0,1fr) 18px minmax(0,1fr);
  align-items: center;
  gap: 6px;
}
.compare-values > div { min-width: 0; }
.compare-values > div:last-child { text-align: right; }
.compare-values small {
  display: block;
  color: #5f718e;
  font-size: 7.5px;
  font-weight: 750;
}
.compare-values strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #eff4fd;
  font-size: clamp(13px, 1.35vw, 18px);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-values-arrow { color: #4d6182; text-align: center; font-size: 11px; }
.compare-relative {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(34,48,73,.5);
  color: #71829c;
  font-size: 8px;
  font-weight: 700;
}
.compare-relative.up { color: #56cfa8; }
.compare-relative.down { color: #e67b89; }
.compare-relative.flat { color: #71829c; }

@media (max-width: 1180px) {
  .compare-panel { grid-template-columns: 1fr; }
  .compare-form { justify-content: flex-start; flex-wrap: wrap; }
  .compare-help { grid-column: 1; text-align: left; margin-top: -4px; }
  .compare-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .sidebar .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
  }
  .sidebar .nav a {
    min-width: 0;
    justify-content: center;
    gap: 6px;
    padding-inline: 6px;
    font-size: 11.5px;
  }
  .command-hero-copy { flex: 0 1 auto; width: 100%; }
  .dashboard-filter-bar { align-items: stretch; }
  .compare-toggle { flex: 1 1 140px; }
  .compare-panel { gap: 12px; }
  .compare-form { display: grid; grid-template-columns: 1fr; width: 100%; }
  .compare-picker,
  .compare-picker .date-picker-trigger { width: 100%; min-width: 0; }
  .compare-arrow { display: none; }
  .compare-actions { width: 100%; }
  .compare-actions .button { flex: 1 1 0; }
  .compare-picker .xd-calendar {
    width: min(314px, calc(100vw - 58px));
    left: 0;
    right: auto;
  }
  .compare-results-head { flex-direction: column; }
  .compare-date-links { justify-content: flex-start; }
  .compare-metrics-grid { grid-template-columns: 1fr; }
}
/* --- Editor do menu: nome e ícone ---------------------------------------- */
#menu { grid-column: 1 / -1; }
.nav-order-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
}
.nav-order-campo-icone select {
  width: 46px;
  padding: 6px 4px;
  border: 1px solid var(--line-lit);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.nav-order-campo-nome { min-width: 0; }
.nav-order-campo-nome input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}
.nav-order-campo-nome input:hover { border-color: var(--line-lit); background: var(--surface); }
.nav-order-campo-nome input:focus { border-color: var(--blue, #4f7cff); background: var(--surface); outline: none; }
.nav-order-acoes { gap: 8px; }

/* --- Aba Turbo ------------------------------------------------------------ */
.turbo-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.turbo-barra-fim { margin-left: auto; }
.turbo-base { padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 12px; }
.turbo-alertas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.turbo-alerta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-lit);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
}
.turbo-alerta.tom-bad { border-left-color: #ff4d63; }
.turbo-alerta.tom-warn { border-left-color: #f0a742; }
.turbo-alerta.tom-info { border-left-color: #63a0ff; }

.turbo-planos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.turbo-plano {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(79, 124, 255, .07), transparent 62%), var(--surface-2);
}
.turbo-plano-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.turbo-plano-topo strong { font-size: 14px; }
.turbo-plano-preco { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.turbo-plano-sem-dado { margin: 0; color: var(--text-3); font-size: 12px; }
.turbo-plano-link { margin-top: 4px; color: #9dc2ff; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.turbo-plano-link:hover { text-decoration: underline; }

.turbo-colunas { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 16px; }
.turbo-texto { margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.turbo-texto b { color: var(--text); }
.turbo-contrato-rota { margin: 10px 0 4px; font-size: 12.5px; }
.turbo-contrato {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #06080d;
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.turbo-tabela { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.turbo-tabela th { padding: 6px 8px; color: var(--text-3); font-size: 11px; font-weight: 650; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.turbo-tabela td { padding: 8px; border-top: 1px solid var(--line); }
.turbo-tabela td:first-child { color: var(--text); word-break: break-all; }
.turbo-lista { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.turbo-lista li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.turbo-lista li:last-child { border-bottom: 0; padding-bottom: 0; }
.turbo-lista-nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turbo-lista-valor { flex-shrink: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.turbo-vazio { margin: 0; color: var(--text-3); font-size: 13px; }
/* --- Arrastar aba na barra lateral --------------------------------------- */
.nav a[data-nav-id][draggable="true"] { cursor: grab; }
.nav a.nav-arrastando { opacity: .45; cursor: grabbing; }
.nav.nav-salvando { opacity: .6; pointer-events: none; }
/* --- Ícones do menu (desenho, não glifo) --------------------------------- */
svg.nav-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-order-previa {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-2);
}
.nav-order-previa svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-order-item { grid-template-columns: auto auto auto minmax(0, 1fr) auto; }
.nav-order-campo-icone select { width: 108px; text-align: left; }
/* --- Turbo: números por plano -------------------------------------------- */
.turbo-plano-numeros { display: flex; justify-content: space-between; gap: 8px; margin: 0; color: var(--text-2); font-size: 12.5px; }
.turbo-plano-numeros b { color: var(--text); font-size: 13.5px; }
.command-hero .turbo-base { margin-left: 6px; }
.dashboard-filter-bar .button.ghost { min-height: 38px; }
/* --- Turbo: o secundário fica recolhido ---------------------------------- */
.turbo-mais { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius, 16px); background: var(--surface); }
.turbo-mais > summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.turbo-mais > summary::-webkit-details-marker { display: none; }
.turbo-mais > summary span { font-size: 14px; font-weight: 650; }
.turbo-mais > summary small { color: var(--text-3); font-size: 12px; }
.turbo-mais > summary::after { content: "▾"; position: absolute; right: 22px; color: var(--text-3); }
.turbo-mais > summary { position: relative; }
.turbo-mais[open] > summary::after { content: "▴"; }
.turbo-mais > *:not(summary) { padding: 0 14px 14px; }
.turbo-mais .turbo-colunas { margin-top: 0; }
.turbo-lista-nome small { display: block; color: var(--text-3); font-size: 11.5px; }
.turbo-vazio-central { padding: 4px 4px 16px; }
.turbo-atalhos { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding-top: 4px; font-size: 13px; }
.turbo-atalhos a { color: #9dc2ff; text-decoration: none; }
.turbo-atalhos a:hover { text-decoration: underline; }
.chart-wrap svg { max-width: 100%; }
/* --- Turbo: lugar do gráfico quando ainda não há venda -------------------- */
.turbo-aviso-magro {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px dashed var(--line-lit);
  border-radius: var(--radius-sm, 10px);
  color: var(--text-3);
  font-size: 13px;
}

/* XD-FPS-ASSETS: 6.13.24-financeiro-limpo */
