/* =====================================================================
 * ADA · Hoja de estilos principal
 * Paleta: verde aceite + tierra. Apoyada en Bootstrap 5.
 * ===================================================================== */

:root {
  --ada-primary: #2d6a4f;        /* verde aceite oscuro */
  --ada-primary-dark: #1b4332;
  --ada-accent: #95d5b2;         /* verde claro */
  --ada-earth: #b08968;          /* tierra cálida */
  --ada-bg: #f8f9f4;             /* fondo crema muy suave */
  --ada-text: #1f2421;
  --ada-muted: #6c757d;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--ada-bg);
  color: var(--ada-text);
}

.bg-soft { background: var(--ada-bg); }

/* === Navbar === */
.ada-nav {
  background: var(--ada-primary-dark);
}
.ada-nav .navbar-brand { font-weight: 600; }
.ada-nav .brand-dot {
  display: inline-flex;
  width: 32px; height: 32px;
  background: var(--ada-accent);
  color: var(--ada-primary-dark);
  border-radius: 50%;
  align-items: center; justify-content: center;
}
.ada-nav .nav-link { color: rgba(255,255,255,0.85); }
.ada-nav .nav-link:hover { color: #fff; }
.ada-nav .nav-link.active { color: #fff; font-weight: 500; }

/* === Botones primarios verde ADA === */
.btn-success, .bg-success {
  background-color: var(--ada-primary) !important;
  border-color: var(--ada-primary) !important;
}
.btn-success:hover, .btn-success:focus {
  background-color: var(--ada-primary-dark) !important;
  border-color: var(--ada-primary-dark) !important;
}
.text-success { color: var(--ada-primary) !important; }

/* === Login === */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%; max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  text-align: center;
}
.brand-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ada-accent);
  color: var(--ada-primary-dark);
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

/* === Cards estilo ADA === */
.kpi-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.25rem;
  height: 100%;
}
.kpi-card .kpi-label {
  font-size: 0.78rem;
  color: var(--ada-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}
.kpi-card .kpi-value {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ada-text);
  line-height: 1.1;
}
.kpi-card .kpi-sub {
  font-size: 0.78rem;
  color: var(--ada-muted);
  margin-top: 0.35rem;
}
.kpi-card.success-tone .kpi-value { color: var(--ada-primary); }

.progress-thin { height: 6px; }

/* === Panel === */
.ada-panel {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.ada-panel h2.h6, .ada-panel h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--ada-primary-dark);
  display: flex; align-items: center; gap: 0.4rem;
}

/* === Mapa === */
#mapa, .ada-map {
  height: 360px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}
.leaflet-popup-content b { color: var(--ada-primary-dark); }

/* === Banner avisos === */
.aviso-banner {
  border-left: 4px solid var(--ada-earth);
  background: #fdf6ed;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.aviso-banner b { color: var(--ada-earth); }

/* === Etiqueta La Flota (preview en pantalla) === */
.flota-preview {
  background: white;
  border: 2px solid #222;
  font-family: 'Courier New', monospace;
  padding: 1rem;
  max-width: 360px;
  margin: 1rem auto;
  font-size: 0.85rem;
}
.flota-preview .titulo {
  text-align: center;
  font-weight: 700;
  border-bottom: 1px solid #222;
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
  letter-spacing: 1px;
}

/* === Tablas compactas === */
.table-ada th {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--ada-muted);
  font-weight: 500;
  letter-spacing: 0.4px;
}
.table-ada td { font-size: 0.9rem; vertical-align: middle; }

/* === Responsive === */
@media (max-width: 576px) {
  .kpi-card .kpi-value { font-size: 1.4rem; }
  #mapa, .ada-map { height: 240px; }
}
