/* ============================================================
   CONTROL COLEGIO – Design System v2
   Paleta: Steel Blue #688db9 + Warm Orange #ff9800  |  Sólidos pasteles
   Google/Gmail inspired  |  Compact & Responsive
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --border: #dde3ed;
  --text-main: #1e293b;
  --text-muted: #6b7a99;

  /* Blue – Steel palette */
  --blue: #688db9;
  --blue-light: #eef3fa;
  --blue-mid: #c4d4e8;
  --blue-dark: #5577a3;
  --blue-hover: #789dca;
  /* #789dca – lighter steel */

  /* Orange – Warm palette */
  --orange: #ff9800;
  --orange-light: #fff8e1;
  --orange-mid: #ffe0b2;
  --orange-dark: #ec8800;
  --orange-accent: #ffa424;
  /* #ffa424 – mid tone */

  --green: #2e7d52;
  --green-light: #edf7f1;
  --red: #c0392b;
  --red-light: #fdf0ee;
  --yellow: #b8860b;
  --yellow-light: #fdf9e3;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, .05), 0 2px 4px rgba(0, 0, 0, .08);
  --shadow-lift: 0 10px 20px rgba(0, 0, 0, .07), 0 4px 8px rgba(0, 0, 0, .05);

  --sidebar-w: 218px;
  --topbar-h: 52px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ─── Reset / Base ──────────────────────────────────────────── */
*,
::before,
::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--text-main);
}

p {
  margin-bottom: .5rem;
}

/* ─── App Shell ──────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .25s ease, transform .25s ease;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  gap: .5rem;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .625rem;
}

.sidebar-brand__icon {
  width: 30px;
  height: 30px;
  background: var(--orange);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .8rem;
  flex-shrink: 0;
}

.sidebar-brand__text strong {
  display: block;
  font-size: .875rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.sidebar-brand__text small {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 5px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sidebar-toggle:hover {
  background: var(--bg);
  color: var(--text-main);
}

.sidebar-nav {
  flex: 1;
  padding: .625rem 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-nav .nav-section-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  font-weight: 600;
  padding: .5rem 1rem .2rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 1rem;
  margin-right: .625rem;
  color: var(--text-muted);
  font-size: .8375rem;
  font-weight: 500;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  transition: background .15s, color .15s;
  white-space: nowrap;
  position: relative;
}

.sidebar-nav .nav-link i {
  font-size: .95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
  background: var(--bg);
  color: var(--text-main);
}

.sidebar-nav .nav-link.active {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}

.sidebar-nav .nav-link.active i {
  color: var(--blue);
}

.sidebar-nav .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--orange);
  border-radius: 0 3px 3px 0;
}

/* Collapsed */
.app-shell.sidebar-collapsed .sidebar {
  width: 60px;
}

.app-shell.sidebar-collapsed .sidebar-brand__text,
.app-shell.sidebar-collapsed .sidebar-nav .nav-link span,
.app-shell.sidebar-collapsed .sidebar-nav .nav-section-label {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-nav .nav-link {
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: .55rem;
  gap: 0;
  margin-right: .5rem;
}

.app-shell.sidebar-collapsed .sidebar-nav .nav-link::before {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-nav {
  padding: .625rem .375rem;
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 1100;
    height: 100%;
    box-shadow: var(--shadow-lift);
  }

  .app-shell.sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }
}

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 1090;
  backdrop-filter: blur(2px);
}

.app-shell.sidebar-mobile-open .sidebar-overlay {
  display: block;
}

