/* ==========================================================================
   Atlas Finance Control — identidade visual própria
   Fintech / CFO dashboard: dark, azul profundo, roxo, detalhes luminosos,
   sidebar mínima (rail de ícones) e cards pequenos e densos.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  --bg: #060a18;
  --bg-2: #0a1024;
  --panel: #0d1430;
  --panel-2: #111a3b;
  --line: #1b2550;
  --line-2: #26336a;

  --ink: #e8ecff;
  --ink-2: #b7c0e6;
  --muted: #7582b3;
  --faint: #4d5886;

  --blue: #4f7cff;
  --blue-soft: #8fa8ff;
  --violet: #8b5cff;
  --violet-soft: #b89bff;
  --cyan: #38e1d0;
  --pos: #3ddc97;
  --neg: #ff6b8b;
  --warn: #ffb86b;

  --glow-blue: 0 0 0 1px rgba(79, 124, 255, .35), 0 0 24px rgba(79, 124, 255, .22);
  --glow-violet: 0 0 0 1px rgba(139, 92, 255, .35), 0 0 24px rgba(139, 92, 255, .22);

  --radius: 10px;
  --radius-sm: 6px;
  --rail: 68px;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, 'SFMono-Regular', monospace;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font: 13px/1.45 var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(139, 92, 255, .16), transparent 60%),
    radial-gradient(700px 420px at 15% -5%, rgba(79, 124, 255, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

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

.muted {
  color: var(--muted);
}

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.zero { color: var(--muted); }

/* --------------------------------------------------------------------------
   3. Rail (sidebar mínima)
   -------------------------------------------------------------------------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  background: linear-gradient(180deg, #080d22, #070b1c);
  border-right: 1px solid var(--line);
}

.rail-brand .mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 0 22px rgba(111, 100, 255, .55);
}

.rail-brand .mark i {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 10px;
  font-style: normal;
  color: var(--cyan);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.rail-nav a {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--muted);
  transition: color .15s, background .15s;
}

.rail-nav a:hover {
  color: var(--ink);
  background: rgba(79, 124, 255, .1);
}

.rail-nav a.is-active {
  color: #fff;
  background: rgba(79, 124, 255, .16);
  box-shadow: var(--glow-blue);
}

.rail-nav a.is-active::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--blue), var(--violet));
  box-shadow: 0 0 10px var(--blue);
}

.rail-text {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translate(-4px, -50%);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 11px;
  color: var(--ink);
  background: #151e45;
  border: 1px solid var(--line-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s, transform .12s;
}

.rail-nav a:hover .rail-text,
.rail-nav a:focus-visible .rail-text {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail-lft {
  margin-top: auto;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--faint);
}

.rail-lft:hover {
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   4. Shell, topbar e cabeçalho da página
   -------------------------------------------------------------------------- */
