/* ═══════════════════════════════════════════════════════════════════
   RJF Dashboard — Estilo Moderno
   Inspirado em plotly.app (opioid-epidemic, medical-charges)
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #e94560;
  --accent2: #0f3460;
  --gold: #f6c445;
  --green: #2ecc71;
  --bg: #f8f9fe;
  --card-bg: #ffffff;
  --text: #2c3e50;
  --text-light: #94a3b8;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

body { background: var(--bg); color: var(--text); }

/* ── Header ── */
.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 1.2rem 2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 0 -1.5rem 1.5rem -1.5rem;
  box-shadow: var(--shadow-lg);
}
.app-header h1 {
  color: white;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: -0.5px;
}
.app-header .subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 400;
}

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-body { padding: 1.2rem; }

/* ── KPI Cards ── */
.kpi-card {
  text-align: center;
  padding: 1rem 0.5rem;
}
.kpi-card .kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}
.kpi-card .kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-top: 0.3rem;
}
.kpi-card .kpi-icon { font-size: 1.5rem; margin-bottom: 0.2rem; }

/* ── Filter Bar ── */
.filter-bar {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.filter-bar label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

/* ── DataTable ── */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table {
  font-family: 'Inter', sans-serif !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
/* Permite selecionar/copiar texto das células */
.dash-spreadsheet td, .dash-spreadsheet th {
  -webkit-user-select: text !important;
  user-select: text !important;
}
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
  padding: 10px 12px !important;
  font-size: 0.8rem !important;
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
}
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
  background: var(--primary) !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 0.7rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:hover td {
  background: #f8f9fe !important;
}

/* ── Tabs ── */
.nav-tabs {
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 1.2rem;
}
.nav-tabs .nav-link {
  border: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.75rem 1.2rem;
  transition: color 0.2s;
}
.nav-tabs .nav-link:hover { color: var(--text); border: none; }
.nav-tabs .nav-link.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  background: transparent;
}

/* ── Buttons ── */
.btn-warning {
  background: linear-gradient(135deg, #f6c445, #f39c12) !important;
  border: none !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem 1.2rem !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.btn-warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243,156,18,0.3) !important;
}
.btn-secondary {
  border-radius: var(--radius-sm) !important;
  font-size: 0.8rem !important;
}

/* ── Dropdowns ── */
.Select-control {
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-sm) !important;
  min-height: 36px !important;
  box-shadow: none !important;
}
.Select-control:hover { border-color: var(--accent2) !important; }
.Select-value-label { font-size: 0.85rem !important; }

/* ── Switch ── */
.form-switch .form-check-input:checked {
  background-color: var(--green) !important;
  border-color: var(--green) !important;
}

/* ── Itinerary Panel ── */
.itinerary-step {
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--gold);
  margin-bottom: 0.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #fffbeb;
  transition: transform 0.2s;
}
.itinerary-step:hover { transform: translateX(4px); }
.itinerary-step .step-city {
  font-weight: 600;
  font-size: 0.85rem;
}
.itinerary-step .step-meta {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

/* ── Footer ── */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-light);
  font-size: 0.75rem;
}