/* ─── Main Content ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ─── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 1rem;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.topbar__title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
}

.topbar__subtitle {
  font-size: .72rem;
  color: var(--text-muted);
  margin: 0;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}

.topbar__mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}

@media (max-width: 991.98px) {
  .topbar__mobile-toggle {
    display: flex;
  }

  .topbar {
    padding: 0 1rem;
  }
}

@media (max-width: 575.98px) {
  .topbar {
    height: auto;
    min-height: var(--topbar-h);
    padding: .55rem .75rem;
    gap: .5rem;
    align-items: center;
  }

  .topbar__left {
    flex: 1;
    min-width: 0;
    gap: .5rem;
  }

  .topbar__left>div {
    min-width: 0;
  }

  .topbar__title {
    font-size: .82rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar__subtitle {
    display: none;
  }

  .topbar__right {
    gap: .35rem;
    min-width: 0;
  }

  .topbar__role-badge {
    display: none;
  }

  .user-chip__menu {
    min-width: 0;
    width: min(320px, calc(100vw - 1rem));
  }

  .user-chip {
    padding: .25rem .4rem .25rem .25rem;
    gap: .3rem;
    flex-shrink: 0;
  }

  .user-chip__content {
    display: none;
  }

  .user-chip__avatar {
    width: 28px;
    height: 28px;
  }

  .user-chip__caret {
    margin-left: 0;
  }
}

/* User chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem .3rem .35rem;
  background: var(--bg);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.user-chip--button {
  appearance: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.user-chip--button:hover,
.user-chip--button:focus {
  background: #eef2f8;
  border-color: var(--blue-mid);
  box-shadow: var(--shadow-sm);
}

.user-chip__content {
  min-width: 0;
}

.user-chip__avatar {
  width: 26px;
  height: 26px;
  background: var(--blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-chip__name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.1;
}

.user-chip__role {
  font-size: .67rem;
  color: var(--text-muted);
}

.user-chip__caret {
  color: var(--text-muted);
  font-size: .72rem;
  margin-left: .1rem;
}

.user-chip__menu {
  min-width: 240px;
  padding: .45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.user-chip__menu-header {
  padding: .55rem .65rem .65rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .25rem;
}

.user-chip__menu-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-main);
}

.user-chip__menu-email {
  font-size: .72rem;
  color: var(--text-muted);
  word-break: break-word;
}

.user-chip__menu-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .65rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  color: var(--text-main);
}

.user-chip__menu-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
}

.user-chip__menu-item:hover,
.user-chip__menu-item:focus {
  background: var(--bg);
  color: var(--text-main);
}

.user-chip__menu-item.active {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}

.user-chip__menu-item.active i {
  color: var(--blue);
}

/* ─── Content Wrapper ─────────────────────────────────────────── */
.content-wrapper {
  flex: 1;
  padding: 1.25rem 1.5rem 2rem;
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .content-wrapper {
    padding: 1rem 1rem 1.5rem;
  }
}

/* ─── Page / Section Headers ──────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-header__info h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: .125rem;
}

.page-header__info p {
  font-size: .775rem;
  color: var(--text-muted);
  margin: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.section-header h3,
.section-header h4,
.section-header h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.section-header p {
  font-size: .775rem;
  color: var(--text-muted);
  margin: 0;
}

/* ─── Cards ───────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.glass-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-body {
  padding: 1.25rem;
}

/* ─── Metric Cards ────────────────────────────────────────────── */
.metric-card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.metric-card__body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.metric-card__eyebrow {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
}

.metric-card__label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.metric-card__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.metric-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.metric-card__hint {
  font-size: .72rem;
  color: var(--text-muted);
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Metric colour variants */
.metric-card--saldo {
  border-top: 3px solid var(--blue);
}

.metric-card--saldo .metric-icon {
  background: var(--blue-light);
  color: var(--blue);
}

.metric-card--saldo .metric-card__value {
  color: var(--blue);
}

.metric-card--recaudado {
  border-top: 3px solid var(--green);
}

.metric-card--recaudado .metric-icon {
  background: var(--green-light);
  color: var(--green);
}

.metric-card--recaudado .metric-card__value {
  color: var(--green);
}

.metric-card--deuda {
  border-top: 3px solid var(--orange);
}

.metric-card--deuda .metric-icon {
  background: var(--orange-light);
  color: var(--orange);
}

.metric-card--deuda .metric-card__value {
  color: var(--orange);
}

.metric-card--eventos {
  border-top: 3px solid var(--yellow);
}

.metric-card--eventos .metric-icon {
  background: var(--yellow-light);
  color: var(--yellow);
}

.metric-card--eventos .metric-card__value {
  color: var(--yellow);
}

.metric-card--danger {
  border-top: 3px solid var(--red);
}

.metric-card--danger .metric-icon {
  background: var(--red-light);
  color: var(--red);
}

.metric-card--danger .metric-card__value {
  color: var(--red);
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  font-family: var(--font);
  font-weight: 500;
  font-size: .8375rem;
  border-radius: var(--radius-pill);
  padding: .42rem 1.05rem;
  transition: all .15s;
  letter-spacing: .1px;
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  box-shadow: 0 2px 8px rgba(104, 141, 185, .35);
  color: #fff;
}

.btn-outline-primary {
  color: var(--blue);
  border-color: var(--blue-mid);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue);
}

