/* sga.modern.css */
:root {
  /* Modern Color Palette */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --bg-body: #f8fafc;
  --bg-sidebar: #1e293b;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;

  --border-color: #e2e8f0;

  /* Layout */
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --header-height: 60px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

body {
  font-family: 'Inter', 'Roboto', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;

  /* WebView Optimizations */
  -webkit-tap-highlight-color: transparent;
  /* Eliminar el sombreado azul al tocar en móviles */
  overscroll-behavior-y: none;
  /* Evitar el "pull-to-refresh" por defecto que hace rebotar el webview */
  touch-action: manipulation;
  /* Eliminar el retraso de 300ms al hacer tap y evitar zoom con doble tap */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Permitir selección de texto sólo donde importa para una app (puedes activar esto si no quieres que seleccionen texto de la app como si fuera web) */
/* 
html, body {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, [contenteditable="true"] {
  -webkit-user-select: auto;
  user-select: auto;
}
*/
padding: 0;
overflow-x: hidden;
display: flex;
min-height: 100vh;
}

/* Base resets */
* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

/* Botón de cierre para móvil */
.sidebar-mobile-close {
  display: none !important;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: var(--text-light);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: width var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE / Edge */
}

/* Ocultar scrollbar en WebKit (Chrome, Safari, Edge, Opera) */
#sidebar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}


/* Sidebar Profile Header */
.sidebar-header {
  padding: 0px 14px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-normal);
}

.sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.sidebar-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.sidebar-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  background: #1e293b;
  display: block;
}

.sidebar-online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #0f172a;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
}

.sidebar-user-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow: hidden;
  transition: opacity var(--transition-normal);
}

.sidebar-user-name {
  font-size: 10px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 4px 0;
  max-width: 100%;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.35;
  text-align: center;
}

.sidebar-user-course {
  font-size: 11px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 20px;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar Collapsed State */
#sidebar.collapsed .sidebar-header {
  padding: 14px 6px;
}

#sidebar.collapsed .sidebar-avatar-wrapper {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
}

#sidebar.collapsed .sidebar-avatar-img {
  width: 44px;
  height: 44px;
  border-width: 2px;
}

#sidebar.collapsed .sidebar-online-indicator {
  width: 10px;
  height: 10px;
  bottom: 0;
  right: 0;
}

#sidebar.collapsed .sidebar-user-details {
  display: none;
}

#sidebar .menu {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
  flex-grow: 1;
}

#sidebar .menu li a {
  display: flex;
  align-items: center;
  padding: 10px 26px 10px 31px;
  color: var(--text-light);
  transition: background-color var(--transition-fast), padding-left var(--transition-fast);
  border-left: 4px solid transparent;
  font-size: 13px;
  position: relative;
}

#sidebar .menu li a:hover,
#sidebar .menu li a.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--primary-color);
}

#sidebar .menu li a span:not(.info_popup) {
  margin-left: 14px;
  transition: opacity var(--transition-normal);
  white-space: nowrap;
}

#sidebar.collapsed .menu li a span:not(.info_popup),
.sidebar-collapsed #sidebar .menu li a span:not(.info_popup) {
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  display: none !important;
}

/* Badge de Notificaciones (info_popup) siempre visible */
#sidebar .menu li a .info_popup {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  top: 50% !important;
  right: 248px !important;
  left: auto !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
  z-index: 10 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: all var(--transition-normal) !important;
}

/* Posición del badge cuando el sidebar está cerrado / colapsado */
#sidebar.collapsed .menu li a .info_popup,
.sidebar-collapsed #sidebar .menu li a .info_popup {
  top: 6px !important;
  right: 234px !important;
  left: auto !important;
  transform: none !important;
  min-width: 16px !important;
  height: 16px !important;
  font-size: 10px !important;
  padding: 0 4px !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
}

/* Submenu */
.sga_submenu {
  display: none;
  background-color: rgba(0, 0, 0, 0.2);
  list-style: none;
  padding: 0;
}

.sga_submenu li a {
  padding-left: 40px !important;
  font-size: 0.9em;
}

#sidebar.collapsed .sga_submenu {
  display: none !important;
}

/* Pantalla de Login: Ocultar Header */
body.login-page:not(:has(.main-navbar)) {
  display: block !important;
}

body.login-page:not(:has(.main-navbar)) header,
body:has(article.login) header,
body:has(article.login) .main-navbar,
header:has(.info_site),
.login-header {
  display: none !important;
}

/* En pantallas pequeñas, el formulario de login se coloca arriba de términos */
@media (max-width: 850px) {
  .content_login {
    display: flex !important;
    flex-direction: column !important;
    padding: 16px !important;
    margin: 20px auto !important;
  }

  .form_login {
    order: 1 !important;
    float: none !important;
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto 24px auto !important;
  }

  .terminos {
    order: 2 !important;
    float: none !important;
    width: 100% !important;
  }
}

/* Botón ver/ocultar contraseña en Login */
.password-field-wrapper {
  position: relative !important;
  width: 90% !important;
  margin: 15px auto !important;
  display: flex !important;
  align-items: center !important;
}

.password-field-wrapper input {
  width: 100% !important;
  margin: 0 !important;
  padding-right: 42px !important;
  box-sizing: border-box !important;
}

.btn-toggle-password {
  position: absolute !important;
  right: 8px !important;
  /*top: 50% !important;*/
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  padding: 6px 8px !important;
  font-size: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  outline: none !important;
  transition: color 0.2s ease !important;
  z-index: 5 !important;
  box-shadow: none !important;
  border-radius: 6px !important;
}

.btn-toggle-password:hover {
  color: #2563eb !important;
  background: rgba(0, 0, 0, 0.05) !important;
  box-shadow: none !important;
}

/* Indicador de carga al dar clic en Ingresar */
.sga-login-cargando {
  display: none;
  margin: 14px auto 6px auto !important;
  padding: 10px 14px !important;
  background: rgba(65, 89, 104, 0.12) !important;
  border: 1px solid rgba(65, 89, 104, 0.28) !important;
  border-radius: 6px !important;
  color: #263843 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-align: center !important;
  box-sizing: border-box !important;
  width: 90% !important;
  animation: fadeIn 0.25s ease-in-out;
}

.sga-login-cargando i {
  margin-right: 8px !important;
  color: #415968 !important;
}



/* Header / Navbar - Ajustada al ancho del sidebar */
header,
.main-navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  height: var(--header-height);
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 999;
  box-sizing: border-box;
  transition: left var(--transition-normal), width var(--transition-normal);
}

.sidebar-collapsed header,
.sidebar-collapsed .main-navbar,
body:has(#sidebar.collapsed) header,
body:has(#sidebar.collapsed) .main-navbar {
  left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  cursor: pointer;
  font-size: 18px;
  color: #64748b !important;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
}

.menu-toggle:hover {
  color: #596983;
  background-color: #000;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navbar-institution {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  color: #f8fafc;
}

.navbar-inst-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-inst-logo img {
  height: 32px;
  max-height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}

.navbar-inst-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-animalizados {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  transition: all var(--transition-fast);
}

.navbar-animalizados:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.navbar-animalizados img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  padding: calc(var(--header-height) + 20px) 20px 20px;
  width: calc(100% - var(--sidebar-width));
  box-sizing: border-box;
  transition: margin-left var(--transition-normal), width var(--transition-normal);
}

