/* ============================================================
   SISTEMA DE GESTIÓN — CSS GLOBAL
   Paleta: VERDE AGUA + AZUL SUAVE
   Archivo: /admin/assets/css/sistema.css

   #F3FBFA  Fondo principal
   #FFFFFF  Card / superficie
   #E6FFFB  Card suave
   #0F766E  Primario (verde agua)
   #CCF8F1  Primario suave
   #3B82F6  Acento (azul)
   #DBEAFE  Acento suave
   #102A43  Texto principal
   #52748E  Texto secundario
   #CFE8E5  Borde suave
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300..900&display=swap');



/* ============================================================
   1. VARIABLES
============================================================ */
:root {
  /* Verde agua — marca principal */
  --brand:         #0F766E;
  --brand-mid:     #0D9488;
  --brand-2:       #14B8A6;
  --brand-3:       #5EEAD4;
  --brand-deep:    #134E4A;
  --brand-text:    #115E59;

  /* Azul — acento secundario */
  --accent:        #3B82F6;
  --accent-light:  #60A5FA;
  --accent-soft:   #DBEAFE;
  --accent-glow:   rgba(59,130,246,.18);

  /* Verde éxito */
  --green:         #0F766E;
  --green-strong:  #065F56;
  --green-soft:    #CCF8F1;
  --green-glow:    rgba(15,118,110,.18);

  /* Fondos */
  --bg-deep:       #E8F5F3;
  --bg:            #F3FBFA;
  --bg-soft:       #F0F9F8;
  --bg-white:      #FFFFFF;
  --bg-tint:       #EEF8F7;

  /* Superficies */
  --surface:       #FFFFFF;
  --surface-hover: #F6FFFE;
  --surface-2:     #F3FBFA;
  --surface-soft:  #FAFFFE;

  /* Bordes */
  --border:        #CFE8E5;
  --border-strong: #B2D8D3;
  --border-soft:   #E2F2F0;
  --border-glow:   rgba(15,118,110,.25);

  /* Texto */
  --text:          #102A43;
  --text-soft:     #52748E;
  --text-muted:    #6B8FA8;
  --text-dim:      #94A8BA;

  /* Estados */
  --success:        #0F766E;
  --success-bg:     #CCF8F1;
  --success-border: #99EDDE;
  --success-text:   #065F56;

  --warning:        #D97706;
  --warning-bg:     #FEF3C7;
  --warning-border: #FDE68A;
  --warning-text:   #92400E;

  --danger:         #DC2626;
  --danger-bg:      #FEF2F2;
  --danger-border:  #FECACA;
  --danger-text:    #991B1B;

  /* Radios */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 22px;

  /* Sombras — estilo papel */
  --shadow-sm: 0 1px 2px rgba(16,42,67,.04), 0 1px 3px rgba(16,42,67,.05);
  --shadow-md: 0 4px 12px rgba(16,42,67,.06), 0 2px 4px rgba(16,42,67,.04);
  --shadow-lg: 0 12px 32px rgba(16,42,67,.08), 0 4px 8px rgba(16,42,67,.05);
  --shadow-glow: 0 8px 24px rgba(15,118,110,.14);
}


/* ============================================================
   2. RESET / BASE
============================================================ */
*, *::before, *::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  min-height: 100%;
  background: var(--bg);
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--text);
  background: linear-gradient(180deg, #F3FBFA 0%, #EEF8F7 100%);
  font-family: var(--font-sans);
}

/* Glow verde agua muy sutil — profundidad */
body::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(700px 460px at 16% 12%, rgba(204,248,241,.40), transparent 62%),
    radial-gradient(760px 500px at 86%  8%, rgba(219,234,254,.30), transparent 64%),
    radial-gradient(900px 560px at 50% 98%, rgba(20,184,166,.14), transparent 70%);
  filter: blur(8px);
  animation: bgAura 28s ease-in-out infinite alternate;
}

@keyframes bgAura {
  0%   { transform: translate3d(0,0,0) scale(1); }
  45%  { transform: translate3d(-26px,16px,0) scale(1.03); }
  100% { transform: translate3d(30px,-20px,0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}


/* ============================================================
   3. LAYOUT
============================================================ */
.container,
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: auto;
}


/* ============================================================
   4. HEADER CORPORATIVO
============================================================ */
.app-header,
.topbar {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.75rem;
  padding: 1.4rem 2.2rem;
  color: var(--brand-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, #CCF8F1 0%, #DBEAFE 60%, #CCF8F1 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.8) inset,
    0 8px 28px rgba(15,118,110,.08),
    0 2px 6px rgba(15,118,110,.05);
}

.app-header::before,
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% -10%, rgba(255,255,255,.55), transparent 45%),
    radial-gradient(circle at  0% 110%, rgba(15,118,110,.10), transparent 45%);
}

.app-header::after,
.topbar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(15,118,110,.45), transparent);
}

/* Layout interno del header */
.app-header-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.topbar .wave-top { display: none; }

/* Marca */
.app-brand,
.topbar .brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.app-logo,
.topbar .logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid rgba(15,118,110,.20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15,118,110,.10), 0 1px 0 rgba(255,255,255,.9) inset;
}

.app-logo img,
.topbar .logo-wrap img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.logo-wrap {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; overflow: hidden;
}

.logo-wrap img { max-width: 36px; max-height: 36px; object-fit: contain; }

.app-titles,
.topbar .titles {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-title,
.topbar .titles .title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.01em;
}

.app-title i,
.topbar .titles .title i { color: var(--brand); font-size: 1rem; }

.app-subtitle,
.topbar .titles .subtitle {
  margin: 0;
  font-size: .82rem;
  color: var(--brand-text);
  font-weight: 500;
  opacity: .85;
}

/* Acciones del header */
.app-actions,
.topbar .actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.app-actions a,
.topbar .actions a { flex: 0 0 auto; }


/* ============================================================
   5. BOTONES
============================================================ */
.btn-modern,
.topbar .actions .btn-light,
.topbar .actions .btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--brand-deep);
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,118,110,.18);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all .18s ease;
}

.btn-modern:hover,
.topbar .actions .btn-light:hover,
.topbar .actions .btn-sm:hover {
  background: #fff;
  border-color: rgba(15,118,110,.40);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,118,110,.14);
}

.btn-modern.btn-primary-modern {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15,118,110,.28);
}

.btn-modern.btn-primary-modern:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15,118,110,.38);
}

.btn-modern i { font-size: .78rem; opacity: .95; }

.btn-modern.disabled { pointer-events: none; opacity: .45; filter: grayscale(.5); }

/* Botón guardar */
.btn-save {
  background: linear-gradient(135deg, var(--brand), var(--green-strong));
  border: 1px solid var(--green-strong);
  color: #fff;
}

.btn-save:hover {
  background: linear-gradient(135deg, var(--green-strong), #065F56);
  border-color: #065F56;
  color: #fff;
  box-shadow: 0 4px 14px var(--green-glow);
  transform: translateY(-1px);
}

/* Botón advertencia pulsante */
.btn-warning-glow {
  background: linear-gradient(135deg,#FCD34D,#F59E0B);
  border: 1px solid #F59E0B;
  color: #7C2D12;
  font-weight: 700;
  animation: glowPulse 1.6s ease-in-out infinite;
}

.btn-warning-glow:hover {
  background: linear-gradient(135deg,#FDE047,#FBBF24);
  color: #7C2D12;
  transform: translateY(-1px);
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(245,158,11,0); }
  50%       { box-shadow: 0 0 18px rgba(245,158,11,.40); }
}

/* Botón panel admin — verde agua fuerte */
a[href*="admin_panel.php"],
a[href*="admin_dashboard.php"] {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
  border: 1px solid rgba(15,118,110,.55) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 24px rgba(15,118,110,.24), inset 0 1px 0 rgba(255,255,255,.18);
  transition: all .2s ease;
}

a[href*="admin_panel.php"]:hover,
a[href*="admin_dashboard.php"]:hover {
  background: linear-gradient(135deg, var(--brand-deep), #065F56) !important;
  box-shadow: 0 12px 28px rgba(15,118,110,.34), inset 0 1px 0 rgba(255,255,255,.22);
  transform: translateY(-1px);
}

/* Botón morado legacy (por si existe en alguna vista) */
.btn-purple-modern,
.btn-header-purple {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15,118,110,.28);
}

.btn-purple-modern:hover,
.btn-header-purple:hover {
  background: linear-gradient(135deg, var(--brand-deep), #065F56) !important;
  color: #fff !important;
  transform: translateY(-1px);
}


/* ============================================================
   6. BADGES
============================================================ */
.badge-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

.badge-edit::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warning);
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}


/* ============================================================
   7. ALERTAS
============================================================ */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .7rem 1rem;
  border: 1px solid;
  border-radius: var(--radius-md);
  font-size: .83rem;
  font-weight: 500;
}