.btn-outline-danger {
  color: var(--red);
  border-color: #fca5a5;
}

.btn-outline-danger:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

.btn-light {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-light:hover {
  background: var(--border);
}

.btn-reset-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.btn-reset-filter:hover,
.btn-reset-filter:focus {
  color: var(--blue);
  background: var(--blue-light);
  border-color: var(--blue-mid);
  box-shadow: 0 2px 8px rgba(104, 141, 185, .18);
}

.btn-sm {
  padding: .28rem .7rem;
  font-size: .775rem;
}

/* ─── Badges ──────────────────────────────────────────────────── */
.badge {
  border-radius: var(--radius-pill);
  font-size: .68rem;
  font-weight: 600;
  padding: .28em .65em;
}

.text-bg-success {
  background: var(--green-light) !important;
  color: var(--green) !important;
}

.text-bg-danger {
  background: var(--red-light) !important;
  color: var(--red) !important;
}

.text-bg-warning {
  background: var(--yellow-light) !important;
  color: var(--yellow) !important;
}

.text-bg-primary {
  background: var(--blue-light) !important;
  color: var(--blue) !important;
}

.text-bg-secondary {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.text-bg-light {
  background: var(--bg) !important;
  color: var(--text-muted) !important;
}

.badge-soft {
  background: var(--blue-light);
  color: var(--text-main) !important;
  border: 1px solid var(--blue-mid);
}

/* ─── Forms ───────────────────────────────────────────────────── */
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: .275rem;
}

.form-control,
.form-select {
  font-size: .875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .42rem .75rem;
  color: var(--text-main);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(104, 141, 185, .18);
  outline: none;
}

/* ─── Tables (base) ───────────────────────────────────────────── */
.table {
  font-size: .8375rem;
  color: var(--text-main);
  margin: 0;
}

.table> :not(caption)>*>* {
  padding: .65rem .9rem;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
}

.table thead th {
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border) !important;
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: rgba(37, 99, 235, .025);
}

/* ─── Admin Row-Card Table ────────────────────────────────────── */
.admin-list-table {
  border-collapse: separate !important;
  border-spacing: 0 .45rem !important;
  margin-top: -.45rem;
  width: 100%;
}

.admin-list-table thead th {
  border-bottom: none !important;
  background: transparent !important;
  padding: 0 .9rem !important;
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}

.admin-list-table tbody tr {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}

.admin-list-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.admin-list-table tbody td {
  padding: .65rem .9rem !important;
  border-top: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle;
}

.admin-list-table tbody td:first-child {
  border-left: 1px solid var(--border) !important;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.admin-list-table tbody td:last-child {
  border-right: 1px solid var(--border) !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.border-start-success td:first-child {
  border-left-color: var(--green) !important;
  border-left-width: 3px !important;
}

.border-start-danger td:first-child {
  border-left-color: var(--orange) !important;
  border-left-width: 3px !important;
}

.table-card-amount {
  font-size: 1rem;
  font-weight: 700;
}

/* ─── Caja scrollable table ───────────────────────────────────── */
.caja-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.caja-table-responsive--main {
  max-height: 360px;
  overflow-y: auto;
}

.caja-table-responsive--main thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface) !important;
}

.caja-table__principal {
  display: block;
  font-weight: 600;
  font-size: .8375rem;
}

