/* ============================================================
   JUICIOS EVALUATIVOS — Diseño renovado
   Dark Sidebar · Violeta/Índigo · Glassmorfismo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --sidebar-w: 260px;
  --sidebar-bg: #0f0c29;
  --sidebar-bg2: #1a1040;
  --accent: #7c3aed;
  --accent2: #6d28d9;
  --accent-glow: rgba(124,58,237,.35);
  --accent-light: rgba(124,58,237,.12);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --body-bg: #0d0b1e;
  --card-bg: rgba(255,255,255,.04);
  --card-border: rgba(255,255,255,.08);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #475569;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,.45);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.3);
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ── Fondo animado ──────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(124,58,237,.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(6,182,212,.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(124,58,237,.2);
  transition: transform var(--transition);
}

/* Logo */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 24px 24px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand .brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.sidebar-brand .brand-text { line-height: 1.2; }
.sidebar-brand .brand-title {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
.sidebar-brand .brand-sub {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Nav links */
.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  list-style: none;
}
.sidebar-nav li { margin-bottom: 2px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.sidebar-nav a i {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-nav a:hover {
  background: var(--accent-light);
  color: #fff;
}
.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(124,58,237,.3), rgba(124,58,237,.1));
  color: #fff;
  font-weight: 600;
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

/* Section label */
.nav-section-label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 16px 14px 6px;
}

/* Footer sidebar */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .72rem;
  color: var(--text-dim);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   WRAPPER PRINCIPAL
   ═══════════════════════════════════════════════════════════ */
#main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* Top bar */
#topbar {
  height: 64px;
  background: rgba(13,11,30,.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}
.topbar-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin-left: 4px;
}
.topbar-spacer { flex: 1; }
.topbar-badge {
  background: var(--accent-light);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,.3);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

/* Contenido */
#page-content {
  padding: 28px;
  flex: 1;
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════════
   TARJETAS
   ═══════════════════════════════════════════════════════════ */
.je-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  max-width: 100%;
}
.je-card:hover { border-color: rgba(124,58,237,.35); box-shadow: var(--shadow-sm); }

.je-card .card-header {
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--card-border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px 20px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.je-card .card-body { padding: 20px; }
.je-card .card-body.p-0 { padding: 0; }

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -30px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: .06;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--stat-color, rgba(124,58,237,.4)); }

.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card .stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}
.stat-card .stat-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.stat-card-link:hover {
  color: inherit;
}

.stat-card-link.active .stat-card {
  border-color: var(--stat-color, rgba(124,58,237,.45));
  box-shadow: 0 0 0 1px var(--stat-color, rgba(124,58,237,.35)), var(--shadow-sm);
}