.alert-success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.alert-success::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--success);
}

.alert-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.alert-danger::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--danger);
}

.alert-info {
  background: var(--accent-soft);
  border-color: rgba(59,130,246,.22);
  color: var(--brand-text) !important;
}

.alert-info strong { color: var(--brand) !important; }


/* ============================================================
   8. ACTIVITY BAR
============================================================ */
.activity-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
}

.activity-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
}

.activity-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: .82rem;
  white-space: nowrap;
  color: var(--text);
}

.activity-title i { color: var(--brand); font-size: .9rem; }

.activity-live {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  color: var(--success-text);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 999px;
}

.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: livePulse 1.6s ease-out infinite;
}

@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0   rgba(15,118,110,.6); }
  70%  { box-shadow: 0 0 0 6px rgba(15,118,110,0); }
  100% { box-shadow: 0 0 0 0   rgba(15,118,110,0); }
}

.activity-slider-wrapper {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.activity-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  animation: scrollLoop 40s linear infinite;
}

.activity-slider:hover { animation-play-state: paused; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  font-size: .78rem;
  white-space: nowrap;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
}

.activity-item:hover {
  background: var(--green-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}

.activity-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.activity-dot.dot-vencida { background: #FB7185; animation: blinkSalmon 1s infinite; }

@keyframes blinkSalmon {
  0%, 100% { opacity: 1; }
  50%       { opacity: .35; }
}

@keyframes scrollLoop {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.activity-empty { font-size: .78rem; color: var(--text-muted); font-style: italic; }


/* ============================================================
   9. SECTION TITLE
============================================================ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .4px;
  color: var(--text);
}

.section-title i { color: var(--brand); font-size: 1rem; }

.section-title-text {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

.section-title-text i { color: var(--brand); font-size: .95rem; }

.section-title-meta {
  padding: 3px 10px;
  font-size: .76rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.section-count {
  padding: 4px 10px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--green-soft);
  border: 1px solid var(--success-border);
  border-radius: 999px;
}

.section-divider,
.config-page-form .section-divider {
  height: 1px;
  margin: 1rem 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  border: none;
}


/* ============================================================
   10. CARDS DE MÓDULOS
============================================================ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.module-card,
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1rem 1rem .85rem;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}

.module-card::before,
.tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.module-card:hover,
.tile:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.module-card:hover::before,
.tile:hover::before { transform: scaleX(1); }

.module-card-icon,
.tile .icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
  color: var(--brand);
  background: var(--green-soft);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  transition: all .2s ease;
}

.module-card:hover .module-card-icon,
.tile:hover .icon {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 18px var(--green-glow);
}

.module-card-body,
.tile .meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.module-card-title,
.tile .meta .title {
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.module-card-desc,
.tile .meta .desc {
  margin: 0;
  font-size: .72rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.module-card-arrow {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all .2s ease;
}

.module-card:hover .module-card-arrow {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translate(2px,-2px);
}

.module-card.is-disabled { pointer-events: none; opacity: .5; filter: grayscale(.7); }

.module-card.is-disabled::after {
  content: "\f023";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 12px; right: 12px;
  font-size: .7rem;
  color: var(--text-muted);
}


/* ============================================================
   11. MODO EDICIÓN
============================================================ */
.edit-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .7rem 1rem;
  margin-bottom: 1.1rem;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
}

.edit-mode-banner-text {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--warning-text);
  font-size: .8rem;
  font-weight: 500;
}

.edit-mode-banner-text i { font-size: 1rem; color: var(--warning); }

.module-card.in-edit { cursor: default; }
.module-card.in-edit:hover { transform: none; }

.module-key-tag {
  display: inline-block;
  padding: 2px 6px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: .65rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
}


/* ============================================================
   12. TOGGLE / FORM SWITCH
============================================================ */
.mod-toggle {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
}

.mod-toggle .form-check-input {
  width: 34px; height: 20px;
  margin: 0;
  cursor: pointer;
  background-color: var(--bg-deep);
  border-color: var(--border-strong);
}

.mod-toggle .form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.mod-toggle .form-check-input:focus {
  box-shadow: 0 0 0 3px var(--green-soft);
  border-color: var(--brand);
}


/* ============================================================
   13. LOGOUT
============================================================ */
.logout-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  justify-content: center;
}

.logout-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: .6rem 1.3rem;
  font-weight: 600;
  font-size: .82rem;
  color: var(--text-soft);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}

.logout-card:hover {
  border-color: var(--danger);
  color: var(--danger-text);
  background: var(--danger-bg);
}

.logout-card i { font-size: .85rem; }


/* ============================================================
   14. FOOTER
============================================================ */
.app-footer {
  text-align: center;
  margin-top: 2.5rem;
  padding: 1.2rem 0;
  font-size: .74rem;
  color: var(--text-dim);
}

.app-footer-divider {
  width: 32px; height: 2px;
  margin: 0 auto .6rem;
  background: var(--border-strong);
  border-radius: 2px;
}

.footer-note {
  font-size: .78rem;
  color: var(--text-muted);
  letter-spacing: .3px;
}

.footer-note.mb-2,
.becas-parciales-filter-title {
  color: var(--text) !important;
  font-weight: 600;
}


/* ============================================================
   15. MODAL
============================================================ */
.modal-content {
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1rem 1.3rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}

.modal-title i { color: var(--brand); }

.btn-close { filter: none; opacity: .6; }
.btn-close:hover { opacity: 1; }

.modal-body { padding: 1.3rem; }

.modal-footer {
  padding: .85rem 1.3rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}

.modal-dialog { position: relative; pointer-events: auto; }

/* Asegurar interactividad dentro del modal */
.modal-content,
.modal-content input,
.modal-content select,
.modal-content textarea,
.modal-content button,
.modal-content label,
.modal-content .form-check { pointer-events: auto !important; }

.btn-modal-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: .5rem 1.1rem;
  font-weight: 600;
  font-size: .83rem;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s ease;
}

.btn-modal-primary:hover {
  background: var(--brand-deep);
  box-shadow: 0 4px 14px var(--green-glow);
}

