/* ============================================================================
   SECTORES PROFESIONALES - LISTA, DETALLE Y FORMULARIO MEJORADOS
   ============================================================================
   
   IMPORTANTE: Agregar al final de modulos.css
   
   Estos estilos complementan y MEJORAN los existentes para sectores:
   - Lista de sectores: .grupo-categoria, .tarjeta-sector (mejorados)
   - Vista detalle: .contenedor-detalle-moderno (nuevo)
   - Formulario: .contenedor-formulario-moderno (nuevo)
   
============================================================================ */

/* ============================================================================
   LISTA DE SECTORES - DISEÑO MEJORADO
============================================================================ */

.lista-sectores {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 1rem 0;
}

/* Grupo de categoría */
.grupo-categoria {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.titulo-categoria {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  border-left: 6px solid #0ea5e9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.contador-categoria {
  background: #0ea5e9;
  color: white;
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
}

/* Grid de sectores mejorado */
.grid-sectores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* Tarjeta sector mejorada */
.tarjeta-sector {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.tarjeta-sector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9 0%, #06b6d4 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tarjeta-sector:hover {
  border-color: #0ea5e9;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.15);
  transform: translateY(-6px);
}

.tarjeta-sector:hover::before {
  opacity: 1;
}

.tarjeta-sector.inactivo {
  opacity: 0.55;
  border-color: #cbd5e0;
  background: #f8fafc;
}

.tarjeta-sector.inactivo:hover {
  border-color: #94a3b8;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.cabecera-tarjeta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.nombre-sector {
  flex: 1;
  min-width: 0;
}

.nombre-sector h4 {
  margin: 0 0 0.625rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.categoria-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #7dd3fc;
}

.estado-sector {
  flex-shrink: 0;
}

.badge.badge-success {
  background: #dcfce7;
  color: #16a34a;
  padding: 0.375rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #86efac;
}

.badge.badge-danger {
  background: #fee2e2;
  color: #dc2626;
  padding: 0.375rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #fca5a5;
}

.descripcion-sector {
  color: #64748b;
  font-size: 0.925rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.descripcion-sector p {
  margin: 0;
}

.acciones-tarjeta {
  display: flex;
  gap: 0.625rem;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.btn-icono {
  width: 40px;
  height: 40px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: all 0.2s ease;
  color: #64748b;
}

.btn-icono:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-editar:hover {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #3b82f6;
}

.btn-desactivar:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #ef4444;
}

.btn-activar {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
  font-weight: bold;
}

.btn-activar:hover {
  background: #bbf7d0;
  border-color: #22c55e;
}

/* Estados de carga */
.cargando-sectores {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
  font-size: 1.125rem;
}

.cargando-sectores i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #0ea5e9;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sin-sectores {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

.sin-sectores i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: #cbd5e0;
}

.sin-sectores h3 {
  margin: 0 0 0.75rem 0;
  color: #475569;
  font-size: 1.5rem;
}

.sin-sectores p {
  margin: 0;
  color: #94a3b8;
  font-size: 1rem;
}

/* ============================================================================
   VISTA DETALLE DE SECTOR - DISEÑO MODERNO
============================================================================ */

.contenedor-detalle-moderno {
  background: #f8f9fa;
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* Header con gradiente */
.header-detalle-gradiente {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.contenedor-acciones-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.btn-volver-moderno {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-volver-moderno:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-4px);
}

.acciones-rapidas {
  display: flex;
  gap: 1rem;
}

.btn-accion-moderno {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-accion-moderno:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-accion-moderno.btn-editar:hover {
  background: #4CAF50;
  border-color: #4CAF50;
}

.btn-accion-moderno.btn-desactivar:hover {
  background: #f44336;
  border-color: #f44336;
}

.btn-accion-moderno.btn-activar:hover {
  background: #2196F3;
  border-color: #2196F3;
}

/* Título del sector */
.titulo-sector-detalle {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.icono-sector-grande {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  backdrop-filter: blur(10px);
}

.info-titulo h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.metadata-sector {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.badge-estado-grande {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-estado-grande.activo {
  background: rgba(76, 175, 80, 0.3);
  border: 2px solid rgba(76, 175, 80, 0.5);
}

.badge-estado-grande.inactivo {
  background: rgba(244, 67, 54, 0.3);
  border: 2px solid rgba(244, 67, 54, 0.5);
}

.categoria-grande {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Contenido principal */
.contenido-detalle-moderno {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid-detalle-moderno {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

/* Tarjetas de información */
.tarjeta-info-principal,
.tarjeta-descripcion-completa,
.tarjeta-info-tecnica,
.tarjeta-estadisticas-uso {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.tarjeta-info-principal:hover,
.tarjeta-descripcion-completa:hover,
.tarjeta-info-tecnica:hover,
.tarjeta-estadisticas-uso:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.cabecera-tarjeta-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.cabecera-tarjeta-info i {
  font-size: 1.5rem;
  color: #667eea;
}

.cabecera-tarjeta-info h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.contenido-tarjeta-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.campo-info-moderno {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.campo-info-moderno label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.campo-info-moderno label i {
  color: #667eea;
  font-size: 1rem;
}

.valor-info {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.valor-info span {
  color: #333;
  font-weight: 500;
}

.categoria-badge-detalle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}

.estado-badge {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.estado-badge.activo {
  background: #e8f5e9;
  color: #2e7d32;
}

.estado-badge.inactivo {
  background: #ffebee;
  color: #c62828;
}

/* Descripción */
.tarjeta-descripcion-completa {
  grid-column: 1 / -1;
}

.contenido-descripcion {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.contenido-descripcion p {
  margin: 0;
  line-height: 1.8;
  color: #555;
  font-size: 1rem;
}

/* Código UUID */
.codigo-uuid {
  background: #2d2d2d;
  color: #4CAF50;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copiar-id {
  background: #667eea;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-copiar-id:hover {
  background: #764ba2;
  transform: scale(1.05);
}

/* Estadísticas de uso */
.contenido-stats-uso {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: #e8eaf6;
  transform: translateX(4px);
}

.stat-icono {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.stat-valor {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
}

.stat-descripcion {
  font-size: 0.8rem;
  color: #666;
}

.nota-proximamente {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #856404;
}

.nota-proximamente i {
  font-size: 1.2rem;
}

/* Footer */
.footer-detalle-moderno {
  max-width: 1400px;
  margin: 2rem auto 0;
  padding: 0 2rem;
}

.info-footer {
  background: white;
  border-left: 4px solid #667eea;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-footer i {
  color: #667eea;
  font-size: 1.5rem;
}

.info-footer span {
  color: #666;
  font-size: 0.95rem;
}

/* ============================================================================
   FORMULARIO DE SECTOR - DISEÑO MODERNO
============================================================================ */

.contenedor-formulario-moderno {
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header del formulario */
.header-formulario-gradiente {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.titulo-formulario {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.icono-formulario {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  backdrop-filter: blur(10px);
}

.titulo-formulario h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.subtitulo-formulario {
  margin: 0.5rem 0 0;
  opacity: 0.9;
  font-size: 1rem;
}

.btn-cerrar-formulario {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 10px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cerrar-formulario:hover {
  background: rgba(244, 67, 54, 0.3);
  border-color: #f44336;
  transform: rotate(90deg);
}

.btn-cerrar-formulario:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-menu-auxiliar {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(102, 126, 234, 0.1);
  border: none;
  border-left: 3px solid #667eea;
  color: #667eea;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.btn-menu-auxiliar:hover {
  background: rgba(102, 126, 234, 0.2);
  border-left-width: 5px;
  transform: translateX(4px);
}

.btn-menu-auxiliar.activo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-left-color: white;
}

/* Formulario */
.form-sector-moderno {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.contenido-formulario-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

/* Secciones del formulario */
.seccion-formulario {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cabecera-seccion {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.cabecera-seccion i {
  font-size: 1.5rem;
  color: #667eea;
}

.cabecera-seccion h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.badge-obligatorio {
  background: #ffebee;
  color: #c62828;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-opcional {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Grid de campos */
.grid-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.campo-formulario-moderno {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.campo-formulario-moderno.campo-completo {
  grid-column: 1 / -1;
}

.label-moderno {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.label-moderno i {
  color: #667eea;
  font-size: 1rem;
}

.label-moderno.obligatorio::after {
  content: '*';
  color: #f44336;
  margin-left: 0.25rem;
  font-size: 1.2rem;
}

/* Inputs */
.input-moderno,
.textarea-moderno {
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.input-moderno:focus,
.textarea-moderno:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-moderno.input-error,
.textarea-moderno.input-error {
  border-color: #f44336;
}

.input-moderno.input-error:focus,
.textarea-moderno.input-error:focus {
  box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.1);
}

/* Select personalizado */
.select-wrapper-moderno {
  position: relative;
}

.select-moderno {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 3rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  appearance: none;
  background: white;
  color: #2c3e50;
  cursor: pointer;
  background-color: white;
}

.select-moderno:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.select-icono {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #667eea;
  pointer-events: none;
}

/* Mensajes de error */
.mensaje-error-moderno {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f44336;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Ayuda de campo */
.ayuda-campo-moderno {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
}

.ayuda-campo-moderno i {
  color: #ffc107;
}

/* Contador de caracteres */
.contador-caracteres {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  font-size: 0.85rem;
  color: #666;
  margin-top: -0.25rem;
}

/* Preview */
.seccion-preview {
  background: linear-gradient(135deg, #f8f9fa 0%, #e8eaf6 100%);
  border: 2px dashed #667eea;
}

.preview-tarjeta-sector {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.preview-nombre h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: #333;
}

.preview-categoria {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.preview-badge {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.preview-descripcion {
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.preview-descripcion p {
  margin: 0;
  color: #666;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Footer del formulario */
.footer-formulario-moderno {
  background: white;
  border-top: 2px solid #f0f0f0;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
}

.info-guardado {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #666;
  font-size: 0.9rem;
}

.info-guardado i {
  color: #4CAF50;
  font-size: 1.2rem;
}

.botones-accion-formulario {
  display: flex;
  gap: 1rem;
}

.btn-secundario-moderno,
.btn-primario-moderno {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
}

.btn-secundario-moderno {
  background: #f5f5f5;
  color: #666;
}

.btn-secundario-moderno:hover:not(:disabled) {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primario-moderno {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primario-moderno:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secundario-moderno:disabled,
.btn-primario-moderno:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================================
   RESPONSIVE - SECTORES DETALLE Y FORMULARIO
============================================================================ */

@media (max-width: 768px) {
  .header-detalle-gradiente,
  .header-formulario-gradiente {
    padding: 1rem;
  }

  .contenedor-acciones-header {
    flex-direction: column;
    gap: 1rem;
  }

  .acciones-rapidas,
  .botones-accion-formulario {
    flex-direction: column;
    width: 100%;
  }

  .btn-accion-moderno,
  .btn-secundario-moderno,
  .btn-primario-moderno {
    width: 100%;
    justify-content: center;
  }

  .grid-detalle-moderno {
    grid-template-columns: 1fr;
  }

  .titulo-sector-detalle,
  .titulo-formulario {
    flex-direction: column;
    text-align: center;
  }

  .info-titulo h1,
  .titulo-formulario h2 {
    font-size: 1.75rem;
  }

  .footer-formulario-moderno {
    flex-direction: column;
    gap: 1rem;
  }

  .info-guardado {
    text-align: center;
  }
}

/* ============================================================================
   CABECERA MÓDULO - ESTILO LIMPIO Y MODERNO
============================================================================ */

.cabecera-modulo-limpia {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.titulo-principal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.contador-registros {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0369a1;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  border: 2px solid #7dd3fc;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.controles-principales {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.input-busqueda-moderno:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.btn-icono-moderno:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-nuevo-moderno:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.btn-volver:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
  transform: translateX(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .cabecera-modulo-limpia {
    padding: 1rem;
  }
  
  .controles-principales {
    flex-direction: column;
    align-items: stretch;
  }
  
  .campo-busqueda {
    width: 100%;
  }
  
  .botones-accion {
    flex-direction: column;
    width: 100%;
  }
  
  .botones-accion button {
    width: 100%;
    justify-content: center;
  }
}