.sidebar-collapsed .main-wrapper,
body:has(#sidebar.collapsed) .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

.content {
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 20px;
  min-height: calc(100vh - var(--header-height) - 40px);
  animation: fadeIn var(--transition-normal);
  position: relative;
}

/* Loader */
.ajax-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ajax-loader.active {
  display: block;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s forwards;
}

.toast.success {
  border-color: #10b981;
}

.toast.error {
  border-color: #ef4444;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {

  /* 1. Sidebar en pantallas pequeñas: ocupa el 100% del ancho de la pantalla al abrirse */
  #sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease !important;
    z-index: 99999 !important;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #sidebar.mobile-open {
    transform: translateX(0) !important;
    width: 100% !important;
    max-width: 100vw !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none !important;
  }

  /* Botón para cerrar la sidebar en pantallas pequeñas */
  .sidebar-mobile-close {
    display: none;
    position: absolute;
    top: 14px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 19px;
    cursor: pointer;
    z-index: 1001;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
  }

  .sidebar-mobile-close:hover,
  .sidebar-mobile-close:active {
    background-color: rgba(239, 68, 68, 0.85);
    transform: scale(1.06);
  }

  #sidebar.mobile-open .sidebar-mobile-close {
    display: flex !important;
  }

  /* Cabecera del usuario en móvil */
  #sidebar.mobile-open .sidebar-header,
  #sidebar.mobile-open.collapsed .sidebar-header {
    padding: 24px 20px 18px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  #sidebar.mobile-open .sidebar-avatar-wrapper,
  #sidebar.mobile-open.collapsed .sidebar-avatar-wrapper {
    width: 76px !important;
    height: 76px !important;
    margin-bottom: 12px !important;
  }

  #sidebar.mobile-open .sidebar-avatar-img,
  #sidebar.mobile-open.collapsed .sidebar-avatar-img {
    width: 76px !important;
    height: 76px !important;
    border-width: 3px !important;
  }

  #sidebar.mobile-open .sidebar-online-indicator,
  #sidebar.mobile-open.collapsed .sidebar-online-indicator {
    width: 14px !important;
    height: 14px !important;
    bottom: 2px !important;
    right: 2px !important;
  }

  #sidebar.mobile-open .sidebar-user-details,
  #sidebar.mobile-open.collapsed .sidebar-user-details,
  .sidebar-collapsed #sidebar.mobile-open .sidebar-user-details {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-top: 6px !important;
  }

  #sidebar.mobile-open .sidebar-user-name,
  #sidebar.mobile-open.collapsed .sidebar-user-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    max-width: 82% !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
  }

  #sidebar.mobile-open .sidebar-user-course,
  #sidebar.mobile-open.collapsed .sidebar-user-course {
    font-size: 12px !important;
    color: #cbd5e1 !important;
    margin-top: 4px !important;
    max-width: 90% !important;
  }

  /* Menú desplegable a ancho completo (100%) */
  #sidebar.mobile-open .menu,
  #sidebar.mobile-open.collapsed .menu,
  .sidebar-collapsed #sidebar.mobile-open .menu {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 10px 0 40px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    left: 0 !important;
    top: 0 !important;
    position: relative !important;
  }

  #sidebar.mobile-open .menu li,
  #sidebar.mobile-open.collapsed .menu li,
  .sidebar-collapsed #sidebar.mobile-open .menu li {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #sidebar.mobile-open .menu li a,
  #sidebar.mobile-open.collapsed .menu li a,
  .sidebar-collapsed #sidebar.mobile-open .menu li a {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 14px 24px !important;
    position: relative !important;
    border-left: 4px solid transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    text-decoration: none !important;
  }

  #sidebar.mobile-open .menu li a:hover,
  #sidebar.mobile-open .menu li a.active {
    background-color: rgba(255, 255, 255, 0.09) !important;
    border-left-color: var(--primary-color) !important;
    padding-left: 24px !important;
  }

  /* 2. ETIQUETAS DEL MENÚ: 100% visibles y con tipografía clara */
  #sidebar.mobile-open .menu li a span:not(.info_popup),
  #sidebar.mobile-open.collapsed .menu li a span:not(.info_popup),
  .sidebar-collapsed #sidebar.mobile-open .menu li a span:not(.info_popup),
  body.sidebar-mobile-open #sidebar .menu li a span:not(.info_popup) {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    width: auto !important;
    height: auto !important;
    margin-left: 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #f1f5f9 !important;
    white-space: normal !important;
    line-height: 1.35 !important;
  }

  /* Iconos del menú en móvil */
  #sidebar.mobile-open .menu li a i,
  #sidebar.mobile-open.collapsed .menu li a i {
    font-size: 18px !important;
    width: 24px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    color: #94a3b8 !important;
  }

  #sidebar.mobile-open .menu li a:hover i,
  #sidebar.mobile-open .menu li a.active i {
    color: #38bdf8 !important;
  }

  /* Badges de notificaciones en móvil alineados a la derecha */
  #sidebar.mobile-open .menu li a .info_popup,
  #sidebar.mobile-open.collapsed .menu li a .info_popup,
  .sidebar-collapsed #sidebar.mobile-open .menu li a .info_popup,
  body.sidebar-mobile-open #sidebar .menu li a .info_popup {
    position: absolute !important;
    top: 50% !important;
    right: 24px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 10px !important;
    z-index: 10 !important;
  }

  /* Submenús en móvil */
  #sidebar.mobile-open .sga_submenu,
  #sidebar.mobile-open.collapsed .sga_submenu,
  .sidebar-collapsed #sidebar.mobile-open .sga_submenu,
  body.sidebar-mobile-open #sidebar .sga_submenu {
    width: 100% !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  #sidebar.mobile-open .sga_submenu li a,
  #sidebar.mobile-open.collapsed .sga_submenu li a {
    padding-left: 54px !important;
    font-size: 14px !important;
  }

  /* Bloqueo de scroll de fondo cuando la sidebar móvil está abierta */
  body.sidebar-mobile-open {
    overflow: hidden !important;
  }

  header,
  .main-navbar {
    left: 0 !important;
    width: 100% !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .menu-toggle {
    display: flex;
  }

  .navbar-inst-name {
    font-size: 13px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-hero {
    padding: 20px !important;
  }

  .dashboard-hero .hero-left {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 14px !important;
  }

  .dashboard-hero .hero-title {
    font-size: 20px !important;
  }

  .kpi-grid,
  .quick-access-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 580px) {
  .navbar-inst-name {
    display: none;
  }
}

/* ==========================================================================
   DASHBOARD MODERNO (FASE 2)
   ========================================================================== */

.content {
  margin: 0 auto !important;
  max-width: 1240px !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #edf2f7;
  padding: 26px !important;
}

.sga-dashboard {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* Hero Banner */
.dashboard-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #4f46e5 100%);
  border-radius: 16px;
  padding: 30px 34px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-hero .hero-left {
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 2;
}

.dashboard-hero .hero-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.dashboard-hero .hero-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-weight: 500;
}

.dashboard-hero .hero-title {
  margin: 0 0 10px 0;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.dashboard-hero .hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  color: #ffffff;
}

.dashboard-hero .badge-status {
  background: rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.dashboard-hero .hero-decor {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  pointer-events: none;
  overflow: hidden;
}

.dashboard-hero .decor-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
}

.dashboard-hero .circle-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -50px;
}

.dashboard-hero .circle-2 {
  width: 200px;
  height: 200px;
  bottom: -60px;
  right: 120px;
}

/* Section Header */
.dashboard-section-header {
  margin-top: 4px;
}

.dashboard-section-header .section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-section-header .section-title i {
  color: var(--primary-color);
  font-size: 17px;
}

.dashboard-section-header .section-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
  display: block;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.kpi-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none !important;
  cursor: pointer;
}

.kpi-card:hover {
  box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.08);
}

.kpi-card.card-tareas:hover {
  border-color: #3b82f6;
}

.kpi-card.card-mensajes:hover {
  border-color: #10b981;
}

.kpi-card.card-observaciones:hover {
  border-color: #f59e0b;
}

.kpi-card.card-archivos:hover {
  border-color: #8b5cf6;
}

.kpi-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  transition: transform 0.2s ease;
}

.kpi-card:hover .kpi-icon-wrapper {
  transform: scale(1.08);
}

.icon-tareas {
  background: #eff6ff;
  color: #2563eb;
}

.icon-mensajes {
  background: #ecfdf5;
  color: #059669;
}

.icon-observaciones {
  background: #fffbeb;
  color: #d97706;
}

.icon-archivos {
  background: #f5f3ff;
  color: #7c3aed;
}

.kpi-body {
  flex-grow: 1;
}

.kpi-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.kpi-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  margin-top: 4px;
}

.kpi-subtext {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.kpi-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  transition: color 0.2s ease;
}

.kpi-card:hover .kpi-footer {
  color: var(--primary-color);
}

.kpi-card:hover .kpi-footer i {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

/* Quick Access Grid */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.quick-access-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.quick-access-btn:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 16px -2px rgba(37, 99, 235, 0.08);
}

.quick-access-btn .qa-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.quick-access-btn .qa-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.quick-access-btn .qa-info strong {
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
}