.btn-modal-cancel {
  height: 34px;
  padding: .5rem 1.1rem;
  font-weight: 600;
  font-size: .83rem;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-modal-cancel:hover {
  background: var(--bg-soft);
  color: var(--text);
}


/* ============================================================
   16. FORMS
============================================================ */
.input-group-text {
  background: var(--bg-soft);
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.form-control,
.form-select {
  height: 46px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  transition: all .2s ease;
}

.form-control:hover,
.form-select:hover { border-color: var(--brand-2); }

.form-control:focus,
.form-select:focus {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--green-soft);
  color: var(--text);
  outline: none;
}

.form-control::placeholder { color: var(--text-dim); font-weight: 400; }

.form-select { cursor: pointer; }

select.form-select option { background: #fff; color: var(--text); }
select.form-select option:checked { background: var(--brand); color: #fff; }

.form-label {
  margin-bottom: .32rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text-soft);
  text-transform: uppercase;
}


/* ============================================================
   17. TOAST
============================================================ */
.toast-saas {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
}


/* ============================================================
   18. HELPERS / UTILIDADES
============================================================ */
.sys-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.sys-card-title {
  margin: 0 0 .85rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}

.sys-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .85rem;
}

.sys-table thead th {
  padding: .65rem .85rem;
  font-size: .7rem;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-soft);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.sys-table tbody td {
  padding: .7rem .85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.sys-table tbody tr:hover { background: var(--surface-hover); }

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: .72rem;
  font-weight: 600;
  border-radius: 999px;
}

.pill-success { background: var(--success-bg);  color: var(--success-text);  border: 1px solid var(--success-border); }
.pill-warning { background: var(--warning-bg);  color: var(--warning-text);  border: 1px solid var(--warning-border); }
.pill-danger  { background: var(--danger-bg);   color: var(--danger-text);   border: 1px solid var(--danger-border); }
.pill-info    { background: var(--accent-soft);  color: var(--accent);        border: 1px solid rgba(59,130,246,.22); }

.sys-mt-sm { margin-top: .6rem; }
.sys-mt-md { margin-top: 1.2rem; }
.sys-mt-lg { margin-top: 2rem; }

.small-muted { font-size: 12px; color: var(--text-muted) !important; }
.hidden-block { display: none !important; }


/* ============================================================
   19. TABS / CARDS BOOTSTRAP OVERRIDE
============================================================ */
.nav-tabs { border: none; gap: 6px; }

.nav-tabs .nav-link {
  padding: 8px 14px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-soft);
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
}

.nav-tabs .nav-link:hover { background: var(--surface-hover); color: var(--text); }

.nav-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff !important;
  border-color: var(--brand) !important;
  box-shadow: 0 4px 12px var(--green-glow);
}

.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-sm);
}

.card, .table-responsive { border-color: var(--border) !important; }
.card-body { background: transparent !important; }

.card-lite {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: 16px !important;
  padding: 14px !important;
}

/* Tablas Bootstrap */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: var(--surface-hover);
  --bs-table-hover-color: var(--text);
  margin: 0;
  background: transparent !important;
  color: var(--text);
  border-radius: 12px;
  overflow: hidden;
}

.table thead,
.table-light,
.table-light th { background: var(--bg-soft) !important; color: var(--text-soft) !important; }

.table th {
  padding: .65rem .85rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-soft) !important;
  background: var(--bg-soft) !important;
  border-color: var(--border) !important;
}

.table td {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.table tbody tr { transition: all .15s ease; }
.table tbody tr:hover td { background: var(--surface-hover) !important; }


/* ============================================================
   20. CONFIGURACIÓN
============================================================ */
.compact-form { max-width: 1100px; margin: 0 auto; }

.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.config-page { width: 100%; }

.config-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}

.config-page-form .section-card,
.config-page-form .config-section-card {
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.config-page-form .section-card:hover,
.config-page-form .config-section-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.config-section-title { margin-bottom: 1rem; }
.config-card { cursor: default; min-height: auto; }
.config-card .form-control { width: 100%; height: 44px; border-radius: 14px; }

.config-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.config-actions .btn-save { height: 40px; padding: 0 18px; border-radius: 10px; }

.config-logo-preview {
  max-height: 68px; max-width: 100%;
  margin-top: 10px; padding: .55rem;
  object-fit: contain;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}

.config-danger-btn { color: var(--danger-text); background: var(--danger-bg); border-color: var(--danger-border); }
.config-danger-btn:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.config-view-btn { height: 34px; }
.config-main-save { height: 36px; padding: 8px 18px; }

.config-card .table-responsive {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.config-card .table thead th {
  padding: .8rem .9rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  background: var(--bg-soft) !important;
  color: var(--text-soft) !important;
  border-bottom: 1px solid var(--border) !important;
}

.config-card .table tbody td {
  padding: .8rem .9rem;
  background: var(--surface) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
}

.config-card .table tbody tr:hover td { background: var(--surface-hover) !important; }

.config-card .table .btn-modern {
  height: 28px; padding: 4px 10px; font-size: .74rem;
  background: var(--green-soft);
  border: 1px solid var(--success-border);
  color: var(--brand);
}

.config-card .table .btn-modern:hover { background: var(--brand); color: #fff; border-color: var(--brand); }


/* ============================================================
   21. LOGIN
============================================================ */
.login-title { text-align: center; font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.login-sub   { text-align: center; margin-bottom: 22px; font-size: 13px; color: var(--text-muted); }

.login-form { display: flex; flex-direction: column; gap: 16px; max-width: 280px; margin: auto; }

.form-row label,
.form-group label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-muted); }
.form-group { margin-bottom: 16px; }

.input {
  width: 100%; height: 40px;
  padding: 0 10px; font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-sizing: border-box;
}

.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--green-soft); }

.password-group, .input-wrap { position: relative; }
.password-group input, .input-wrap .input { padding-right: 38px; }

.password-group i,
.eye {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 14px; color: var(--text-muted); cursor: pointer;
}

.login-extra { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13px; color: var(--text-muted); }

.btn-login {
  width: 100%; height: 42px;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 6px;
  font-size: 14px; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none; border-radius: 10px; transition: .2s;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  box-shadow: 0 6px 16px var(--green-glow);
}

.btn-loader {
  width: 14px; height: 14px;
  border: 2px solid #fff; border-top-color: transparent;
  border-radius: 50%; animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-footer { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-muted); }


/* ============================================================
   22. ASIGNACIONES / CHIPS
============================================================ */
.asignacion-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.asignacion-card,
.asignacion-card strong,
.asignacion-card span,
.asignacion-card label { color: var(--text) !important; }

.asignacion-card .form-check-label,
.asignacion-card .form-check span { color: var(--text) !important; font-size: 13px; font-weight: 500; }

.asignacion-card .form-check-input { border: 1px solid var(--brand); }
.asignacion-card .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.asignacion-card i { color: var(--green-strong) !important; }

#contador-asignaciones { color: var(--text-soft) !important; }

.asig-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--green-soft);
  border: 1px solid var(--success-border);
  border-radius: 8px;
  color: var(--text);
}

.asig-chip a,
.asig-chip .x {
  margin-left: 4px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  color: var(--danger) !important;
  text-decoration: none !important;
}

