/* ═══════════════════════════════════════════════════════════════
   BID Partners · Área do Investidor — design system do painel
   Herdado do site institucional. Estética: gestora boutique.
   Tipografia: Inter (display + corpo) · IBM Plex Mono (microlabels).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy:   #083A4F;
  --navy-d: #052A3A;
  --gold:   #A58D66;
  --gold-l: #C4AC80;
  --gold-ink: #8A7350;
  --sand:   #E5E1DD;
  --paper:  #F4F2ED;
  --ink:    #16181A;
  --ink-soft: #3C3934;
  --line:   #DAD7CF;
  --line-soft: #E6E3DB;
  --muted:  #87837A;
  --muted-d: #6B665C;
  --green:  #1F5E3F;

  --shadow-card: 0 10px 24px -14px rgba(8, 58, 79, 0.18);
  --shadow-pop:  0 24px 48px -24px rgba(8, 58, 79, 0.35);
  --r-card: 12px;
  --r-lg: 14px;
  --r-sm: 10px;
  --sidebar-w: 232px;

  --display: "Inter", -apple-system, "Segoe UI", sans-serif;
  --sans:  "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", "Consolas", monospace;
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; cursor: pointer; }

/* Microlabel mono — eyebrow institucional */
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow--muted { color: var(--muted); }

/* Logo lockup */
.lk { display: inline-flex; align-items: baseline; gap: 0.34em; line-height: 1; }
.lk .bid {
  font-family: var(--display); font-weight: 800;
  font-size: 24px; letter-spacing: -0.03em; color: var(--navy);
}
.lk .pt {
  font-family: var(--sans); font-weight: 500;
  font-size: 8px; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap;
}
.lk--inverse .bid { color: #fff; }

/* ═══════════════════════════════════════════════
   LOGIN (index.html)
   ═══════════════════════════════════════════════ */
.login-body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(8, 58, 79, 0.07), transparent 60%),
    radial-gradient(720px 480px at 96% 104%, rgba(165, 141, 102, 0.10), transparent 55%),
    var(--paper);
}
.login-card {
  width: 100%; max-width: 408px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 44px 40px 36px;
  text-align: center;
}
.login-card .lk { justify-content: center; }
.login-card .lk .bid { font-size: 32px; }
.login-card .lk .pt { font-size: 9.5px; }
.login-rule {
  width: 36px; height: 2px; background: var(--gold-l);
  margin: 22px auto 18px; border: 0;
}
.login-title {
  font-family: var(--display);
  font-size: 19px; font-weight: 700; color: var(--navy);
  letter-spacing: -0.02em;
}
.login-sub {
  margin-top: 8px;
  font-size: 13px; color: var(--muted-d);
}
.login-form { margin-top: 28px; text-align: left; }
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-d);
}
.login-field input {
  width: 100%; padding: 11px 14px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: #FCFBF9;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(8, 58, 79, 0.08);
}
.login-btn {
  width: 100%; margin-top: 6px; padding: 12px 16px;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  color: #fff; background: var(--navy);
  border: 0; border-radius: var(--r-sm);
  box-shadow: 0 10px 24px -14px rgba(8, 58, 79, 0.7);
  transition: background 0.2s ease, transform 0.2s ease;
}
.login-btn:hover { background: var(--navy-d); transform: translateY(-1px); }
.login-note {
  margin-top: 18px;
  font-size: 12px; color: var(--muted);
}
.login-seal {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.login-seal svg { width: 12px; height: 12px; stroke: var(--gold-ink); }
.login-foot {
  margin-top: 26px; text-align: center;
  font-size: 11.5px; color: var(--muted); max-width: 440px; line-height: 1.55;
}

/* ═══════════════════════════════════════════════
   SHELL — sidebar + topbar + conteúdo
   ═══════════════════════════════════════════════ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 26px 18px 20px;
  z-index: 40;
}
.sidebar .lk { padding: 0 8px; }
.sidebar-nav { margin-top: 34px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  font-size: 13.5px; font-weight: 500; color: var(--muted-d);
  border-radius: var(--r-sm);
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-link svg { width: 16px; height: 16px; stroke: currentColor; flex: none; }
.sidebar-link:hover { background: rgba(8, 58, 79, 0.05); color: var(--navy); }
.sidebar-link.is-active {
  background: rgba(8, 58, 79, 0.07);
  color: var(--navy); font-weight: 600;
}
.sidebar-link.is-active::before {
  content: "";
  position: absolute; left: -18px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 2px 2px 0;
  background: var(--gold);
}
.sidebar-foot {
  margin-top: auto; padding: 14px 8px 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); line-height: 1.8;
}

.main {
  flex: 1; min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(20px, 3.4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 242, 237, 0.92);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-title {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-d);
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user { text-align: right; line-height: 1.3; }
.topbar-user .nm { font-size: 13px; font-weight: 600; color: var(--navy); }
.topbar-user .rl { font-size: 11px; color: var(--muted); }
.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 12.5px;
  flex: none;
}
.topbar-exit {
  font-size: 12.5px; font-weight: 500; color: var(--muted-d);
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topbar-exit:hover { color: var(--navy); border-color: var(--navy); }
.menu-btn {
  display: none;
  width: 38px; height: 38px; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--navy);
}
.menu-btn svg { width: 18px; height: 18px; stroke: currentColor; }

.content {
  flex: 1;
  padding: clamp(24px, 3.4vw, 40px) clamp(20px, 3.4vw, 44px) 28px;
  max-width: 1280px; width: 100%;
}

.footer {
  padding: 18px clamp(20px, 3.4vw, 44px) 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--muted); line-height: 1.6;
  max-width: 1280px;
}
.footer strong { font-weight: 600; color: var(--muted-d); }

/* ───────── Cabeçalho de página ───────── */
.page-head { margin-bottom: clamp(22px, 3vw, 32px); }
.page-head h1 {
  margin-top: 8px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(22px, 2.3vw, 27px);
  letter-spacing: -0.025em; color: var(--navy);
}
.page-head .sub { margin-top: 8px; font-size: 14px; color: var(--muted-d); max-width: 64ch; }

/* ───────── Cards ───────── */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}
.card-title {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-d);
}