.quick-access-btn .qa-info span {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.quick-access-btn .qa-arrow {
  color: #cbd5e1;
  font-size: 13px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-access-btn:hover .qa-arrow {
  color: #2563eb;
  transform: translateX(3px);
}

/* Info Cards / Comunicados */
.comunicados-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.info-card-header {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card-header i {
  color: #2563eb;
  font-size: 16px;
}

.info-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.info-card-body {
  padding: 20px;
}

.sga_mensaje_modern {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

/* ==========================================================================
   MÓDULO ACADÉMICO: TAREAS, OBSERVACIONES Y NOTAS (FASE 3)
   ========================================================================== */

/* --- TAREAS --- */
.academic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px dotted #e2e8f0;
}

.academic-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.academic-title i {
  color: #2563eb;
}

.academic-badge-count {
  font-size: 12px;
  background: #eff6ff;
  color: #2563eb;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.filter-select-modern {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  font-size: 13px;
  color: #334155;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.filter-select-modern:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.sga-task-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 18px;
  box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sga-task-card:hover {
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.task-card-top {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.task-subject-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

.task-card-main {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.task-info-block {
  flex: 1;
  min-width: 250px;
}

.task-main-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.task-dates-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.task-date-pill {
  font-size: 12px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
}

.task-date-pill.deadline {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
}

.task-action-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.task-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.task-status-badge.open {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.task-status-badge.open i {
  color: #10b981;
}

.task-status-badge.close,
.task-status-badge.closed {
  background-color: #f10000;
  color: #ffffff;
  border: 1px solid #b90000;
  cursor: pointer;
}

.task-status-badge.close i,
.task-status-badge.closed i {
  color: #ffffff;
}

.task-action-wrapper a,
.task-action-wrapper button,
.sga_card_btn a {
  background: #2563eb !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
  transition: all 0.2s ease !important;
}

.task-action-wrapper a:hover,
.task-action-wrapper button:hover,
.sga_card_btn a:hover {
  background: #103cb4 !important;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3) !important;
}

.task-card-footer {
  padding: 12px 20px;
  background: #fafafa;
  border-top: 1px solid #edf2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.task-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.task-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #334155;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.task-file-chip:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* --- OBSERVACIONES (TIMELINE) --- */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  margin-top: 10px;
}

.timeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 20px;
  box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
}

.timeline-card:hover {
  box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.badge-unread {
  background: #fee2e2;
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #fecaca;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.obs-filter-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  border: 1px solid #e2e8f0;
}

.obs-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.obs-filter-btn:hover {
  color: #1e293b !important;
  background: rgba(255, 255, 255, 0.6);
}

.obs-filter-btn.active {
  background: #ffffff;
  color: #2563eb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.obs-filter-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
  line-height: 1.2;
}

.obs-filter-btn.active .obs-filter-count {
  background: #dbeafe;
  color: #1d4ed8;
}

.obs-filter-count.has-unread {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.timeline-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.timeline-author-info strong {
  display: block;
  font-size: 14px;
  color: #1e293b;
}

.timeline-author-info span {
  font-size: 12px;
  color: #64748b;
}

.timeline-date {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.timeline-body {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 2px;
  border-left: 2px solid #0a0a09;
}

.timeline-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.timeline-btn-reply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.timeline-btn-reply:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.timeline-card.timeline-card-replied {
  border-left: 2px solid #10b981;
}

.badge-replied {
  background: #ecfdf5;
  color: #059669;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #a7f3d0;
}

.timeline-replies-thread {
  margin-top: 12px;
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-replies-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.timeline-replies-header i {
  color: #2563eb;
}

.timeline-replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-reply-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.timeline-reply-item.is-student {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.timeline-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-reply-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1e293b;
}

.timeline-reply-author i {
  color: #2563eb;
}

.timeline-reply-role {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.timeline-reply-item.is-teacher .timeline-reply-role {
  background: #fef3c7;
  color: #b45309;
}

.timeline-reply-date {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-reply-body {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

.timeline-reply-body p {
  margin: 0 0 6px 0;
}

.timeline-reply-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .timeline-replies-thread {
    margin-left: 10px;
    padding-left: 10px;
  }
}

/* --- CALIFICACIONES / NOTAS --- */
.notas-tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 12px;
}

.notas-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.notas-tab-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}

.notas-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.sga-notas-table-wrapper {
  overflow-x: auto;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
  margin-top: 16px;
}

.sga-notas-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sga-notas-table-wrapper th,
.sga_table_fila_th {
  background: #f8fafc !important;
  color: #334155 !important;
  font-weight: 700 !important;
  padding: 12px 14px !important;
  text-align: center !important;
  border-bottom: 2px solid #e2e8f0 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

.sga-notas-table-wrapper td,
.sga_table_fila_td {
  padding: 10px 14px !important;
  color: #1e293b !important;
  transition: background-color 0.15s ease;
}

.sga-notas-table-wrapper tr:hover td {
  background-color: #f8fafc !important;
}

.encabezado {
  margin: 0 auto 20px auto;
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px;
}

.encabezado .sga_subtitle {
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

/* ==========================================================================
   MÓDULO DE PERFIL, MATRÍCULA Y REPOSITORIO (FASE 4)
   ========================================================================== */

/* --- REPOSITORIO DE ARCHIVOS --- */
.repo-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.repo-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 260px;
  max-width: 360px;
  width: 100%;
}

.repo-search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.repo-search-input {
  width: 100%;
  padding: 8px 34px 8px 34px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background-color: #f8fafc;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
}

.repo-search-input:focus {
  background-color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.repo-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  outline: none;
  transition: color 0.15s ease;
}

.repo-search-clear:hover {
  color: #ef4444;
}

.repository-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.file-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.file-card:hover {
  border-color: #2563eb;
  box-shadow: 0 10px 20px -3px rgba(37, 99, 235, 0.08);
}

.file-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.file-card-info {
  flex-grow: 1;
  overflow: hidden;
}

.file-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
  word-break: break-word;
}

.file-card-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-download-btn {
  background: #2563eb;
  color: #ffffff !important;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.file-download-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* --- DESCARGAS INSTITUCIONALES --- */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.download-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.download-item-card:hover {
  border-color: #ef4444;
  box-shadow: 0 6px 15px -2px rgba(239, 68, 68, 0.1);
}

.download-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.download-info strong {
  display: block;
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
}

.download-info span {
  font-size: 12px;
  color: #64748b;
}

.tox :not(svg):not(rect) {
  color: #000 !important;
}

.tox-statusbar__branding {
  display: none !important;
}

.tox-tinymce-aux {
  z-index: 99999 !important;
}

.sga_card_editor {
  width: calc(100% - 40px) !important;
  margin: 0 auto 12px auto !important;
  text-align: left !important;
}

.sga_card_editor .tox-tinymce {
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
}

/* Modal de Descarga de Archivo */
.overlay {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(4px);
}

.descarga_archivo {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid #e2e8f0 !important;
  overflow: hidden;
}

.descarga_archivo_titulo {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  padding: 16px 20px !important;
}

.descarga_archivo_detalles {
  padding: 20px !important;
}

.sga_btn_descarga a {
  background: #2563eb !important;
  border: none !important;
  color: #ffffff !important;
  padding: 10px 24px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25) !important;
}

.sga_btn_descarga a:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

/* --- FORMULARIOS Y ACTUALIZACIÓN DE MATRÍCULA --- */
.msg_actualizacion {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-left: 4px solid #2563eb !important;
  color: #334155 !important;
  border-radius: 5px !important;
  padding: 16px 20px !important;
  text-align: left !important;
  font-size: 13px !important;
  line-height: 1.6;
}

/* Estilos para inputs genéricos del sistema */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font-family: inherit !important;
  color: #1e293b !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.sga-upload-section {
  margin-top: 15px;
}

/* Estilos para botones de acción y submit */
input[type="submit"],
button.btn_guardar {
  background: #2563eb !important;
  border: none !important;
  color: #ffffff !important;
  padding: 9px 20px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
}

input[type="submit"]:hover,
button.btn_guardar:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3) !important;
}

/* Ficha Académica */
.sga_foto img {
  border-radius: 10px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  border: 2px solid #ffffff !important;
}

/* ==========================================================================
   MÓDULO DE COMUNICACIÓN: MENSAJERÍA (FASE 5)
   ========================================================================== */

.mensajeria_content {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04) !important;
  padding: 16px !important;
  margin-top: 10px !important;
}

.mensajeria_menu {
  float: none !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.mensajeria_menu a {
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mensajeria_menu a:hover,
.mensajeria_menu .inbox_hover a,
.mensajeria_menu .send_hover a,
.mensajeria_menu .sendnew_hover a,
.mensajeria_menu .trash_hover a {
  background: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

.mensajeria_mensajes {
  float: none !important;
  flex-grow: 1 !important;
  min-width: 300px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.mensajeria_mensajes .eliminar_mensajes {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-top: none !important;
  padding: 10px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.mensajeria_mensajes .sga_imbox {
  height: auto !important;
  min-height: 44px !important;
  border-bottom: 1px solid #edf2f7 !important;
  transition: background-color 0.15s ease !important;
}

.mensajeria_mensajes .sga_imbox:hover {
  background-color: #f8fafc !important;
}

.mensajeria_mensajes .sga_imbox a {
  display: flex !important;
  align-items: center !important;
  padding: 12px 14px !important;
  color: #1e293b !important;
  font-size: 13px !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.mensajeria_mensajes .impar {
  background: #ffffff !important;
}

/* --- REPRODUCTOR DE VIDEO INSTITUCIONAL --- */
.sga-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  margin-top: 6px;
}

.sga-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* --- GALERÍA DE IMÁGENES Y LIGHTBOX MODERNO --- */
.sga-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 18px !important;
  padding: 15px 0 !important;
}

.sga-gallery-item {
  position: relative !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  cursor: pointer !important;
  background: #0f172a !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.sga-gallery-item:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

.gallery-thumb-wrapper {
  position: relative !important;
  width: 100% !important;
  padding-bottom: 75% !important;
  overflow: hidden !important;
}

.gallery-thumb-wrapper img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease !important;
}

.sga-gallery-item:hover .gallery-thumb-wrapper img {
  transform: scale(1.06) !important;
}

.gallery-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(15, 23, 42, 0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 24px !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
}

.sga-gallery-item:hover .gallery-overlay {
  opacity: 1 !important;
}

.gallery-date-badge {
  position: absolute !important;
  bottom: 8px !important;
  left: 8px !important;
  background: rgba(15, 23, 42, 0.78) !important;
  backdrop-filter: blur(4px) !important;
  color: #e2e8f0 !important;
  font-size: 11px !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  pointer-events: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Lightbox Modal Moderno */
.sga-lightbox-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999999 !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
  user-select: none !important;
}

.sga-lightbox-modal.active {
  display: flex !important;
  opacity: 1 !important;
}

.sga-lightbox-content {
  position: relative !important;
  max-width: 88vw !important;
  max-height: 86vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  z-index: 10000001 !important;
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sga-lightbox-img-container {
  max-width: 88vw !important;
  max-height: 78vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sga-lightbox-content img {
  max-width: 88vw !important;
  max-height: 78vh !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
  object-fit: contain !important;
  transition: opacity 0.2s ease !important;
}

.sga-lightbox-info {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin-top: 14px !important;
  gap: 16px !important;
}

.sga-lightbox-caption {
  color: #f8fafc !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.sga-lightbox-counter {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(4px) !important;
  color: #ffffff !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  flex-shrink: 0 !important;
}

/* Botones de Navegación Anterior / Siguiente */
.sga-lightbox-nav {
  position: fixed !important;
  top: 50% !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  font-size: 20px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  z-index: 10000002 !important;
  outline: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

.sga-lightbox-prev {
  left: 24px !important;
}

.sga-lightbox-next {
  right: 24px !important;
}

.sga-lightbox-nav:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5) !important;
}

/* Botón de Cierre */
.sga-lightbox-close {
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-size: 20px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  z-index: 10000003 !important;
  line-height: 1 !important;
  outline: none !important;
}

.sga-lightbox-close i {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.sga-lightbox-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(1.1) !important;
}

@media (max-width: 640px) {
  .sga-lightbox-nav {
    width: 42px !important;
    height: 42px !important;
    font-size: 16px !important;
  }

  .sga-lightbox-prev {
    left: 10px !important;
  }

  .sga-lightbox-next {
    right: 10px !important;
  }

  .sga-lightbox-close {
    top: 14px !important;
    right: 14px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 22px !important;
  }
}

/* ==========================================================================
   MÓDULO NOSOTROS (EQUIPO DOCENTE Y DEPARTAMENTOS)
   ========================================================================== */

.nosotros-container {
  width: 100%;
  padding: 0 4px 30px 4px;
}

.nosotros-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.nosotros-section-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.nosotros-section-header h3 i {
  color: #3b82f6;
  font-size: 20px;
}

.nosotros-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 6px;
}

.nosotros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Tarjeta Nosotros */
.nosotros-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.nosotros-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.nosotros-card.is-tutor {
  border-color: #bfdbfe;
}

.nosotros-card.is-tutor:hover {
  border-color: #3b82f6;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18);
}

/* Banner superior */
.nosotros-card-banner {
  height: 68px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px 12px;
}

.banner-docente {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.banner-tutor {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.banner-depto {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
}

.nosotros-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nosotros-badge.tutor {
  background: rgba(254, 240, 138, 0.95);
  color: #854d0e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nosotros-badge.role {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.nosotros-badge.depto {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

/* Avatar centrado */
.nosotros-avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-top: -46px;
  position: relative;
  z-index: 2;
}

.nosotros-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  background: #f1f5f9;
  transition: transform 0.25s ease;
}

.nosotros-card:hover .nosotros-avatar-img {
  transform: scale(1.05);
}

/* Cuerpo de la tarjeta */
.nosotros-card-content {
  padding: 16px 20px 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-grow: 1;
}

.nosotros-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.nosotros-role-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Materias */
.nosotros-materias {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
}

.nosotros-materia-tag {
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nosotros-materia-tag i {
  color: #3b82f6;
  font-size: 10px;
}

.nosotros-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Acerca de mí */
.nosotros-acerca {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-align: left;
  box-sizing: border-box;
}

.nosotros-acerca-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nosotros-acerca-label i {
  color: #3b82f6;
  font-size: 12px;
}

.nosotros-acerca-text {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.nosotros-contact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
}

.nosotros-contact-item {
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nosotros-contact-item i {
  color: #059669;
}

/* Acción */
.nosotros-card-action {
  padding: 12px 20px 20px 20px;
  width: 100%;
}

.btn-nosotros-msg {
  width: 100%;
  padding: 10px 16px;
  background: #96a9bd;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nosotros-card:hover .btn-nosotros-msg,
.btn-nosotros-msg:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.nosotros-card.is-depto:hover .btn-nosotros-msg,
.nosotros-card.is-depto .btn-nosotros-msg:hover {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* ==========================================================================
   MODAL DE ENVÍO DE MENSAJE A NOSOTROS
   ========================================================================== */

.sga-nosotros-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999999 !important;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 16px;
  box-sizing: border-box;
}

.sga-nosotros-modal.active {
  display: flex !important;
  opacity: 1 !important;
}

.nosotros-modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.nosotros-modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nosotros-modal-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nosotros-modal-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: #334155;
}

.nosotros-modal-user-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 2px 0;
}

.nosotros-modal-user-info span {
  font-size: 12px;
  color: #94a3b8;
}

.nosotros-modal-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transition: all 0.2s ease;
  line-height: 1 !important;
  outline: none;
}

.nosotros-modal-close i {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.nosotros-modal-close:hover {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
  transform: scale(1.08);
}

.nosotros-modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nosotros-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nosotros-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nosotros-form-group label i {
  color: #3b82f6;
}

.nosotros-form-group input,
.nosotros-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nosotros-form-group input:focus,
.nosotros-form-group textarea:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.nosotros-form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.nosotros-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}

.btn-nosotros-cancel {
  padding: 10px 18px;
  background: #ff0022;
  border: 1px solid #bd0019;
  color: #ffffff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-nosotros-cancel:hover {
  background: #bd0019;
  color: #ffffff;
}

.btn-nosotros-submit {
  padding: 10px 20px;
  background: #2563eb;
  border: none;
  color: #ffffff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-nosotros-submit:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* Modal de Agendar Cita en Nosotros */
#sga-nosotros-cita-modal .nosotros-modal-dialog {
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#sga-nosotros-cita-modal .citas-card-box-body {
  padding: 20px 22px;
  overflow-y: auto;
  max-height: calc(90vh - 85px);
}

.btn-nosotros-cita {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #ffffff !important;
  margin-top: 8px !important;
}

.btn-nosotros-cita:hover {
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3) !important;
}

/* ==========================================================================
   MÓDULO DE CITAS MODERNO CON AJAX
   ========================================================================== */

.citas-wrapper {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto 40px auto;
  box-sizing: border-box;
}

.citas-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .citas-grid-layout {
    grid-template-columns: 1fr 460px;
    align-items: start;
  }
}

/* Tarjetas contenedor */
.citas-card-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.citas-card-box:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.citas-card-box-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f5f9;
  background: #fcfdfd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.citas-box-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.citas-box-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.citas-box-icon.history {
  background: #ecfdf5;
  color: #059669;
}

.citas-box-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.citas-box-subtitle {
  font-size: 12px;
  color: #64748b;
}

.citas-counter-pill {
  padding: 4px 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

.citas-card-box-body {
  padding: 22px;
}

/* Stepper visual */
.citas-stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 20px;
  gap: 6px;
}

.citas-step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.citas-step-item.active {
  color: #2563eb;
}

.citas-step-item.active .step-badge {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Campos del formulario */
.citas-field-group {
  margin-bottom: 18px;
}

.citas-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.citas-field-label i {
  color: #3b82f6;
  font-size: 13px;
}

.citas-select-wrapper {
  position: relative;
  width: 100%;
}

.citas-field-control {
  width: 100%;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13.5px;
  color: #1e293b;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.citas-field-control:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.citas-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.45;
}

.citas-field-loader {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 500;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Grid de turnos interactivos */
.citas-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.citas-slot-chip {
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.citas-slot-chip:hover:not(.disabled) {
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.15);
}

.citas-slot-chip.selected {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
  transform: scale(1.02);
}

.citas-slot-chip.disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.75;
}

.citas-empty-slots {
  grid-column: 1 / -1;
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

/* Botón agendar */
.btn-citas-agendar {
  width: 100%;
  padding: 12px 18px;
  background: #2563eb;
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-citas-agendar:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-citas-agendar:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Alertas de confirmación en vivo */
.citas-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  animation: fadeIn 0.25s ease;
}

.citas-alert.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.citas-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Lista de citas registradas */
.citas-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.citas-empty-card {
  text-align: center;
  padding: 40px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}

.citas-empty-icon {
  font-size: 36px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.citas-empty-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 6px 0;
}

.citas-empty-card p {
  font-size: 13px;
  color: #64748b;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.45;
}

/* Tarjeta individual de cita */
.citas-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  padding: 16px 18px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.citas-item-card:hover {
  background: #e5ebf3;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.citas-item-card.status-agendada {
  border-left-color: #10b981;
}

.citas-item-card.status-cancelada {
  border-left-color: #ef4444;
  opacity: 0.85;
}

.citas-item-card.status-concluida {
  border-left-color: #3b82f6;
}

.citas-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.citas-item-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tipo {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-tipo.convocatoria {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-tipo.solicitud {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-estado {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-estado.agendada {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-estado.cancelada {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-estado.concluida {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.citas-item-datetime {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #475569;
  font-weight: 500;
}

.citas-date-val i,
.citas-time-val i {
  color: #3b82f6;
  margin-right: 3px;
}

.citas-time-val {
  font-weight: 700;
  color: #0f172a;
}

.citas-user-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.citas-user-email {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.citas-item-motivo {
  background: #f8fafc;
  border-left: 2px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 4px 8px 8px 4px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.45;
}

.citas-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.btn-cita-action {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-informe {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.btn-informe:hover {
  background: #dbeafe;
  color: #1e40af;
}

.btn-cancelar {
  background: #ff5353;
  border: 1px solid #fecaca;
}

.btn-cancelar:hover {
  background: #d33939;
}

.citas-pagination-wrap {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* Modal de Cancelación de Citas */
.sga-citas-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sga-citas-modal.active {
  display: flex;
  opacity: 1;
}

.citas-modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.citas-modal-header {
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.citas-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.citas-modal-title h4 {
  font-size: 15px;
  font-weight: 700;
  color: #991b1b;
  margin: 0;
}

.citas-modal-close {
  background: #f00;
  border: none;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.citas-modal-close:hover {
  background: #ef4444;
  color: #ffffff;
}

.citas-modal-body {
  padding: 20px;
}

.citas-cancel-desc {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

.citas-modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancel-dialog-close {
  padding: 9px 16px;
  background: #308ec7;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel-dialog-close:hover {
  background: #004489;
}

.btn-cancel-dialog-confirm {
  padding: 9px 18px;
  background: #ef4444;
  border: none;
  color: #ffffff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-cancel-dialog-confirm:hover {
  background: #dc2626;
}

.btn-cancel-dialog-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   FullCalendar v3 y Conmutador de Vistas (Calendario / Tarjetas)
   ========================================================================== */

.citas-view-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
  border: 1px solid #e2e8f0;
}

.btn-citas-tab {
  border: none;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.btn-citas-tab:hover {
  color: #1e293b;
  background: rgb(109 109 109 / 60%);
}

.btn-citas-tab.active {
  background: #5cacdd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.citas-calendar-wrapper {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.citas-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #edf2f7;
  margin-bottom: 14px;
  font-size: 12px;
}

.citas-calendar-legend .legend-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.legend-chip.agendada {
  background: #ecfdf5;
  color: #059669;
}

.legend-chip.agendada i {
  color: #10b981;
}

.legend-chip.realizada {
  background: #eff6ff;
  color: #2563eb;
}

.legend-chip.realizada i {
  color: #3b82f6;
}

.legend-chip.cancelada {
  background: #fef2f2;
  color: #dc2626;
}

.legend-chip.cancelada i {
  color: #ef4444;
}

.citas-calendar-hint {
  color: #64748b;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* FullCalendar v3 Custom Theme Overrides */
#citas-fullcalendar {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

#citas-fullcalendar .fc-toolbar {
  margin-bottom: 16px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

#citas-fullcalendar .fc-toolbar h2 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  text-transform: capitalize !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

#citas-fullcalendar .fc-button {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  height: auto !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  text-shadow: none !important;
  transition: all 0.15s ease !important;
  outline: none !important;
  margin-right: 5px;
}

#citas-fullcalendar .fc-button:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

#citas-fullcalendar .fc-button.fc-state-active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12) !important;
}

#citas-fullcalendar .fc-button.fc-state-disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

#citas-fullcalendar .fc-day-header {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  padding: 8px 4px !important;
  border-color: #e2e8f0 !important;
  letter-spacing: 0.4px !important;
}

#citas-fullcalendar td,
#citas-fullcalendar th {
  border-color: #edf2f7 !important;
}

#citas-fullcalendar .fc-today {
  background: #f0fdf4 !important;
}

#citas-fullcalendar .fc-day-number {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  padding: 5px 8px !important;
}

#citas-fullcalendar .fc-event {
  border-radius: 6px !important;
  padding: 3px 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  border: none !important;
  margin: 2px 1px !important;
}

#citas-fullcalendar .fc-event:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18) !important;
  z-index: 10 !important;
}

#citas-fullcalendar .fc-event.status-agendada {
  background: #10b981 !important;
}

#citas-fullcalendar .fc-event.status-concluida {
  background: #3b82f6 !important;
}

#citas-fullcalendar .fc-event.status-cancelada {
  background: #ef4444 !important;
}

#citas-fullcalendar .fc-more {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #2563eb !important;
  padding: 2px 4px !important;
}

.fc-agendaWeek-button {
  margin: 0px 5px !important;
}

/* FullCalendar List View Styling */
#citas-fullcalendar .fc-list-view {
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

#citas-fullcalendar .fc-list-table {
  border-collapse: separate !important;
  width: 100% !important;
}

#citas-fullcalendar .fc-list-heading td {
  background: #f8fafc !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-top: 1px solid #e2e8f0 !important;
}

#citas-fullcalendar .fc-list-heading-main {
  font-weight: 700 !important;
  color: #1e293b !important;
  font-size: 13px !important;
  text-transform: capitalize !important;
}

#citas-fullcalendar .fc-list-heading-alt {
  font-size: 12px !important;
  color: #64748b !important;
}

#citas-fullcalendar .fc-list-item {
  cursor: pointer !important;
  transition: background-color 0.15s ease !important;
}

#citas-fullcalendar .fc-list-item:hover td {
  background-color: #f1f5f9 !important;
}

#citas-fullcalendar .fc-list-item td {
  padding: 11px 14px !important;
  font-size: 13px !important;
  border-color: #f1f5f9 !important;
}

#citas-fullcalendar .fc-list-item-time {
  font-weight: 600 !important;
  color: #2563eb !important;
  white-space: nowrap !important;
  width: 95px !important;
}

#citas-fullcalendar .fc-list-item-title {
  font-weight: 600 !important;
  color: #1e293b !important;
}

#citas-fullcalendar .fc-list-empty-wrap2 {
  padding: 36px 20px !important;
  text-align: center !important;
}

#citas-fullcalendar .fc-list-empty {
  font-size: 13.5px !important;
  color: #64748b !important;
  background: transparent !important;
}

/* Modal de Detalle de Cita */
.citas-modal-header.detalle {
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
}

.citas-modal-header.detalle .citas-modal-title h4 {
  color: #1e40af;
}

.citas-detalle-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.citas-detalle-info-box {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.citas-detalle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 13px;
}

.citas-detalle-row:last-child {
  border-bottom: none;
}

.citas-detalle-label {
  color: #64748b;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.citas-detalle-val {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.citas-detalle-motivo-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.citas-detalle-motivo-box label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.citas-detalle-motivo {
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.5;
  margin: 0;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 3px;
  border-left: 3px solid #2563eb;
}

/* ==========================================================================
   MODULO DESCARGAS
   ========================================================================== */

/* Contenedor del mensaje de descargas */
.msg_descargas {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-left: 2px solid #22c55e;
  padding: 16px 20px;
  margin: 0 auto 24px auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  border-bottom-left-radius: 5px;
  border-top-left-radius: 5px;
  gap: 8px;
  text-align: left;
}

.msg_descargas p {
  margin: 0;
  font-size: 15px;
}

.msg_descargas p strong {
  font-size: 16px;
  align-items: center;
  gap: 8px;
}

/* Lista de descargas tipo grid */
.list_download {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0 auto 32px auto;
}

.list_download li {
  margin: 0;
  padding: 0;
  border: none !important;
}

.list_download li a {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  color: #334155 !important;
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.list_download li a::after {
  content: '\f019';
  /* Download icon instead of arrow */
  font-family: 'FontAwesome';
  position: absolute;
  right: 16px;
  font-size: 16px;
  color: #94a3b8;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.list_download li a:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  color: #0f172a !important;
}

.list_download li a:hover::after {
  opacity: 1;
}

/* Iconos específicos por tipo de archivo */
.list_download li a i {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f8fafc;
  transition: all 0.2s ease;
  margin: 0 !important;
}

.list_download li.list_pdf a i {
  color: #ef4444 !important;
  background: #fef2f2;
}

.list_download li.list_pdf a:hover i {
  background: #ef4444;
  color: #ffffff !important;
}

.list_download li.list_xls a i {
  color: #10b981 !important;
  background: #ecfdf5;
}

.list_download li.list_xls a:hover i {
  background: #10b981;
  color: #ffffff !important;
}

.list_download li.list_doc a i {
  color: #3b82f6 !important;
  background: #eff6ff;
}

.list_download li.list_doc a:hover i {
  background: #3b82f6;
  color: #ffffff !important;
}

.list_download li.list_nd a i {
  color: #64748b !important;
  background: #f1f5f9;
}

.list_download li.list_nd a:hover i {
  background: #64748b;
  color: #ffffff !important;
}

/* ==========================================================================
   MODULO CARGAS (Gestor de Documentos Cargados)
   ========================================================================== */

.list_cargas li .carga-card-content {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  color: #334155;
  font-weight: 500;
  font-size: 14.5px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  position: relative;
}

.list_cargas li .carga-card-content:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.list_cargas .carga-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f8fafc;
}

.list_cargas .carga-name {
  flex: 1;
  word-break: break-word;
}

.list_cargas .carga-actions {
  display: flex;
  gap: 8px;
}

.list_cargas .carga-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  background: #f1f5f9;
  color: #64748b !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.list_cargas .carga-actions a::after {
  display: none !important;
}

.list_cargas .carga-actions a.btn-download:hover {
  background: #10b981;
  color: #ffffff !important;
}

.list_cargas .carga-actions a.btn-delete:hover {
  background: #ef4444;
  color: #ffffff !important;
}

.list_cargas .carga-actions a i {
  background: transparent !important;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
  color: inherit !important;
  font-size: 16px;
}

/* ==========================================================================
   FICHA DECE - RESPONSIVE TABLE (CARD LAYOUT EN MÓVILES)
   ========================================================================== */
.ficha-dece-wrapper {
  width: 100%;
  margin-bottom: 20px;
  background: transparent;
}

.ficha-dece-wrapper table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ficha-dece-wrapper td,
.ficha-dece-wrapper th {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {

  /* Convertimos la tabla en bloques para diseño tipo tarjeta */
  .ficha-dece-wrapper table,
  .ficha-dece-wrapper thead,
  .ficha-dece-wrapper tbody,
  .ficha-dece-wrapper th,
  .ficha-dece-wrapper td,
  .ficha-dece-wrapper tr {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Ocultamos thead visualmente si es una tabla de datos, o reducimos su impacto */
  .ficha-dece-wrapper thead {
    display: none;
  }

  /* Cada fila se convierte en una tarjeta */
  .ficha-dece-wrapper tr {
    margin-bottom: 16px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #cbd5e1;
    overflow: hidden;
  }

  .ficha-dece-wrapper table {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  /* Las celdas se apilan, con un diseño más limpio */
  .ficha-dece-wrapper td {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    padding: 12px 16px;
    text-align: left !important;
  }

  .ficha-dece-wrapper td:last-child {
    border-bottom: none;
  }

  /* Entradas e inputs a ancho completo */
  .ficha-dece-wrapper td input[type="text"],
  .ficha-dece-wrapper td input[type="number"],
  .ficha-dece-wrapper td input[type="date"],
  .ficha-dece-wrapper td select,
  .ficha-dece-wrapper td textarea {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
  }
}

/* ==========================================================================
   RESPONSIVE PARA BLOQUES (Perfil / Layout del Sistema)
   ========================================================================== */
@media (max-width: 768px) {

  /* Hacemos que todos los bloques se apilen verticalmente al 100% en móviles */
  .bloque_x,
  .bloque_x2,
  .bloque_x3,
  .bloque_x33,
  .bloque_x4,
  .bloque_x5,
  .bloque_x6,
  .bloque_x7,
  .bloque_x8,
  .bloque_x9 {
    width: 100% !important;
    float: none !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px !important;
    margin-bottom: 8px;
    box-sizing: border-box;
  }

  /* El último bloque no necesita borde inferior */
  .bloque_x:last-child,
  .bloque_x2:last-child,
  .bloque_x3:last-child,
  .bloque_x33:last-child,
  .bloque_x4:last-child,
  .bloque_x5:last-child,
  .bloque_x6:last-child,
  .bloque_x7:last-child,
  .bloque_x8:last-child,
  .bloque_x9:last-child {
    border-bottom: none;
  }
}

/* --- VENTANA MODAL DE COMUNICADOS DIRIGIDOS --- */
.sga-comunicado-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999998 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  opacity: 0;
  transition: opacity 0.25s ease !important;
}

.sga-comunicado-overlay.active {
  display: flex !important;
  opacity: 1 !important;
}

.sga-comunicado-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
  width: 100% !important;
  max-width: 840px !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: sgaModalZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1px solid #e2e8f0 !important;
}

@keyframes sgaModalZoom {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.sga-comunicado-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 22px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #f8fafc !important;
}

.sga-comunicado-meta {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.sga-comunicado-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
}

.sga-comunicado-badge.badge-urgente {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

.sga-comunicado-badge.badge-alta {
  background: #fef3c7 !important;
  color: #d97706 !important;
  border: 1px solid #fcd34d !important;
}

.sga-comunicado-badge.badge-normal {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

.sga-comunicado-badge.badge-baja {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}

.sga-comunicado-counter {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  background: #ffffff !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  border: 1px solid #e2e8f0 !important;
}

.sga-comunicado-close-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sga-comunicado-close-btn:hover {
  background: #e2e8f0 !important;
  color: #1e293b !important;
}

.sga-comunicado-heading-block {
  padding: 20px 24px 14px 24px !important;
  background: #ffffff !important;
}

.sga-comunicado-title {
  margin: 0 0 10px 0 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
}

.sga-comunicado-info-row {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  font-size: 13px !important;
  color: #64748b !important;
  flex-wrap: wrap !important;
}

.sga-comunicado-info-row span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.sga-comunicado-body {
  padding: 0 24px 20px 24px !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
}

.sga-comunicado-text {
  font-size: 14.5px !important;
  line-height: 1.65 !important;
  color: #334155 !important;
  word-break: break-word !important;
}

.sga-comunicado-text p {
  margin: 0 0 12px 0 !important;
}

.sga-comunicado-text img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
}

/* --- PREVIEW DE GOOGLE DRIVE Y ADJUNTOS EN COMUNICADOS --- */
.sga-comunicado-drive-section {
  margin-top: 18px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

.sga-comunicado-drive-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 16px !important;
  background: #f1f5f9 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.sga-comunicado-drive-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
}

.sga-comunicado-drive-header-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.sga-btn-toggle-drive,
.sga-btn-toggle-pdf {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.sga-btn-toggle-drive:hover,
.sga-btn-toggle-pdf:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.sga-comunicado-drive-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.sga-comunicado-drive-btn:hover {
  background: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  color: #047857 !important;
}

.sga-comunicado-drive-iframe-wrapper {
  width: 100% !important;
  height: 440px !important;
  background: #0f172a !important;
  position: relative !important;
}

.sga-comunicado-drive-iframe-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

.sga-comunicado-adjuntos {
  margin-top: 18px !important;
  border-top: 1px dashed #cbd5e1 !important;
  padding-top: 14px !important;
}

.sga-comunicado-adjuntos-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.sga-comunicado-adjuntos-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.sga-comunicado-adjunto-item {
  width: 100% !important;
}

.sga-comunicado-preview-img-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  text-align: center !important;
}

.sga-comunicado-preview-img {
  max-width: 100% !important;
  max-height: 400px !important;
  display: block !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  cursor: zoom-in !important;
  transition: transform 0.2s ease !important;
}

.sga-comunicado-preview-img:hover {
  opacity: 0.95 !important;
}

.sga-comunicado-preview-video-box {
  background: #020617 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid #1e293b !important;
}

.sga-comunicado-preview-video {
  width: 100% !important;
  max-height: 420px !important;
  display: block !important;
}

.sga-comunicado-preview-pdf-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

.sga-comunicado-media-caption {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 14px !important;
  background: #f1f5f9 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 12.5px !important;
  color: #334155 !important;
  font-weight: 500 !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.sga-media-caption-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.sga-btn-media-download {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  font-size: 12px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.sga-btn-media-download:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

.sga-pdf-embed-wrapper {
  width: 100% !important;
  height: 420px !important;
  background: #525659 !important;
}

.sga-comunicado-preview-pdf-iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

.sga-comunicado-adjunto-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.sga-comunicado-adjunto-chip:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #2563eb !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

.sga-adjunto-chip-size {
  color: #94a3b8 !important;
  font-size: 11.5px !important;
}

.sga-adjunto-chip-icon {
  margin-left: 4px !important;
  color: #64748b !important;
}

.sga-comunicado-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 24px !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.sga-btn-comunicado-secondary {
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
}

.sga-btn-comunicado-secondary:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

.sga-comunicado-footer-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.sga-btn-comunicado-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.2s ease !important;
}

.sga-btn-comunicado-primary:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 6px 12px -1px rgba(37, 99, 235, 0.35) !important;
}

@media (max-width: 640px) {
  .sga-comunicado-card {
    max-height: 95vh !important;
  }

  .sga-comunicado-title {
    font-size: 17px !important;
  }

  .sga-comunicado-footer {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
  }

  .sga-btn-comunicado-primary,
  .sga-btn-comunicado-secondary {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   MENÚ LATERAL - ÍCONO Y ESTADO ACTIVO DE COMUNICADOS
   ========================================================================== */
#sidebar .menu li.ul_comunicados>a>i:first-child:before {
  content: "\f0a1" !important;
  /* fa-bullhorn */
}

#sidebar .menu li.ul_comunicados.active>a {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   SECCIÓN DE COMUNICADOS INSTITUCIONALES (FEED & CARDS)
   ========================================================================== */

.sga-feed-filter-bar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 20px !important;
  flex-wrap: wrap !important;
}

.sga-feed-filter-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.sga-feed-filter-btn:hover {
  background: #f8fafc !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

.sga-feed-filter-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25) !important;
}

.sga-feed-filter-btn .badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2px 7px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  background: #e2e8f0 !important;
  color: #475569 !important;
  transition: all 0.2s ease !important;
}

.sga-feed-filter-btn.active .badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.sga-feed-filter-btn .badge.badge-unread {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

.sga-feed-filter-btn.active .badge.badge-unread {
  background: #ffffff !important;
  color: #dc2626 !important;
}

/* Contenedor del Feed de Comunicados */
.sga-comunicados-feed-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  max-width: 960px !important;
  margin: 0 auto !important;
}

/* Card del Comunicado en el Feed */
.sga-comunicado-feed-card {
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 5px solid #2563eb !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
  padding: 22px 26px !important;
  transition: all 0.25s ease !important;
  position: relative !important;
}

.sga-comunicado-feed-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

/* Variantes por prioridad y estado de lectura */
.sga-comunicado-feed-card.is-leido {
  border-left-color: #cbd5e1 !important;
  background: #ffffff !important;
  opacity: 0.96 !important;
}

.sga-comunicado-feed-card.is-no-leido {
  border-left-color: #2563eb !important;
  background: #ffffff !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06) !important;
}

.sga-comunicado-feed-card.prio-urgente {
  border-left-color: #ef4444 !important;
}

.sga-comunicado-feed-card.prio-alta {
  border-left-color: #f59e0b !important;
}

/* Encabezado de la Card */
.sga-feed-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 16px !important;
  flex-wrap: wrap !important;
}

