/* ============================================================
   Sistema de Control de Eventos — Diseño Visual v4
   Paleta profesional azul corporativo con toques de energía
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
  /* Colores primarios */
  --azul:        #1D4ED8;
  --azul-hover:  #1E40AF;
  --azul-light:  #EFF6FF;
  --azul-mid:    #BFDBFE;
  --azul-dark:   #1E3A8A;

  /* Colores semánticos */
  --verde:       #059669;
  --verde-light: #ECFDF5;
  --verde-mid:   #A7F3D0;
  --naranja:     #D97706;
  --naranja-light:#FFFBEB;
  --rojo:        #DC2626;
  --rojo-light:  #FEF2F2;
  --morado:      #7C3AED;
  --morado-light:#F5F3FF;

  /* Escala de grises */
  --bg:          #F0F4F8;
  --surface:     #FFFFFF;
  --border:      #E2E8F0;
  --border-hover:#CBD5E1;
  --hover-bg:    #F8FAFF;
  --text-1:      #0F172A;
  --text-2:      #334155;
  --text-3:      #64748B;
  --text-4:      #94A3B8;

  /* Sidebar */
  --sidebar-bg:       #0F172A;
  --sidebar-hover:    rgba(255,255,255,0.07);
  --sidebar-active:   linear-gradient(135deg,#1D4ED8,#3B82F6);
  --sidebar-border:   rgba(255,255,255,0.07);
  --sidebar-text:     rgba(255,255,255,0.60);
  --sidebar-text-act: #FFFFFF;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-blue: 0 4px 14px rgba(29,78,216,0.30);

  /* Radio */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════ */
.sidebar {
  width: 256px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: width 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 20px rgba(0,0,0,0.20);
}
.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-sub,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .sidebar-footer-info { display: none; }

/* Header del sidebar con logo */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-logo-wrap {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(29,78,216,0.45);
  overflow: hidden;
  position: relative;
}
.sidebar-logo-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.sidebar-logo-txt {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.5px;
}
.sidebar-title {
  font-size: 13px; font-weight: 700;
  color: #F1F5F9;
  line-height: 1.25;
}
.sidebar-sub { font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 1px; }
.sidebar-toggle {
  margin-left: auto;
  background: none; border: none;
  cursor: pointer; font-size: 18px;
  color: rgba(255,255,255,0.40);
  padding: 5px; border-radius: 7px;
  transition: all 0.15s; flex-shrink: 0;
  line-height: 1;
}
.sidebar-toggle:hover {
  color: #fff;
  background: rgba(255,255,255,0.10);
}

/* Nav links */
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-section {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase; letter-spacing: 0.10em;
  padding: 14px 10px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--sidebar-text);
  font-size: 13px; font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.18s;
}
.nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-act);
  font-weight: 700;
  box-shadow: var(--shadow-blue);
}
.nav-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }

/* Footer sidebar */
.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 10px;
}
.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1D4ED8, #60A5FA);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.sidebar-footer-info {}
.sidebar-footer-name { font-size: 12px; font-weight: 700; color: #F1F5F9; }
.sidebar-footer-user { font-size: 10px; color: rgba(255,255,255,0.38); }
.sidebar-logout {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.40);
  text-decoration: none;
  padding: 7px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  transition: all 0.15s;
}
.sidebar-logout:hover {
  color: #fff;
  background: rgba(220,38,38,0.18);
  border-color: rgba(220,38,38,0.4);
}

/* ── Main ───────────────────────────────────────────────── */
.main-content {
  margin-left: 256px;
  flex: 1;
  padding: 28px 32px;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(.4,0,.2,1);
}
.main-content.collapsed { margin-left: 72px; }

/* ══════════════════════════════════════════════════════════
   TOPBAR — barra oscura superior con título y logo
══════════════════════════════════════════════════════════ */
.main-content {
  margin-left: 256px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(.4,0,.2,1);
}
.main-content.collapsed { margin-left: 72px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 55%, #1D4ED8 100%);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  min-height: 100px;
}
.topbar::before {
  content: '';
  position: absolute;
  right: 180px; top: -30px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}

.topbar-left { flex: 1; min-width: 0; }
.topbar-title {
  font-size: 20px;
  font-weight: 800;
  color: #F1F5F9;
  letter-spacing: -0.3px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
  font-weight: 400;
}

.topbar-logo {
  width: 120px;
  height: 80px;
  border-radius: 12px;
  background: rgba(255,255,255,0.10);
  border: 1.5px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
}
.topbar-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.topbar-logo-fallback {
  font-size: 32px;
  font-weight: 900;
  color: rgba(255,255,255,0.75);
  letter-spacing: -1px;
}

/* Cuerpo de contenido debajo de la topbar */
.main-body {
  flex: 1;
  padding: 28px 32px;
}

/* El page-header ya no va dentro del content — se usa el topbar */
.page-header { display: none; }

/* Limpiar estilos obsoletos del logo flotante y logo-bar */
.form-logo-bar  { display: none !important; }
.form-logo-float { display: none !important; }
.card-title { padding-right: 0; }