/* KPIs */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.kpi .kpi-num {
  margin-top: 12px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(21px, 1.9vw, 25px);
  letter-spacing: -0.02em; color: var(--navy);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kpi .kpi-num.is-green { color: var(--green); }
.kpi .kpi-sub { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.kpi .kpi-tag {
  display: inline-block; margin-top: 9px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green);
  background: rgba(31, 94, 63, 0.08);
  padding: 3px 8px; border-radius: 999px;
}

.disclaimer {
  font-size: 11px; color: var(--muted); font-style: italic; line-height: 1.5;
}

/* Badges de macro-etapa */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  background: #FBFAF8; color: var(--muted-d);
  white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted); flex: none;
}
.badge--analise::before       { background: var(--muted); }
.badge--aquisicao::before     { background: var(--gold-l); }
.badge--regularizacao::before { background: var(--gold-ink); }
.badge--venda::before         { background: var(--navy); }
.badge--encerramento::before  { background: var(--green); }
.badge--encerramento { color: var(--green); border-color: rgba(31, 94, 63, 0.25); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: #fff; color: var(--navy);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { border-color: var(--navy); transform: translateY(-1px); }
.btn--primary {
  background: var(--navy); border-color: var(--navy); color: #fff;
  box-shadow: 0 10px 24px -14px rgba(8, 58, 79, 0.7);
}
.btn--primary:hover { background: var(--navy-d); }
.btn--sm { padding: 6px 12px; font-size: 12px; font-weight: 500; }

/* Tabelas */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 10px 12px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft); vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .strong { font-weight: 600; color: var(--ink); }
.table tfoot td {
  border-top: 1px solid var(--line); border-bottom: 0;
  font-weight: 600; color: var(--navy);
}

/* ═══════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════ */
.dash-grid {
  display: grid; grid-template-columns: 1.55fr 1fr;
  gap: 16px; align-items: start;
}
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Distribuição por etapa */
.dist-row {
  display: flex; gap: 4px; margin-top: 18px;
  border-radius: 8px; overflow: hidden;
}
.dist-seg { height: 10px; min-width: 6px; transition: opacity 0.2s ease; }
.dist-seg--analise       { background: var(--sand); }
.dist-seg--aquisicao     { background: var(--gold-l); }
.dist-seg--regularizacao { background: var(--gold-ink); }
.dist-seg--venda         { background: var(--navy); }
.dist-seg--encerramento  { background: var(--green); }
.dist-legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
.dist-item {
  text-align: left; padding: 10px 10px 9px;
  background: #FBFAF8; border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.dist-item:hover { border-color: var(--gold-l); background: #fff; }
.dist-item .dt {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-d); line-height: 1.3;
}
.dist-item .dt i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dist-item .dn {
  margin-top: 6px;
  font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--navy);
}
.dist-item .dv { font-size: 10.5px; color: var(--muted); }