.sga-feed-author-meta {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.sga-feed-author-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  flex-shrink: 0 !important;
}

.sga-feed-author-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.sga-feed-author-name {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}

.sga-feed-date-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 12.5px !important;
  color: #64748b !important;
}

.sga-feed-vence {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: #b91c1c !important;
  background: #fef2f2 !important;
  padding: 1px 7px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
}

/* Grupo de Badges en Feed Header */
.sga-feed-badges-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.sga-feed-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
}

.prio-badge-urgente {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.prio-badge-alta {
  background: #fef3c7 !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
}

.prio-badge-baja {
  background: #e0e7ff !important;
  color: #4f46e5 !important;
  border: 1px solid #c7d2fe !important;
}

.prio-badge-normal {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

.badge-status-read {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

.badge-status-unread {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

/* Título de la Card */
.sga-feed-card-title-block {
  margin-bottom: 12px !important;
}

.sga-feed-card-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}

/* Footer de la Card */
.sga-feed-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin-top: 18px !important;
  padding-top: 14px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.sga-btn-feed-action {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
}

.sga-btn-feed-action:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3) !important;
}

.sga-feed-read-meta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: #10b981 !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   MÓDULO COLECTURÍA / PAGOS Y MODAL AJAX MODERNO
   ========================================================================== */
.sga-pagos-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.sga-pagos-count-badge {
  font-size: 12px;
  background: #eff6ff;
  color: #2563eb;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.sga-period-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.sga-btn-reg-pago {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.25s ease;
  text-decoration: none !important;
}

.sga-btn-reg-pago:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  color: #ffffff !important;
}