.asig-chip a:hover,
.asig-chip .x:hover { color: #DC2626 !important; transform: scale(1.1); }


/* ============================================================
   23. WIZARD CUOTAS / MATRÍCULA
============================================================ */
.wizard-step {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
}

.wizard-step h4,
.wizard-step .step-subtitle,
.step-header h4 { color: var(--text) !important; }
.step-subtitle { color: var(--text-soft) !important; }

.wizard-step .alert {
  background: var(--green-soft) !important;
  color: var(--text) !important;
  border: 1px solid var(--success-border) !important;
}

.stat-card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.summary-label { color: var(--text-soft) !important; }
.summary-value { color: var(--text) !important; }

.empty-state {
  background: var(--bg-soft) !important;
  color: var(--text-muted) !important;
  border: 1px dashed var(--border-strong) !important;
}

.alert-info,
.card-lite,
.card-lite .fw-bold,
.card-lite .text-muted,
.card-lite .small,
.card-lite label,
.card-lite strong { color: var(--text) !important; }

.card-lite .text-muted,
.card-lite .small { color: var(--text-muted) !important; }

.matricula-toggle {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.matricula-toggle .form-check,
.card-lite .form-check {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-sm);
  transition: all .25s ease;
}

.card-lite .form-check:hover {
  background: var(--surface-hover) !important;
  border-color: var(--brand) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.card-lite .form-check-label { color: var(--text) !important; font-size: 14px; font-weight: 600; }
.card-lite .form-check small { display: block; margin-top: 2px; font-size: 13px; color: var(--text-muted) !important; }

.card-lite .form-check-input {
  width: 20px; height: 20px;
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 6px; cursor: pointer;
  transition: all .2s ease;
}

.card-lite .form-check-input:checked {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}

.confirm-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all .25s ease;
}

.confirm-card:hover {
  background: var(--surface-hover) !important;
  border-color: var(--brand) !important;
  box-shadow: var(--shadow-md) !important;
}

.confirm-card strong { color: var(--text) !important; font-weight: 700; }
.confirm-card span,
.confirm-card label { color: var(--text-soft) !important; }

.confirm-card input[type="checkbox"] {
  width: 20px; height: 20px;
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 6px; cursor: pointer;
}

.confirm-card input[type="checkbox"]:checked {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}

.confirm-card.confirmed {
  background: var(--success-bg) !important;
  border-color: var(--success-border) !important;
}

.danger-zone {
  padding: 16px 18px !important;
  background: var(--danger-bg) !important;
  border: 1px solid var(--danger-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-sm) !important;
}

.danger-zone h5 { color: var(--danger-text) !important; font-weight: 700 !important; }

.danger-zone .btn,
.danger-zone button {
  background: #fff !important;
  border: 1px solid var(--danger-border) !important;
  color: var(--danger-text) !important;
  font-weight: 600 !important;
}

.danger-zone .btn:hover,
.danger-zone button:hover {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

.preview-linea-proporcional {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.preview-linea-proporcional strong { color: var(--green-strong) !important; }

.tabla-alumnos { font-size: 13px; }
.tabla-alumnos th { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; opacity: .85; }
.tabla-alumnos td { padding: 10px 8px !important; }

.tabla-alumnos input,
.tabla-alumnos select {
  height: 34px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  border-radius: 10px !important;
}

.tabla-alumnos input:focus,
.tabla-alumnos select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 2px var(--green-soft) !important;
}

.tabla-alumnos tbody tr:first-child { background: var(--success-bg); border-top: 1px solid var(--success-border); }
.tabla-alumnos tbody tr:first-child td { font-weight: 600; }

.actions { display: flex; align-items: center; justify-content: center; gap: 6px; }

td .actions .btn,
.tabla-alumnos .actions .btn,
.sys-table .actions .btn {
  width: 32px; height: 32px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}

.btn-outline-secondary,
.btn-outline-danger {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}

.editing {
  background: var(--green-soft) !important;
  border-left: 4px solid var(--brand);
}

#buscador {
  height: 44px;
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 12px;
}

#btnGuardar {
  height: 46px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border: none;
  border-radius: 12px;
  transition: all .2s ease;
}

#btnGuardar:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--green-glow); }
#btnGuardar:disabled { opacity: .7; transform: none; box-shadow: none; }


/* ============================================================
   24. COBRANZAS
============================================================ */
.filtros-cobranzas {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  padding: 16px !important;
  color: var(--text);
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-sm);
}

.filtros-cobranzas .row { display: flex !important; }

.filtros-cobranzas label,
.filtros-cobranzas span,
.filtros-cobranzas small,
.filtros-cobranzas .form-check-label,
.filtros-cobranzas summary { color: var(--text) !important; font-weight: 500; }

.filtros-cobranzas .form-check {
  width: auto !important;
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.filtros-cobranzas .form-check-input { margin: 0; }

.filtros-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-left: auto !important;
}

.filtros-acciones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

.filtro-consejo summary {
  display: inline-flex;
  align-items: center; gap: 6px;
  height: 34px; padding: 0 13px;
  font-weight: 700;
  color: var(--brand) !important;
  background: var(--green-soft);
  border: 1px solid var(--success-border);
  border-radius: 10px; list-style: none; cursor: pointer;
}

.filtro-consejo summary::-webkit-details-marker { display: none; }
.filtro-consejo summary::before { content: "\f0eb"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--warning); }

.filtro-consejo-box {
  position: absolute; right: 0; margin-top: 8px; max-width: 360px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
}

.btn-filtro-clear {
  height: 34px; padding: 0 13px;
  font-weight: 600; color: var(--text-soft);
  background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: 10px;
  cursor: pointer;
}

.btn-filtro-clear:hover { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }

.acciones-cobranzas { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.acciones-left,
.acciones-center { display: flex; gap: 10px; }

.acciones-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.resumen-cobranzas {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
}

.resumen-kpis {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0;
}

.resumen-acciones {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-shrink: 0;
  margin-left: auto !important;
}

.resumen-pago {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid var(--border) !important;
}

.summaryWrap { position: relative !important; z-index: 20 !important; }

.summaryWrap,
.summaryWrap *,
#tablaCuotas,
#tablaCuotas *,
#modalPago,
#modalPago * { pointer-events: auto !important; }

.summaryWrap .card-lite { padding: 14px 16px !important; }

.summaryWrap .btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  border-radius: 10px !important;
}

.summaryWrap #togglePaidBtn {
  color: var(--brand) !important;
  background: var(--green-soft) !important;
  border: 1px solid var(--success-border) !important;
}

.summaryWrap #togglePaidBtn:hover {
  color: #fff !important;
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}

.summaryWrap .btn-outline-secondary {
  color: var(--text-soft) !important;
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-strong) !important;
}

.summaryWrap .btn-outline-primary {
  color: var(--brand) !important;
  background: var(--green-soft) !important;
  border: 1px solid var(--success-border) !important;
}

.summaryWrap #btnPagar {
  min-width: 120px !important;
  height: 36px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Filtros cobranzas — 1 sola línea */
#formFiltros .row.g-1 {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  gap: 8px !important;
  width: 100%;
}

#formFiltros .row.g-1 > [class*="col-"] {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: none !important;
}

#formFiltros .row.g-1 > .col-lg-5 { flex: 2.2 1 0 !important; }
#formFiltros .row.g-1 > .col-lg-4 { flex: 1.8 1 0 !important; }
#formFiltros .row.g-1 > .col-lg-1 { flex: 0 0 90px !important; min-width: 80px !important; }
#formFiltros .row.g-1 > .col-lg-2 { flex: 1.3 1 0 !important; }

#formFiltros .row.g-1 > .col-12 {
  flex: 0 0 auto !important;
  width: auto !important;
  display: flex !important;
  align-items: flex-end !important;
  padding-bottom: 2px !important;
}

#formFiltros .form-label.small { font-size: .68rem !important; margin-bottom: 3px !important; white-space: nowrap; }
#formFiltros .form-select-sm { height: 36px !important; font-size: .83rem !important; }

#formFiltros .form-check.form-switch {
  margin: 0 !important;
  padding-left: 2.6em;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}

#formFiltros .form-check-label { font-size: .8rem !important; white-space: nowrap; }


/* ============================================================
   25. DASHBOARD / KPIs
============================================================ */
.card-soft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  width: 100%; padding: 14px 16px;
  transition: all .25s ease;
}

.card-soft:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: all .25s ease;
}

.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--text); }

