/* Panel de Administración - Estilos Extraídos */

/* Disable animations only during initial load to prevent flicker */
body.preload * {
  animation: none !important;
  animation-duration: 0s !important;
  transition: none !important;
}

/* Bootstrap Modal Helper Overrides */
.modal-backdrop {
  z-index: 1040;
}

.modal {
  z-index: 1050;
}

body.modal-open,
html.modal-open {
  overflow: hidden !important;
}

.modal-content {
  border-radius: 24px !important;
  border: none !important;
  overflow: hidden;
  /* Garantiza que el contenido interno respete el radio */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2) !important;
}

.modal-header {
  border-radius: 24px 24px 0 0 !important;
}




/* Admin Navbar Styles */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../../assets/fonts/plus-jakarta-sans.woff2') format('woff2');
}

html,
body {
  overflow-x: clip;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.admin-wrapper:not(.admin-wrapper--selector) {
  --admin-header-offset: 88px;
  padding-top: var(--admin-header-offset);
  padding-bottom: 40px;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.admin-header {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  gap: 20px;
  border-radius: 16px;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.admin-cover-thumb {
  width: 60px;
  height: 45px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #475569;
  font-size: 0.45rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  line-height: 1.2;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  flex-shrink: 0;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid #e2e8f0;
}

.admin-action-btn {
  padding: 9px 12px;
  white-space: nowrap;
}

button.admin-action-btn {
  font-family: inherit;
  cursor: pointer;
}

.nav-btn.secondary.admin-action-export {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.nav-btn.secondary.admin-action-export:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.nav-btn.secondary.admin-action-download {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.nav-btn.secondary.admin-action-download:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.nav-btn.secondary.admin-action-cv {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.nav-btn.secondary.admin-action-cv:hover {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}

.nav-btn.secondary.admin-action-config {
  background: #faf5ff;
  border-color: #c084fc;
  color: #7e22ce;
}

.nav-btn.secondary.admin-action-config:hover {
  background: #9333ea;
  border-color: #9333ea;
  color: #fff;
}

.nav-btn.secondary.admin-action-history {
  background: #ecfeff;
  border-color: #67e8f9;
  color: #0e7490;
}

.nav-btn.secondary.admin-action-history:hover {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}

.nav-btn.secondary.admin-action-users {
  background: #fdf2f8;
  border-color: #f9a8d4;
  color: #be185d;
}

.nav-btn.secondary.admin-action-users:hover {
  background: #db2777;
  border-color: #db2777;
  color: #fff;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.admin-header-left > .nav-btn,
.admin-header-right > .nav-btn,
.admin-header-right .admin-header-actions,
.admin-header-right .admin-dropdown {
  flex: 0 0 auto;
}

.nav-separator {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 4px;
  transition: opacity 0.2s;
}

/* Ocultar separadores adyacentes a la pestaña activa para un look más limpio */
.admin-tab.active+.nav-separator {
  opacity: 0;
}

.nav-separator:has(+ .admin-tab.active) {
  opacity: 0;
}

.view-switcher {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  width: 100%;
  margin-bottom: 16px;
}

.view-switcher-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  flex: 1;
}

.view-switcher-btn:hover {
  color: #1e293b;
}

.view-switcher-btn.active {
  background: #fff;
  color: #0D3243;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.view-switcher-btn i {
  font-size: 1.1rem;
}

.biblioteca-assignment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 6px;
}

.biblioteca-assignment-list::-webkit-scrollbar {
  width: 6px;
}

.biblioteca-assignment-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
}

.admin-tab:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.admin-tab.active {
  background: linear-gradient(135deg, #0D3243, #D2591F);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 98, 114, 0.25);
}

.admin-tab i {
  font-size: 1.1rem;
  display: none;
  /* Oculto por defecto en ventana grande */
}

.admin-mini-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Dropdown Styles */
.admin-dropdown {
  position: relative;
}

.admin-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-dropdown-toggle i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.admin-dropdown.open .admin-dropdown-toggle i {
  transform: rotate(180deg);
}

.admin-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 200;
}

.admin-dropdown.open .admin-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-dropdown-menu a,
.admin-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  text-decoration: none;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-dropdown-menu a:hover,
.admin-dropdown-menu button:hover {
  background: #f1f5f9;
}

.admin-dropdown-menu a i,
.admin-dropdown-menu button i {
  color: #0D3243;
  font-size: 1rem;
}

.admin-dropdown-menu hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 6px 0;
}

/* Toggle status button */
.btn-toggle-status {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.btn-toggle-status:hover {
  background: #f1f5f9;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .admin-wrapper:not(.admin-wrapper--selector) {
    --admin-header-offset: 80px;
  }

  .admin-header {
    padding: 10px 16px;
    gap: 10px;
  }

  .admin-tab span {
    display: none;
  }

  .admin-tab i {
    display: block;
    /* Se muestra solo en responsive */
  }

  .admin-tab {
    padding: 10px 14px;
  }

  .admin-dropdown-toggle span {
    display: none;
  }

  .admin-header-actions {
    padding-left: 10px;
  }

  .admin-action-btn {
    padding: 9px 10px;
  }

  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 600px) {
  .admin-wrapper:not(.admin-wrapper--selector) {
    --admin-header-offset: 130px;
  }

  .admin-header {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .admin-header-left {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .admin-header-left::-webkit-scrollbar {
    display: none;
  }

  .admin-header-right {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #edf2f7;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .admin-header-right::-webkit-scrollbar {
    display: none;
  }

  .admin-header-actions {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 700px) {
  .admin-action-btn span {
    display: none;
  }
}

@media (max-width: 420px) {
  .admin-wrapper:not(.admin-wrapper--selector) {
    --admin-header-offset: 140px;
  }
}

/* Watermark Background */
html {
  background-color: #fff;
}

body.admin-body {
  background-color: #fff;
}

body.admin-body::before {
  display: none;
}


/* Clickable table rows for solicitudes */
#solicitudesContainer tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#solicitudesContainer tr:hover {
  background-color: #f0f9fa;
}

/* Solicitudes Detail Modal */
.solicitud-modal-body {
  padding: 24px;
}

.solicitud-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.solicitud-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.solicitud-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #0D3243;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.solicitud-field {
  margin-bottom: 12px;
}

.solicitud-field-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.solicitud-field-value {
  font-size: 15px;
  color: #0f172a;
  word-break: break-word;
  line-height: 1.5;
}

.solicitud-field-value a {
  color: #0D3243;
  text-decoration: none;
}

.solicitud-field-value a:hover {
  text-decoration: underline;
}

.solicitud-message-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
}

.solicitud-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.solicitud-actions a {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.solicitud-actions .btn-email {
  background: #0D3243;
  color: #fff;
}

.solicitud-actions .btn-email:hover {
  background: #004e5b;
}

.solicitud-actions .btn-phone {
  background: #fff;
  border: 1px solid #0D3243;
  color: #0D3243;
}

.solicitud-actions .btn-phone:hover {
  background: #f0f9fa;
}

/* Rediseño del modal de detalle de solicitudes */
.solicitud-detail-dialog {
  width: min(820px, calc(100% - 24px));
  max-width: none;
}

.solicitud-detail-modal {
  max-height: min(86vh, 820px);
}

.solicitud-detail-header {
  background: linear-gradient(135deg, #0D3243 0%, #008b96 58%, #D2591F 100%);
  border-radius: 24px 24px 0 0 !important;
  padding: 18px 22px !important;
}

.solicitud-detail-heading {
  min-width: 0;
}

.solicitud-detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.solicitud-detail-header .btn-close {
  flex: 0 0 auto;
  margin-left: 18px;
  opacity: 0.9;
}

.solicitud-detail-body {
  padding: 22px !important;
  background: #f8fafc;
}

.solicitud-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.solicitud-detail-stack .solicitud-section {
  margin: 0;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
}

.solicitud-detail-stack .solicitud-section:last-child {
  margin-bottom: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.solicitud-detail-stack .solicitud-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #0f172a;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.solicitud-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.solicitud-field {
  min-width: 0;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #f8fafc;
}

.solicitud-field--wide {
  grid-column: 1 / -1;
}

.solicitud-field--action {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.solicitud-field-label {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  letter-spacing: 0.07em;
}

.solicitud-field-value {
  font-size: 14px;
  line-height: 1.45;
}

.solicitud-field-value a {
  overflow-wrap: anywhere;
}

.solicitud-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #15803d !important;
  font-weight: 700;
}

.solicitud-whatsapp-link:hover {
  color: #166534 !important;
  text-decoration: none !important;
}

.solicitud-message-section,
.solicitud-attachment-section {
  background: #fff;
}

.solicitud-message-box {
  max-height: 220px;
  margin: 0;
  overflow-y: auto;
}

.solicitud-attachment-section .main-btn {
  width: fit-content;
}

@media (max-width: 575.98px) {
  .solicitud-detail-dialog {
    width: calc(100% - 16px);
    margin: 8px auto;
  }

  .solicitud-detail-modal {
    max-height: calc(100vh - 16px);
  }

  .solicitud-detail-header,
  .solicitud-detail-body {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .solicitud-fields-grid {
    grid-template-columns: 1fr;
  }

  .solicitud-field--wide {
    grid-column: auto;
  }
}

/* Select styling */
.featured-select,
.filter-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #fff;
  font-size: 14px;
  color: #475569;
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
}

.featured-select:focus,
.filter-select:focus {
  border-color: #0D3243;
  box-shadow: 0 0 0 3px rgba(0, 98, 114, 0.1);
}

/* Chatbot Styles */
/* Chatbot Styles */
.admin-chat-msg {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.admin-chat-msg.user {
  align-items: flex-end;
}

.admin-chat-msg.bot {
  align-items: flex-start;
}

.admin-chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.admin-chat-bubble.user {
  background: linear-gradient(135deg, #0D3243 0%, #008b9e 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.admin-chat-bubble.bot {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-chat-bubble a {
  color: #0D3243 !important;
}

.admin-chat-bubble.user a {
  color: #a5f3fc !important;
}

.admin-chat-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  padding: 0 4px;
}

.admin-form-status {
  padding: 12px 16px;
  border-radius: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 85%;
  border: 1px dashed;
  font-size: 13px;
}

.admin-form-status.form_sent {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.admin-form-status.form_sent i {
  color: #10b981;
}

.admin-form-status.form_expired {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.admin-form-status.form_expired i {
  color: #f59e0b;
}

.admin-form-status.form {
  background: #f8fafc;
  color: #1d4ed8;
  border-color: #e2e8f0;
}

/* Registros Modal Styles */
/* Registros Modal Styles */
/* Note: registrosModal container styles handled by Bootstrap now */
#registrosModal.active {
  display: flex;
}

.registros-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.registros-table th {
  width: 25%;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 20px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.registros-table td {
  padding: 6px 20px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
  background: #fff;
  transition: background 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registros-table th.text-center,
.registros-table td.text-center {
  text-align: center;
}

.registros-table tbody tr {
  transition: all 0.15s;
}

.registros-table tbody tr:hover td {
  background: #f8fafc;
}

.registros-table tbody tr:hover {
  cursor: pointer;
}

.registros-table tr.hidden {
  display: none;
}

.badge-type {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-type-inscrip {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-type-contact {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-type-empleo {
  background: linear-gradient(135deg, #ffedd5, #fff7ed);
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.badge-type-alquiler {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.detail-row {
  display: flex;
  margin-bottom: 20px;
  gap: 16px;
}

.detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0D3243;
  font-size: 18px;
  flex-shrink: 0;
}

.detail-info {
  flex: 1;
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 15px;
  color: #1e293b;
  font-weight: 500;
}

.detail-message-box {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

input#registrosSearchInput:focus {
  border-color: #0D3243;
  box-shadow: 0 0 0 3px rgba(0, 98, 114, 0.1);
}

/* Estilos Modal Detalle con Animación Suave */
.registros-detail-modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11000;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow-y: auto;
}

.registros-detail-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.registros-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: -1;
}

.registros-detail-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 40px;
}

.registros-detail-modal.active .registros-detail-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Toast Notifications System */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }

  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.admin-toast.success {
  background: #059669;
}

.admin-toast.error {
  background: #dc2626;
}

.admin-toast.warning {
  background: #d97706;
}

.admin-toast i {
  font-size: 20px;
}

/* Permission Selection Grid */
.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.perm-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid #eef2f6;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.perm-card:hover {
  border-color: #dde4ee;
  background: #fbfcfe;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.perm-card input[type="checkbox"] {
  display: none;
}

.perm-card i {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #64748b;
  transition: all 0.25s ease;
}

.perm-card span {
  font-weight: 600;
  color: #475569;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

/* Active State */
.perm-card:has(input:checked) {
  border-color: #0D3243;
  background: #f0f9fa;
}

.perm-card:has(input:checked) i {
  background: #0D3243;
  color: #fff;
}

.perm-card:has(input:checked) span {
  color: #0D3243;
}

.perm-card:active {
  transform: scale(0.98);
}

/* Override Bootstrap Primary Button to match Brand Color */
.btn-primary {
  background-color: #0D3243 !important;
  border-color: #0D3243 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #004e5b !important;
  border-color: #004e5b !important;
}

/* Legacy generic header styles */
header:not(.admin-header) {
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  gap: 20px;
  border-radius: 16px;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.admin-wrapper:not(.admin-wrapper--selector) {
  padding-top: var(--admin-header-offset);
}

.admin-analytics {
  margin-top: 24px;
}

.admin-content--solicitudes > .admin-card,
.admin-content--usuarios > .admin-card,
.admin-content--configuracion > .admin-card,
.admin-content--chatbot {
  margin-top: 24px;
}

.admin-wrapper--editor > .row {
  --bs-gutter-x: 0;
  margin-top: 24px;
}

.admin-wrapper--editor form {
  margin: 0;
}

.admin-wrapper--editor form.px-4 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Status Picker Popup Styles */
.status-picker-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.status-picker-options {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: white;
  border-radius: 30px;
  padding: 6px 12px;
  display: flex;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

/* Invisible bridge to prevent hover loss */
.status-picker-options::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 12px;
}

.status-picker-wrapper:hover .status-picker-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(8px);
}

/* Ensure conversation items don't clip the picker */
.conversation-item-modern {
  overflow: visible !important;
}

/* Chatbot: horizontal status picker (to the right) */
.conversation-item-modern .status-picker-options {
  top: 50%;
  left: 100%;
  transform: translateY(-50%) translateX(4px);
  flex-direction: row;
}

.conversation-item-modern .status-picker-options::before {
  top: 0;
  left: -12px;
  width: 12px;
  height: 100%;
}

.conversation-item-modern .status-picker-wrapper:hover .status-picker-options {
  transform: translateY(-50%) translateX(8px);
}

.status-dot-option {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}

.status-dot-option:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.text-primary-dark {
  color: #0D3243 !important;
}

/* User Selector Modal Grid (Biblioteca) */
.user-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.user-selector-grid::-webkit-scrollbar {
  width: 6px;
}

.user-selector-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.user-selector-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.user-select-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid #eef2f6;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}



.user-select-card.active {
  border-color: #0D3243;
  background: #f0f9fa;
  box-shadow: 0 4px 12px rgba(0, 98, 114, 0.15);
}

.user-select-card i {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #64748b;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.user-select-card.active i {
  background: #0D3243;
  color: #fff;
}

.user-select-card[data-user-id="public"].active i {
  background: #198754;
  color: #fff;
}

.user-select-card span {
  font-weight: 600;
  color: #475569;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-select-card.active span {
  color: #0D3243;
}

.user-select-card[data-user-id="public"].active span {
  color: #198754;
}

/* User selector button in tables/forms */
.user-selector-wrapper button.user-select-btn {
  transition: all 0.2s ease;
  border-radius: 8px;
}

.user-selector-wrapper button.user-select-btn:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.user-selector-wrapper button.user-select-btn.btn-primary:hover {
  background-color: #004e5b !important;
  border-color: #004e5b !important;
}

/* ============================================
   FILTER DROPDOWN (Shared hover dropdown style)
   ============================================ */
.filter-toggle-btn {
  width: 100%;
  min-width: 150px;
  max-width: 180px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.filter-toggle-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.filter-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
}

.filter-toggle-btn:hover .filter-dropdown {
  opacity: 1;
  visibility: visible;
}

.filter-dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  transition: background 0.15s ease;
}

.filter-dropdown-item:hover {
  background: #f1f5f9;
}

.filter-dropdown-item.active {
  background: #e0f2fe;
  color: #0D3243;
  font-weight: 600;
}

.filter-dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.filter-dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.filter-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
}

/* ============================================
   UNIFIED ACTION BUTTONS (Edit / Delete)
   Reset browser defaults so <a> and <button>
   render identically across all admin modules.
   ============================================ */
.action-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

a.btn-icon,
button.btn-icon,
.btn-icon {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

a.btn-icon:hover,
button.btn-icon:hover,
.btn-icon:hover {
  background: #D2591F;
  color: #fff;
  border-color: #D2591F;
  box-shadow: 0 4px 10px rgba(0, 176, 185, 0.25);
}

a.btn-icon:focus-visible,
button.btn-icon:focus-visible,
.btn-icon:focus-visible {
  outline: 2px solid #D2591F;
  outline-offset: 2px;
}

a.btn-icon.delete,
button.btn-icon.delete,
.btn-icon.delete {
  color: #ef4444;
  background: #fff;
  border-color: #fecaca;
}

a.btn-icon.delete:hover,
button.btn-icon.delete:hover,
.btn-icon.delete:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
}

a.btn-icon.delete:focus-visible,
button.btn-icon.delete:focus-visible,
.btn-icon.delete:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

.btn-icon i {
  font-size: 16px;
  line-height: 1;
}

/* ============================================
   SAVE BUTTON - Editor header & FAB
   ============================================ */
.editor-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.editor-sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
}

.editor-sidebar-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
  font-weight: 700;
  font-size: 0.85rem;
  color: #0D3243;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

.editor-sidebar-title i {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.editor-sidebar-title span {
  flex: 1;
  min-width: 0;
}

.editor-public-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  margin: 0 0 12px;
  background: #ecfeff;
  color: #0D3243;
  border: 1px solid #a5f3fc;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.editor-public-link:hover {
  background: #cffafe;
  color: #004e5b;
  border-color: #67e8f9;
  transform: translateY(-1px);
}

.editor-public-link i {
  font-size: 16px;
}

.editor-sidebar .editor-sticky-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
}

.editor-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.editor-section > .form-section {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.editor-section h4,
.editor-section .form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px !important;
  color: #0D3243 !important;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.editor-layout .editor-sticky-nav .nav-tab-btn {
  width: 100%;
  justify-content: flex-start;
}

.nav-tab-btn {
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 8px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  width: 100%;
}

.editor-layout .editor-sticky-nav .nav-tab-btn {
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 0;
}

.nav-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-tab-btn.active {
  background: #ecfeff;
  color: #0D3243;
  border: 1px solid #bde6eb;
}

.editor-layout .editor-sticky-nav .nav-tab-btn.active {
  border-left: 0;
}

.editor-layout .editor-sticky-nav .nav-tab-btn.has-unsaved-changes::after {
  content: 'Pendiente';
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
}

.editor-layout .editor-sticky-nav .nav-tab-btn.has-unsaved-changes.active::after {
  background: rgba(255, 255, 255, 0.9);
  color: #0D3243;
}

.editor-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
}

.d-none {
  display: none !important;
}

@media (max-width: 768px) {
  .editor-layout {
    flex-direction: column;
  }

  .editor-sidebar {
    flex: none;
    position: static;
    width: 100%;
    max-height: none;
    overflow-y: visible;
  }

  .editor-sidebar .editor-sticky-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
  }
}

.nav-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #0D3243;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 98, 114, 0.25);
}

.nav-btn-save:hover {
  background: #004e5b;
  box-shadow: 0 4px 12px rgba(0, 98, 114, 0.35);
  transform: translateY(-1px);
}

.nav-btn-save:active {
  transform: translateY(0);
}

.nav-btn-save i {
  font-size: 16px;
}

/* Floating Action Button - Save */
.fab-save {
  position: fixed;
  top: 100px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: #0D3243;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 98, 114, 0.4);
  z-index: 999;
}

.fab-save:hover {
  background: #004e5b;
  box-shadow: 0 8px 28px rgba(0, 98, 114, 0.5);
  transform: translateY(-2px) scale(1.02);
}

.fab-save:active {
  transform: translateY(0) scale(0.98);
}

.fab-save i {
  font-size: 18px;
}

/* Sidebar Save Button */
.sidebar-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  margin-top: 10px;
  background: #0D3243;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 98, 114, 0.25);
}

.editor-sticky-nav .sidebar-save-btn {
  border-top: 1px solid rgba(0, 98, 114, 0.12);
  margin-top: 12px;
}

.sidebar-save-btn:hover {
  background: #004e5b;
  box-shadow: 0 4px 12px rgba(0, 98, 114, 0.35);
  transform: translateY(-1px);
}

.sidebar-save-btn:active {
  transform: translateY(0);
}

.sidebar-save-btn i {
  font-size: 16px;
}

@media (max-width: 768px) {
  .nav-btn-save span {
    display: none;
  }
  
  .nav-btn-save {
    padding: 8px 12px;
  }
  
  .fab-save {
    top: 90px;
    right: 16px;
    padding: 12px 20px;
    font-size: 14px;
  }
}