/* Portal de Pagos en Línea Banner */
.sga-portal-pagos-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  padding: 20px 24px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
  border: 1px solid #334155;
}

.sga-portal-pagos-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0) 70%);
  pointer-events: none;
}

.sga-pagos-banner-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sga-pagos-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #60a5fa;
  flex-shrink: 0;
}

.sga-pagos-banner-content h4 {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.sga-pagos-banner-content p {
  margin: 0;
  font-size: 13.5px;
  color: #94a3b8;
}

.sga-btn-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #3b82f6;
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  flex-shrink: 0;
}

.sga-btn-banner-link:hover {
  background: #2563eb;
  color: #ffffff !important;
}

/* Grid de Tarjetas de Meses/Pagos */
.sga-pagos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.sga-pago-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.sga-pago-card:hover {
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.09);
  border-color: #cbd5e1;
}

.sga-pago-card.pago-estado-pagado {
  border-left: 5px solid #10b981;
}

.sga-pago-card.pago-estado-revision {
  border-left: 5px solid #f59e0b;
}

.sga-pago-card.pago-estado-anulado {
  border-left: 5px solid #ef4444;
}

.sga-pago-card.pago-estado-vacio {
  border-left: 5px solid #cbd5e1;
}

.pago-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.pago-mes-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pago-mes-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pago-mes-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  text-transform: capitalize;
}