/* Color variants */
.stat-violet .stat-icon { background: rgba(124,58,237,.18); color: #a78bfa; }
.stat-violet { --stat-color: rgba(124,58,237,.4); }
.stat-cyan   .stat-icon { background: rgba(6,182,212,.15); color: #22d3ee; }
.stat-cyan   { --stat-color: rgba(6,182,212,.4); }
.stat-green  .stat-icon { background: rgba(16,185,129,.15); color: #34d399; }
.stat-green  { --stat-color: rgba(16,185,129,.4); }
.stat-amber  .stat-icon { background: rgba(245,158,11,.15); color: #fbbf24; }
.stat-amber  { --stat-color: rgba(245,158,11,.4); }
.stat-red    .stat-icon { background: rgba(239,68,68,.15); color: #f87171; }
.stat-red    { --stat-color: rgba(239,68,68,.4); }
.stat-indigo .stat-icon { background: rgba(79,70,229,.18); color: #818cf8; }
.stat-indigo { --stat-color: rgba(79,70,229,.4); }

/* ── Quick action cards ─────────────────────────────────────── */
.quick-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  display: block;
  transition: all var(--transition);
}
.quick-card:hover {
  background: var(--accent-light);
  border-color: rgba(124,58,237,.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px var(--accent-glow);
  color: #fff;
}
.quick-card .qc-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  display: block;
  transition: transform var(--transition);
}
.quick-card:hover .qc-icon { transform: scale(1.15); }
.quick-card .qc-title { font-size: .9rem; font-weight: 600; }
.quick-card .qc-sub { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.quick-card:hover .qc-sub { color: rgba(255,255,255,.7); }

/* ── Barra de progreso ──────────────────────────────────────── */
.je-progress { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.je-progress-bar { height: 100%; border-radius: 4px; transition: width .6s ease; }
.je-progress-bar.green  { background: linear-gradient(90deg, #059669, #10b981); }
.je-progress-bar.amber  { background: linear-gradient(90deg, #d97706, #f59e0b); }
.je-progress-bar.red    { background: linear-gradient(90deg, #dc2626, #ef4444); }

.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 82px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: .78rem;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.045);
  color: var(--text-main);
  white-space: nowrap;
}
.progress-pill .progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,.05);
}
.progress-pill.green {
  background: rgba(16,185,129,.12);
  border-color: rgba(16,185,129,.28);
  color: #34d399;
}
.progress-pill.green .progress-dot { background: #10b981; }
.progress-pill.amber {
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.3);
  color: #fbbf24;
}
.progress-pill.amber .progress-dot { background: #f59e0b; }
.progress-pill.red {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.28);
  color: #f87171;
}
.progress-pill.red .progress-dot { background: #ef4444; }

.global-progress-card {
  min-height: 100%;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(124,58,237,.42);
  background:
    linear-gradient(135deg, rgba(124,58,237,.24), rgba(79,70,229,.10)),
    rgba(255,255,255,.035);
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}

.global-progress-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.global-progress-value {
  color: #a78bfa;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
}

.global-progress-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(124,58,237,.16);
  color: rgba(196,181,253,.78);
  font-size: 1.7rem;
  flex-shrink: 0;
}

.global-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.global-progress-track {
  width: 100%;
  height: 12px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.global-progress-fill {
  height: 100%;
  border-radius: inherit;
  transition: width .6s ease;
}

.global-progress-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
.global-progress-fill.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.global-progress-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ── Badges ─────────────────────────────────────────────────── */
.je-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}
.je-badge-violet  { background: rgba(124,58,237,.18); color: #a78bfa; border: 1px solid rgba(124,58,237,.3); }
.je-badge-green   { background: rgba(16,185,129,.15); color: #34d399;  border: 1px solid rgba(16,185,129,.3); }
.je-badge-amber   { background: rgba(245,158,11,.15); color: #fbbf24;  border: 1px solid rgba(245,158,11,.3); }
.je-badge-red     { background: rgba(239,68,68,.15);  color: #f87171;  border: 1px solid rgba(239,68,68,.3);  }
.je-badge-gray    { background: rgba(148,163,184,.1); color: #94a3b8;  border: 1px solid rgba(148,163,184,.2); }
.je-badge-cyan    { background: rgba(6,182,212,.12);  color: #22d3ee;  border: 1px solid rgba(6,182,212,.25); }

/* ── Tablas ──────────────────────────────────────────────────── */
.je-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.je-table thead th {
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}
.je-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text-main);
  vertical-align: middle;
}
.je-table tbody tr:last-child td { border-bottom: none; }
.je-table tbody tr { transition: background var(--transition); }
.je-table tbody tr:hover { background: rgba(124,58,237,.07); }

/* DataTables dark override */
.dataTables_wrapper { color: var(--text-main); font-size: .875rem; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}
.dataTables_wrapper .dataTables_filter input { border-radius: 20px; }
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label { color: var(--text-muted); }
.dataTables_wrapper .paginate_button {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid var(--card-border) !important;
  color: var(--text-muted) !important;
  border-radius: 8px !important;
  margin: 0 2px !important;
}
.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .paginate_button:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
table.dataTable thead th,
table.dataTable thead td { border-bottom: 1px solid var(--card-border); background: rgba(255,255,255,.04); color: var(--text-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
table.dataTable tbody tr { background: transparent; }
table.dataTable tbody tr:hover { background: rgba(124,58,237,.07); }
table.dataTable tbody td { border-bottom: 1px solid rgba(255,255,255,.04); color: var(--text-main); }

/* ── Formularios ─────────────────────────────────────────────── */
.je-input {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid var(--card-border) !important;
  color: var(--text-main) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 14px !important;
  font-size: .875rem !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}
.je-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
  outline: none !important;
  background: rgba(255,255,255,.08) !important;
}
.je-input::placeholder { color: var(--text-dim) !important; }
.je-input option { background: #1a1040; }

.je-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
  display: block;
}

/* ── Botones ─────────────────────────────────────────────────── */
.je-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.je-btn-primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.je-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px var(--accent-glow); color: #fff; }
.je-btn-outline {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}
.je-btn-outline:hover { border-color: var(--accent); color: #a78bfa; background: var(--accent-light); }
.je-btn-danger  { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.je-btn-danger:hover { background: #ef4444; color: #fff; }
.je-btn-success { background: rgba(16,185,129,.16); color: #34d399; border: 1px solid rgba(16,185,129,.35); }
.je-btn-success:hover { background: #10b981; color: #06130f; box-shadow: 0 8px 20px rgba(16,185,129,.2); transform: translateY(-2px); }
.je-btn-sm { padding: 6px 14px; font-size: .78rem; }
.je-btn.icon-only {
  width: 34px;
  height: 34px;
  justify-content: center;
  padding: 0;
}

/* Consolidado */
.consolidado-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.consolidado-hero {
  background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(6,182,212,.06));
  border: 1px solid rgba(124,58,237,.22);
  border-radius: var(--radius);
  padding: 22px;
}

.consolidado-hero h4 i {
  color: #a78bfa;
}

.consolidado-hero p {
  max-width: 760px;
  margin-top: 8px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: .9rem;
}

.consolidado-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  min-width: 0;
}

.consolidado-stats .stat-card {
  min-width: 0;
  height: 100%;
}

.consolidado-stats .stat-num {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.consolidado-filter .je-input {
  width: 100%;
  min-height: 41px;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.consolidado-table {
  overflow: hidden;
  max-width: 100%;
}

.consolidado-table .card-header {
  justify-content: flex-start;
}

.consolidado-table .dataTables_wrapper {
  padding: 16px 16px 12px;
  min-width: 1580px;
}

.consolidado-table .dt-top,
.consolidado-table .dt-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.consolidado-table .dt-top {
  margin-bottom: 12px;
}

.consolidado-table .dt-bottom {
  margin-top: 12px;
}

.consolidado-table .je-table {
  min-width: 1580px;
  table-layout: fixed;
}

.consolidado-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.consolidado-scroll .dataTables_wrapper {
  width: max-content;
}

.consolidado-table th,
.consolidado-table td {
  overflow-wrap: anywhere;
}

.consolidado-table th:nth-child(1),
.consolidado-table td:nth-child(1) { width: 150px; }
.consolidado-table th:nth-child(2),
.consolidado-table td:nth-child(2) { width: 190px; }
.consolidado-table th:nth-child(3),
.consolidado-table td:nth-child(3) { width: 145px; }
.consolidado-table th:nth-child(4),
.consolidado-table td:nth-child(4) { width: 95px; }
.consolidado-table th:nth-child(5),
.consolidado-table td:nth-child(5) { width: 190px; }
.consolidado-table th:nth-child(6),
.consolidado-table td:nth-child(6),
.consolidado-table th:nth-child(7),
.consolidado-table td:nth-child(7),
.consolidado-table th:nth-child(8),
.consolidado-table td:nth-child(8) { width: 105px; }
.consolidado-table th:nth-child(9),
.consolidado-table td:nth-child(9) { width: 145px; }
.consolidado-table th:nth-child(10),
.consolidado-table td:nth-child(10) { width: 120px; }
.consolidado-table th:nth-child(11),
.consolidado-table td:nth-child(11) { width: 170px; }
.consolidado-table th:nth-child(12),
.consolidado-table td:nth-child(12) { width: 60px; }

.consolidado-table .dataTables_filter input {
  max-width: 220px;
}

.doc-cell {
  white-space: nowrap;
  font-weight: 700;
}

.doc-cell .je-badge {
  margin-right: 8px;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition);
}

.doc-link:hover {
  color: #a78bfa;
}

.doc-link:hover .je-badge {
  border-color: rgba(124,58,237,.45);
  color: #c4b5fd;
}

.apprentice-judgements .table-responsive {
  max-width: 100%;
  overflow-x: auto;
}

.apprentice-judgements .je-table {
  min-width: 980px;
}

.apprentice-judgements .je-table th:nth-child(1),
.apprentice-judgements .je-table td:nth-child(1) { width: 220px; }
.apprentice-judgements .je-table th:nth-child(2),
.apprentice-judgements .je-table td:nth-child(2) { width: 390px; }
.apprentice-judgements .je-table th:nth-child(3),
.apprentice-judgements .je-table td:nth-child(3) { width: 120px; }
.apprentice-judgements .je-table th:nth-child(4),
.apprentice-judgements .je-table td:nth-child(4) { width: 110px; }
.apprentice-judgements .je-table th:nth-child(5),
.apprentice-judgements .je-table td:nth-child(5) { width: 180px; }

.table-muted {
  color: var(--text-muted) !important;
  font-size: .8rem;
}

.text-ok {
  color: #34d399 !important;
  font-weight: 700;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 56px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state i {
  color: rgba(148,163,184,.55);
  font-size: 2.2rem;
}

.empty-state p {
  margin: 0;
}

/* ── Zona drag & drop ────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed rgba(124,58,237,.4);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  background: rgba(124,58,237,.05);
  transition: all var(--transition);
}
.drop-zone:hover, .drop-zone.is-dragover {
  border-color: var(--accent);
  background: rgba(124,58,237,.12);
}
.drop-zone .dz-icon { font-size: 3rem; color: rgba(124,58,237,.5); margin-bottom: .75rem; display: block; }
.drop-zone.has-file .dz-icon { color: var(--success); }
.drop-zone p { color: var(--text-muted); font-size: .875rem; margin: 0; }
.drop-zone .dz-filename { color: var(--text-muted); font-size: .82rem; margin-top: .5rem; }

/* Importar Excel */
.import-page {
  width: min(100%, 980px);
  margin: 0 auto;
}

.import-header {
  width: min(100%, 880px);
  margin-inline: auto;
}

.import-card {
  box-shadow: 0 18px 46px rgba(0,0,0,.28);
}

/* ── Flash alerts ────────────────────────────────────────────── */
.je-alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 20px;
}
.je-alert-success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #34d399; }
.je-alert-danger  { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.3);  color: #f87171; }
.je-alert-info    { background: rgba(6,182,212,.1);   border: 1px solid rgba(6,182,212,.25); color: #22d3ee; }
.je-alert .alert-icon { font-size: 1.1rem; margin-top: 1px; flex-shrink: 0; }
.je-alert-close {
  margin-left: auto; background: none; border: none;
  color: inherit; opacity: .6; cursor: pointer; font-size: 1rem;
}
.je-alert-close:hover { opacity: 1; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.je-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--text-muted); margin-bottom: 20px;
  list-style: none; padding: 0;
}
.je-breadcrumb li + li::before { content: '/'; opacity: .4; }
.je-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.je-breadcrumb a:hover { color: #a78bfa; }
.je-breadcrumb .active { color: var(--text-main); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-content {
  background: #1a1040;
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius);
  color: var(--text-main);
}
.modal-header {
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 20px 24px;
}
.modal-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 24px; }
.btn-close-white { filter: invert(1) brightness(2); }

/* ── Page header ─────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h1, .page-header h4 {
  font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0;
}
.page-header p { font-size: .82rem; color: var(--text-muted); margin: 4px 0 0; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Animación entrada ───────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .35s ease forwards; }
.fade-up-2 { animation: fadeUp .35s .07s ease both; }
.fade-up-3 { animation: fadeUp .35s .14s ease both; }
.fade-up-4 { animation: fadeUp .35s .21s ease both; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #main-wrapper { margin-left: 0; }
  #page-content { padding: 16px; }
  .stat-card { padding: 16px 14px; gap: 12px; }
  .stat-card .stat-num { font-size: 1.5rem; }
}

/* ── Overlay móvil ────────────────────────────────────────────── */
#sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 99; backdrop-filter: blur(2px);
}
#sidebar-overlay.show { display: block; }