/* ── Page Header ─────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-title {
  font-size: 22px; font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.4px;
}
.page-subtitle { font-size: 13px; color: var(--text-3); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.card-title {
  font-size: 15px; font-weight: 800;
  color: var(--text-1);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.2px;
}
.card-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 20px;
  background: linear-gradient(180deg, var(--azul), #60A5FA);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Grids ───────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ══════════════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════════════ */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--azul), #60A5FA); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--verde), #34D399); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--naranja), #FCD34D); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--morado), #A78BFA); }

.stat-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 30px; font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}
.stat-blue   { color: var(--azul); }
.stat-green  { color: var(--verde); }
.stat-orange { color: var(--naranja); }
.stat-purple { color: var(--morado); }

/* ══════════════════════════════════════════════════════════
   FORMULARIOS — Labels y campos resaltados
══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
label .req {
  color: var(--rojo);
  font-size: 13px;
  line-height: 1;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  background: #FAFBFF;
  outline: none;
  transition: all 0.18s;
  font-family: inherit;
}
input:hover, select:hover { border-color: var(--border-hover); background: #fff; }
input:focus, select:focus, textarea:focus {
  border-color: var(--azul);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29,78,216,0.10);
}
input[readonly], input:disabled {
  background: #F1F5F9; color: var(--text-3);
  cursor: not-allowed; border-color: var(--border);
}
input[readonly]:hover { border-color: var(--border); background: #F1F5F9; }
textarea { resize: vertical; min-height: 82px; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--text-4); font-style: italic; font-weight: 400; }

.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 20px; margin-top: 10px;
  border-top: 1px solid var(--border);
}

/* Section divider */
.section-divider {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 800;
  color: var(--azul);
  text-transform: uppercase; letter-spacing: 0.09em;
  padding: 8px 0;
  margin: 4px 0 16px;
}
.section-divider::before {
  content: '';
  display: inline-block;
  width: 16px; height: 2px;
  background: var(--azul);
  border-radius: 1px;
  flex-shrink: 0;
}
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--azul-mid), transparent);
}

/* ══════════════════════════════════════════════════════════
   BOTONES
══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
  letter-spacing: 0.01em;
  font-family: inherit;
}
.btn:hover { background: var(--hover-bg); border-color: var(--border-hover); color: var(--azul); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--azul) 0%, #3B82F6 100%);
  color: #fff; border-color: transparent;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--azul-hover), var(--azul));
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(29,78,216,0.40);
}
.btn-success {
  background: linear-gradient(135deg, var(--verde), #10B981);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(5,150,105,0.30);
}
.btn-success:hover { filter: brightness(1.08); color: #fff; transform: translateY(-1px); }
.btn-danger { color: var(--rojo); border-color: #FCA5A5; background: var(--surface); }
.btn-danger:hover { background: var(--rojo-light); border-color: var(--rojo); color: var(--rojo); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn-xs { padding: 3px 9px; font-size: 11px; border-radius: 5px; }

/* ══════════════════════════════════════════════════════════
   TABLAS
══════════════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; border-radius: var(--r-sm); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table thead tr {
  background: linear-gradient(135deg, #F8FAFF, var(--azul-light));
  border-bottom: 2px solid var(--azul-mid);
}
.data-table th {
  text-align: left; padding: 12px 14px;
  font-size: 10px; font-weight: 800;
  color: var(--azul-dark);
  text-transform: uppercase; letter-spacing: 0.09em;
  white-space: nowrap;
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: var(--text-2);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover td { background: var(--hover-bg); }
.data-table tbody tr:nth-child(even) td { background: #FAFBFF; }
.data-table tbody tr:nth-child(even):hover td { background: var(--hover-bg); }
.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12px; font-weight: 600; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 11px;
  border-radius: 100px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.03em; white-space: nowrap;
}
.badge-green  { background: var(--verde-light); color: #065F46; border: 1px solid var(--verde-mid); }
.badge-yellow { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.badge-blue   { background: var(--azul-light); color: #1E40AF; border: 1px solid var(--azul-mid); }
.badge-red    { background: var(--rojo-light); color: #991B1B; border: 1px solid #FECACA; }
.badge-gray   { background: #F8FAFC; color: var(--text-3); border: 1px solid var(--border); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 13px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 14px;
  border-left: 4px solid transparent;
}
.alert-success { background: var(--verde-light); color: #065F46; border-left-color: var(--verde); }
.alert-danger, .alert-error { background: var(--rojo-light); color: #991B1B; border-left-color: var(--rojo); }
.alert-warning { background: var(--naranja-light); color: #92400E; border-left-color: var(--naranja); }
.alert-info { background: var(--azul-light); color: #1E40AF; border-left-color: var(--azul); }

/* ── Jornadas ────────────────────────────────────────────── */
.jornada-item {
  background: linear-gradient(135deg, #F8FAFF, var(--azul-light));
  border: 1.5px solid var(--azul-mid);
  border-radius: var(--r-md);
  padding: 16px 18px; margin-bottom: 12px;
}
.jornada-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 14px;
}
.jornada-title {
  font-size: 13px; font-weight: 800;
  color: var(--azul-dark);
  display: flex; align-items: center; gap: 8px;
}
.jornada-title::before { content: '◆'; font-size: 9px; color: var(--azul); }

