.trip-in-progress {
  background-color: #fef9c3;
  color: #b45309;
}
/* Paleta y Base */
.admin-body {
  background-color: #53585c;
  margin: 0;
  min-height: 100vh;
  padding-top: 69px; /* evita que el header fijo tape el contenido */
}

/* Navbar */
.admin-nav {
  background: white;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 1px solid #ddd;
  padding-left: 20px;
}

.btn-salir {
  background: #0a091e;
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  border: none;
}

/* Contenedor y Títulos */
.admin-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}

.panel-title {
  color: #d84b74;
  font-weight: 800;
  font-size: 2rem;
  margin: 0;
  margin-bottom: 2rem;
}

/* Contenedor Principal de la Sección */
.admin-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Encabezado de la Sección */
.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-section h3 {
  color: var(--blue-color-1);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0;
  margin-bottom: 1rem;
}

/* Badge de Sistema Automático */
.badge-ai-system {
  background: #f3e8ff;
  color: #6f42c1;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grid de métricas */
.ia-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

/* Estilo Base de las Tarjetas IA */
.ia-card {
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ia-card strong {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: block;
}

.ia-card .metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

/* Variantes de Color exactas según capturas */
.ia-blue { 
  background-color: #f0f7ff; 
  color: #3b82f6; 
}

.ia-green { 
  background-color: #f0fff4; 
  color: #22c55e; 
}

.ia-yellow { 
  background-color: #fffdf0; 
  color: var(--yellow-color-2); 
}

.ia-purple { 
  background-color: #fcfaff; 
  color: #8b5cf6; 
}

/* Cards de Métricas Superiores */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 2rem;
}

.metric-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fdf2f5;
  color: #d84b74;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}

/* Tablas y Secciones Blancas */
.admin-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
}

/* Fondo para encabezados de tablas */
.admin-section table thead,
.trips-table thead {
  background-color: #f9fafb;
}

/* Borde inferior para encabezados de tablas */
.admin-section table thead th,
.trips-table thead th {
  border-bottom: 1px solid var(--blue-color-1);
}