/* Badges de Estado */
.sga-pago-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-pagado {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  float: right;
}

.badge-revision {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.badge-anulado {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.badge-vacio {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.pago-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pago-monto-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.pago-monto-label {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
}

.pago-monto-val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.pago-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
}

.pago-info-label {
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pago-info-val {
  font-weight: 600;
  color: #1e293b;
  text-align: right;
}

/* Voucher Chips */
.pago-voucher-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.pago-voucher-chip.chip-has-doc {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.pago-voucher-chip.chip-has-doc:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.pago-voucher-chip.chip-no-doc {
  background: #fef2f2;
  color: #dc2626;
  border: 1px dashed #fca5a5;
  cursor: pointer;
}

.pago-voucher-chip.chip-no-doc:hover {
  background: #fee2e2;
}

.pago-card-footer {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Action Buttons */
.sga-btn-action-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.btn-view-doc {
  background: #f1f5f9;
  color: #475569 !important;
  border-color: #cbd5e1;
}

.btn-view-doc:hover {
  background: #e2e8f0;
  color: #1e293b !important;
}

.btn-edit-pago {
  background: #eff6ff;
  color: #2563eb !important;
  border-color: #bfdbfe;
}

.btn-edit-pago:hover {
  background: #dbeafe;
  color: #1d4ed8 !important;
}

.btn-upload-missing {
  background: #fef3c7;
  color: #b45309 !important;
  border-color: #fde68a;
}

.btn-upload-missing:hover {
  background: #fde68a;
  color: #92400e !important;
}

.btn-registrar-new {
  background: #2563eb;
  color: #ffffff !important;
  width: 100%;
  justify-content: center;
  padding: 9px 16px;
}

.btn-registrar-new:hover {
  background: #1d4ed8;
  color: #ffffff !important;
}

.btn-details {
  background: #f8fafc !important;
  color: #64748b !important;
  border-color: #c1c4c9 !important;
}

.btn-details:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

/* ==========================================================================
   MODAL DIALOGS (SGA MODAL POPUPS)
   ========================================================================== */
.sga-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: sgaFadeInOverlay 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sgaFadeInOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.sga-modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: sgaModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e2e8f0;
}

.sga-modal-dialog-wide {
  max-width: 820px;
}

@keyframes sgaModalSlideUp {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.sga-modal-header {
  padding: 18px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sga-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sga-modal-title i {
  color: #2563eb;
  font-size: 20px;
}

.sga-modal-close-btn {
  background: transparent;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}

.sga-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sga-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.sga-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Spinner / Loader dentro del modal */
.sga-modal-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  gap: 16px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.sga-spinner {
  width: 42px;
  height: 42px;
  border: 3.5px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: sgaSpin 0.8s linear infinite;
}

@keyframes sgaSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   FORMULARIO DENTRO DEL MODAL DE PAGO
   ========================================================================== */
.sga-modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.sga-form-col-full {
  grid-column: span 2;
}

.sga-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sga-form-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sga-form-label .req-star {
  color: #ef4444;
}

.sga-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.sga-input-prefix {
  position: absolute;
  left: 12px;
  font-weight: 700;
  color: #64748b;
  font-size: 15px;
  pointer-events: none;
}

.sga-input-prefix+.sga-form-control {
  padding-left: 30px;
}

.sga-form-control,
.sga-form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.sga-form-control:focus,
.sga-form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.sga-form-hint {
  font-size: 11.5px;
  color: #64748b;
}

/* File Dropzone */
.sga-file-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.sga-file-dropzone:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.sga-file-dropzone i {
  font-size: 28px;
  color: #2563eb;
}

.sga-file-dropzone-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}

.sga-file-dropzone-sub {
  font-size: 11.5px;
  color: #64748b;
}

.sga-file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.sga-file-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 12px;
  font-weight: 600;
}

/* Voucher Actual Card (para modo edición) */
.sga-voucher-actual-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  margin-bottom: 12px;
}

.sga-voucher-actual-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
}

.sga-voucher-actual-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #ffffff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  text-decoration: none !important;
  font-weight: 600;
}

.sga-voucher-actual-btn:hover {
  background: #dbeafe;
}

/* Botones de acción del formulario */
.sga-btn-submit-pago {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  color: #ffffff !important;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.sga-btn-submit-pago:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.sga-btn-submit-pago:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.sga-btn-cancel-pago {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sga-btn-cancel-pago:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Alertas de Feedback */
.sga-alert-feedback {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.sga-alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.sga-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.sga-alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Detalle de Recibo Box */
.sga-recibo-detalle-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
}

.sga-recibo-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px dashed #e2e8f0;
}

.sga-recibo-num {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.sga-recibo-grid-table {
  width: 100%;
  border-collapse: collapse;
}

.sga-recibo-grid-table td {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}

.sga-recibo-grid-table td:first-child {
  font-weight: 600;
  color: #64748b;
  width: 35%;
}

.sga-recibo-grid-table td:last-child {
  font-weight: 600;
  color: #1e293b;
}

/* Responsive */
@media (max-width: 640px) {
  .sga-modal-form-grid {
    grid-template-columns: 1fr;
  }

  .sga-form-col-full {
    grid-column: span 1;
  }

  .sga-portal-pagos-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .sga-btn-banner-link {
    width: 100%;
    justify-content: center;
  }

  .sga-pagos-grid {
    grid-template-columns: 1fr;
  }

  .sga-pago-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .sga-pago-card-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Banner Pagos en Línea */
.sga-pagos-online-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 14px;
  padding: 18px 22px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  margin-bottom: 20px;
}

.sga-pagos-online-text {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sga-pagos-online-text>i {
  font-size: 28px;
  color: #38bdf8;
}

.sga-pagos-online-text strong {
  font-size: 15px;
  color: #ffffff;
  display: block;
}

.sga-pagos-online-text p {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.sga-btn-pago-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0284c7;
  color: #ffffff !important;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.sga-btn-pago-online:hover {
  background: #0369a1;
}

/* Pagos Card layout alternativo en lista */
.sga-pagos-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sga-pago-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
}

.sga-pago-mes-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sga-pago-mes-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sga-pago-mes-titulo {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.sga-pago-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #64748b;
  flex-wrap: wrap;
}

.sga-pago-monto-badge {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.sga-pago-card-status {
  flex-shrink: 0;
}

.sga-pago-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sga-modal-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.sga-dropzone-icon {
  font-size: 32px;
  color: #2563eb;
}

.sga-dropzone-text {
  font-size: 13.5px;
  color: #334155;
}

.sga-dropzone-hint {
  font-size: 11.5px;
  color: #64748b;
}

/* Chat Moderno */
.sga-chat-container {
  display: flex;
  height: 80vh;
  min-height: 500px;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--border-color);
}

.sga-chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: #fdfdfd;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-body);
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.chat-groups-list {
  flex: 1;
  overflow-y: auto;
}

.chat-no-groups {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
}

.chat-no-groups i {
  font-size: 32px;
  margin-bottom: 10px;
  color: #94a3b8;
}

.chat-group-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition-fast);
}

