:root {
  --sidebar-width: 250px;
  --brand-color: #0d6efd;
  --bg-body: #f4f6f9;
}

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

/* ── Layout ────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: #1a2233;
  color: #cfd6e4;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.sidebar-brand small { display: block; opacity: .6; font-size: .72rem; }
.sidebar-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; }

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}

.sidebar-nav .nav-link,
.sidebar-footer .nav-link {
  color: #cfd6e4;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
}
.sidebar-nav .nav-link i,
.sidebar-footer .nav-link i { width: 20px; text-align: center; }

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: rgba(13,110,253,0.18);
  color: #fff;
}

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e6e9ee;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.page-content {
  padding: 24px;
}

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
}

/* ── Cards / KPIs ──────────────────────────────────────── */
.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  height: 100%;
}
.kpi-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.kpi-label { font-size: .78rem; color: #6c757d; margin-top: 4px; }

.card { border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

.seccion-card { transition: transform .15s ease, box-shadow .15s ease; cursor: pointer; }
.seccion-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }

/* ── Auth ──────────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(135deg, #1a2233 0%, #0d6efd 100%);
  min-height: 100vh;
}
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.auth-icon { font-size: 2.4rem; color: var(--brand-color); }
.auth-logo { width: 88px; height: 88px; object-fit: contain; }