.caja-table__secondary {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
}

/* ─── Dashboard list cards (inferiores) ───────────────────────── */
.dashboard-list-card {
  border-top: 3px solid var(--border);
}

.dashboard-list-card__title {
  font-size: .9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.dashboard-list-card--pagos {
  border-top-color: var(--blue);
}

.dashboard-list-card--pagos .dashboard-list-card__title {
  color: var(--blue);
}

.dashboard-list-card--ingresos {
  border-top-color: var(--green);
}

.dashboard-list-card--ingresos .dashboard-list-card__title {
  color: var(--green);
}

.dashboard-list-card--egresos {
  border-top-color: var(--red);
}

.dashboard-list-card--egresos .dashboard-list-card__title {
  color: var(--red);
}

/* ─── Dashboard filter ────────────────────────────────────── */
.dashboard-filter-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-filter-card__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: .9rem 1.25rem;
}

.dashboard-filter-form {
  min-width: min(100%, 300px);
}

.dashboard-filter-form__controls {
  display: flex;
  gap: .4rem;
}

/* ─── Dashboard list ──────────────────────────────────────────── */
.dashboard-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .8125rem;
}

.dashboard-list-item:last-child {
  border-bottom: none;
}

.dashboard-amount-badge {
  font-size: .775rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ─── Quota Picker ────────────────────────────────────────────── */
.quota-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}