.chat-group-item:hover {
  background: #f8fafc;
}

.chat-group-item.active {
  background: #eff6ff;
  border-left: 4px solid var(--primary-color);
}

.group-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  margin-right: 15px;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

.chat-avatar-initials {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  user-select: none;
  text-transform: uppercase;
}

.group-info h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.group-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.sga-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.chat-main-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
}

.chat-main-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.chat-messages-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

.chat-welcome-placeholder {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
}

.chat-welcome-placeholder i {
  font-size: 48px;
  margin-bottom: 15px;
  color: #cbd5e1;
}

.chat-loading {
  margin: auto;
  font-size: 14px;
  color: var(--text-muted);
}

.chat-input-area {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

#chat-message-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border var(--transition-fast), box-shadow var(--transition-fast);
  background: #f8fafc;
}

#chat-message-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #ffffff;
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.chat-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

/* Burbujas de Mensaje */
.chat-message-bubble {
  max-width: 70%;
  margin-bottom: 15px;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.chat-message-bubble.me {
  align-self: flex-end;
  background: var(--primary-color);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message-bubble.other {
  align-self: flex-start;
  background: #ffffff;
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-message-header {
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: 600;
}

.chat-message-bubble.me .chat-message-header {
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
}

.chat-message-bubble.other .chat-message-header {
  color: var(--text-muted);
}

.chat-message-time {
  font-size: 10px;
  display: block;
  margin-top: 5px;
  opacity: 0.7;
}

.chat-message-bubble.me .chat-message-time {
  text-align: right;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Override for "Entregado" tag in tasks */
.task-card-footer .sga_btn_green {
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  border: none;
  box-shadow: none;
  margin: 0;
  text-transform: none;
}

.task-card-footer .sga_btn_green::before {
  content: '\f00c';
  font-family: 'FontAwesome';
  margin-right: 5px;
}

/* Chat Responsive */
@media (max-width: 768px) {
  .sga-chat-container {
    flex-direction: column;
    height: 85vh;
  }

  .sga-chat-sidebar {
    width: 100%;
    height: 35%;
    min-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
  }

  .sga-chat-main {
    height: 65%;
  }
}

/* ==========================================================================
   MÓDULO DE INFORMES DE NOVEDADES (DETALLE COMPLETO)
   ========================================================================== */
.informe-sections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.informe-section-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

.informe-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
}

.informe-section-title i {
  color: #2563eb;
  font-size: 14px;
}

.informe-check-badge {
  display: block;
  align-items: center;
  padding: 5px 12px;
  color: #1d4ed8;
  border-bottom: 1px #bfdbfe dotted;
  font-size: 12.5px;
  font-weight: 600;
}

.informe-check-badge.strategy {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.informe-otro-box {
  margin-top: 6px;
  padding: 0px 12px;
  background: #ffffff;
  border-radius: 6px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.5;
}

.informe-acciones-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
}

.informe-empty-text {
  font-size: 12.5px;
  color: #94a3b8;
  font-style: italic;
}


/* Modal de revisión de Informes */
.overlay .gestor_contenido.modal-informe-dialog {
  width: 92% !important;
  max-width: 820px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.modal-informe-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.modal-informe-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-informe-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.modal-informe-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.modal-informe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: #64748b;
}

.modal-informe-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-informe-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.modal-informe-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-informe-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.btn-modal-informe-cerrar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-modal-informe-cerrar:hover {
  background: #cbd5e1;
  color: #0f172a;
}


/* Modal de revisión de Informes */
.overlay .gestor_contenido.modal-informe-dialog {
  width: 92% !important;
  max-width: 820px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.modal-informe-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.modal-informe-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-informe-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.modal-informe-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.modal-informe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: #64748b;
}

.modal-informe-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-informe-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.modal-informe-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-informe-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.btn-modal-informe-cerrar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-modal-informe-cerrar:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* ==========================================================================
   MÓDULO DE ELECCIONES ESTUDIANTILES (PLUGIN APP/ELECCIONES)
   ========================================================================== */
#plugin-elecciones-root {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-top: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.badge-ok {
  background: #d1fae5;
  color: #047857;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  font-weight: 600;
}

.badge-no {
  background: #fee2e2;
  color: #b91c1c;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  font-weight: 600;
}

.voter-instruction {
  text-align: center;
  margin: 10px 0 25px 0;
  padding: 18px 24px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.voter-instruction h3 {
  color: #1e293b;
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
}

.voter-instruction p {
  color: #64748b;
  margin: 0;
  font-size: 13px;
}

.voter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.voter-card {
  background: #ffffff;
  border-radius: 16px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  overflow: hidden;
  box-shadow: 1px 20px 20px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  border-top-width: 10px;
  border-top-style: solid;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.voter-card-logo {
  height: 160px;
  background: #f8fafc;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.voter-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.voter-card-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  font-size: 32px;
}

.voter-card-info {
  padding: 20px 18px 12px 18px;
  text-align: center;
  flex: 1;
}

.voter-card-info h2 {
  margin: 0 0 10px 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.btn-votar {
  border: none;
  color: #ffffff;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
  width: 97%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-votar:hover {
  filter: brightness(1.1);
}

.btn-secondary-custom {
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-secondary-custom:hover {
  color: #1e293b;
}

.voter-msg-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 45px 25px;
  text-align: center;
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.05);
  max-width: 600px;
  margin: 40px auto;
}

.voter-msg-card h3 {
  margin: 0 0 10px 0;
  color: #1e293b;
  font-size: 20px;
}

.voter-msg-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.success-msg h3 {
  color: #16a34a;
}

/* ========================================================
   MODAL INTEGRANTES ELECCIONES - TARJETAS DE CANDIDATOS
   ======================================================== */
.integrantes-modal-container {
  max-height: 68vh;
  overflow-y: auto;
  padding: 10px 4px 16px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.integrantes-modal-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  box-sizing: border-box;
}

.integrante-card {
  flex: 0 1 210px;
  width: 210px;
  min-width: 190px;
  max-width: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  box-sizing: border-box;
  margin: 0;
}

.integrante-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.integrante-avatar-box {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 12px auto;
  overflow: hidden;
  border: 3px solid #3b82f6;
  background-color: #f1f5f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.integrante-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.integrante-cargo-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: #e0f2fe;
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  border: 1px solid #bae6fd;
}

.integrante-cargo-badge.presidente {
  background-color: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.integrante-cargo-badge.vicepresidente {
  background-color: #f3e8ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.integrante-nombre {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.35;
  text-transform: uppercase;
}

.integrante-curso {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.integrante-propuesta-card {
  width: 100%;
  max-width: 720px;
  margin: 22px auto 0 auto;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  text-align: left;
}

.integrante-propuesta-header {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.integrante-propuesta-header i {
  color: #2563eb;
  font-size: 16px;
}

.integrante-propuesta-body {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.65;
  max-height: 260px;
  overflow-y: auto;
  word-wrap: break-word;
}


/* ==========================================================================
   AVISO / MODAL DE SESIÓN CERRADA (SESIONES MÚLTIPLES)
   ========================================================================== */

@keyframes sgaFadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes sgaScaleUpModal {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sga-session-closed-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 9999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  animation: sgaFadeInModal 0.25s ease-out !important;
}

.sga-session-closed-card {
  background: #ffffff !important;
  border-radius: 18px !important;
  padding: 36px 30px !important;
  max-width: 440px !important;
  width: 100% !important;
  text-align: center !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  animation: sgaScaleUpModal 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.sga-session-closed-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fef2f2;
  border: 3px solid #fee2e2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 18px auto;
  box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.2);
}

.sga-session-closed-title {
  font-size: 21px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: -0.3px !important;
}

.sga-session-closed-msg {
  font-size: 14px !important;
  color: #64748b !important;
  line-height: 1.55 !important;
  margin: 0 0 22px 0 !important;
}

.sga-btn-login-redirect {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 13px 26px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4) !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sga-btn-login-redirect:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.5) !important;
  color: #ffffff !important;
}

.sga-session-countdown {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  color: #94a3b8;
}

/* Banner de Sesión Cerrada en Pantalla de Login */
.sga-sesion-cerrada-banner {
  max-width: 480px;
  margin: 20px auto 10px auto;
  padding: 16px 20px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  color: #9f1239;
  font-size: 13.5px;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-sizing: border-box;
}

.sga-sesion-cerrada-banner .sga-sesion-cerrada-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fee2e2;
  color: #e11d48;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.15);
}

.sga-sesion-cerrada-banner strong {
  font-size: 16px;
  color: #9f1239;
  display: block;
  margin-bottom: 4px;
}

.sga-sesion-cerrada-banner p {
  margin: 0;
  color: #881337;
  line-height: 1.45;
}

.sga-btn-sesion-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
  transition: all 0.2s ease;
}

.sga-btn-sesion-login:hover {
  background: linear-gradient(135deg, #be123c 0%, #9f1239 100%);
  transform: translateY(-1px);
  color: #ffffff !important;
}