/* AXORYN — Soft Light UI v6
   Estilo de referencia (MediApp/MedSync): fondo claro aireado, tarjetas blancas
   con radios grandes y sombra muy suave, sidebar sin bordes con píldora activa,
   píldoras oscuras para CTA, chips pastel por categoría.
   Identidad AXORYN: azul de marca como acento.
*/

:root {
  /* Superficies */
  --bg-deep: #EFF3F6;
  --bg-mid: #F4F7F9;
  --bg-lift: #FFFFFF;
  --card: #FFFFFF;
  --card-solid: #FFFFFF;
  --card-soft: #F7F9FB;

  /* Texto */
  --ink: #141A21;
  --sub: #5C6773;
  --muted: #8D97A3;

  /* Líneas */
  --rule: #E7ECF1;
  --rule2: #DDE4EB;
  --border: var(--rule);
  --glass-border: var(--rule);
  --text: var(--ink);

  /* Marca AXORYN */
  --blue: #1565E8;
  --blue-l: #4C8BF0;
  --blue-xl: #E8F0FE;
  --cyan: #00B8D4;
  --primary: var(--blue);
  --primary-l: var(--blue-l);
  --primary-xl: var(--blue-xl);

  /* Semánticos */
  --green: #16A34A;
  --green-l: #E7F4EA;
  --amber: #D97706;
  --amber-l: #FDF3E0;
  --red: #DC2626;
  --red-l: #FDECEC;
  --accent: var(--green);
  --accent-l: var(--green-l);
  --warn: var(--amber);
  --warn-l: var(--amber-l);
  --danger: var(--red);
  --danger-l: var(--red-l);
  --info: var(--cyan);

  /* Pasteles de categoría (como la referencia) */
  --pastel-mint: #E9F4E7;
  --pastel-sky: #E4EFF6;
  --pastel-butter: #FBF6D9;
  --pastel-lilac: #EEEBFA;
  --pastel-peach: #FCEDE4;

  /* CTA oscuro tipo referencia */
  --ink-btn: #161D26;

  /* Sombras suaves */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.07);
  --glass-shadow: var(--shadow-sm);
  --focus-ring: 0 0 0 3px rgba(21, 101, 232, 0.16);

  /* Compat con el tema anterior */
  --navy: #141A21;
  --navy2: #202932;
  --navy3: #2A343E;
  --teal: #0EA5A5;
  --gold: #B8860B;
  --gold-l: #FBF3DA;
  --glass: #FFFFFF;
  --glass-2: var(--card-soft);
  --glass-highlight: #FFFFFF;
  --grad: linear-gradient(135deg, #1565E8 0%, #2E7BF0 55%, #00B8D4 100%);
  --grad-soft: linear-gradient(135deg, rgba(21, 101, 232, 0.10), rgba(0, 184, 212, 0.08));
  --glow: rgba(21, 101, 232, 0.18);
  --bg: var(--bg-deep);

  --F: 'Inter', system-ui, -apple-system, sans-serif;
  --FH: 'Outfit', system-ui, -apple-system, sans-serif;
  --M: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 24px;
  --radius-sm: 16px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --sidebar: 244px;
  --rail: 300px;
}

/* ── Fondo de página: degradado claro muy sutil ── */
.axo-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(21, 101, 232, 0.06), transparent 60%),
    radial-gradient(820px 520px at 100% 110%, rgba(0, 184, 212, 0.07), transparent 60%),
    linear-gradient(180deg, #F2F6F9 0%, #EEF3F6 50%, #F1F5F8 100%);
}
.axo-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
}
.axo-bg__orb--1 { width: 420px; height: 420px; top: -150px; left: -100px; background: rgba(21, 101, 232, 0.10); }
.axo-bg__orb--2 { width: 460px; height: 460px; bottom: -190px; right: -130px; background: rgba(0, 184, 212, 0.10); }
.axo-bg__orb--3 { width: 260px; height: 260px; top: 50%; left: 55%; background: rgba(120, 190, 160, 0.08); }
.axo-bg__orb--4 { display: none; }
.axo-bg--login .axo-bg__orb { opacity: 0.5; }
.axo-bg--login .axo-bg__orb--4 {
  display: block;
  width: 240px; height: 240px; top: 12%; right: 16%;
  background: rgba(21, 101, 232, 0.10);
}