/* Lista de movimentações recentes */
.mov-list { display: flex; flex-direction: column; }
.mov-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s ease;
  border-radius: 8px;
}
.mov-item:last-child { border-bottom: 0; }
.mov-item:hover { background: #FBFAF8; }
.mov-thumb {
  width: 64px; height: 42px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line-soft); flex: none;
}
.mov-thumb svg { width: 100%; height: 100%; }
.mov-body { flex: 1; min-width: 0; }
.mov-body .mt { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.mov-body .ms { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.mov-item .badge { flex: none; }

/* Feed */
.feed { display: flex; flex-direction: column; gap: 0; }
.feed-item {
  position: relative;
  display: flex; gap: 12px;
  padding: 10px 0 10px 18px;
}
.feed-item::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-l);
}
.feed-item::after {
  content: ""; position: absolute; left: 7px; top: 28px; bottom: -6px;
  width: 1px; background: var(--line-soft);
}
.feed-item:last-child::after { display: none; }
.feed-date {
  flex: none; width: 52px;
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  padding-top: 3px;
}
.feed-text { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.feed-text a:hover { color: var(--navy); }

/* ═══════════════════════════════════════════════
   CARTEIRA — filtros + grid de veículos
   ═══════════════════════════════════════════════ */
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.filters .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.chip {
  padding: 7px 14px;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--muted-d);
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--gold-l); color: var(--navy); }
.chip.is-active {
  background: var(--navy); border-color: var(--navy); color: #fff;
}
.chip .ct { font-family: var(--mono); font-size: 10px; margin-left: 6px; opacity: 0.65; }

.cars-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.car-card {
  display: block;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.car-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-l);
  box-shadow: 0 18px 36px -18px rgba(8, 58, 79, 0.3);
}
.car-img { aspect-ratio: 16 / 8.4; }
.car-img svg { width: 100%; height: 100%; }
.car-body { padding: 16px 18px 18px; }
.car-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.car-name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.car-origin { margin-top: 2px; font-size: 12px; color: var(--muted); }
.car-meta {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 14px; padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}
.car-meta .lbl {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.car-meta .val {
  margin-top: 3px;
  font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--navy);
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}
.car-meta .val--sm { font-size: 13px; font-weight: 600; }
.car-substatus { margin-top: 9px; font-size: 11.5px; color: var(--muted-d); }
.car-substatus b { font-weight: 600; color: var(--gold-ink); }
.cars-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 48px 20px;
  color: var(--muted); font-size: 13.5px;
}

/* ═══════════════════════════════════════════════
   VEÍCULO — detalhe
   ═══════════════════════════════════════════════ */
.veh-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--muted-d);
  margin-bottom: 18px;
  transition: color 0.2s ease;
}
.veh-back:hover { color: var(--navy); }
.veh-hero {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.veh-hero-img {
  min-height: 264px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #083A4F, #0E4258 62%, #2E5A6B);
  padding: 24px;
}
.veh-hero-img svg { width: 100%; height: 100%; max-height: 320px; }
.veh-hero-body { padding: 28px 30px; display: flex; flex-direction: column; }
.veh-code {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--gold-ink); text-transform: uppercase;
}
.veh-title {
  margin-top: 10px;
  font-family: var(--display); font-size: clamp(20px, 2vw, 24px);
  font-weight: 700; letter-spacing: -0.02em; color: var(--navy);
}
.veh-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.veh-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
  margin-top: auto; padding-top: 22px;
}
.veh-fact .lbl {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.veh-fact .val { margin-top: 3px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.veh-fact .val--display {
  font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--navy);
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}

/* Stepper das 5 macro-etapas */
.stepper {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0; margin: 4px 0 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 22px 18px 20px;
}
.step { position: relative; text-align: center; padding: 0 8px; }
.step::before {
  content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px;
  background: var(--line-soft);
}
.step:first-child::before { display: none; }
.step.is-done::before, .step.is-current::before { background: var(--gold-l); }
.step-dot {
  position: relative; z-index: 1;
  width: 26px; height: 26px; margin: 0 auto;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--line);
  font-family: var(--mono); font-size: 10px; color: var(--muted);
}
.step.is-done .step-dot {
  background: var(--gold-l); border-color: var(--gold-l); color: #fff;
}
.step.is-current .step-dot {
  background: var(--navy); border-color: var(--navy); color: #fff;
  box-shadow: 0 0 0 4px rgba(8, 58, 79, 0.12);
}
.step-name {
  margin-top: 9px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  line-height: 1.3;
}
.step.is-done .step-name { color: var(--gold-ink); }
.step.is-current .step-name { color: var(--navy); }
.step-sub {
  margin-top: 3px;
  font-size: 10.5px; color: var(--gold-ink); font-style: italic; line-height: 1.35;
}