.chart-box {
  position: relative;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.chart-box h6 { font-size: 14px; font-weight: 600; color: var(--text); }
.chart-box p  { font-size: 12px; color: var(--text-muted); }
.chart-title  { font-size: 14px; font-weight: 600; color: var(--text); margin: 0; }
.chart-sub    { font-size: 12px; color: var(--text-muted); }

.legend-item.matricula { background: var(--brand); }
.legend-item.cuotas    { background: var(--accent); }

.card-soft, .kpi-card, .chart-box { animation: fadeUp .4s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kpi-inline { display: flex; gap: 10px; margin-top: 10px; }
.kpi-inline .kpi-card { flex: 1; min-width: 0; height: 70px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.kpi-inline .kpi-label { margin-bottom: 2px; font-size: 11px; }
.kpi-inline .kpi-value { font-size: 18px; }

.kpi-chips { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.kpi-chip {
  display: flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 10px; font-size: 12px; font-weight: 600;
  white-space: nowrap; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.kpi-chip:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.filtros-inline { display: flex; align-items: flex-end; gap: 10px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }

.filtro-item { display: flex; flex-direction: column; flex: 0 0 auto; min-width: 110px; }
.filtro-item label { margin-bottom: 2px; font-size: 10px; text-transform: uppercase; color: var(--text-muted); }
.filtro-item .form-control,
.filtro-item .form-select { height: 32px !important; padding: 0 8px !important; font-size: 12px !important; border-radius: 8px !important; }

.filtros-inline-pro { display: flex !important; align-items: end !important; gap: 12px; flex-wrap: nowrap !important; }
.filtros-inline-pro .form-control,
.filtros-inline-pro .form-select { height: 36px !important; padding: 5px 10px !important; font-size: .82rem; border-radius: 10px; }
.filtros-inline-pro .form-label { margin-bottom: 3px; font-size: .68rem; color: var(--text-muted); }
.filtros-inline-pro .btn { height: 36px !important; padding: 5px 14px !important; font-size: .8rem; border-radius: 10px; white-space: nowrap; }

/* Tabla pivot */
.table-pivot {
  border-collapse: separate !important;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.table-pivot thead th {
  padding: .65rem .85rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text) !important;
  background: var(--bg-soft) !important;
  border-bottom: 1px solid var(--border) !important;
}

.table-pivot tbody td { font-size: .88rem; color: var(--text); }
.table-pivot tbody td:first-child { font-weight: 600; }
.table-pivot tfoot { background: var(--bg-soft); }
.table-pivot tfoot th,
.table-pivot tfoot td { padding: .85rem .95rem; font-size: .85rem; border-top: 1px solid var(--border); }

.col-matricula { background: linear-gradient(180deg, rgba(15,118,110,.07), rgba(15,118,110,.02)); text-align: center; }
.col-cuota     { background: linear-gradient(180deg, rgba(59,130,246,.06), rgba(59,130,246,.02)); text-align: center; }
.col-total     { background: linear-gradient(180deg, rgba(217,119,6,.07), rgba(217,119,6,.02)); text-align: center; font-weight: 600; }

thead .col-matricula { background: rgba(15,118,110,.10); }
thead .col-cuota     { background: rgba(59,130,246,.10); }
thead .col-total     { background: rgba(217,119,6,.10); }

.table-pivot .col-matricula,
.table-pivot .col-matricula * { color: var(--green-strong) !important; }
.table-pivot .col-cuota,
.table-pivot .col-cuota *     { color: var(--accent) !important; }

.text-matricula { color: var(--green-strong) !important; }
.text-cuota     { color: var(--accent) !important; }
.text-total     { color: var(--warning-text) !important; }

.btn-cat-filter {
  padding: 8px 14px; font-size: .82rem; font-weight: 600;
  color: var(--text-soft); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 999px;
  box-shadow: var(--shadow-sm); transition: all .18s ease;
  cursor: pointer;
}

.btn-cat-filter:hover { color: var(--brand); background: var(--green-soft); border-color: var(--brand); transform: translateY(-1px); }

.btn-cat-filter.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  box-shadow: 0 6px 16px var(--green-glow);
}


/* ============================================================
   26. BECAS
============================================================ */
.categoria-title-wrap { display: flex; align-items: center; gap: 10px; }
.categoria-title-wrap::after { content: ""; width: 1px; height: 14px; margin-left: 6px; background: var(--border-strong); }

.badge-alumnos {
  padding: 5px 10px; font-size: .72rem; font-weight: 500;
  color: var(--text-soft); background: var(--bg-soft);
  border: 1px solid var(--border-strong); border-radius: 999px;
}

.badge-soft { padding: 4px 10px; font-weight: 500; color: var(--text-soft); background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: 999px; }
.badge-soft:first-of-type { color: var(--green-strong); border-color: var(--success-border); background: var(--success-bg); }
.badge-soft:last-of-type  { color: var(--accent); border-color: rgba(59,130,246,.22); background: var(--accent-soft); }


/* ============================================================
   27. ASISTENCIAS
============================================================ */
.accordion-item {
  margin-bottom: 10px;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-button {
  padding: 12px 16px; font-size: .85rem; font-weight: 600;
  color: var(--text) !important;
  background: var(--bg-soft) !important;
  border: none !important; box-shadow: none !important;
}

.accordion-button:hover { background: var(--surface-hover) !important; }
.accordion-button:not(.collapsed) { color: var(--brand) !important; background: var(--green-soft) !important; }
.accordion-button::after { filter: none; opacity: .6; }
.accordion-body { padding: 12px; background: var(--surface) !important; }

.flag-ok, .att-ok  { color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border); }
.flag-no           { color: var(--danger-text);  background: var(--danger-bg);  border: 1px solid var(--danger-border); }
.flag-na, .att-no  { color: var(--text-muted);   background: var(--bg-soft);    border: 1px solid var(--border); }

.flag, .att {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; font-size: .75rem; font-weight: 700; border-radius: 6px;
}

.metric-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm); transition: all .2s ease;
}

.metric-item:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-md); }
.metric-label { font-size: .7rem; letter-spacing: .4px; color: var(--text-muted); text-transform: uppercase; }
.metric-value { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.metric-item.percent .metric-value { color: var(--brand); }
.metric-item.success .metric-value { color: var(--green-strong); }
.metric-item.danger  .metric-value { color: var(--danger); }

.mini-progress { height: 4px; background: var(--bg-deep); border-radius: 4px; overflow: hidden; }
.mini-bar { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .4s ease; }

.col-ok { color: var(--green-strong) !important; font-weight: 700; }
.col-no { color: var(--danger) !important; font-weight: 700; }

.metrics-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }


/* ============================================================
   28. MOROSIDADES
============================================================ */
.morosidades-page .corp-header .header-actions { display: none !important; }

.topbar-system {
  padding: 20px 22px;
  background: linear-gradient(135deg, #CCF8F1, #DBEAFE, #CCF8F1);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  color: var(--brand-deep);
}

.topbar-title { font-size: 1.4rem; font-weight: 700; color: var(--brand-deep); letter-spacing: .3px; }
.topbar-sub   { font-size: .85rem; color: var(--brand-text); opacity: .85; }
.crumbs       { font-size: .75rem; color: var(--brand-text); opacity: .7; }

.icon-wrap {
  padding: 8px; color: var(--brand);
  background: #fff; border: 1px solid rgba(15,118,110,.20);
  border-radius: 10px; box-shadow: 0 4px 12px rgba(15,118,110,.10);
}

.header-actions-pro { display: flex; flex-wrap: wrap; gap: 10px; }

.btn-wa   { color: var(--green-strong); background: rgba(255,255,255,.7); border: 1px solid rgba(15,118,110,.20); }
.btn-mail { color: var(--brand); background: rgba(255,255,255,.7); border: 1px solid rgba(15,118,110,.20); }


/* ============================================================
   29. RESPONSIVE
============================================================ */
@media (max-width: 992px) {
  .form-2col { grid-template-columns: 1fr; }
  .app-actions { max-width: 100%; width: 100%; justify-content: flex-start; }
}

@media (max-width: 768px) {
  .app-header,
  .topbar { padding: 1rem 1.2rem; flex-wrap: wrap; gap: 14px; }
  .app-header-top { flex-wrap: wrap; }
  .app-title { font-size: 1rem; }
  .app-actions,
  .topbar .actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .modules-grid { grid-template-columns: 1fr; gap: 10px; }
  .activity-inline { flex-wrap: wrap; height: auto; padding: 6px 0; gap: 10px; }
  .activity-slider-wrapper { width: 100%; flex-basis: 100%; }
  .config-form-grid { grid-template-columns: 1fr; }
  .config-actions { justify-content: stretch; }
  .config-actions .btn-save { width: 100%; justify-content: center; }
  .filtros-inline { flex-wrap: wrap; }
  .kpi-inline { flex-wrap: wrap; }
  .kpi-inline .kpi-card { flex: 1 1 48%; }
  .kpi-chips { width: 100%; flex-wrap: wrap; margin-top: 8px; }
  .topbar-system { flex-direction: column; gap: 10px; }
  .kpi-value { font-size: 1.2rem; }

  #formFiltros .row.g-1 { flex-wrap: wrap !important; }
  #formFiltros .row.g-1 > [class*="col-"] { flex: 1 1 calc(50% - 8px) !important; max-width: calc(50% - 8px) !important; }
  #formFiltros .row.g-1 > .col-lg-1 { flex: 0 0 calc(50% - 8px) !important; }
  #formFiltros .row.g-1 > .col-12 { flex: 1 1 100% !important; width: 100% !important; }
}

@media (max-width: 576px) {
  .compact-form { max-width: 100%; }
  .config-page-form .section-card,
  .config-page-form .config-section-card { padding: 1rem; }
  #formFiltros .row.g-1 > [class*="col-"] { flex: 1 1 100% !important; max-width: 100% !important; }
}

@media (max-width: 480px) {
  .app-logo,
  .topbar .logo-wrap { width: 42px; height: 42px; }
}
/* ============================================================
   FIX BOTONES RESUMEN COBRANZAS
   Botón Mostrar pagadas + Seleccionar visibles + Exportar Excel
============================================================ */

.summaryWrap .resumen-cobranzas{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.summaryWrap .resumen-kpis{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.summaryWrap .resumen-acciones{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.summaryWrap .resumen-acciones .btn,
.summaryWrap #togglePaidBtn,
.summaryWrap #btnSelectVisible{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px !important;
  border-radius: 12px !important;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Botón Mostrar pagadas */
.summaryWrap #togglePaidBtn{
  color: #0f766e !important;
  background: #ccfbf1 !important;
  border: 1px solid rgba(15,118,110,.25) !important;
  box-shadow: 0 8px 18px rgba(15,118,110,.10);
}

.summaryWrap #togglePaidBtn:hover{
  background: #99f6e4 !important;
  color: #115e59 !important;
}

/* Cuando está en modo Ocultar pagadas */
.summaryWrap #togglePaidBtn.btn-outline-dark{
  color: #ffffff !important;
  background: #0f766e !important;
  border-color: #0f766e !important;
}

/* Botón Seleccionar visibles */
.summaryWrap #btnSelectVisible{
  color: #0f766e !important;
  background: #ccfbf1 !important;
  border: 1px solid rgba(15,118,110,.25) !important;
}