/* ── Sidebar: sin bordes duros, ítem activo = píldora blanca ── */
.sidebar {
  width: var(--sidebar);
  position: fixed;
  top: 0; left: 0; height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  background: transparent;
  border-right: none;
  padding: 0 0.7rem;
}
.sidebar-logo {
  padding: 1.35rem 0.6rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.sidebar-logo img.brand-logo {
  height: 46px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.logo-mark {
  width: 38px; height: 38px;
  background: var(--grad);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(21, 101, 232, 0.22);
  overflow: hidden;
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-name {
  font-family: var(--FH);
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.logo-name span {
  font-family: var(--F);
  color: var(--muted);
  font-size: 0.66rem;
  display: block;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  margin-top: 2px;
}
.sidebar-badge {
  margin: 0 0.6rem 0.9rem;
  background: var(--blue-xl);
  border: none;
  color: var(--blue);
  border-radius: var(--radius-pill);
  padding: 0.34rem 0.7rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}
.nav { padding: 0 0 0.75rem; flex: 1; }
.nav-label {
  padding: 0.9rem 0.75rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
  text-transform: none;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.8rem;
  margin-bottom: 3px;
  color: var(--sub);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 14px;
  transition: background 0.16s var(--ease), color 0.16s, box-shadow 0.16s;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.75); }
.nav a.active {
  color: var(--ink);
  background: #FFFFFF;
  font-weight: 650;
  box-shadow: var(--shadow-sm);
}
.nav a .ico { font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-count {
  margin-left: auto;
  min-width: 20px; height: 20px;
  border-radius: var(--radius-pill);
  background: var(--ink-btn);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Tarjeta promo tipo referencia */
.side-promo {
  margin: 0.4rem 0.4rem 0.8rem;
  border-radius: 20px;
  padding: 1.1rem 1rem 1.15rem;
  background: linear-gradient(160deg, #EAF1FE 0%, #E6F6F8 100%);
  position: relative;
  overflow: hidden;
}
.side-promo::before {
  content: "";
  position: absolute;
  top: -28px; right: -28px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(21, 101, 232, 0.16);
}
.side-promo-title {
  position: relative;
  font-family: var(--FH);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.side-promo-sub { position: relative; font-size: 0.76rem; color: var(--sub); }

.sidebar-footer { padding: 0.5rem 0.4rem 1rem; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 0.6rem 0.7rem;
  box-shadow: var(--shadow-sm);
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logout-btn {
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: none;
  display: block;
  margin-top: 0.5rem;
  padding-left: 0.3rem;
  transition: color 0.15s;
}
.logout-btn:hover { color: var(--red); }

/* Submenú simuladores (admin) */
.sim-dd-head { position: relative; }
.sim-dd-head .chevron {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  transition: transform 0.15s;
  padding: 0.25rem;
  line-height: 1;
}
.sim-dd.expanded .sim-dd-head .chevron { transform: rotate(90deg); }
.sim-submenu {
  display: none;
  padding: 0.15rem 0 0.35rem 0.5rem;
  margin: 0 0 0.25rem 0.9rem;
  border-left: 1px solid var(--rule);
}
.sim-sub-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.15s;
}
.sim-sub-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.8); }
.sim-sub-link.active { color: var(--blue); background: var(--blue-xl); font-weight: 650; }
.sim-sub-link .ico { font-size: 0.85rem; width: 18px; text-align: center; }

/* ── Main ── */
.main {
  margin-left: var(--sidebar);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.topbar {
  padding: 1.15rem 1.6rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(242, 246, 249, 0.96) 55%, rgba(242, 246, 249, 0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.page-title {
  font-family: var(--FH);
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.topbar-actions { display: flex; align-items: center; gap: 0.6rem; }
.search-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #FFFFFF;
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.1rem;
  min-width: min(320px, 40vw);
  color: var(--muted);
  font-size: 0.85rem;
}
.search-pill input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font: 500 0.88rem/1.3 var(--F);
  min-width: 0;
}
.search-pill input::placeholder { color: var(--muted); }
.profile-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.9rem 0.3rem 0.3rem;
  text-decoration: none;
  color: inherit;
}
.profile-pill .avatar { width: 32px; height: 32px; font-size: 0.7rem; }
.content { padding: 0.9rem 1.6rem 2rem; flex: 1; }

/* ── Tarjetas ── */
.card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-sm { padding: 1.1rem 1.25rem; }
.card-p { padding: 1.4rem 1.5rem; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.card-title {
  font-family: var(--FH);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  min-width: 0;
}
.card-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
  font-weight: 400;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.section-title {
  font-family: var(--FH);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--card-soft);
  color: var(--sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--rule); color: var(--ink); }

/* ── Stats ── */
.stats-row,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.stat-card {
  position: relative;
  background: var(--card);
  border: none;
  border-radius: 20px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.stat-accent { background: var(--pastel-butter); }
.stat-card.stat-mint { background: var(--pastel-mint); }
.stat-card.stat-sky { background: var(--pastel-sky); }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: var(--blue-xl);
  color: var(--blue);
}
.stat-icon i, .stat-icon svg { width: 19px; height: 19px; }
.stat-val, .stat-value {
  font-family: var(--FH);
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-lbl, .stat-label {
  font-size: 0.78rem;
  color: var(--sub);
  margin-top: 0.15rem;
  font-weight: 500;
}
.trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.5rem;
  margin-top: 0.35rem;
}
.trend-up { background: var(--green-l); color: #15803D; }
.trend-down { background: var(--red-l); color: #B91C1C; }

/* ── Bento ── */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) var(--rail);
  gap: 1rem;
  align-items: start;
}
.bento-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.bento-mid { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.bento-rail { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }

/* ── Listas tipo referencia (filas pastel) ── */
.person-list { display: flex; flex-direction: column; gap: 0.6rem; }
.person-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  background: var(--card-soft);
  border: none;
  transition: background 0.15s;
}
.person-row:hover { background: #F1F5F8; }
.person-row.row-mint { background: var(--pastel-mint); }
.person-row.row-sky { background: var(--pastel-sky); }
.person-row.row-butter { background: var(--pastel-butter); }
.person-row.row-lilac { background: var(--pastel-lilac); }
.person-meta { flex: 1; min-width: 0; }
.person-name {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person-sub { font-size: 0.76rem; color: var(--sub); margin-top: 1px; }

.timeline { display: flex; flex-direction: column; gap: 0.7rem; }
.timeline-item { display: grid; grid-template-columns: 52px 1fr; gap: 0.65rem; align-items: start; }
.timeline-time {
  font-size: 0.72rem;
  color: var(--muted);
  padding-top: 0.7rem;
  text-align: right;
  font-weight: 500;
}
.timeline-block { border-radius: 18px; padding: 0.85rem 1rem; background: var(--card-soft); }
.timeline-block.block-a { background: var(--pastel-butter); }
.timeline-block.block-b { background: var(--pastel-sky); }
.timeline-block.block-c { background: var(--pastel-mint); }
.timeline-title { font-size: 0.88rem; font-weight: 650; color: var(--ink); }
.timeline-sub { font-size: 0.76rem; color: var(--sub); margin-top: 0.15rem; }

/* ── Segmented / píldoras ── */
.seg {
  display: inline-flex;
  background: var(--card-soft);
  border: none;
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.seg button, .seg a {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--sub);
  font: 600 0.78rem/1 var(--F);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.seg button.active, .seg a.active {
  background: var(--ink-btn);
  color: #fff;
}
.chip-select {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--card-soft);
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sub);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* ── Cursos ── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1rem;
}
.course-card {
  position: relative;
  background: var(--card);
  border: none;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.course-header {
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  position: relative;
  border-bottom: none;
}
.course-body {
  padding: 1rem 1.15rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.course-title { font-size: 0.95rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.course-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* ── Tablas ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rule);
}
td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--ink);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--card-soft); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 650;
  border: none;
}
.badge-blue, .badge-primary { background: var(--blue-xl); color: #1249AE; }
.badge-green, .badge-success { background: var(--green-l); color: #15803D; }
.badge-amber, .badge-warn { background: var(--amber-l); color: #B45309; }
.badge-red, .badge-danger { background: var(--red-l); color: #B91C1C; }
.badge-gray { background: var(--card-soft); color: var(--sub); }
.badge-info { background: #E3F6FA; color: #0E7490; }
.td-mono { font-family: var(--M); font-size: 0.8rem; font-weight: 500; color: var(--sub); }

.progress { background: var(--rule); border-radius: var(--radius-pill); height: 7px; overflow: hidden; }
.progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--grad);
  transition: width 0.5s var(--ease);
}

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  border: none;
  font-family: var(--F);
  transition: all 0.18s var(--ease);
  text-decoration: none;
}
.btn-primary { background: var(--ink-btn); color: #fff; }
.btn-primary:hover { background: #262F3A; transform: translateY(-1px); }
.btn-brand { background: var(--blue); color: #fff; }
.btn-brand:hover { background: #0F55CC; }
.btn-ghost { background: var(--card-soft); color: var(--sub); border: none; }
.btn-ghost:hover { background: var(--rule); color: var(--ink); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 0.94rem; }
.btn-danger { background: var(--red-l); color: #B91C1C; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success, .btn-accent { background: var(--green); color: #fff; }
.btn-success:hover, .btn-accent:hover { background: #128A3E; }
.btn-warn { background: var(--amber); color: #fff; }
.btn-warn:hover { background: #B45309; }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue-xl); }
.btn i, .btn svg { width: 16px; height: 16px; }

/* ── Modales ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 26, 33, 0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff;
  border: none;
  border-radius: 24px;
  padding: 2rem;
  max-width: 520px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.2s var(--ease);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-title {
  font-family: var(--FH);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.modal-footer {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

/* ── Formularios ── */
.form-row { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--sub);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-bottom: 0.4rem;
}
.form-input, .form-textarea {
  width: 100%;
  border: 1px solid var(--rule2);
  border-radius: 14px;
  padding: 0.7rem 0.95rem;
  font-size: 0.9rem;
  font-family: var(--F);
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--blue); box-shadow: var(--focus-ring); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C6773' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
.form-select option { background: #fff; color: var(--ink); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-hint { font-size: 0.76rem; color: var(--muted); margin-top: 0.35rem; }

/* ── Alertas ── */
.alert { border-radius: 16px; padding: 0.8rem 1.05rem; font-size: 0.86rem; margin-bottom: 1rem; }
.alert-success { background: var(--green-l); color: #15803D; border: none; }
.alert-error { background: var(--red-l); color: #B91C1C; border: none; }
.alert-info { background: var(--blue-xl); color: #1249AE; border: none; }
.alert-warn { background: var(--amber-l); color: #B45309; border: none; }

.pagination { display: flex; gap: 0.5rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--sub);
  font-weight: 600;
}
.pagination a:hover { background: var(--card-soft); color: var(--ink); }
.pagination .current { background: var(--ink-btn); color: #fff; }

.text-muted { color: var(--sub); }
.text-sm { font-size: 0.875rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.mt-1 { margin-top: 0.5rem; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--M); }

/* ── Banner de bienvenida ── */
.welcome-banner {
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.15rem;
  background: linear-gradient(135deg, #EAF1FE 0%, #E7F5F3 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: "";
  position: absolute;
  top: -60px; right: 8%;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(21, 101, 232, 0.10);
}
.welcome-banner > * { position: relative; }
.welcome-banner .eyebrow {
  font-size: 0.74rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.welcome-banner h2 {
  font-family: var(--FH);
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.welcome-banner p { font-size: 0.88rem; color: var(--sub); }
.welcome-pct { text-align: center; flex-shrink: 0; }
.welcome-pct strong {
  display: block;
  font-family: var(--FH);
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue);
}

/* ── Login / tarjetas de vidrio (ahora claras) ── */
.glass-card {
  position: relative;
  background: #FFFFFF;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(16, 24, 40, 0.10);
  overflow: hidden;
}
.glass-card::before { display: none; }
.glass-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--rule2);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--ink);
  font: 500 0.95rem/1.4 var(--F);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.glass-input::placeholder { color: var(--muted); }
.glass-input:focus { border-color: var(--blue); box-shadow: var(--focus-ring); }
.btn-grad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  font: 700 0.96rem/1 var(--FH);
  color: #fff;
  background: var(--ink-btn);
  transition: transform 0.18s var(--ease), background 0.2s;
}
.btn-grad:hover { transform: translateY(-2px); background: #262F3A; }
.btn-grad:active { transform: translateY(0); }
.btn-grad:disabled { opacity: 0.6; cursor: wait; transform: none; }

.axo-stagger > * {
  opacity: 0;
  transform: translateY(12px);
  animation: axoRise 0.5s var(--ease) forwards;
}
.axo-stagger > *:nth-child(1) { animation-delay: 0.04s; }
.axo-stagger > *:nth-child(2) { animation-delay: 0.10s; }
.axo-stagger > *:nth-child(3) { animation-delay: 0.16s; }
.axo-stagger > *:nth-child(4) { animation-delay: 0.22s; }
@keyframes axoRise { to { opacity: 1; transform: none; } }
.axo-mark-glow { box-shadow: 0 8px 24px rgba(21, 101, 232, 0.22); }

/* ── Móvil ── */
.menu-btn {
  display: none;
  background: #fff;
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 33, 0.35);
  z-index: 150;
  backdrop-filter: blur(3px);
}
.sidebar-backdrop.open { display: block; }

@media (max-width: 1200px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-rail { grid-column: 1 / -1; }
  :root { --rail: auto; }
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 200;
    background: #F4F7F9;
    padding-top: 0.5rem;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 50px rgba(16, 24, 40, 0.18); }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .content { padding: 0.85rem 1.05rem 1.5rem; }
  .topbar { padding: 0.9rem 1.05rem 0.35rem; }
  .page-title { font-size: 1.35rem; }
  .search-pill { display: none; }
  .bento { grid-template-columns: 1fr; }
  .stats-row, .stats-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-actions .btn span.lbl { display: none; }
}
@media (max-width: 520px) {
  .content { padding: 0.75rem; }
  .card { padding: 1.15rem; }
  .welcome-banner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .axo-stagger > * { animation: none !important; opacity: 1; transform: none; }
}