.quota-picker__header {
  padding: .55rem .875rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.quota-picker__list {
  max-height: 280px;
  overflow-y: auto;
  padding: .375rem .5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quota-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .45rem .625rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s;
  border: 1px solid transparent;
}

.quota-item:hover {
  background: var(--blue-light);
  border-color: var(--blue-mid);
}

.quota-item:has(input:checked) {
  background: var(--blue-light);
  border-color: var(--blue-mid);
}

.quota-item__checkbox {
  flex-shrink: 0;
  cursor: pointer;
}

.quota-item__content {
  flex: 1;
  min-width: 0;
}

.quota-item__content strong {
  display: block;
  font-size: .8rem;
  color: var(--text-main);
}

.quota-item__content small {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quota-item__amount {
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
}

.quota-picker__empty {
  padding: .75rem .875rem;
}

/* ─── Selection Summary ───────────────────────────────────────── */
.selection-summary {
  border: 1px solid var(--blue-mid);
  border-radius: var(--radius-md);
  background: var(--blue-light);
  padding: .875rem 1rem;
}

.selection-summary__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .35rem;
}

.selection-summary__header h6 {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.selection-summary__grid {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.selection-summary__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .775rem;
}

.selection-summary__item span {
  color: var(--text-muted);
}

.selection-summary__item strong {
  color: var(--text-main);
  font-size: .8rem;
  text-align: right;
  max-width: 60%;
}

.selection-summary__item--total {
  margin-top: .35rem;
  padding-top: .35rem;
  border-top: 1px solid var(--blue-mid);
}

.selection-summary__item--total span {
  font-weight: 600;
  color: var(--text-main);
}

.selection-summary__item--total strong {
  font-size: 1rem;
  color: var(--blue);
}

/* ─── Reporte detalle por evento ─────────────────────────────── */
.reporte-evento-table {
  width: 100%;
  table-layout: fixed;
}

.reporte-evento-table__col-periodo {
  width: 30%;
}

.reporte-evento-table__col-monto,
.reporte-evento-table__col-pagado,
.reporte-evento-table__col-saldo {
  width: 18%;
}

.reporte-evento-table__col-estado {
  width: 16%;
}

.reporte-evento-table th,
.reporte-evento-table td {
  vertical-align: middle;
}

.reporte-evento-table tfoot td {
  border-top: 1px solid var(--border);
  padding-top: .9rem;
}

.reporte-evento-table__total {
  font-weight: 500;
  white-space: nowrap;
}

.reporte-evento-table__total strong {
  font-weight: 700;
}

.reporte-evento-table__total--pagado {
  color: var(--green);
}

.reporte-evento-table__total--saldo {
  color: var(--red);
}

/* ─── Drawers ─────────────────────────────────────────────────── */
.drawer-form {
  width: 340px !important;
  box-shadow: -4px 0 24px rgba(0, 0, 0, .08);
}

.drawer-form--wide {
  width: 480px !important;
}

.drawer-form .offcanvas-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.drawer-form .offcanvas-title {
  font-size: .9375rem;
  font-weight: 700;
}

.drawer-form .offcanvas-body {
  padding: 1.25rem 1.5rem;
}

.drawer-form__body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.drawer-form__body .mb-3 {
  margin-bottom: 0 !important;
}

/* ─── Auth ────────────────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 3.25rem);
  width: calc(100% + 3rem);
  margin: -1.25rem -1.5rem -2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(104, 141, 185, .14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 152, 0, .12), transparent 28%),
    linear-gradient(180deg, #f8fafd 0%, var(--bg) 100%);
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before,
.auth-wrapper::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-wrapper::before {
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(221, 227, 237, .3) calc(100% - 1px)),
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(221, 227, 237, .3) calc(100% - 1px));
  background-size: 36px 36px;
  opacity: .22;
}

.auth-wrapper::after {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 152, 0, .08);
  left: -140px;
  bottom: -180px;
}

.auth-stage {
  width: 100%;
  max-width: 960px;
  position: relative;
  z-index: 1;
}

.auth-stage__alerts {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 3;
}

.auth-stage__alerts .alert {
  margin-bottom: 0;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(221, 227, 237, .85);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.auth-stage__hero {
  position: relative;
  height: 240px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #fdfefe 0%, var(--blue-light) 42%, #f7fbff 67%, var(--orange-light) 100%);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.auth-stage__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .42) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .5;
}

.auth-stage__shape {
  position: absolute;
  display: block;
}

.auth-stage__shape--circle {
  border-radius: 50%;
}

.auth-stage__shape--blue {
  width: 220px;
  height: 220px;
  left: -36px;
  top: -26px;
  background:
    linear-gradient(180deg, rgba(104, 141, 185, .95) 0 50%, rgba(120, 157, 202, .32) 50% 100%);
}

.auth-stage__shape--orange {
  width: 164px;
  height: 164px;
  left: 270px;
  top: -18px;
  background:
    radial-gradient(circle at 62% 38%, #ffd28b 0, #ffb74d 26%, #ff9800 58%, #ec8800 100%);
  opacity: .92;
}

.auth-stage__shape--triangle {
  right: 56px;
  top: 58px;
  width: 0;
  height: 0;
  border-left: 118px solid transparent;
  border-right: 118px solid transparent;
  border-bottom: 128px solid rgba(104, 141, 185, .88);
  transform: rotate(90deg);
}

.auth-stage__shape--square {
  width: 124px;
  height: 124px;
  left: 150px;
  bottom: -18px;
  background: rgba(104, 141, 185, .22);
  transform: rotate(45deg);
  border-radius: 26px;
}

.auth-stage__shape--half {
  width: 186px;
  height: 186px;
  right: 212px;
  top: -70px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .9) 0 50%, rgba(196, 212, 232, .45) 50% 100%);
  border-radius: 0 0 120px 120px;
  transform: rotate(180deg);
}

.auth-card {
  width: min(100%, 620px);
  margin: -74px auto 0;
  background: var(--surface);
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lift);
  padding: 3.8rem 2.35rem 2rem;
  position: relative;
}

.auth-card__crest {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 1.72rem;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .92), var(--shadow-md);
}

.auth-login__header {
  margin-bottom: 1rem;
}

.auth-login__badge {
  margin-bottom: .85rem;
  padding: .35rem .78rem;
  border: 1px solid var(--blue-mid);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.auth-login__title {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .6rem;
}

.auth-login__subtitle {
  color: var(--text-muted);
  max-width: 44ch;
  margin: 0 auto;
}

.auth-card__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-bottom: 1.15rem;
}

.auth-card__chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .72rem;
  border-radius: var(--radius-pill);
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 600;
}

.auth-card__chip i {
  color: var(--orange);
}

.auth-demo-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(238, 243, 250, .88) 0%, rgba(255, 248, 225, .72) 100%);
  border-radius: var(--radius-md);
  padding: .95rem 1rem;
  margin-bottom: 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.auth-demo-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.auth-demo-card__label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--orange-dark);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .45rem;
}

.auth-demo-card__description {
  color: var(--text-muted);
  font-size: .8rem;
}

.auth-demo-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #fff;
  flex-shrink: 0;
}

.auth-demo-card__credentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.auth-demo-card__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  padding: .65rem .75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(255, 255, 255, .9);
}

.auth-demo-card__row span {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
}

.auth-demo-card__row strong {
  color: var(--text-main);
  font-size: .86rem;
  font-weight: 700;
  word-break: break-word;
}

.auth-form .form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-main);
}

.auth-form__field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.auth-input {
  position: relative;
}

.auth-input__icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue-dark);
  pointer-events: none;
  z-index: 2;
}

.auth-form .form-control {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  min-height: 48px;
  padding: .78rem .95rem;
  background: #fbfcfe;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-input__control {
  padding-left: 2.65rem !important;
}

.auth-form .form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 .2rem rgba(104, 141, 185, .18);
  background: #fff;
}

.auth-form__hint {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .8rem;
  margin-bottom: 1rem;
  padding: .75rem .85rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
}

.auth-form__hint i {
  color: var(--blue);
  margin-top: 1px;
}

.auth-form__submit {
  min-height: 48px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .02em;
  box-shadow: 0 10px 22px rgba(104, 141, 185, .16);
}

.auth-login__footer {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: .78rem;
}

.auth-login__footer-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.auth-login__footer-item i {
  color: var(--blue);
}

@media (max-width: 991.98px) {
  .auth-stage {
    max-width: 760px;
  }

  .auth-stage__hero {
    height: 210px;
  }

  .auth-stage__shape--triangle {
    right: 18px;
    top: 66px;
    transform: rotate(90deg) scale(.82);
  }

  .auth-stage__shape--half {
    right: 138px;
  }
}

@media (max-width: 575.98px) {
  .auth-wrapper {
    width: calc(100% + 2rem);
    min-height: calc(100vh - 2.5rem);
    margin: -1rem -1rem -1.5rem;
    padding: 1rem;
  }

  .auth-stage__hero {
    height: 168px;
    border-radius: 22px;
  }

  .auth-stage__alerts {
    top: .75rem;
    left: .75rem;
    right: .75rem;
  }

  .auth-stage__shape--orange {
    width: 118px;
    height: 118px;
    left: 186px;
  }

  .auth-stage__shape--triangle {
    right: -30px;
    top: 48px;
    transform: rotate(90deg) scale(.52);
  }

  .auth-stage__shape--square,
  .auth-stage__shape--half {
    display: none;
  }

  .auth-card {
    margin-top: -54px;
    border-radius: 24px;
    padding: 3.2rem 1.2rem 1.4rem;
  }

  .auth-card__crest {
    width: 58px;
    height: 58px;
    top: -28px;
    font-size: 1.58rem;
  }

  .auth-login__title {
    font-size: 1.65rem;
  }

  .auth-login__subtitle {
    max-width: 28ch;
  }

  .auth-card__chips {
    gap: .45rem;
  }

  .auth-demo-card__credentials {
    grid-template-columns: 1fr;
  }

  .auth-demo-card__row {
    padding: .6rem .7rem;
  }

  .auth-login__footer {
    flex-direction: column;
    align-items: center;
    gap: .45rem;
  }
}

/* ─── Alerts ──────────────────────────────────────────────────── */
.alert {
  border: none;
  border-radius: var(--radius-md);
  font-size: .8375rem;
  padding: .7rem 1rem;
}

.alert-success {
  background: var(--green-light);
  color: var(--green);
}

.alert-danger {
  background: var(--red-light);
  color: var(--red);
}

.alert-warning {
  background: var(--yellow-light);
  color: var(--yellow);
}

.alert-info {
  background: var(--blue-light);
  color: var(--blue);
}

/* ─── Progress ────────────────────────────────────────────────── */
.progress {
  border-radius: var(--radius-pill);
  height: 6px;
  background: var(--border);
}

.progress-bar {
  background: var(--blue);
  border-radius: var(--radius-pill);
}

.event-progress {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.event-progress__status {
  white-space: nowrap;
}

.event-status-badge {
  color: #fff !important;
  border: 1px solid transparent;
}

.event-status-badge--success {
  background: var(--green) !important;
  border-color: var(--green) !important;
}

.event-status-badge--secondary {
  background: #64748b !important;
  border-color: #64748b !important;
}

.event-status-badge--danger {
  background: var(--red) !important;
  border-color: var(--red) !important;
}

.quota-status-badge {
  color: #fff !important;
  border: 1px solid transparent;
}

.quota-status-badge--success {
  background: var(--green) !important;
  border-color: var(--green) !important;
}

.quota-status-badge--warning {
  background: var(--yellow) !important;
  border-color: var(--yellow) !important;
}

.quota-status-badge--secondary {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
}

.event-list-item__stats {
  line-height: 1.4;
}

.event-list-item__stat {
  display: inline-flex;
  align-items: center;
}

.event-list-item__stat--meta {
  color: var(--orange-dark);
}

.event-list-item__stat--paid {
  color: var(--green);
}

.event-list-item__stat--expense {
  color: var(--red);
}

.event-progress__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.event-progress__label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-main);
}

.event-progress__value {
  font-size: .875rem;
  font-weight: 600;
  color: var(--orange-dark);
  white-space: nowrap;
}

.event-progress__value--complete {
  color: var(--green);
}

.event-progress__bar {
  height: 10px;
  background: #dfe4eb;
}

.event-progress__bar .progress-bar {
  background: #f2b705;
}

.event-progress__bar .event-progress__bar-fill--complete {
  background: var(--green) !important;
}

.event-progress--detail {
  gap: .35rem;
}

.event-progress__bar--detail {
  height: 10px;
}

.event-progress__row {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.event-progress__row .event-progress__bar {
  flex: 1 1 auto;
}

.guardian-hero-card {
  border-top: 3px solid var(--blue);
}

.guardian-hero-card__student {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(238, 243, 250, .55), rgba(255, 255, 255, .95));
}

.guardian-hero-card__student-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.guardian-hero-card__student-meta {
  color: var(--text-muted);
  font-size: .8rem;
}

.guardian-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem;
  border-radius: var(--radius-pill);
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 600;
}