.summaryWrap #btnSelectVisible:hover{
  background: #99f6e4 !important;
  color: #115e59 !important;
}

/* Botón Exportar */
.summaryWrap .resumen-acciones .btn-success{
  color: #ffffff !important;
  background: linear-gradient(135deg, #059669, #047857) !important;
  border: 0 !important;
  box-shadow: 0 10px 22px rgba(5,150,105,.20);
}

/* Segunda línea: seleccionadas + pagar */
.summaryWrap .resumen-pago{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,118,110,.15);
}

/* Botón pagar */
.summaryWrap #btnPagar{
  min-height: 42px;
  padding: 0 18px !important;
  border-radius: 12px !important;
  font-weight: 800;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px){
  .summaryWrap .resumen-cobranzas,
  .summaryWrap .resumen-pago{
    align-items: stretch;
  }

  .summaryWrap .resumen-acciones{
    width: 100%;
    justify-content: flex-start;
  }

  .summaryWrap .resumen-acciones .btn,
  .summaryWrap #togglePaidBtn,
  .summaryWrap #btnSelectVisible{
    flex: 1 1 auto;
  }
}
/* ============================================================
   99. LAYOUT MODERNO TIPO REACT — SIDEBAR + CONTENIDO
   Capa visual global. No altera formularios, consultas ni acciones.
============================================================ */
body.layout-react-modern{
  padding-left: 292px;
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(20,184,166,.16), transparent 58%),
    radial-gradient(760px 520px at 100% 8%, rgba(59,130,246,.12), transparent 55%),
    linear-gradient(135deg, #f4fbfa 0%, #f6f8ff 52%, #eef9f7 100%) !important;
}

body.layout-react-modern::before{
  left:292px;
}

.modern-sidebar{
  position:fixed;
  z-index:1080;
  top:8px;
  left:8px;
  bottom:8px;
  width:260px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(207,232,229,.92);
  border-radius:0 38px 38px 0;
  background:rgba(255,255,255,.86);
  box-shadow:0 24px 60px rgba(15,23,42,.12), 0 2px 8px rgba(15,118,110,.06);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.modern-sidebar::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 0%, rgba(94,234,212,.18), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.72));
}

.modern-sidebar > *{ position:relative; z-index:1; }

.modern-sidebar-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:22px 20px 16px;
}

.modern-brand-logo{
  width:48px;
  height:48px;
  border-radius:18px;
  display:grid;
  place-items:center;
  overflow:hidden;
  color:#fff;
  background:linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow:0 10px 24px rgba(15,118,110,.20);
}

.modern-brand-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:6px;
}

.modern-sidebar-brand strong{
  display:block;
  font-size:1.05rem;
  line-height:1.1;
  color:var(--text);
  letter-spacing:-.02em;
}

.modern-sidebar-brand small,
.modern-sidebar-user small,
.modern-sidebar-footer small{
  display:block;
  color:var(--text-soft);
  font-size:.76rem;
}

.modern-sidebar-user{
  margin:0 16px 14px;
  padding:12px;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(207,232,229,.76);
  border-radius:18px;
  background:linear-gradient(135deg, rgba(204,248,241,.55), rgba(219,234,254,.45));
}

