/* Fuentes: se sirven desde assets/fonts (sin Google Fonts) */

:root {
  --sga-primary: #2563eb; /* Brand Blue 600 */
  --sga-primary-hover: #1d4ed8;
  --sga-primary-light: #eff6ff;
  --sga-secondary: #64748b; /* Slate 500 */
  --sga-bg-main: #f8fafc; /* Slate 50 */
  --sga-bg-card: #ffffff;
  --sga-text-main: #0f172a; /* Slate 900 */
  --sga-text-muted: #64748b; /* Slate 500 */
  --sga-accent: #10b981; /* Emerald 500 */
  --sga-accent-light: #d1fae5;
  --sga-danger: #ef4444; /* Red 500 */
  --sga-danger-light: #fee2e2;
  --sga-warning: #f59e0b; /* Amber 500 */
  --sga-warning-light: #fef3c7;
  --sga-border: #e2e8f0; /* Slate 200 */
  --sga-radius: 16px;
  --sga-radius-sm: 10px;
  --sga-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --sga-shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
}

#sga-app-root {
  font-family: 'Inter', '"Plus Jakarta Sans"', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--sga-text-main);
  background-color: var(--sga-bg-main);
  box-sizing: border-box;
  min-height: 100vh;
}

* {
  -webkit-tap-highlight-color: transparent;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.1); }
}
.status-live {
  animation: pulse-dot 2s infinite ease-in-out;
}
.shadow-subtle {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}
.shadow-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
}
.shadow-floating {
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.25);
}
  background-color: var(--sga-bg-main);
  box-sizing: border-box;
  min-height: 100vh;
}
#sga-app-root *, #sga-app-root *::before, #sga-app-root *::after {
  box-sizing: inherit;
}

.sga-mobile-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--sga-bg-main);
  position: relative;
}

/* Header */
.sga-header {
  padding: 14px 20px;
  background: var(--sga-bg-card);
  border-bottom: 1px solid var(--sga-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Top Navigation Bar Principal */
.sga-nav-bar {
  background: var(--sga-bg-card);
  border-bottom: 1px solid var(--sga-border);
  padding: 0 16px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.sga-nav-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sga-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.sga-nav-tab:hover {
  color: var(--sga-primary);
  background-color: #f8fafc;
}
.sga-nav-tab.active {
  color: var(--sga-primary);
  border-bottom-color: var(--sga-primary);
  background-color: #faf5ff;
}

.sga-main-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Bottom Nav para móviles pequeños */
.sga-bottom-nav {
  display: none;
}
@media (max-width: 768px) {
  .sga-nav-bar {
    padding: 0 8px;
  }
  .sga-nav-tab {
    padding: 10px 12px;
    font-size: 12px;
  }
  .sga-main-content {
    padding: 16px;
  }
}

/* Modales y Bottom Sheets */
.sga-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: sgaFadeIn 0.2s ease;
}
.sga-modal-box {
  background: var(--sga-bg-card);
  border-radius: var(--sga-radius);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--sga-border);
}
.sga-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--sga-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sga-modal-body {
  padding: 22px;
}

/* Tarjetas y UI Components */
.sga-card {
  background: var(--sga-bg-card);
  border: 1px solid var(--sga-border);
  border-radius: var(--sga-radius);
  padding: 20px;
  box-shadow: var(--sga-shadow);
}
.sga-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.sga-badge-success { background: var(--sga-accent-light); color: #065f46; }
.sga-badge-warning { background: var(--sga-warning-light); color: #92400e; }
.sga-badge-danger  { background: var(--sga-danger-light); color: #991b1b; }
.sga-badge-primary { background: var(--sga-primary-light); color: var(--sga-primary); }

.sga-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--sga-radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sga-btn-primary {
  background: var(--sga-primary);
  color: #ffffff;
}
.sga-btn-primary:hover {
  background: var(--sga-primary-hover);
}
.sga-btn-secondary {
  background: #f1f5f9;
  color: var(--sga-text-main);
  border: 1px solid var(--sga-border);
}
.sga-btn-secondary:hover {
  background: #e2e8f0;
}
.sga-btn-success {
  background: var(--sga-accent);
  color: #ffffff;
}
.sga-btn-success:hover {
  background: #059669;
}

.sga-input, .sga-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--sga-radius-sm);
  font-size: 14px;
  margin-top: 4px;
  outline: none;
  background: #ffffff;
}
.sga-input:focus, .sga-select:focus {
  border-color: var(--sga-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Toast de notificación */
.sga-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--sga-shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  z-index: 2000;
  animation: sgaFadeIn 0.3s ease;
}
@keyframes sgaFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Adaptación para el Administrador de WordPress */
.sga-admin-wrap {
  margin-right: 20px;
}
.sga-admin-wrap .sga-mobile-container {
  border-radius: var(--sga-radius);
  border: 1px solid var(--sga-border);
  box-shadow: var(--sga-shadow);
  overflow: hidden;
}

/* --- REGLAS RESPONSIVAS Y EXPANDIDAS PARA ESCRITORIO --- */
@media (min-width: 1024px) {
  .sga-mobile-container {
    width: 100%;
  }
  .sga-main-content {
    padding: 30px 40px;
    max-width: 1600px;
  }
  .sga-desktop-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .sga-desktop-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .sga-desktop-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
  .sga-desktop-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
  }
  .sga-modal-box {
    max-width: 720px;
  }
  .sga-modal-box.sga-modal-lg {
    max-width: 900px;
  }
}

/* --- ESTILOS DE BLOQUEO POR CUPO Y FEEDBACK UI --- */
.sga-schedule-full {
  opacity: 0.55;
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed;
  position: relative;
}

.sga-tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.sga-tooltip-trigger {
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
}
.sga-tooltip-bubble {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0f172a;
  color: #f8fafc;
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 100;
  box-shadow: var(--sga-shadow-lg);
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}
.sga-tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}
.sga-tooltip-container:hover .sga-tooltip-bubble,
.sga-tooltip-container:focus-within .sga-tooltip-bubble {
  visibility: visible;
  opacity: 1;
}

/* Resaltado llamativo para fecha de finalización en cursos intensivos */
.sga-input-highlight {
  border: 2px solid #f59e0b !important;
  background-color: #fffbeb !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25) !important;
  transition: all 0.2s ease;
  animation: sgaPulseBorder 2s infinite;
}
@keyframes sgaPulseBorder {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Panel de Salud de Cursos */
.sga-health-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sga-health-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sga-shadow-lg);
}
.sga-health-critico {
  border-left: 5px solid #ef4444 !important;
  background: #fef2f2;
}
.sga-health-medio {
  border-left: 5px solid #f59e0b !important;
  background: #fffbeb;
}
.sga-health-optimo {
  border-left: 5px solid #10b981 !important;
  background: #f0fdf4;
}
.sga-health-lleno {
  border-left: 5px solid #6366f1 !important;
  background: #eef2ff;
}