.guardian-note {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .9rem 1rem;
  background: linear-gradient(180deg, rgba(255, 248, 225, .75), rgba(255, 255, 255, .96));
  color: var(--text-muted);
  font-size: .84rem;
}

.guardian-debt-list {
  display: flex;
  flex-direction: column;
  gap: .95rem;
}

.guardian-debt-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.guardian-debt-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .95rem 1rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--border);
}

.guardian-debt-item__title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-main);
}

.guardian-debt-item__subtitle {
  font-size: .76rem;
  color: var(--text-muted);
}

.guardian-debt-item__amount {
  color: var(--orange-dark);
  font-size: .95rem;
  font-weight: 700;
  white-space: nowrap;
}

.guardian-debt-item__body {
  padding: .25rem 1rem 1rem;
}

.guardian-empty {
  text-align: center;
  padding: 2.25rem 1rem;
  color: var(--text-muted);
}

@media (max-width: 767.98px) {

  .guardian-hero-card__student,
  .guardian-debt-item__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.event-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 46%);
  align-items: center;
  column-gap: 1rem;
  row-gap: .35rem;
}

.event-list-item__header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.event-list-item__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .5rem;
}

.event-list-item__title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.event-list-item__title {
  display: inline-block;
}

.event-list-item__title-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

.event-list-item__subtitle {
  margin-top: .05rem;
}