.modern-user-avatar{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:14px;
  color:var(--brand-deep);
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.modern-sidebar-user strong{
  display:block;
  max-width:160px;
  overflow:hidden;
  color:var(--text);
  font-size:.88rem;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.modern-sidebar-nav{
  flex:1;
  overflow:auto;
  padding:4px 14px 14px;
  scrollbar-width:thin;
}

.modern-nav-label{
  margin:16px 8px 8px;
  color:var(--text-muted);
  font-size:.70rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.modern-sidebar-link{
  min-height:42px;
  margin:4px 0;
  padding:10px 11px;
  display:flex;
  align-items:center;
  gap:11px;
  border:1px solid transparent;
  border-radius:16px;
  color:#20364d;
  font-size:.92rem;
  font-weight:650;
  text-decoration:none;
  transition:transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.modern-sidebar-link:hover{
  color:var(--brand-deep);
  background:rgba(204,248,241,.45);
  transform:translateX(3px);
}

.modern-sidebar-link.active{
  color:#fff;
  border-color:rgba(255,255,255,.42);
  background:linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow:0 12px 24px rgba(15,118,110,.18);
}

.modern-sidebar-link.disabled{
  pointer-events:none;
  opacity:.45;
  filter:grayscale(1);
}

.modern-sidebar-ico{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:12px;
  background:rgba(15,118,110,.08);
}

.modern-sidebar-link.active .modern-sidebar-ico{
  color:#fff;
  background:rgba(255,255,255,.18);
}

.modern-sidebar-footer{
  padding:14px 16px 18px;
  border-top:1px solid rgba(207,232,229,.78);
}

.modern-logout{
  width:100%;
  margin-bottom:8px;
  padding:10px 12px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  border-radius:14px;
  color:var(--danger-text);
  background:var(--danger-bg);
  border:1px solid var(--danger-border);
  font-weight:750;
  text-decoration:none;
}

.modern-logout:hover{
  color:#fff;
  background:var(--danger);
}

.modern-mobile-toggle,
.modern-sidebar-backdrop{
  display:none;
}

body.layout-react-modern > .container,
body.layout-react-modern > .container-fluid,
body.layout-react-modern .page-wrap{
  max-width:1480px;
}

body.layout-react-modern > .app-header,
body.layout-react-modern > .topbar,
body.layout-react-modern .container > .app-header:first-child{
  margin-top:28px;
}

body.layout-react-modern .app-header{
  border-radius:24px;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

body.layout-react-modern .card,
body.layout-react-modern .summary-card,
body.layout-react-modern .stat-card,
body.layout-react-modern .kpi-card,
body.layout-react-modern .table-responsive,
body.layout-react-modern .panel-card{
  border-radius:20px;
  border-color:rgba(207,232,229,.78);
  box-shadow:0 16px 38px rgba(15,23,42,.07);
}

@media (max-width: 1199.98px){
  body.layout-react-modern{ padding-left:0; }
  body.layout-react-modern::before{ left:0; }

  .modern-sidebar{
    top:0;
    left:0;
    bottom:0;
    width:min(310px, 86vw);
    border-radius:0 30px 30px 0;
    transform:translateX(-105%);
    transition:transform .24s ease;
  }

  body.sidebar-open .modern-sidebar{ transform:translateX(0); }

  .modern-sidebar-backdrop{
    position:fixed;
    z-index:1070;
    inset:0;
    background:rgba(15,23,42,.36);
    backdrop-filter:blur(2px);
  }

  body.sidebar-open .modern-sidebar-backdrop{ display:block; }

  .modern-mobile-toggle{
    display:grid;
    place-items:center;
    position:fixed;
    z-index:1090;
    right:16px;
    bottom:18px;
    width:54px;
    height:54px;
    border:0;
    border-radius:18px;
    color:#fff;
    background:linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow:0 16px 32px rgba(15,118,110,.28);
  }

  body.layout-react-modern .app-header-top,
  body.layout-react-modern .topbar{
    flex-wrap:wrap;
  }

  body.layout-react-modern .app-actions{
    width:100%;
    justify-content:flex-start;
    overflow-x:auto;
    padding-bottom:2px;
  }
}

@media (max-width: 575.98px){
  body.layout-react-modern{
    background:#f4fbfa !important;
  }

  body.layout-react-modern > .container,
  body.layout-react-modern > .container-fluid,
  body.layout-react-modern .page-wrap{
    padding-left:12px;
    padding-right:12px;
  }

  body.layout-react-modern .app-header{
    margin-top:14px;
    padding:1rem;
    border-radius:18px;
  }

  .modern-mobile-toggle{
    right:12px;
    bottom:12px;
  }
}

/* ============================================================
   100. AJUSTE FINO — TIPOGRAFÍA COMPACTA Y ELEGANTE
   Reduce dureza visual sin tocar PHP, consultas ni acciones.
============================================================ */
:root{
  --ui-font-size: 13px;
  --ui-font-size-sm: 12px;
  --ui-font-size-xs: 11px;
  --ui-font-weight: 500;
  --ui-font-weight-strong: 650;
}

body{
  font-size: var(--ui-font-size) !important;
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -.006em;
}

body.layout-react-modern{
  padding-left: 284px !important;
}

body.layout-react-modern::before{ left:284px !important; }

body.layout-react-modern > .container,
body.layout-react-modern > .container-fluid,
body.layout-react-modern .page-wrap{
  max-width: calc(100vw - 316px) !important;
}

.app-header,
.topbar{
  padding: 1.05rem 1.45rem !important;
  margin-bottom: 1.15rem !important;
}

.app-title,
.topbar .titles .title{
  font-size: 1.02rem !important;
  font-weight: 650 !important;
  letter-spacing: -.018em !important;
}

.app-subtitle,
.topbar .titles .subtitle{
  font-size: .76rem !important;
  font-weight: 450 !important;
}

.app-logo,
.topbar .logo-wrap{
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
}

.app-logo img,
.topbar .logo-wrap img{
  width: 28px !important;
  height: 28px !important;
}

.btn-modern,
.topbar .actions .btn-light,
.topbar .actions .btn-sm,
.btn,
button{
  font-size: .78rem !important;
  font-weight: 650 !important;
  letter-spacing: -.01em !important;
}

.btn-modern,
.topbar .actions .btn-light,
.topbar .actions .btn-sm{
  height: 34px !important;
  padding: 0 13px !important;
  border-radius: 10px !important;
}

.form-label{
  font-size: .66rem !important;
  font-weight: 700 !important;
  letter-spacing: .035em !important;
}

.form-control,
.form-select,
.input{
  height: 38px !important;
  font-size: .79rem !important;
  font-weight: 420 !important;
  border-radius: 11px !important;
}

.form-control::placeholder,
.input::placeholder{
  font-size: .79rem !important;
  color: #94a8ba !important;
}

.card,
.card-lite,
.sys-card,
.filtros-cobranzas,
.summaryWrap .card-lite{
  border-radius: 17px !important;
}

.table,
.sys-table,
.tabla-alumnos{
  font-size: .78rem !important;
}

.table th,
.sys-table thead th,
.table-pivot thead th,
.tabla-alumnos th{
  font-size: .66rem !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
  padding: .56rem .72rem !important;
}

.table td,
.sys-table tbody td,
.table-pivot tbody td,
.tabla-alumnos td{
  font-size: .77rem !important;
  font-weight: 430 !important;
  padding: .56rem .72rem !important;
}

.section-title,
.section-title-text,
.sys-card-title,
.chart-title{
  font-size: .9rem !important;
  font-weight: 650 !important;
}

.small,
small,
.small-muted,
.footer-note,
.activity-item,
.activity-empty{
  font-size: .72rem !important;
}

.kpi-value{ font-size: 1.35rem !important; font-weight: 650 !important; }
.kpi-label{ font-size: .70rem !important; }

.modern-sidebar{
  width: 252px !important;
}

.modern-sidebar-brand{
  padding: 18px 18px 12px !important;
}

.modern-brand-logo{
  width: 42px !important;
  height: 42px !important;
  border-radius: 16px !important;
}

.modern-sidebar-brand strong{
  font-size: .98rem !important;
  font-weight: 650 !important;
}

.modern-sidebar-brand small,
.modern-sidebar-user small,
.modern-sidebar-footer small{
  font-size: .70rem !important;
}

.modern-sidebar-user{
  margin: 0 14px 11px !important;
  padding: 10px !important;
  border-radius: 16px !important;
}

.modern-sidebar-user strong{
  font-size: .80rem !important;
  font-weight: 650 !important;
}

.modern-nav-label{
  margin: 13px 8px 6px !important;
  font-size: .62rem !important;
}

.modern-sidebar-link{
  min-height: 37px !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  font-size: .80rem !important;
  font-weight: 580 !important;
}

.modern-sidebar-ico{
  width: 27px !important;
  height: 27px !important;
  border-radius: 10px !important;
  font-size: .78rem !important;
}

.modern-logout{
  padding: 9px 10px !important;
  border-radius: 13px !important;
  font-size: .80rem !important;
}

.summaryWrap .resumen-acciones .btn,
.summaryWrap #togglePaidBtn,
.summaryWrap #btnSelectVisible,
.summaryWrap #btnPagar{
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 13px !important;
  border-radius: 11px !important;
  font-size: .77rem !important;
  font-weight: 700 !important;
}

#formFiltros .form-select-sm{
  height: 34px !important;
  font-size: .76rem !important;
}

#formFiltros .form-check-label{
  font-size: .74rem !important;
}

@media (max-width: 1199.98px){
  body.layout-react-modern{ padding-left: 0 !important; }
  body.layout-react-modern::before{ left:0 !important; }
  body.layout-react-modern > .container,
  body.layout-react-modern > .container-fluid,
  body.layout-react-modern .page-wrap{
    max-width: 100% !important;
  }
}

@media (max-width: 575.98px){
  body{ font-size: 12.5px !important; }
  .app-title{ font-size: .95rem !important; }
  .btn-modern,
  .topbar .actions .btn-light,
  .topbar .actions .btn-sm,
  .btn{ font-size: .75rem !important; }
}

/* ============================================================
   101. SHELL PRINCIPAL — MENÚ + MÓDULO EN SEGUNDA COLUMNA
   Sólo estructura visual. Los módulos mantienen sus archivos y lógica.
============================================================ */
body.modern-app-shell{
  min-height:100vh;
  overflow:hidden;
}

.modern-shell-main{
  height:100vh;
  padding:24px 24px 18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.modern-shell-activity{
  flex:0 0 auto;
  margin:0 !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.78) !important;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  box-shadow:0 12px 34px rgba(15,23,42,.08) !important;
}

.modern-content-panel{
  flex:1 1 auto;
  min-height:0;
  border:1px solid rgba(207,232,229,.72);
  border-radius:22px;
  background:rgba(255,255,255,.50);
  box-shadow:0 16px 42px rgba(15,23,42,.07);
  overflow:hidden;
}

.modern-module-frame{
  width:100%;
  height:100%;
  display:block;
  border:0;
  background:transparent;
}

body:not(.layout-react-modern) .modern-sidebar,
body:not(.layout-react-modern) .modern-sidebar-backdrop,
body:not(.layout-react-modern) .modern-mobile-toggle{
  display:none !important;
}

@media (max-width:1199.98px){
  body.modern-app-shell{ overflow:auto; }
  .modern-shell-main{
    min-height:100vh;
    height:100vh;
    padding:14px 12px 12px;
  }
  .modern-content-panel{ border-radius:18px; }
}

@media (max-width:575.98px){
  .modern-shell-main{ padding:10px; gap:10px; }
  .modern-shell-activity .activity-title{ display:none; }
}

/* ============================================================
   102. AJUSTE DE ESPACIO — MÁS ANCHO PARA SEGUNDA COLUMNA
   Reduce el aire entre menú izquierdo y contenido sin tocar lógica.
============================================================ */
@media (min-width: 1200px){
  body.layout-react-modern{
    padding-left: 264px !important;
  }

  body.layout-react-modern::before{
    left: 264px !important;
  }

  body.layout-react-modern > .container,
  body.layout-react-modern > .container-fluid,
  body.layout-react-modern .page-wrap{
    max-width: calc(100vw - 278px) !important;
  }

  .modern-shell-main{
    padding: 18px 14px 14px 12px !important;
    gap: 10px !important;
  }

  .modern-content-panel{
    border-radius: 20px !important;
  }

  .modern-shell-activity{
    border-radius: 16px !important;
  }
}


/* ============================================================
   103. TIPOGRAFÍA WEB PRO — INTER GLOBAL
   Capa final: aplica Inter en todo el sistema sin romper íconos,
   tablas, formularios, botones ni componentes Bootstrap.
============================================================ */
:root{
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  --font-size-base: 13.5px;
  --font-size-table: 12.8px;
  --font-size-button: 12.8px;
  --font-size-label: 11px;
  --line-base: 1.45;
  --tracking-tight: -.015em;
  --tracking-normal: -.006em;
}

html{
  font-family: var(--font-sans) !important;
  font-size: 100%;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body,
body *:not(i):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not([class^="bi-"]):not([class*=" bi-"]):not(.material-icons):not(.material-symbols-outlined){
  font-family: var(--font-sans) !important;
}

body{
  font-size: var(--font-size-base) !important;
  font-weight: 400 !important;
  line-height: var(--line-base) !important;
  letter-spacing: var(--tracking-normal);
  font-optical-sizing: auto;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Mantener íconos funcionando correctamente */
.fa,
.fas,
.far,
.fal,
.fab,
.fa-solid,
.fa-regular,
.fa-brands{
  font-family: 'Font Awesome 6 Free' !important;
}

.fab,
.fa-brands{
  font-family: 'Font Awesome 6 Brands' !important;
}

.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before{
  font-family: 'bootstrap-icons' !important;
}

code,
pre,
kbd,
samp,
.module-key-tag{
  font-family: var(--font-mono) !important;
  letter-spacing: 0 !important;
}

/* Títulos más limpios */
h1,h2,h3,h4,h5,h6,
.app-title,
.topbar .titles .title,
.topbar-title,
.section-title-text,
.sys-card-title,
.chart-title,
.module-card-title,
.tile .meta .title{
  font-family: var(--font-sans) !important;
  font-weight: 750 !important;
  letter-spacing: var(--tracking-tight) !important;
  line-height: 1.18 !important;
}

.app-title,
.topbar .titles .title{
  font-size: clamp(1rem, 1.4vw, 1.18rem) !important;
}

.app-subtitle,
.topbar .titles .subtitle,
.topbar-sub,
.module-card-desc,
.tile .meta .desc,
.text-muted,
.small-muted,
small{
  font-weight: 450 !important;
  letter-spacing: -.004em !important;
}

/* Botones Inter: compactos, elegantes y legibles */
.btn,
button,
.btn-modern,
.btn-login,
.btn-save,
.btn-modal-primary,
.btn-modal-cancel,
.topbar .actions .btn-light,
.topbar .actions .btn-sm,
.modern-sidebar-link,
.modern-logout{
  font-family: var(--font-sans) !important;
  font-size: var(--font-size-button) !important;
  font-weight: 700 !important;
  letter-spacing: -.012em !important;
  line-height: 1 !important;
}

.btn,
button,
.btn-modern,
.topbar .actions .btn-light,
.topbar .actions .btn-sm{
  min-height: 36px;
  border-radius: 12px !important;
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
.form-control:focus,
.form-select:focus,
.input:focus{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(20,184,166,.22) !important;
}

/* Formularios más claros en web */
.form-label,
label,
.filtro-item label,
#formFiltros .form-label.small{
  font-family: var(--font-sans) !important;
}

.form-label,
#formFiltros .form-label.small,
.filtro-item label{
  font-size: var(--font-size-label) !important;
  font-weight: 800 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase;
}

.form-control,
.form-select,
.input,
textarea,
input,
select{
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  font-weight: 450 !important;
  letter-spacing: -.006em !important;
}

.form-control::placeholder,
.input::placeholder,
textarea::placeholder{
  font-family: var(--font-sans) !important;
  font-weight: 400 !important;
  color: var(--text-dim) !important;
}

/* Tablas: mejor lectura y menos ruido visual */
.table,
.sys-table,
.table-pivot,
.tabla-alumnos{
  font-family: var(--font-sans) !important;
  font-size: var(--font-size-table) !important;
  letter-spacing: -.004em !important;
}

.table th,
.sys-table thead th,
.table-pivot thead th,
.tabla-alumnos th{
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.2 !important;
}

.table td,
.sys-table tbody td,
.table-pivot tbody td,
.tabla-alumnos td{
  font-family: var(--font-sans) !important;
  font-size: 12.7px !important;
  font-weight: 450 !important;
  line-height: 1.35 !important;
}

.table td strong,
.sys-table td strong,
.table-pivot td strong{
  font-weight: 750 !important;
}

/* Sidebar moderno con Inter más premium */
.modern-sidebar-brand strong,
.modern-sidebar-user strong{
  font-weight: 760 !important;
  letter-spacing: -.018em !important;
}

.modern-sidebar-brand small,
.modern-sidebar-user small,
.modern-sidebar-footer small{
  font-weight: 450 !important;
  letter-spacing: -.004em !important;
}

.modern-nav-label{
  font-weight: 850 !important;
  letter-spacing: .09em !important;
}

.modern-sidebar-link{
  font-weight: 680 !important;
}

/* KPIs y números: Inter tabular para montos y conteos */
.kpi-value,
.metric-value,
.summary-value,
.col-matricula,
.col-cuota,
.col-total,
.text-matricula,
.text-cuota,
.text-total,
.table td:nth-child(n+2),
.sys-table td:nth-child(n+2){
  font-variant-numeric: tabular-nums !important;
}

.kpi-value,
.metric-value,
.summary-value{
  font-weight: 760 !important;
  letter-spacing: -.025em !important;
}

/* Badges, pills y alertas */
.badge,
.badge-edit,
.badge-soft,
.badge-alumnos,
.pill,
.activity-live,
.section-count,
.section-title-meta,
.kpi-chip,
.asig-chip{
  font-family: var(--font-sans) !important;
  font-weight: 750 !important;
  letter-spacing: -.006em !important;
}

.alert,
.modal-title,
.modal-body,
.modal-footer{
  font-family: var(--font-sans) !important;
}

/* Links más limpios */
a{
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

/* Responsive: Inter un poco más compacto en móvil */
@media (max-width: 768px){
  :root{
    --font-size-base: 13px;
    --font-size-table: 12.5px;
    --font-size-button: 12.5px;
  }

  .app-title,
  .topbar .titles .title{
    font-size: 1rem !important;
  }

  .table th,
  .sys-table thead th,
  .table-pivot thead th,
  .tabla-alumnos th{
    font-size: 10.5px !important;
  }

  .table td,
  .sys-table tbody td,
  .table-pivot tbody td,
  .tabla-alumnos td{
    font-size: 12.4px !important;
  }
}

@media (max-width: 480px){
  :root{
    --font-size-base: 12.8px;
    --font-size-button: 12.3px;
  }

  body{
    line-height: 1.4 !important;
  }
}