/* Notificaciones y Badge */
.sga-notif-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 9999px;
  margin-left: 4px;
}

/* ==========================================================================
   ESTILOS DE RECIBO OFICIAL Y VISTA PREVIA (2 COPIAS / PRINT / WHATSAPP)
   ========================================================================== */
.sga-recibo-container {
  background: #ffffff;
  color: #0f172a;
  font-family: var(--sga-font-body, system-ui, sans-serif);
  padding: 10px;
}
.sga-recibo-copy {
  border: 1.5px solid #0f172a;
  border-radius: 6px;
  padding: 12px 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-size: 11px;
  line-height: 1.35;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.sga-recibo-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.08;
  max-width: 65%;
  max-height: 65%;
  pointer-events: none;
  z-index: 0;
}
.sga-recibo-sello {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.sga-receipt-preview-scale {
  width: 100%;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  padding: 6px 0;
}
.sga-recibo-badge-copy {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: #0f172a;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.sga-recibo-cut-line {
  border-top: 2px dashed #94a3b8;
  position: relative;
  margin: 16px 0;
  text-align: center;
}
.sga-recibo-cut-line span {
  position: relative;
  top: -11px;
  background: #f8fafc;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.sga-resumen-box {
  background: #1e293b;
  color: #f8fafc;
  font-family: var(--sga-font-numbers, monospace);
  padding: 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
  border: 1px solid #334155;
}

/* Reglas de Impresión Oficial */
/* =====================================================================
   MOBILE FIRST · ASPECTO DE APP NATIVA
   Base = celular; >= 640px tablet; >= 1024px escritorio (reglas de arriba).
   Muchas vistas de app.js traen estilos inline: aquí se usan !important
   solo donde hace falta ganarles (se irán al reescribir el frontend, Fase 4).
   ===================================================================== */
body.sga-app-shell {
  margin: 0;
  background: var(--sga-bg-main);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.sga-app-shell #sga-app-root { min-height: 100dvh; }

/* Grillas de tarjetas (KPIs): 2 columnas en el celular (escritorio sin cambios) */
@media (max-width: 767px) {
  .sga-desktop-grid-3, .sga-desktop-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .sga-desktop-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sga-desktop-grid-3 > :last-child:nth-child(odd),
  .sga-desktop-grid-4 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}


@media (max-width: 767px) {
  /* --- Cabecera compacta y fija --- */
  .sga-header {
    position: sticky; top: 0; z-index: 40;
    padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
    gap: 8px; flex-wrap: nowrap;
    box-shadow: 0 1px 0 var(--sga-border);
  }
  .sga-header h1 { font-size: 16px !important; line-height: 1.15 !important; }
  .sga-header p { display: none !important; }
  .sga-header img, .sga-header .sga-logo { height: 34px !important; width: auto !important; }
  .sga-header > div:first-child > div:first-child:not(:only-child) { width: 36px !important; height: 36px !important; font-size: 14px !important; border-radius: 10px !important; }
  .sga-header .sga-btn { padding: 7px 10px !important; font-size: 12px !important; min-height: 36px; }
  .sga-header .sga-badge { font-size: 10px !important; padding: 3px 7px !important; }

  /* --- Navegación: chips deslizables, fija bajo la cabecera --- */
  .sga-nav-bar {
    position: sticky; top: 57px; z-index: 39;
    padding: 8px 10px; gap: 6px;
    scroll-snap-type: x proximity; scrollbar-width: none;
    border-bottom: 1px solid var(--sga-border);
  }
  .sga-nav-bar::-webkit-scrollbar { display: none; }
  .sga-nav-tab {
    scroll-snap-align: start; flex: 0 0 auto;
    padding: 8px 12px; font-size: 12.5px; border-radius: 999px;
    border: 1px solid var(--sga-border); border-bottom-width: 1px;
    background: var(--sga-bg-card);
  }
  .sga-nav-tab.active {
    background: var(--sga-primary); color: #fff; border-color: var(--sga-primary);
    box-shadow: 0 2px 6px rgba(79, 70, 229, .3);
  }

  /* Pocas pestañas (asesor, profesor): barra inferior tipo app */
  .sga-nav-bar.sga-nav-compact {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 45;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding: 6px 4px; padding-bottom: max(6px, env(safe-area-inset-bottom));
    gap: 0; border-top: 1px solid var(--sga-border); border-bottom: 0;
    background: rgba(255, 255, 255, .97); backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, .06);
  }
  .sga-nav-compact .sga-nav-tab {
    flex-direction: column; gap: 2px; border: 0; border-radius: 12px;
    padding: 6px 2px; font-size: 10.5px; background: transparent; box-shadow: none;
    color: var(--sga-text-muted); white-space: normal; text-align: center; line-height: 1.15;
  }
  .sga-nav-compact .sga-nav-tab.active { background: var(--sga-primary-light); color: var(--sga-primary); box-shadow: none; }
  .sga-nav-icon { font-size: 18px; line-height: 1; }
  .sga-has-bottom-nav .sga-main-content { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
  .sga-has-bottom-nav .sga-toast { bottom: calc(86px + env(safe-area-inset-bottom)) !important; }

  /* --- Contenido y tarjetas --- */
  .sga-main-content { padding: 12px !important; }
  .sga-main-content > div { gap: 12px !important; }
  .sga-card { padding: 14px !important; border-radius: 16px !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important; }
  .sga-card h2 { font-size: 18px !important; }
  .sga-card h3 { font-size: 15px !important; }
  .sga-desktop-grid-3 > .sga-card, .sga-desktop-grid-4 > .sga-card { padding: 12px !important; min-width: 0; }
  .sga-desktop-grid-3 > .sga-card h3, .sga-desktop-grid-4 > .sga-card h3 { font-size: 22px !important; margin-top: 4px !important; word-break: break-word; }
  .sga-desktop-grid-3 > .sga-card span, .sga-desktop-grid-4 > .sga-card span { font-size: 11px !important; }
  .sga-desktop-grid-3 > .sga-card .sga-btn, .sga-desktop-grid-4 > .sga-card .sga-btn { padding: 9px 8px !important; font-size: 12.5px !important; }
  /* Banners de bienvenida más bajos */
  .sga-main-content > div > div:first-child[style*="linear-gradient"] { padding: 16px !important; border-radius: 16px !important; }
  .sga-main-content > div > div:first-child[style*="linear-gradient"] h2 { font-size: 18px !important; }
  .sga-main-content > div > div:first-child[style*="linear-gradient"] p { font-size: 12px !important; }

  /* --- Tablas: desplazamiento horizontal cómodo --- */
  .sga-main-content table { font-size: 12px !important; }
  .sga-main-content table th, .sga-main-content table td { padding: 8px 6px !important; }
  .sga-main-content [style*="overflow-x"] { -webkit-overflow-scrolling: touch; margin: 0 -4px; }

  /* --- Formularios táctiles (16px evita el zoom de iOS) --- */
  .sga-input, .sga-select, #sga-app-root input[type="text"], #sga-app-root input[type="number"], #sga-app-root input[type="date"],
  #sga-app-root input[type="password"], #sga-app-root input[type="email"], #sga-app-root input[type="url"], #sga-app-root select, #sga-app-root textarea {
    font-size: 16px !important; min-height: 44px;
  }
  .sga-btn { min-height: 40px; }

  /* --- Modales como hojas inferiores --- */
  .sga-modal-backdrop { align-items: flex-end !important; padding: 0 !important; }
  .sga-modal-box {
    width: 100% !important; max-width: 100% !important; max-height: 94dvh !important;
    border-radius: 20px 20px 0 0 !important; margin: 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
    animation: sgaSheetUp .22s ease-out;
  }
  .sga-modal-header { position: sticky; top: 0; z-index: 2; background: var(--sga-bg-card); }
  .sga-modal-header::before {
    content: ''; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px;
    margin-left: -19px; border-radius: 4px; background: #cbd5e1;
  }

  .sga-toast {
    top: auto !important; bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    left: 12px !important; right: 12px !important; transform: none !important; justify-content: center; text-align: center;
  }
  .sga-hide-mobile { display: none !important; }
  .sga-header > div:first-child { min-width: 0; flex: 1 1 auto; }
  .sga-header-title { min-width: 0; }
  .sga-header-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sga-header > div:last-child { flex: 0 0 auto; gap: 6px !important; }
  .sga-header > div:last-child .sga-btn { width: 38px; padding: 0 !important; justify-content: center; position: relative; }
}
@keyframes sgaSheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }

/* =====================================================================
   LISTA DE INSCRIPCIONES EN TARJETAS (móvil)
   ===================================================================== */
.sga-mlist { display: flex; flex-direction: column; gap: 10px; }
.sga-mlist-toolbar { display: flex; flex-direction: column; gap: 8px; }
.sga-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sga-chips::-webkit-scrollbar { display: none; }
.sga-chip {
  flex: 0 0 auto; border: 1px solid var(--sga-border); background: var(--sga-bg-card);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; color: var(--sga-text-muted);
}
.sga-chip.active { background: var(--sga-text-main); border-color: var(--sga-text-main); color: #fff; }
.sga-mcard {
  background: var(--sga-bg-card); border: 1px solid var(--sga-border); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); overflow: hidden;
}
.sga-mcard-main {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 12px 12px 12px 14px;
}
.sga-mcard-asesores {
  margin: -4px 12px 10px 14px; font-size: 11.5px; font-weight: 700; color: #475569; overflow-wrap: anywhere;
}
.sga-mcard-name { font-weight: 800; font-size: 14px; color: var(--sga-text-main); line-height: 1.2; overflow-wrap: anywhere; }
.sga-mcard-sub { font-size: 12px; color: var(--sga-text-muted); margin-top: 3px; overflow-wrap: anywhere; }
.sga-mcard-course { font-weight: 700; font-size: 12.5px; color: #334155; line-height: 1.25; overflow-wrap: anywhere; }
.sga-mcard-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sga-pay-dot {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: #f1f5f9;
}
.sga-pay-dot.vencido { background: #fee2e2; }
.sga-pay-dot.por_vencer { background: #fef3c7; }
.sga-pay-dot.sin_deuda { background: #dcfce7; }
.sga-more-btn {
  border: 0; background: #f1f5f9; color: #334155; border-radius: 999px; padding: 5px 10px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.sga-mcard.open .sga-more-btn { background: var(--sga-primary-light); color: var(--sga-primary); }
.sga-mcard-detail { border-top: 1px dashed var(--sga-border); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; background: #fcfcfd; }
.sga-cobro {
  border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  background: #eff6ff; border: 1px solid #bfdbfe;
}
.sga-cobro.vencido { background: #fef2f2; border-color: #fecaca; }
.sga-cobro.por_vencer { background: #fffbeb; border-color: #fde68a; }
.sga-cobro-label { font-size: 11px; font-weight: 700; color: var(--sga-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.sga-cobro-val { font-size: 15px; font-weight: 900; color: var(--sga-text-main); }
.sga-cobro .sga-btn { grid-row: span 2; }
.sga-mcard-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sga-mcard-date { background: #f8fafc; border-radius: 10px; padding: 8px 10px; }
.sga-mcard-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sga-mcard-actions .sga-btn { flex: 1 1 auto; justify-content: center; font-size: 12.5px; padding: 9px 10px; }
/* Cartilla (celular): acciones del recibo en 2 filas de 2 */
@media (max-width: 767px) {
  .sga-cartilla-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .sga-cartilla-actions .sga-btn { justify-content: center; padding: 9px 6px !important; font-size: 12px !important; }
}
/* Barra "Solicitar cobro" (fija abajo de la lista) */
.sga-solicitar-bar {
  position: sticky; bottom: 8px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--sga-border); border-radius: 14px; padding: 10px 12px; box-shadow: 0 6px 18px rgba(15, 23, 42, .1);
}
@media (max-width: 767px) { .sga-has-bottom-nav .sga-solicitar-bar { bottom: calc(80px + env(safe-area-inset-bottom)); } }
/* Filtros de dashboard: resumen a la izquierda, ícono de filtro a la derecha */
.sga-filtro-bar { display: flex; align-items: center; gap: 10px; margin-bottom: -8px; }
.sga-filtro-resumen {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--sga-border); border-radius: 12px; padding: 9px 12px; font-size: 13px; color: #334155;
}
.sga-filtro-periodo { font-weight: 800; white-space: nowrap; }
.sga-filtro-sep { color: #94a3b8; }
.sga-filtro-resto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; font-weight: 600; }
.sga-filtro-btn {
  position: relative; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--sga-border); color: #334155;
}
.sga-filtro-btn.activo { background: var(--sga-primary, #4f46e5); border-color: var(--sga-primary, #4f46e5); color: #fff; }
.sga-filtro-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.sga-filtro-popup { max-width: 440px; display: flex; flex-direction: column; gap: 12px; }
.sga-filtro-campo { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: #334155; }
/* Certificados y requisitos (dashboard de Dirección) */
.sga-cert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sga-cert-tile {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font: inherit;
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px;
}
@media (max-width: 767px) {
  .sga-acciones-rapidas { grid-template-columns: 1fr !important; }
  .sga-cert-grid { grid-template-columns: 1fr; }
}
.sga-empty { text-align: center; color: var(--sga-text-muted); font-size: 13px; padding: 24px 12px; }

@media print {
  body * {
    visibility: hidden !important;
  }
  #wpadminbar, #adminmenumain, #wpfooter, .sga-header, .sga-no-print, .sga-modal-header {
    display: none !important;
  }
  #sga-recibo-print-container, #sga-recibo-print-container * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  #sga-recibo-print-container {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }
  .sga-modal-backdrop {
    background: none !important;
    position: static !important;
    padding: 0 !important;
  }
  .sga-modal-box {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .sga-recibo-copy {
    border: 1.5px solid #000000 !important;
    padding: 12px !important;
    margin-bottom: 12px !important;
    page-break-inside: avoid !important;
  }
  .sga-recibo-cut-line {
    border-top: 1.5px dashed #000000 !important;
    margin: 12px 0 !important;
  }
  @page {
    size: letter portrait;
    margin: 5mm;
  }
}

/* =====================================================================
   LISTAS RESPONSIVAS (diseño Panel de Asistencias) — v1.18.0
   ===================================================================== */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
#sga-app-root article button, #sga-app-root article a { -webkit-tap-highlight-color: transparent; }
/* Filtros en el celular: grilla de 2 columnas, campos a lo ancho */
.sga-filtros-movil > * { min-width: 0; }
.sga-filtros-movil input, .sga-filtros-movil select { width: 100% !important; margin: 0 !important; }
/* Acciones de caja dentro de tarjetas: botones parejos */
.sga-caja-acciones > span { display: flex; flex: 1 1 auto; gap: 8px; flex-wrap: wrap; align-items: center; }
.sga-caja-acciones .sga-btn { flex: 1 1 auto; justify-content: center; }
/* Matrices numéricas (Viabilidad): encabezado suave y primera columna fija al deslizar */
.sga-tabla-matriz thead th { background: #f8fafc; color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px; }
.sga-tabla-matriz td:first-child, .sga-tabla-matriz th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
.sga-tabla-matriz thead th:first-child { background: #f8fafc; }
/* Tarjetas antiguas (comisiones, cobros) alineadas al diseño nuevo */
.sga-mcard { border-radius: 16px; border-color: rgba(226, 232, 240, .9); box-shadow: 0 1px 1px rgba(15, 23, 42, .04); }

/* Texto solo para lectores de pantalla (WordPress / biblioteca de medios): el tema ya no lo define en la app */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  z-index: 100000;
}

/* ---------- Portal del alumno ---------- */
.sga-portal-avatar { width: 56px; height: 56px; border-radius: 50%; background: #e0e7ff; color: #3730a3; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; overflow: hidden; flex-shrink: 0; }
.sga-portal-fila { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; }
.sga-portal-fila-lbl { color: #64748b; white-space: nowrap; }
.sga-portal-fila-val { text-align: right; color: #334155; font-weight: 600; }
.sga-req-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.sga-req-fila.ok { background: #f0fdf4; border-color: #bbf7d0; }

/* ---------- Calendario de asistencia ---------- */
.sga-asis-cargando { padding: 18px; text-align: center; font-size: 13px; color: #64748b; background: #f8fafc; border-radius: 12px; }
.sga-asis-resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.sga-asis-chip { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 10px; border: 1px solid transparent; line-height: 1.15; }
.sga-asis-chip strong { font-size: 17px; font-weight: 900; }
.sga-asis-chip span { font-size: 10.5px; font-weight: 700; }
.sga-asis-progreso { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #475569; font-weight: 600; margin-bottom: 12px; }
.sga-asis-barra { flex: 1; height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.sga-asis-barra span { display: block; height: 100%; background: var(--sga-primary, #4f46e5); border-radius: 99px; }
.sga-asis-meses { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sga-asis-mes { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; background: #fff; }
.sga-asis-mes-titulo { font-size: 13px; font-weight: 800; color: #0f172a; margin-bottom: 6px; text-align: center; }
.sga-asis-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.sga-asis-cab { font-size: 10px; font-weight: 800; color: #94a3b8; text-align: center; padding-bottom: 2px; }
.sga-asis-dia { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: #cbd5e1; border-radius: 7px; border: 1.5px solid transparent; font-variant-numeric: tabular-nums; }
.sga-asis-dia.vacio { visibility: hidden; }
.sga-asis-dia.clase { font-weight: 800; }
.sga-asis-dia.est-pendiente { border-style: dashed; }
.sga-asis-dia.est-sin_registro { border-style: dotted; }
.sga-asis-dia.hoy { box-shadow: 0 0 0 2px #0f172a; }
.sga-asis-leyenda { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 11px; color: #475569; font-weight: 600; }
.sga-asis-leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.sga-asis-leyenda i { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid; display: inline-block; }

/* ---------- Dashboard del asesor ---------- */
.sga-asesor-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.22); }
.sga-asesor-hero h2 { margin: 0; font-size: 19px; font-weight: 800; color: #fff; }
.sga-asesor-hero p { margin: 3px 0 0 0; font-size: 12.5px; opacity: 0.92; color: #fff; }
.sga-asesor-hero-btn { flex-shrink: 0; background: #fff; color: #0369a1; border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 13.5px; cursor: pointer; }
.sga-asesor-hero-btn:active { transform: scale(0.97); }
.sga-kpi-compacto { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px !important; }
.sga-kpi-compacto strong { font-size: 24px; font-weight: 900; line-height: 1.15; }
.sga-kpi-titulo { font-size: 11.5px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.02em; }
.sga-kpi-nota { font-size: 11.5px; color: #64748b; }
.sga-kpi-link { align-self: flex-start; background: none; border: 0; padding: 0; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--sga-primary, #4f46e5); cursor: pointer; }
.sga-btn-wa { background: #25d366 !important; border-color: #1ebe5a !important; color: #fff !important; font-weight: 700; font-size: 12px; padding: 6px 10px; text-decoration: none; white-space: nowrap; }

/* ---------- Horario semanal ---------- */
.sga-semana-titulo { margin: 0 0 10px 0; font-size: 15px; font-weight: 800; color: #0f172a; }
.sga-semana-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 12px; }
.sga-semana-tabla { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.sga-semana-tabla th { background: #f8fafc; color: #475569; font-weight: 800; padding: 7px 4px; text-align: center; border-bottom: 1px solid #e2e8f0; }
.sga-semana-tabla th:first-child { width: 74px; }
.sga-semana-tabla td { padding: 4px; vertical-align: top; border-top: 1px solid #f1f5f9; border-left: 1px solid #f1f5f9; }
.sga-semana-hora { white-space: pre-line; font-weight: 800; color: #334155; text-align: center; font-variant-numeric: tabular-nums; background: #fcfcfd; }
.sga-semana-clase { display: block; width: 100%; text-align: left; margin-bottom: 3px; padding: 5px 6px; border-radius: 8px; border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; font-size: 11.5px; font-weight: 700; line-height: 1.2; cursor: pointer; overflow-wrap: anywhere; }
.sga-semana-clase:disabled { cursor: default; }

/* ---------- Toma de asistencia (profesor) ---------- */
.sga-asis-botones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.sga-asis-botones .sga-btn { width: 100%; justify-content: center; padding: 11px 8px !important; font-size: 14px !important; border-radius: 10px !important; }
.sga-asis-contadores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sga-asis-contador { background: #fff; border: 1px solid #e2e8f0; border-top: 3px solid; border-radius: 10px; padding: 6px 4px; text-align: center; display: flex; flex-direction: column; line-height: 1.15; }
.sga-asis-contador strong { font-size: 18px; font-weight: 900; }
.sga-asis-contador span { font-size: 10.5px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.02em; }
.sga-selclase { position: relative; }
.sga-selclase-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.sga-selclase-txt, .sga-selclase-op { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sga-selclase-curso { font-size: 14px; font-weight: 800; color: #0f172a; line-height: 1.25; overflow-wrap: anywhere; }
.sga-selclase-hora { font-size: 12.5px; font-weight: 600; color: #475569; }
.sga-selclase-flecha { color: #64748b; font-size: 11px; flex-shrink: 0; }
.sga-selclase-fondo { position: fixed; inset: 0; z-index: 40; }
.sga-selclase-lista { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px); max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15); padding: 6px; }
.sga-selclase-op { width: 100%; text-align: left; background: none; border: 0; border-radius: 9px; padding: 9px 10px; cursor: pointer; }
.sga-selclase-op + .sga-selclase-op { border-top: 1px solid #f1f5f9; }
.sga-selclase-op.activo { background: #eef2ff; }
.sga-foto-preview { width: 128px; height: 128px; margin: 0 auto; border-radius: 50%; background: #0f172a; color: #fff; font-size: 38px; font-weight: 800; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 0 0 4px #e2e8f0; }

/* ---------- Profesor: mis pagos ---------- */
.sga-mes-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 6px; }
.sga-mes-nav strong { font-size: 15px; font-weight: 800; color: #0f172a; }
.sga-pago-prof, .sga-pago-hist { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.sga-pago-prof > div:first-child, .sga-pago-hist > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.sga-pago-prof strong, .sga-pago-hist strong { font-size: 14px; font-weight: 800; color: #0f172a; }
.sga-pago-prof span, .sga-pago-hist span { font-size: 12px; color: #64748b; }
.sga-cruce-aviso { font-size: 11.5px; font-weight: 700; color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px; padding: 6px 8px; }
.sga-semana-tabla td.cruce { background: #fff1f2; }
.sga-semana-clase.cruce { border-color: #fb7185; background: #ffe4e6; color: #9f1239; }

/* ---------- Requisitos configurables ---------- */
.sga-cert-estado { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: #eef2ff; border: 1px solid #c7d2fe; font-size: 13.5px; font-weight: 800; color: #312e81; }
.sga-cert-estado.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.sga-req-cartilla { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: #fff; border: 1px solid #f5d0fe; border-radius: 6px; }
.sga-req-cartilla.ok { border-color: #86efac; background: #f0fdf4; }
.sga-req-cartilla.inactivo { opacity: 0.7; }
.sga-req-cartilla label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #1e293b; cursor: pointer; min-width: 0; }
.sga-req-fecha { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #64748b; }
.sga-req-fecha .sga-input { width: 145px; padding: 4px 6px; font-size: 11.5px; }
.sga-req-config { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.sga-req-config.inactivo { background: #f8fafc; color: #64748b; font-size: 13px; }
.sga-req-config .sga-input { flex: 1; min-width: 0; }
.sga-req-orden { display: flex; flex-direction: column; gap: 2px; }
.sga-req-orden button { border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 5px; font-size: 9px; line-height: 1; padding: 3px 5px; cursor: pointer; color: #475569; }
.sga-req-orden button:disabled { opacity: 0.35; cursor: default; }
.sga-req-chk { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #475569; white-space: nowrap; }
@media (max-width: 640px) { .sga-req-config { flex-wrap: wrap; } .sga-req-config .sga-input { flex-basis: calc(100% - 40px); } }

/* ---------- Asesores de una inscripción (tabla y tarjetas) ---------- */
.sga-asesores-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.sga-asesor-fila { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.sga-asesor-nombre { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: #1e293b; }
.sga-asesores-cell.compacto .sga-asesor-nombre { font-size: 11px; }
.sga-asesor-pct { flex-shrink: 0; font-size: 10.5px; font-weight: 800; color: #334155; background: #f1f5f9; border-radius: 6px; padding: 1px 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sga-asesor-estado { flex-shrink: 0; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 1px 5px; white-space: nowrap; }
.sga-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 12px; border: 1px solid #e2e8f0; max-width: 520px; }
.sga-tab { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; border-radius: 9px; padding: 9px 8px; font-size: 13px; font-weight: 700; color: #475569; cursor: pointer; }
.sga-tab.activo { background: #fff; color: var(--sga-primary, #4f46e5); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1); }
.sga-tab-num { font-size: 11px; font-weight: 800; background: #e2e8f0; color: #334155; border-radius: 99px; padding: 1px 7px; }
.sga-tab.activo .sga-tab-num { background: #eef2ff; color: var(--sga-primary, #4f46e5); }
.sga-kpi-lista { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px !important; }
.sga-kpi-lista-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sga-kpi-lista-cab strong { font-size: 26px; font-weight: 900; line-height: 1; }
.sga-kpi-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.sga-kpi-items li { display: flex; flex-direction: column; padding: 6px 8px; background: #f8fafc; border-radius: 8px; min-width: 0; }
.sga-kpi-items .n { font-size: 12.5px; font-weight: 700; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sga-kpi-items .d { font-size: 11px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sga-kpi-vacio { margin: 0; font-size: 12px; color: #64748b; }
.sga-feriados-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.sga-desktop-split .sga-feriados-grid { grid-template-columns: 1fr; }
@media (min-width: 1500px) { .sga-desktop-split .sga-feriados-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Escritorio: nombre y los 4 botones en una sola fila (menos scroll) */
@media (min-width: 1024px) {
  .sga-asis-alumno { flex-direction: row !important; align-items: center !important; justify-content: space-between; padding: 10px 14px !important; }
  .sga-asis-alumno-info { flex: 1 1 auto; }
  .sga-asis-alumno .sga-asis-botones { display: flex; width: auto; flex-shrink: 0; gap: 6px; }
  .sga-asis-alumno .sga-asis-botones .sga-btn { width: auto; min-width: 104px; padding: 8px 12px !important; font-size: 13px !important; }
}
.sga-marcado-por { display: inline-block; margin-top: 2px; margin-right: 4px; font-size: 11px; padding: 2px 6px; background: #f1f5f9; color: #334155; border-radius: 4px; border: 1px solid #cbd5e1; font-weight: 600; }

/* ---------- Modo llegada ---------- */
.sga-llegada { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer; }
.sga-llegada input { margin-top: 3px; width: 18px; height: 18px; }
.sga-llegada > span { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: #475569; }
.sga-llegada strong { font-size: 14px; color: #0f172a; }
.sga-llegada.activo { border-color: #818cf8; background: #eef2ff; }
.sga-aviso-llegada { font-size: 12.5px; font-weight: 600; color: #1e3a8a; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 8px 10px; }
.sga-aviso-sinmarcar { font-size: 12.5px; font-weight: 700; color: #475569; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 10px; padding: 8px 10px; }
.sga-sin-marcar { display: inline-block; margin-top: 2px; margin-right: 4px; font-size: 11px; padding: 2px 6px; background: #f8fafc; color: #475569; border-radius: 4px; border: 1px dashed #94a3b8; font-weight: 700; }
