/* Ruta: zonazero/assets/css/estilos.css */
:root {
  --brand: #4A5B8C;
  --brand-dark: #37436b;
  --card: #ffffff;
  --bg: #f4f5f9;
  --text-mute: #6b7280;
}

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

.marca { color: var(--brand); font-weight: 700; }

/* ---------- Login ---------- */
.contenedor-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.card-login {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* ---------- Layout con sidebar ---------- */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-marca { padding: 0 1.25rem 1.25rem; font-size: 1.25rem; font-weight: 700; }
.sidebar-menu { list-style: none; padding: 0; margin: 0; flex: 1; }
.sidebar-menu li a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 10px 1.25rem; font-size: 14px;
}
.sidebar-menu li a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-usuario { padding: 1rem 1.25rem 0; border-top: 1px solid rgba(255,255,255,0.15); font-size: 13px; }
.sidebar-usuario a { color: #cbd3ea; }

.contenido-principal { flex: 1; padding: 1.5rem; max-width: 100%; }
.btn-abrir-menu { background: none; border: none; font-size: 22px; margin-bottom: 1rem; }

@media (max-width: 767.98px) {
  .sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .2s; }
  .sidebar.abierto { left: 0; }
}

/* ---------- Tarjetas / KPIs ---------- */
.tarjeta-kpi, .panel-blanco {
  background: var(--card);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.kpi-valor { font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); }

.lista-simple { list-style: none; margin: 0; padding: 0; }
.lista-simple li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.lista-simple li:last-child { border-bottom: none; }

.badge-estado { font-size: 11px; padding: 3px 8px; border-radius: 20px; }
.badge-estado-alerta { background: #fde3e3; color: #b02a2a; }
.badge-estado-ok { background: #e1f4e5; color: #1c7a34; }

.campo-label { font-size: 11px; text-transform: uppercase; color: var(--text-mute); font-weight: 600; margin-bottom: 4px; display: block; }

/* ---------- Modal genérico (patrón panel-modal-crud) ---------- */
.modal-fondo { display: none; position: fixed; inset: 0; background: rgba(37,43,66,0.45); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal-fondo.activo { display: flex; }
.modal-caja { background: var(--card); border-radius: 14px; padding: 1.5rem; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal-caja .modal-titulo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-caja .modal-cerrar { background: none; border: none; color: var(--text-mute); font-size: 20px; cursor: pointer; }

.btn-nuevo { background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

.fila-lista { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }
.fila-titulo { font-size: 14px; font-weight: 600; }
.fila-detalle { font-size: 12px; color: var(--text-mute); }
.fila-acciones { display: flex; gap: 6px; }
