:root {
  --ail-azul: #123a5c;
  --ail-azul-osc: #0c2740;
  --ail-dorado: #c9a227;
  --ail-gris: #f4f6f8;
  --ail-texto: #2b2f33;
}

body {
  background: var(--ail-gris);
  color: var(--ail-texto);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Barra lateral ---------- */
.ail-sidebar {
  background: var(--ail-azul-osc);
  min-height: 100vh;
  width: 240px;
  flex-shrink: 0;
}
.ail-sidebar .brand {
  color: #fff;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.ail-sidebar .brand strong { color: var(--ail-dorado); letter-spacing: .5px; }
.ail-sidebar .nav-link {
  color: rgba(255,255,255,.78);
  padding: .55rem 1.2rem;
  border-left: 3px solid transparent;
  font-size: .93rem;
}
.ail-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.ail-sidebar .nav-link.active {
  color: #fff; background: rgba(255,255,255,.08);
  border-left-color: var(--ail-dorado);
  font-weight: 600;
}
.ail-sidebar .nav-header {
  color: rgba(255,255,255,.45);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .9rem 1.2rem .2rem;
}

/* ---------- Topbar ---------- */
.ail-topbar {
  background: #fff;
  border-bottom: 1px solid #e3e7eb;
  padding: .65rem 1.25rem;
}

/* ---------- Tarjetas de indicadores ---------- */
.ail-kpi {
  background: #fff;
  border-radius: .5rem;
  border: 1px solid #e3e7eb;
  padding: 1.1rem 1.3rem;
}
.ail-kpi .valor { font-size: 1.6rem; font-weight: 700; color: var(--ail-azul); }
.ail-kpi .etiqueta { color: #6b7280; font-size: .85rem; }

/* ---------- Tablas ---------- */
.ail-card {
  background: #fff;
  border: 1px solid #e3e7eb;
  border-radius: .5rem;
  padding: 1.25rem;
}
.table thead th {
  background: var(--ail-azul);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  border: none;
}
.table-hover tbody tr:hover { background: #eef3f8; }

.btn-ail { background: var(--ail-azul); border-color: var(--ail-azul); color: #fff; }
.btn-ail:hover { background: var(--ail-azul-osc); border-color: var(--ail-azul-osc); color: #fff; }

.badge-vigente { background: #1e7e34; }
.badge-anulado { background: #a12626; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ail-azul-osc), var(--ail-azul));
}
.login-card {
  background: #fff;
  border-radius: .6rem;
  padding: 2.2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.login-card .titulo { color: var(--ail-azul); font-weight: 700; }
.login-card .subtitulo { color: var(--ail-dorado); font-weight: 600; letter-spacing: .04em; }

@media (max-width: 900px) {
  .ail-sidebar { position: fixed; left: -240px; top: 0; z-index: 1040; transition: left .2s; }
  .ail-sidebar.abierto { left: 0; }
}
