/* ============================================================
   Transparência Rio do Campo — tema visual
   ============================================================ */
:root {
  --orange: #FF6A13;
  --orange-soft: #FF8C42;
  --bg: #0B1118;
  --bg-2: #0F1620;
  --panel: #16202B;
  --panel-2: #1B2733;
  --text: #E7ECF2;
  --muted: #9AA7B4;
  --grid: #243240;
  --border: #22303C;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #14202c 0%, var(--bg) 60%);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 26px;
  background: rgba(11, 17, 24, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-link { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.brand-strong { color: var(--orange); }
.brand-light { color: var(--text); }
.brand-tag { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 2px; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-link {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all .15s ease; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--panel); }
.nav-link.active { color: #fff; background: var(--orange); }

/* ---------- Layout ---------- */
.content { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 26px 50px; }
.page-head { margin: 6px 0 22px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.page-title .accent { color: var(--orange); }
.page-lead { color: var(--muted); font-size: 15px; max-width: 760px; margin: 0; }

.section-head { margin: 28px 0 12px; }
.section-title { font-size: 18px; font-weight: 700; margin: 0; }
.section-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 12px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 .card { margin-bottom: 0; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- KPI ---------- */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 8px;
}
@media (max-width: 860px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-row { grid-template-columns: 1fr; } }
.kpi-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: 12px; padding: 16px 18px;
}
.kpi-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.kpi-value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.kpi-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Filtros ---------- */
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filter { display: flex; flex-direction: column; gap: 5px; min-width: 180px; }
.filter label { font-size: 12px; color: var(--muted); font-weight: 600; }

/* Dash dropdown (react-select) no tema escuro */
.Select-control, .is-focused:not(.is-open) > .Select-control { background: var(--panel-2) !important; border-color: var(--border) !important; color: var(--text) !important; border-radius: 10px !important; }
.Select-menu-outer { background: var(--panel-2) !important; border-color: var(--border) !important; color: var(--text) !important; z-index: 60; }
.Select-value-label, .Select-placeholder, .Select-input > input { color: var(--text) !important; }
.VirtualizedSelectOption { background: var(--panel-2) !important; color: var(--text) !important; }
.VirtualizedSelectFocusedOption { background: var(--orange) !important; color: #fff !important; }
.Select.is-focused > .Select-control { box-shadow: 0 0 0 2px rgba(255,106,19,.35) !important; }

/* ---------- Tabelas (dash_table) ---------- */
.dash-table-container { font-size: 13.5px; }
.dash-spreadsheet-container .dash-spreadsheet-inner table { border-collapse: collapse; }

/* ---------- Análises / relatórios ---------- */
.tabs { display: flex; gap: 8px; margin: 6px 0 20px; border-bottom: 1px solid var(--border); }
.report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.report-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  transition: border-color .15s ease, transform .15s ease; cursor: pointer; height: 100%;
}
.report-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.report-card .tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); }
.report-card h3 { margin: 8px 0 6px; font-size: 16px; }
.report-card .meta { font-size: 12px; color: var(--muted); }
.report-card .resumo { font-size: 13.5px; color: var(--text); opacity: .85; margin-top: 8px; }

.report-body {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 28px; line-height: 1.65; box-shadow: var(--shadow);
}
.report-body h1 { font-size: 26px; border-bottom: 2px solid var(--orange); padding-bottom: 8px; }
.report-body h2 { font-size: 20px; margin-top: 26px; color: var(--orange-soft); }
.report-body h3 { font-size: 16px; margin-top: 18px; }
.report-body table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14px; }
.report-body th, .report-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.report-body th { background: var(--panel-2); }
.report-body blockquote { border-left: 3px solid var(--orange); margin: 12px 0; padding: 4px 14px; color: var(--muted); background: var(--bg-2); }
.report-body code { background: var(--bg-2); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--orange); font-weight: 600; }
.empty-state { text-align: center; color: var(--muted); padding: 50px 20px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); padding: 22px 26px 30px;
  max-width: 1180px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 6px; font-size: 13.5px;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; opacity: .8; }
.dot { color: var(--orange); }