/* ── Checkboxes ──────────────────────────────────────────── */
.checkbox-list { display: flex; flex-direction: column; gap: 7px; }
.checkbox-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  transition: all 0.15s;
  background: #FAFBFF;
}
.checkbox-item:hover {
  background: var(--azul-light);
  border-color: #93C5FD;
  color: var(--azul);
}
.checkbox-item input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--azul); flex-shrink: 0;
}
.checkbox-item.selected { background: var(--azul-light); border-color: var(--azul); }

/* ── Progress ────────────────────────────────────────────── */
.progress {
  height: 8px; background: #E2E8F0;
  border-radius: 4px; overflow: hidden; margin-top: 6px;
}
.progress-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.progress-blue   { background: linear-gradient(90deg, var(--azul), #60A5FA); }
.progress-green  { background: linear-gradient(90deg, var(--verde), #34D399); }
.progress-orange { background: linear-gradient(90deg, var(--naranja), #FCD34D); }

/* ── Search bar ──────────────────────────────────────────── */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input { flex: 1; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 52px 20px;
  color: var(--text-4); font-size: 14px; font-weight: 500;
}
.empty-icon { font-size: 44px; margin-bottom: 12px; opacity: 0.5; }

/* ── Event Card ──────────────────────────────────────────── */
.evento-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 16px 18px;
  margin-bottom: 10px; background: var(--surface);
  transition: all 0.2s; position: relative; overflow: hidden;
}
.evento-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--azul), #60A5FA);
}
.evento-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #93C5FD;
  transform: translateY(-2px);
}
.evento-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.evento-name { font-size: 14px; font-weight: 800; color: var(--text-1); }
.evento-code {
  font-size: 11px; color: var(--azul);
  font-family: 'JetBrains Mono', monospace; font-weight: 600;
  background: var(--azul-light); padding: 2px 8px;
  border-radius: 5px; display: inline-block; margin-top: 3px;
}
.evento-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── User avatar ─────────────────────────────────────────── */
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--azul), #60A5FA);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(29,78,216,0.30);
}

/* ── Perm tags ───────────────────────────────────────────── */
.perm-tag {
  display: inline-block;
  background: var(--azul-light);
  border-radius: 5px; padding: 2px 9px;
  font-size: 11px; font-weight: 700;
  color: var(--azul); margin: 2px;
  border: 1px solid var(--azul-mid);
}

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #0F172A; color: #fff;
  padding: 14px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600;
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  max-width: 340px; box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--azul);
  transform: translateY(8px);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: var(--rojo); background: #450A0A; }

/* ── Upload ──────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed #93C5FD; border-radius: var(--r-md);
  padding: 44px 24px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--azul-light);
}
.upload-area:hover { border-color: var(--azul); background: #EFF6FF; }
.upload-icon { font-size: 44px; margin-bottom: 10px; }
.upload-text { font-size: 13px; color: var(--text-3); font-weight: 500; }

/* ── Login page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #1D4ED8 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(29,78,216,0.3) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(59,130,246,0.2) 0%, transparent 50%);
  animation: pulse-bg 8s ease-in-out infinite alternate;
}
@keyframes pulse-bg {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.05); }
}
.login-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 0;
  width: 100%; max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.40);
  overflow: hidden;
  position: relative; z-index: 1;
}
.login-header {
  background: linear-gradient(135deg, #0F172A, #1E3A5F);
  padding: 32px 36px 28px;
  text-align: center;
}
.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--azul), #60A5FA);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 4px 20px rgba(29,78,216,0.50);
  overflow: hidden;
}
.login-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.login-title { font-size: 22px; font-weight: 800; color: #F1F5F9; letter-spacing: -0.3px; }
.login-sub { font-size: 13px; color: rgba(255,255,255,0.45); margin-top: 4px; }
.login-body { padding: 30px 36px 36px; }
.login-body label {
  font-size: 11px; font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 7px;
}
.login-body input {
  font-size: 14px; padding: 12px 16px;
  border-radius: 10px;
}
.login-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--azul), #3B82F6);
  color: #fff; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 800;
  cursor: pointer; margin-top: 6px;
  box-shadow: var(--shadow-blue);
  transition: all 0.2s;
  font-family: inherit; letter-spacing: 0.01em;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29,78,216,0.45);
}
.login-btn:active { transform: scale(0.98); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .sidebar .nav-text, .sidebar .sidebar-title, .sidebar .sidebar-sub,
  .sidebar .nav-section, .sidebar-footer-info { display: none; }
  .main-content { margin-left: 72px; padding: 20px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .form-row { grid-template-columns: 1fr; }
  .main-content { padding: 14px; }
  .card { padding: 16px; }
  .form-logo-bar { margin: -16px -16px 18px; }
}