th {
  text-align: left;
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

td {
  padding: 1.2rem 0;
  border-bottom: 1px solid #f9f9f9;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a091e;
}

/* Badges y Etiquetas */
.badge-status {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pendiente {
  background-color: #fff8e6;
  color: #d97706;
}

.status-aprobado {
  background-color: #f0fdf4;
  color: #16a34a;
}

.status-rechazado, .status-error {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Barras de confianza */
.confidence-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bg {
  width: 80px;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
}

/* Colores dinámicos de la barra según confianza */
.bar-high { background-color: #22c55e; }    /* Verde */
.bar-medium { background-color: #facc15; }  /* Amarillo */
.bar-low { background-color: #ef4444; }     /* Rojo */

.confidence-text {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Contenedor de la Tabla */
.admin-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

/* Encabezados de Columna */
.admin-section th {
  text-align: left;
  font-size: 0.75rem;
  color: var(--gray-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1.5rem;
  border-bottom: 2px solid #f4f5f7;
  font-weight: 600;
}

/* Celdas de la Tabla */
.admin-section td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--blue-color-1);
  font-size: 0.875rem;
  color: var(--gray-color);
  font-weight: 500;
  vertical-align: middle;
}

.admin-section td.name-cell {
  color: var(--blue-color-1);
  font-weight: 800;
}

/* Enlaces de Acción */
.action-revisar {
  color: #d84b74;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
}

.action-revisar:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.action-detalles {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
}

.action-detalles:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Sección de Gestión de Disputas */
.disputes-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  font-family: inherit;
}

.disputes-section h3 {
  color: #100e35;
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.dispute-card {
  border: 1px solid #e0e2e7;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.dispute-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.badge-dispute {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
}

.badge-abierta {
  background-color: #fef2f2;
  color: #b91c1c;
}

.badge-revision {
  background-color: #fffbeb;
  color: #b45309;
}

.dispute-date {
  color: #8a8da3;
  font-size: 0.9rem;
  font-weight: 600;
}

.dispute-title {
  color: #100e35;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.dispute-parties {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.dispute-parties strong {
  color: #4b5563;
}

.dispute-description {
  font-size: 0.95rem;
  color: #1f2937;
  line-height: 1.5;
  margin: 0;
}

.btn-resolver {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background-color: #d84b74;
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-resolver:hover {
  background-color: #be3e63;
}

/* Sección de Supervisar Viajes */
.trips-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.trips-section h3 {
  color: var(--blue-color-1);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0;
  margin-bottom: 1rem;
}

.trips-table {
  width: 100%;
  border-collapse: collapse;
}

.trips-table th {
  text-align: left;
  font-size: 0.75rem;
  color: var(--gray-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1.5rem;
  border-bottom: 2px solid #f4f5f7;
}

.trips-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f4f5f7;
  font-size: 0.875rem;
  color: var(--gray-color);
  font-weight: 500;
}

.route-text {
  font-weight: 800 !important;
  color: var(--blue-color-1) !important;
}

.badge-trip {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
}

.trip-available {
  background-color: #f0fdf4;
  color: #16a34a;
}

.trip-completed {
  background-color: #eff6ff;
  color: #2563eb;
}

.publisher-name {
  color: #4b5563;
}

.applicants-count {
  text-align: center;
  color: #100e35;
}

/* --- Overlay (Fondo oscuro) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  transition: all 0.3s ease;
}

/* --- Contenedor Principal --- */
.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 580px;
  max-width: 95vw;
  z-index: 1000;
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
}

/* --- Encabezado --- */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.modal-header h3 {
  margin: 0 !important;
  color: var(--primary-color) !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
}

.modal-close:hover {
  color: #d84b74;
}

/* --- Cuerpo del Modal --- */
.modal-body {
  padding: 0 1.5rem 1.5rem;
}

/* --- Secciones con Bordes --- */
.modal-bordered-section {
  border: 1px solid var(--blue-color-1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-color-1);
}

/* --- Grid de Información Personal --- */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Estilo: Etiqueta arriba, Valor abajo */
.info-group label {
  font-size: 0.875rem;
  color: var(--gray-color); /* Gris suave para la etiqueta */
}

.info-group span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-color-1); /* Azul oscuro para el valor */
}

/* --- Sección de Créditos (Inline) --- */
.inline-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.input-simple {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-simple:focus {
  border-color: #100e35;
}

/* Placeholder con fuente Poppins */
.input-simple::placeholder {
  font-family: 'Poppins', sans-serif;
}
.input-simple::-webkit-input-placeholder {
  font-family: 'Poppins', sans-serif;
}
.input-simple::-moz-placeholder {
  font-family: 'Poppins', sans-serif;
}
.input-simple:-ms-input-placeholder {
  font-family: 'Poppins', sans-serif;
}
.input-simple::-ms-input-placeholder {
  font-family: 'Poppins', sans-serif;
}

/* --- Footer y Botones --- */
.modal-actions-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* Botón Cargar/Agregar */
.btn-primary {
  background: #100e35;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

.btn-credits {
  background: #25d366;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

/* Botón Suspender */
.btn-danger {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

/* Botón Cancelar */
.btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border: none;
  padding: 8px 24px !important;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

.btn-primary:hover { }
.btn-danger:hover { background: #be3e62; }
.btn-cancel:hover { background: #e2e8f0; }

/* === Filtros de búsqueda === */
.admin-filter-form {
  margin-bottom: 1rem;
}

.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
}

.filter-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 200px;
  font-family: 'Poppins', sans-serif;
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 150px;
  font-family: 'Poppins', sans-serif;
  background: white;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.btn-filter {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

.btn-filter:hover {
  background: #be3e62;
}

.btn-clear {
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
}

.btn-clear:hover {
  background: #e2e8f0;
}

/* === Estados adicionales === */
.status-pending {
  background-color: #fff8e6;
  color: #d97706;
}

.status-approved {
  background-color: #f0fdf4;
  color: #16a34a;
}

.status-rejected {
  background-color: #fee2e2;
  color: #dc2626;
}

.status-published {
  background-color: #eff6ff;
  color: #2563eb;
}

/* === Totalizadores === */
.totals-bar {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.totals-bar .filter-active {
  color: var(--primary-color);
  font-weight: 600;
}

.totals-bar .totals-summary {
  color: #475569;
  font-weight: 600;
}