.shell {
  margin-left: var(--rail);
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
  padding: 0 28px;
  background: rgba(6, 10, 24, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.crumbs {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.crumbs strong {
  font-size: 15px;
  letter-spacing: -.3px;
  color: #fff;
}

.crumb-sub {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.crumbs em {
  font-style: normal;
  color: var(--faint);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  padding: 4px 9px;
  border-radius: 999px;
  font: 500 10px var(--mono);
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.chip-glow {
  color: #dfe6ff;
  border-color: rgba(79, 124, 255, .5);
  box-shadow: 0 0 14px rgba(79, 124, 255, .25);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--pos);
  white-space: nowrap;
}

.live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 8px var(--pos);
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2a3570, #4a2f86);
}

main {
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px 28px 12px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.8px;
}

h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.2px;
}

.lead {
  max-width: 760px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   5. Botões, filtros e formulários
   -------------------------------------------------------------------------- */
button,
.btn-ghost {
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

button {
  padding: 8px 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 0 16px rgba(111, 100, 255, .35);
}

button:hover {
  filter: brightness(1.12);
}

.btn-ghost {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  background: transparent;
}

.btn-ghost:hover {
  color: #fff;
  border-color: var(--blue);
}

.btn-mini {
  padding: 5px 9px;
  font-size: 10px;
  color: var(--blue-soft);
  background: rgba(79, 124, 255, .12);
  border: 1px solid rgba(79, 124, 255, .35);
  box-shadow: none;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.segmented button {
  padding: 6px 11px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.segmented button.is-on {
  color: #fff;
  background: rgba(139, 92, 255, .22);
  box-shadow: var(--glow-violet);
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
}

input,
select {
  min-width: 0;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, .18);
}

.inline-filter {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.filters .grow {
  flex: 1;
  min-width: 160px;
}

.filters .reset {
  padding-bottom: 8px;
  font-size: 10px;
  color: var(--muted);
}

.new-entry {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
}

.new-entry summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--blue-soft);
}

.entry-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.entry-form label {
  flex: 1;
  min-width: 140px;
}

.notice {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: rgba(56, 225, 208, .08);
  border: 1px solid rgba(56, 225, 208, .35);
}

.notice-error {
  background: rgba(255, 107, 139, .08);
  border-color: rgba(255, 107, 139, .45);
}

.notice-warning {
  background: rgba(255, 184, 107, .08);
  border-color: rgba(255, 184, 107, .4);
}

/* --------------------------------------------------------------------------
   6. Cards de indicador (pequenos e densos)
   -------------------------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.tiles-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px 10px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}

a.tile:hover {
  border-color: var(--line-2);
  box-shadow: var(--glow-blue);
}

.tile::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 168, 255, .35), transparent);
}

.tile-label {
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-value {
  font: 600 18px/1.2 var(--mono);
  letter-spacing: -.6px;
  white-space: nowrap;
}

.tile-meta {
  overflow: hidden;
  font-size: 10px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-blue {
  border-color: rgba(79, 124, 255, .45);
  box-shadow: inset 0 0 30px rgba(79, 124, 255, .08);
}

.tile-blue .tile-value { color: #cdd8ff; }

.tile-violet {
  border-color: rgba(139, 92, 255, .45);
  box-shadow: inset 0 0 30px rgba(139, 92, 255, .08);
}

.tile-violet .tile-value { color: var(--violet-soft); }
.tile-warn .tile-value { color: var(--warn); }
.tile-pos .tile-value { color: var(--pos); }
.tile-neg .tile-value { color: var(--neg); }

/* --------------------------------------------------------------------------
   7. Painéis e grids
   -------------------------------------------------------------------------- */
.panel {
  min-width: 0;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(13, 20, 48, .88);
  border: 1px solid var(--line);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head > .muted {
  font-size: 10px;
  white-space: nowrap;
}

.figure {
  font: 600 18px var(--mono);
  color: var(--violet-soft);
}

.grid-2,
.grid-2-1,
.grid-1-2,
.grid-3 {
  display: grid;
  gap: 14px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(250px, 1fr) minmax(0, 3fr); align-items: start; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.note {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}

.link-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--blue-soft);
}

.legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 10px;
  color: var(--muted);
}

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: -4px;
  border-radius: 2px;
}

.k-in { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.k-out { background: var(--violet); box-shadow: 0 0 6px var(--violet); }
.k-line { height: 2px !important; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.k-proj { background: repeating-linear-gradient(45deg, var(--blue-soft) 0 2px, transparent 2px 4px); }
.k-budget { background: var(--line-2); }

/* --------------------------------------------------------------------------
   8. Gráficos (HTML/CSS + SVG)
   -------------------------------------------------------------------------- */
.chart-wrap {
  position: relative;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 220px;
  padding-top: 10px;
  background: repeating-linear-gradient(to top, transparent 0 43px, rgba(38, 51, 106, .5) 43px 44px);
}

.bars-mini {
  height: 170px;
}

.bars-daily {
  gap: 3px;
  height: 170px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.bar-pair {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}

.bar-pair i {
  display: block;
  width: 42%;
  max-width: 18px;
  min-height: 1px;
  border-radius: 3px 3px 0 0;
}

.bar-pair .in {
  background: linear-gradient(180deg, #7d9dff, var(--blue));
  box-shadow: 0 0 10px rgba(79, 124, 255, .45);
}

.bar-pair .out {
  background: linear-gradient(180deg, var(--violet-soft), var(--violet));
  box-shadow: 0 0 10px rgba(139, 92, 255, .4);
}

.bar-pair .budget {
  background: var(--line-2);
}

.bar-col.is-proj .bar-pair i {
  opacity: .55;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .25) 0 2px, transparent 2px 5px);
  box-shadow: none;
}

.bar-col.is-partial > span::after {
  content: '*';
  color: var(--warn);
}

.bar-col.is-today > span {
  color: var(--cyan);
  font-weight: 700;
}

.bar-col > span {
  padding-top: 6px;
  font: 9px var(--mono);
  text-align: center;
  color: var(--muted);
}

.overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  width: 100%;
  height: calc(100% - 30px);
  pointer-events: none;
}

.overlay .line,
.spark .line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(56, 225, 208, .7));
}

.spark {
  display: block;
  width: 100%;
  height: 120px;
}

.spark .zero {
  stroke: var(--line-2);
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 12px 0 0;
}

.kv div {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.kv dt {
  font-size: 10px;
  color: var(--muted);
}

.kv dd {
  margin: 2px 0 0;
  font: 500 12px var(--mono);
}

.kv small {
  color: var(--muted);
}

.aging-bar {
  display: flex;
  overflow: hidden;
  height: 10px;
  margin-bottom: 12px;
  border-radius: 99px;
  background: var(--bg-2);
}

.aging-bar i {
  display: block;
  height: 100%;
}

.age-1 { background: var(--blue); }
.age-2 { background: #c9a2ff; }
.age-3 { background: var(--warn); }
.age-4 { background: #ff8f6b; }
.age-5 { background: var(--neg); }

.aging-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aging-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 8px 0;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.aging-list strong {
  font: 500 12px var(--mono);
}

.aging-list li > span:nth-child(2),
.aging-list li > span:nth-child(4) {
  text-align: right;
  font-size: 10px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
}

.share,
.meter {
  display: inline-block;
  vertical-align: middle;
  width: 44px;
  height: 4px;
  margin-right: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
}

.share i,
.meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.meter i.ok { background: var(--pos); }
.meter i.bad { background: var(--neg); }

/* --------------------------------------------------------------------------
   9. Listas e tabelas
   -------------------------------------------------------------------------- */
.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.list li:last-child {
  border-bottom: 0;
}

.list strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list small {
  font-size: 10px;
  color: var(--muted);
}

.list li > div {
  min-width: 0;
}

.list li > span {
  font: 500 12px var(--mono);
  white-space: nowrap;
}

.empty {
  padding: 14px 0;
  font-size: 11px;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.data th {
  position: sticky;
  top: 0;
  padding: 8px 10px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

.data td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: top;
}

.data.compact td {
  padding: 6px 10px;
}

.data tbody tr:hover td {
  background: rgba(79, 124, 255, .05);
}

.data td small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.data td strong {
  font-weight: 500;
}

.data .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
}

.data .strong {
  font-weight: 600;
}

.data .action {
  text-align: right;
}

.data tfoot td {
  font-weight: 600;
  border-top: 1px solid var(--line-2);
}

.data tr.is-proj td {
  color: var(--ink-2);
}

.data tr.is-today td {
  background: rgba(56, 225, 208, .06);
}

.row-link:hover strong {
  color: var(--blue-soft);
}

.dre-total td {
  font-weight: 600;
  background: rgba(79, 124, 255, .06);
}

.dre-detail td:first-child {
  padding-left: 26px;
  color: var(--ink-2);
}

.dre-detail td {
  font-size: 10.5px;
  color: var(--muted);
}

.dre-highlight td {
  color: #fff;
  background: rgba(139, 92, 255, .14);
  box-shadow: inset 0 1px rgba(139, 92, 255, .35), inset 0 -1px rgba(139, 92, 255, .35);
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(117, 130, 179, .15);
}

.tag-liquidado,
.tag-realizado { color: var(--pos); background: rgba(61, 220, 151, .12); }
.tag-vencido { color: var(--neg); background: rgba(255, 107, 139, .12); }
.tag-a-vencer { color: var(--blue-soft); background: rgba(79, 124, 255, .14); }
.tag-previsto,
.tag-projetado { color: var(--violet-soft); background: rgba(139, 92, 255, .14); }
.tag-parcial { color: var(--warn); background: rgba(255, 184, 107, .12); }
.tag-hoje { color: var(--cyan); background: rgba(56, 225, 208, .12); }
.tag-governo { color: var(--warn); background: rgba(255, 184, 107, .1); }
.tag-folha { color: var(--cyan); background: rgba(56, 225, 208, .1); }
.tag-banco { color: var(--violet-soft); background: rgba(139, 92, 255, .12); }

.rating {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font: 700 10px var(--mono);
}

.r-A { color: var(--pos); background: rgba(61, 220, 151, .14); }
.r-B { color: var(--warn); background: rgba(255, 184, 107, .14); }
.r-C { color: var(--neg); background: rgba(255, 107, 139, .14); }

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  font-size: 11px;
  color: var(--muted);
}

.pager a {
  color: var(--blue-soft);
}

.pager .off {
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   10. Rodapé
   -------------------------------------------------------------------------- */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 12px 28px 22px;
  font-size: 10px;
  color: var(--faint);
}

.foot a:hover {
  color: var(--ink-2);
}

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

@media (max-width: 1024px) {
  .grid-2-1,
  .grid-2,
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-actions { justify-content: flex-start; }
  .chip:not(.chip-glow) { display: none; }
}

@media (max-width: 760px) {
  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    width: 100%;
    height: 56px;
    flex-direction: row;
    gap: 10px;
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-brand .mark { width: 34px; height: 34px; font-size: 17px; }

  .rail-nav {
    flex-direction: row;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-nav a { flex: 0 0 38px; width: 38px; height: 38px; }
  .rail-nav a.is-active::before { left: 10px; right: 10px; top: auto; bottom: -8px; width: auto; height: 2px; }
  .rail-text { display: none; }
  .rail-lft { display: none; }

  .shell { margin-left: 0; }
  .topbar { position: static; height: auto; padding: 10px 16px; }
  .crumb-sub, .live, .avatar { display: none; }
  main { padding: 16px 16px 8px; }
  h1 { font-size: 21px; }

  .tiles,
  .tiles-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile-value { font-size: 16px; }

  .panel { padding: 14px; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .bars { gap: 4px; height: 170px; }
  .bars-daily { gap: 1px; }
  .bars-daily .bar-col > span { font-size: 7px; }
  .bar-pair { gap: 1px; }
  .kv { grid-template-columns: minmax(0, 1fr); }

  .page-actions,
  .inline-filter,
  .scenario-form { width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .filters label { flex: 1 1 130px; }
  .filters select, .filters input { width: 100%; }
  .foot { flex-direction: column; padding: 12px 16px 20px; }
}