.event-list-item__quick-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.event-icon-action {
  width: 25px;
  height: 25px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
}

.event-icon-action i {
  font-size: .92rem;
}

.event-list-item__info {
  min-width: 0;
}

.event-list-item__progress {
  min-width: 0;
}

/* ─── DataTables overrides ────────────────────────────────────── */
.table-toolbar--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.alumnos-filter-form {
  flex: 0 1 auto;
}

.alumnos-filter-form .form-select {
  min-width: 160px;
}

.datatable-toolbar-host {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .85rem;
  flex: 1 1 auto;
  min-width: 280px;
}

.datatable-toolbar-host .dataTables_length,
.datatable-toolbar-host .dataTables_filter {
  display: flex;
  align-items: center;
  margin: 0;
}

.datatable-toolbar-host .dataTables_filter label,
.datatable-toolbar-host .dataTables_length label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 0;
  white-space: nowrap;
}

.datatable-role-filter {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.datatable-role-filter__label {
  margin: 0;
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.datatable-role-filter__select {
  min-width: 150px;
}

/* Fila superior: siempre una sola línea horizontal */
.dataTables_wrapper .row:first-child {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

/* Anular columnas Bootstrap que apilan en sm */
.dataTables_wrapper .row:first-child>[class*="col-"] {
  float: none !important;
  width: auto !important;
  flex: 0 0 auto !important;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

/* DataTables genera: col1=length | col2=filter  → invertimos con order */
/* filter (último en DOM) pasa a la izquierda y se expande */
.dataTables_wrapper .row:first-child>[class*="col-"]:last-child {
  order: -1;
  flex: 1 1 auto !important;
}

/* length (primero en DOM) queda a la derecha */
.dataTables_wrapper .row:first-child>[class*="col-"]:first-child {
  order: 1;
}

.dataTables_wrapper .dataTables_filter {
  text-align: left !important;
  float: none !important;
}

.dataTables_wrapper .dataTables_length {
  text-align: right !important;
  float: none !important;
  white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .775rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .3rem .8rem;
  font-size: .8rem;
  color: var(--text-main);
  background: var(--bg);
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(104, 141, 185, .18);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: var(--radius-pill) !important;
  padding: .35rem .9rem !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: var(--text-muted) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
  margin: 0 .18rem !important;
  transition: all .15s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 !important;
  min-width: auto;
  min-height: auto;
  color: inherit !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  line-height: inherit !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--blue) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 6px 16px rgba(104, 141, 185, .28) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
  background: var(--blue-light) !important;
  color: var(--blue) !important;
  box-shadow: 0 4px 10px rgba(104, 141, 185, .16) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
  color: #94a3b8 !important;
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

.dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex-wrap: wrap;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin: 0;
}

.dataTables_wrapper .dataTables_info {
  font-size: .75rem;
  color: var(--text-muted);
}

.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .18rem .4rem;
  font-size: .75rem;
}

.dataTables_wrapper {
  font-size: .8375rem;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 575.98px) {

  .event-list-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .event-list-item__header {
    align-items: flex-start;
  }

  .event-list-item__actions,
  .event-list-item__quick-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .table-toolbar--split,
  .datatable-toolbar-host,
  .alumnos-filter-form {
    width: 100%;
  }

  .table-toolbar--split,
  .datatable-toolbar-host,
  .alumnos-filter-form {
    justify-content: flex-start;
  }

  .alumnos-filter-form {
    flex-wrap: wrap;
  }

  .datatable-role-filter {
    width: 100%;
    flex-wrap: wrap;
  }

  .alumnos-filter-form .form-select {
    min-width: 100%;
  }

  .datatable-role-filter__select {
    min-width: 100%;
  }

  .dataTables_wrapper .dataTables_paginate,
  .dataTables_wrapper .dataTables_paginate .pagination {
    justify-content: center;
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 36px;
    min-height: 36px;
    padding: .32rem .8rem !important;
  }

  .section-header,
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer-form {
    width: 100vw !important;
  }

  .metric-card__value {
    font-size: 1.3rem;
  }

  html {
    font-size: 13px;
  }
}