.veh-grid {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: 16px; align-items: start;
}
.veh-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Bloco de resultado */
.result-block { border-left: 3px solid var(--gold-l); }
.result-block.is-real { border-left-color: var(--green); }
.result-num {
  margin-top: 10px;
  font-family: var(--display); font-size: 22px; font-weight: 700;
  color: var(--navy); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.result-block.is-real .result-num { color: var(--green); }
.result-note { margin-top: 8px; font-size: 12px; color: var(--muted-d); line-height: 1.55; }

/* Timeline vertical */
.tl { position: relative; margin-top: 16px; }
.tl-item { position: relative; display: flex; gap: 16px; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before {
  content: ""; position: absolute; left: 5px; top: 18px; bottom: 0;
  width: 1px; background: var(--line);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff; border: 2px solid var(--gold-l);
  flex: none; margin-top: 5px;
}
.tl-item.is-last .tl-dot { background: var(--navy); border-color: var(--navy); }
.tl-date {
  flex: none; width: 76px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  padding-top: 3px;
}
.tl-body .tt { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tl-body .td { margin-top: 2px; font-size: 12px; color: var(--muted-d); line-height: 1.5; }

/* Lista de documentos */
.doc-list { display: flex; flex-direction: column; }
.doc-item {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s ease;
  border-radius: 8px;
  text-align: left; width: 100%;
  background: none; border-left: 0; border-right: 0; border-top: 0;
}
.doc-item:last-child { border-bottom: 0; }
.doc-item:hover { background: #FBFAF8; }
.doc-ic {
  width: 34px; height: 34px; flex: none;
  border-radius: 8px; border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-ink); background: #FBFAF8;
}
.doc-ic svg { width: 15px; height: 15px; stroke: currentColor; }
.doc-body { flex: 1; min-width: 0; }
.doc-body .dt { font-size: 13px; font-weight: 600; color: var(--ink); }
.doc-body .df {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-date { flex: none; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.doc-view {
  flex: none; font-size: 11.5px; font-weight: 600; color: var(--navy);
  opacity: 0; transition: opacity 0.2s ease;
}
.doc-item:hover .doc-view { opacity: 1; }

/* ═══════════════════════════════════════════════
   JORNADA
   ═══════════════════════════════════════════════ */
.jor-hero { text-align: center; margin: 6px auto 44px; max-width: 760px; }
.jor-hero h1 {
  margin-top: 14px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(24px, 2.9vw, 34px);
  letter-spacing: -0.03em; color: var(--navy); line-height: 1.18;
  text-wrap: balance;
}
.jor-hero h1 .hl { color: var(--gold-ink); }
.jor-hero p {
  margin: 16px auto 0; max-width: 56ch;
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.7;
}
.jor-flow { position: relative; max-width: 880px; margin: 0 auto; }
.jor-flow::before {
  content: ""; position: absolute; left: 27px; top: 30px; bottom: 80px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold-l), var(--line));
}
.jor-stage { position: relative; display: flex; gap: 24px; padding-bottom: 36px; }
.jor-node {
  position: relative; z-index: 1; flex: none;
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--navy);
}
.jor-stage--exit .jor-node { background: var(--navy); border-color: var(--navy); color: #fff; }
.jor-card { flex: 1; min-width: 0; }
.jor-card .card { padding: 24px 26px; }
.jor-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.jor-title {
  font-family: var(--display); font-size: 17.5px; font-weight: 700;
  color: var(--navy); letter-spacing: -0.015em;
}
.jor-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  background: #FBFAF8;
}
.jor-stage--exit .jor-tag { color: #fff; background: var(--navy); border-color: var(--navy); }
.jor-desc { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.65; max-width: 62ch; }
.jor-subs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.jor-sub {
  font-size: 11px; color: var(--muted-d);
  border: 1px dashed var(--line); border-radius: 999px; padding: 4px 11px;
}
.jor-cars { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.jor-car {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 7px 12px 7px 7px; background: #FBFAF8;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.jor-car:hover { border-color: var(--gold-l); background: #fff; transform: translateY(-1px); }
.jor-car-thumb {
  width: 52px; height: 34px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line-soft); flex: none;
}
.jor-car-thumb svg { width: 100%; height: 100%; }
.jor-car .jn { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.jor-car .js { font-size: 10.5px; color: var(--muted); }
.jor-empty { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 16px; }
.jor-close {
  text-align: center; margin: 10px auto 0; max-width: 560px;
  padding: 26px 24px;
}
.jor-close .q {
  font-family: var(--display); font-style: italic; font-size: 15.5px;
  color: var(--navy); line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   RELATÓRIOS
   ═══════════════════════════════════════════════ */
.rel-grid { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 16px; align-items: start; }
.rel-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rel-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 4px; border-bottom: 1px solid var(--line-soft);
  width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.rel-item:last-child { border-bottom: 0; }
.rel-item:hover { background: #FBFAF8; }
.rel-item.is-open { background: rgba(8, 58, 79, 0.05); }
.rel-item .doc-ic { background: #fff; }
.rel-open-tag {
  flex: none; font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-ink);
}

/* Preview com cara de PDF */
.pdf {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow-pop);
  padding: clamp(28px, 3.4vw, 48px) clamp(26px, 3.8vw, 54px);
  font-size: 13px; color: var(--ink-soft);
}
.pdf-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; border-bottom: 2px solid var(--navy);
}
.pdf-head .lk .bid { font-size: 21px; }
.pdf-ref { text-align: right; font-family: var(--mono); font-size: 10px; color: var(--muted); line-height: 1.7; letter-spacing: 0.06em; }
.pdf-title {
  margin-top: 26px;
  font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--navy);
  letter-spacing: -0.015em;
}
.pdf-sub { margin-top: 4px; font-size: 12px; color: var(--muted-d); }
.pdf-section {
  margin: 26px 0 10px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-ink);
  padding-bottom: 7px; border-bottom: 1px solid var(--line);
}
.pdf ul { margin: 10px 0 0; padding-left: 18px; }
.pdf li { margin-bottom: 6px; line-height: 1.6; }
.pdf .table { font-size: 12.5px; }
.pdf .table td:first-child { min-width: 132px; }
.pdf-foot {
  margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--muted); line-height: 1.6;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   MODAL — documento de demonstração
   ═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(22, 24, 26, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 30px 30px 26px;
  text-align: center;
  transform: translateY(8px); transition: transform 0.2s ease;
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal .doc-ic { width: 46px; height: 46px; margin: 0 auto 14px; }
.modal .doc-ic svg { width: 20px; height: 20px; }
.modal-title { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.modal-file { margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); word-break: break-all; }
.modal-text { margin-top: 14px; font-size: 12.5px; color: var(--muted-d); line-height: 1.6; }
.modal .btn { margin-top: 20px; }

/* ═══════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .cars-grid { grid-template-columns: repeat(2, 1fr); }
  .veh-grid { grid-template-columns: 1fr; }
  .rel-grid { grid-template-columns: 1fr; }
  .dist-legend { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-pop);
  }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .sidebar-backdrop {
    position: fixed; inset: 0; z-index: 35;
    background: rgba(22, 24, 26, 0.35);
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  }
  .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .veh-hero { grid-template-columns: 1fr; }
  .veh-hero-img { min-height: 200px; }
  .stepper { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .step { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 0; }
  .step::before { display: none; }
  .step-dot { margin: 0; flex: none; }
  .step-name { margin-top: 3px; }
  .jor-flow::before { left: 21px; }
  .jor-node { width: 42px; height: 42px; font-size: 14px; }
  .jor-stage { gap: 16px; }
}

@media (max-width: 680px) {
  .pdf .table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .cars-grid { grid-template-columns: 1fr; }
  .dist-legend { grid-template-columns: repeat(2, 1fr); }
  .topbar-user .rl { display: none; }
  .veh-facts { grid-template-columns: 1fr; }
  .tl-date { width: 60px; }
  .feed-date { width: 46px; }
}
