/* ============================================================
   styles.css — Sistema de Gestión UPG
   Estilo: Clean Admin UI
   Colores institucionales: Verde #1a6b3c, Naranja #e8651a, Blanco
   Fuentes: DM Sans (cuerpo) + DM Mono (datos numéricos)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Colores institucionales */
  --verde:          #1a6b3c;
  --verde-dark:     #134f2d;
  --verde-light:    #e8f5ee;
  --verde-mid:      #2d8a54;
  --naranja:        #e8651a;
  --naranja-dark:   #c4511200;
  --naranja-light:  #fef0e7;

  /* UI */
  --sidebar-bg:     #0f2419;
  --sidebar-width:  240px;
  --topbar-h:       60px;

  --bg:             #f4f6f9;
  --surface:        #ffffff;
  --surface-2:      #f9fafb;
  --border:         #e5e9f0;
  --border-light:   #f0f2f6;

  /* Texto */
  --txt-primary:    #0f1d14;
  --txt-secondary:  #5a6a63;
  --txt-muted:      #9aab9f;
  --txt-inverse:    #ffffff;

  /* Estados */
  --success:        #16a34a;
  --success-bg:     #dcfce7;
  --warning:        #d97706;
  --warning-bg:     #fef3c7;
  --danger:         #dc2626;
  --danger-bg:      #fee2e2;
  --info:           #0284c7;
  --info-bg:        #e0f2fe;

  /* Sombras */
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:      0 8px 30px rgba(0,0,0,.12);

  /* Radios */
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  /* Tipografía */
  --font:           'DM Sans', sans-serif;
  --font-mono:      'DM Mono', monospace;

  /* Transiciones */
  --transition:     0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }

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

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar-brand-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sidebar-brand-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,.4);
  letter-spacing: 0.04em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: 16px 16px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  margin: 1px 8px;
  color: rgba(255,255,255,.55);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
}

.nav-item.active {
  background: var(--verde);
  color: #fff;
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--naranja);
  border-radius: 0 3px 3px 0;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.8;
}
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.user-card:hover { background: rgba(255,255,255,.06); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--verde);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 0.7rem;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
}

.btn-logout {
  color: rgba(255,255,255,.3);
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.btn-logout:hover { color: var(--naranja); }
.btn-logout svg { width: 16px; height: 16px; display: block; }

/* ── Main ────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--txt-primary);
  flex: 1;
}

.topbar-title span {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--txt-muted);
  margin-left: 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Page content ────────────────────────────────────────────── */
.page-content {
  padding: 24px 28px;
  flex: 1;
}

/* ── Tarjetas KPI ─────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--txt-primary);
  line-height: 1.1;
}

.kpi-value.verde   { color: var(--verde); }
.kpi-value.naranja { color: var(--naranja); }

.kpi-sub {
  font-size: 0.75rem;
  color: var(--txt-muted);
  margin-top: 6px;
}

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.kpi-icon.verde-bg   { background: var(--verde-light); color: var(--verde); }
.kpi-icon.naranja-bg { background: var(--naranja-light); color: var(--naranja); }
.kpi-icon.info-bg    { background: var(--info-bg); color: var(--info); }
.kpi-icon svg        { width: 20px; height: 20px; }

/* ── Tarjeta genérica ──────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--txt-primary);
  flex: 1;
}

.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  width: fit-content;
}

.tab-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--txt-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--txt-primary); background: rgba(0,0,0,.04); }
.tab-btn.active {
  background: var(--surface);
  color: var(--verde);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Tabla ──────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: var(--surface-2);
  padding: 11px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--txt-secondary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

.td-mono { font-family: var(--font-mono); font-size: 0.82rem; }
.td-bold { font-weight: 600; color: var(--txt-primary); }

/* ── Badges / Pills ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge-info    { background: var(--info-bg);     color: var(--info);    }
.badge-muted   { background: var(--border);      color: var(--txt-secondary); }
.badge-verde   { background: var(--verde-light); color: var(--verde);  }
.badge-naranja { background: var(--naranja-light); color: var(--naranja); }

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--verde);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,107,60,.25);
}
.btn-primary:hover {
  background: var(--verde-dark);
  box-shadow: 0 4px 14px rgba(26,107,60,.35);
  transform: translateY(-1px);
}

.btn-naranja {
  background: var(--naranja);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,101,26,.25);
}
.btn-naranja:hover {
  background: #cf561200;
  box-shadow: 0 4px 14px rgba(232,101,26,.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--verde);
  border: 1.5px solid var(--verde);
}
.btn-outline:hover { background: var(--verde-light); }

.btn-ghost {
  background: transparent;
  color: var(--txt-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--txt-primary); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 11px 24px; font-size: 0.95rem; }
.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--txt-secondary);
  border: 1px solid var(--border);
}
.btn-icon:hover { background: var(--border); color: var(--txt-primary); }
.btn-icon svg { width: 16px; height: 16px; display: block; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Formularios ────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txt-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--txt-primary);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(26,107,60,.1);
}
.form-control::placeholder { color: var(--txt-muted); }
.form-control:disabled { background: var(--surface-2); color: var(--txt-muted); cursor: not-allowed; }

select.form-control { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aab9f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(.98);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal.modal-lg { max-width: 760px; }
.modal.modal-xl { max-width: 960px; }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-title { font-size: 1rem; font-weight: 700; flex: 1; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--txt-muted);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  min-width: 240px;
  max-width: 360px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.25s ease;
  pointer-events: all;
}
.toast.toast-show { opacity: 1; transform: translateX(0); }
.toast-icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }
.toast-success { border-color: var(--success); }
.toast-success .toast-icon { background: var(--success-bg); color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-error .toast-icon { background: var(--danger-bg); color: var(--danger); }
.toast-warning { border-color: var(--warning); }
.toast-warning .toast-icon { background: var(--warning-bg); color: var(--warning); }
.toast-info { border-color: var(--info); }
.toast-info .toast-icon { background: var(--info-bg); color: var(--info); }

/* ── Spinner / Loading ──────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--verde);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--txt-muted);
}
.empty-state svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 12px; }
.empty-state p { font-size: 0.85rem; }

/* ── Realtime indicator ─────────────────────────────────────── */
.realtime-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 600;
}
.realtime-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 1.8s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(0.7); }
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

/* ── Grid helpers ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.flex    { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4  { margin-top: 16px; }
.mb-4  { margin-bottom: 16px; }
.flex-1 { flex: 1; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ── Comprobante card (específico de Caja) ───────────────────── */
.comprobante-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.comprobante-card:hover {
  border-color: var(--verde);
  box-shadow: var(--shadow);
}
.comprobante-card.selected {
  border-color: var(--verde);
  background: var(--verde-light);
  box-shadow: 0 0 0 3px rgba(26,107,60,.12);
}
.comprobante-card.ambiguo { border-color: var(--warning); }

/* ── Scrollbar personalizado ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--txt-muted); }

/* ── Login page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.login-left {
  width: 420px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: var(--verde);
  opacity: .12;
}

.login-left::after {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--naranja);
  opacity: .08;
}

.login-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  filter: brightness(0) invert(1);
}

.login-univ-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  margin-bottom: 6px;
}

.login-univ-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,.4);
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg);
}

.login-box {
  width: 100%;
  max-width: 380px;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--txt-primary);
  margin-bottom: 4px;
}
.login-sub {
  font-size: 0.88rem;
  color: var(--txt-muted);
  margin-bottom: 32px;
}

.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
}
.login-error.show { display: block; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-240px); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .page-content { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
