/* ===================================================
   GEX Platform - Estilos Personalizados para Páginas
   ================================================== */



/* === VARIABLES CSS - PALETA CORPORATIVA PROFESIONAL === */
:root {
    /* === PALETA BANCARIA COHERENTE === */
    
    /* Color Principal - Azul Marino (coincide con sidebar) */
    --primary-color: #1e3a8a;
    --primary-hover: #1e40af;
    --primary-light: #dbeafe;
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    
    /* Color Secundario - Gris Profesional */
    --secondary-color: #475569;
    --secondary-hover: #334155;
    --secondary-light: #f1f5f9;
    --secondary-gradient: linear-gradient(135deg, #475569 0%, #334155 100%);
    
    /* Color de Éxito - Verde Institucional (solo para estados positivos) */
    --success-color: #059669;
    --success-hover: #047857;
    --success-light: #d1fae5;
    --success-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    
    /* Color de Advertencia - Gris Azulado (en lugar de naranja) */
    --warning-color: #64748b;
    --warning-hover: #475569;
    --warning-light: #f1f5f9;
    --warning-gradient: linear-gradient(135deg, #64748b 0%, #475569 100%);
    
    /* Color de Peligro - Rojo de Alerta (solo para alertas críticas) */
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --danger-light: #fee2e2;
    --danger-gradient: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    
    /* Color de Información - Azul Claro (coherente con la paleta) */
    --info-color: #2563eb;
    --info-hover: #1d4ed8;
    --info-light: #dbeafe;
    --info-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    
    /* Colores Sector Bancario - Alternativas Profesionales */
    --banking-primary: #1e293b;
    --banking-secondary: #334155;
    --banking-accent: #475569;
    --banking-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --banking-gradient-alt: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --banking-gradient-blue: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    --banking-gradient-navy: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
    
    /* Colores Neutros - Base Empresarial */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --border-dark: #d1d5db;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-light: #d1d5db;
    
    /* Sombras Empresariales */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    
    /* Bordes Redondeados */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transiciones Suaves */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* === CLASES DE COLORES EMPRESARIALES === */
/* Botones con Gradientes Empresariales */
.btn-primary-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white;
    transition: all var(--transition-normal);
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success-gradient {
    background: var(--success-gradient);
    border: none;
    color: white;
    transition: all var(--transition-normal);
}

.btn-success-gradient:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-warning-gradient {
    background: var(--warning-gradient);
    border: none;
    color: white;
    transition: all var(--transition-normal);
}

.btn-warning-gradient:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger-gradient {
    background: var(--danger-gradient);
    border: none;
    color: white;
    transition: all var(--transition-normal);
}

.btn-danger-gradient:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-info-gradient {
    background: var(--info-gradient);
    border: none;
    color: white;
    transition: all var(--transition-normal);
}

.btn-info-gradient:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Badges con Gradientes Empresariales */
.badge-primary-gradient {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.badge-success-gradient {
    background: var(--success-gradient);
    color: white;
    border: none;
}

.badge-warning-gradient {
    background: var(--warning-gradient);
    color: white;
    border: none;
}

.badge-danger-gradient {
    background: var(--danger-gradient);
    color: white;
    border: none;
}

.badge-info-gradient {
    background: var(--info-gradient);
    color: white;
    border: none;
}

/* Cards con Gradientes Empresariales */
.card-primary-gradient {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.card-success-gradient {
    background: var(--success-gradient);
    color: white;
    border: none;
}

.card-warning-gradient {
    background: var(--warning-gradient);
    color: white;
    border: none;
}

.card-danger-gradient {
    background: var(--danger-gradient);
    color: white;
    border: none;
}

.card-info-gradient {
    background: var(--info-gradient);
    color: white;
    border: none;
}

/* Alertas con Gradientes Empresariales */
.alert-primary-gradient {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.alert-success-gradient {
    background: var(--success-gradient);
    color: white;
    border: none;
}

.alert-warning-gradient {
    background: var(--warning-gradient);
    color: white;
    border: none;
}

.alert-danger-gradient {
    background: var(--danger-gradient);
    color: white;
    border: none;
}

.alert-info-gradient {
    background: var(--info-gradient);
    color: white;
    border: none;
}

/* Progress Bars con Gradientes Empresariales */
.progress-bar-primary-gradient {
    background: var(--primary-gradient);
}

.progress-bar-success-gradient {
    background: var(--success-gradient);
}

.progress-bar-warning-gradient {
    background: var(--warning-gradient);
}

.progress-bar-danger-gradient {
    background: var(--danger-gradient);
}

.progress-bar-info-gradient {
    background: var(--info-gradient);
}

/* Backgrounds con Gradientes Empresariales */
.bg-primary-gradient {
    background: var(--primary-gradient);
}

.bg-success-gradient {
    background: var(--success-gradient);
}

.bg-warning-gradient {
    background: var(--warning-gradient);
}

.bg-danger-gradient {
    background: var(--danger-gradient);
}

.bg-info-gradient {
    background: var(--info-gradient);
}

.bg-secondary-gradient {
    background: var(--secondary-gradient);
}

/* Text Colors Empresariales */
.text-primary-soft {
    color: var(--primary-color);
}

.text-success-soft {
    color: var(--success-color);
}

.text-warning-soft {
    color: var(--warning-color);
}

.text-danger-soft {
    color: var(--danger-color);
}

.text-info-soft {
    color: var(--info-color);
}

/* Border Colors Empresariales */
.border-primary-soft {
    border-color: var(--primary-color);
}

.border-success-soft {
    border-color: var(--success-color);
}

.border-warning-soft {
    border-color: var(--warning-color);
}

.border-danger-soft {
    border-color: var(--danger-color);
}

.border-info-soft {
    border-color: var(--info-color);
}

/* === GRADIENTES PARA SECTOR BANCARIO === */
/* Opción 1: Grises Profesionales (Recomendado) */
.sidebar-banking-professional {
    background: var(--banking-gradient) !important;
}

/* Opción 2: Azul Corporativo Bancario */
.sidebar-banking-blue {
    background: var(--banking-gradient-blue) !important;
}

/* Opción 3: Azul Marino Corporativo */
.sidebar-banking-navy {
    background: var(--banking-gradient-navy) !important;
}

/* Opción 4: Grises Oscuros (Máxima Seriedad) */
.sidebar-banking-dark {
    background: var(--banking-gradient-alt) !important;
}

/* Bootstrap 5 Sidebar Styles - Sector Bancario */
#sidebarNav {
    width: 280px;
    transition: width 0.3s ease;
    background: #1e3a8a !important;
}

#sidebarNav.collapsed {
    width: 70px;
    background: #1e3a8a !important;
}

#sidebarNav.collapsed span:not(.badge) {
    display: none;
}

#sidebarNav.collapsed .input-group {
    display: none;
}

#sidebarNav.collapsed .nav-link {
    justify-content: center;
    padding: 0.5rem;
}

#sidebarNav.collapsed .nav-link i {
    margin-right: 0;
}

/* Main Content Styles usando Bootstrap 5 */
#mainContent {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    width: calc(100% - 280px);
}

#mainContent.sidebar-collapsed {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* Responsive adjustments usando Bootstrap 5 breakpoints */
@media (max-width: 991.98px) {
    #mainContent {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    #mainContent.sidebar-collapsed {
        margin-left: 0 !important;
        width: 100% !important;
    }
}


/* === RESET Y BASE === */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* === CONTENEDOR PRINCIPAL === */
.container {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* === STEP 3: DOCUMENT UPLOAD STYLES === */
.drag-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drag-drop-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.drag-drop-area.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
    transform: scale(1.02);
}

.document-card {
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
}

.document-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.file-preview {
    max-height: 400px;
    overflow-y: auto;
}

.file-preview::-webkit-scrollbar {
    width: 6px;
}

.file-preview::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.file-preview::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

.file-preview::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===================================================
   WIZARD - ESTILOS PARA EL ASISTENTE DE EXPEDIENTES
   ================================================== */

/* === INDICADORES DE PASO === */
.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: white;
    font-size: 20px;
    transition: var(--transition-normal);
}

.step-icon.bg-light {
    color: #6c757d;
    background-color: #f8f9fa !important;
}

.step-icon.bg-primary {
    background-color: var(--primary-color) !important;
}

/* === ÁREA DE ARRASTRAR Y SOLTAR === */
.drag-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
    background-color: #fafbfc;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drag-drop-area:hover,
.drag-drop-area.dragover {
    border-color: var(--primary-color);
    background-color: #f0f9ff;
    transform: translateY(-2px);
}

.drag-drop-area .drag-drop-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.drag-drop-area .drag-drop-subtext {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.drag-drop-area i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* === VISTA PREVIA DE ARCHIVOS === */
.file-preview {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fafbfc;
}

.file-preview:empty::before {
    content: "No hay archivos seleccionados";
    color: var(--text-muted);
    font-style: italic;
    display: block;
    text-align: center;
    padding: 2rem;
}

/* === TARJETAS DE DOCUMENTOS === */
.document-card {
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.document-card .card-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
}

.document-card .card-body {
    padding: 1rem;
}

/* === SECCIONES CONDICIONALES === */
.wizard-section {
    transition: var(--transition-normal);
    opacity: 1;
}

.wizard-section[style*="display: none"] {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* === BOTONES DE BÚSQUEDA === */
.search-button {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
    transition: var(--transition-fast);
}

.search-button:hover {
    background-color: #0e7490;
    border-color: #0e7490;
    transform: translateY(-1px);
}

/* === RESULTADOS DE BÚSQUEDA === */
.search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: white;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-result-item:hover {
    background-color: var(--bg-secondary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item.selected {
    background-color: #dbeafe;
    border-left: 4px solid var(--primary-color);
}

/* === TARJETAS DE RESUMEN === */
.summary-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: white;
    transition: var(--transition-normal);
}

.summary-card:hover {
    box-shadow: var(--shadow-md);
}

.summary-card .summary-header {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.summary-card .summary-body {
    padding: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.summary-value {
    color: var(--text-primary);
    text-align: right;
}

/* === PROGRESS BAR PERSONALIZADA === */
.wizard-progress {
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.wizard-progress .progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, #3b82f6 100%);
    transition: width var(--transition-normal);
}

/* === PROTECCIÓN ESPECÍFICA PARA BOTONES DEL WIZARD === */
/* Asegurar que los botones del wizard siempre sean clickeables */
.wizard-progress,
.step-icon,
.wizard-radio label,
.wizard-radio input[type="radio"] {
    pointer-events: auto !important;
    user-select: auto !important;
    cursor: pointer !important;
}

/* Protección especial para botones de navegación del wizard */
.wizard-navigation .btn,
.wizard-navigation button[type="submit"],
.wizard-navigation button[type="button"] {
    pointer-events: auto !important;
    user-select: auto !important;
    cursor: pointer !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Asegurar que TODOS los botones submit muestren cursor pointer */
button[type="submit"]:not(:disabled),
input[type="submit"]:not(:disabled) {
    cursor: pointer !important;
}

/* Asegurar que los botones de "Continuar" y "Siguiente" siempre funcionen */
button[name="action"][value="next"],
button[name="action"][value="previous"],
button[name="action"][value="finish"],
button[onclick*="forceContinueToStep4"],
button[onclick*="proceedToStep4"] {
    pointer-events: auto !important;
    user-select: auto !important;
    cursor: pointer !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Regla específica para botones submit del wizard - máxima prioridad */
.wizard-navigation button[type="submit"],
.wizard-navigation button[type="submit"].btn,
.wizard-navigation button[type="submit"].btn-primary,
.wizard-navigation button[type="submit"].btn-success,
.wizard-navigation button[type="submit"].btn-outline-secondary {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Regla global para todos los botones submit con clases de Bootstrap */
button[type="submit"].btn,
button[type="submit"].btn-primary,
button[type="submit"].btn-success,
button[type="submit"].btn-outline-secondary,
button[type="submit"].btn-outline-primary {
    cursor: pointer !important;
}

/* === NOTIFICACIONES TOAST === */
.wizard-toast {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    min-width: 300px;
    max-width: 500px;
}

/* Contenedor de toasts en la parte superior - no debe interferir con botones */
.position-fixed[style*="z-index: 9999"] {
    pointer-events: none !important;
}

.position-fixed[style*="z-index: 9999"] .toast {
    pointer-events: auto !important;
}

/* === RADIO BUTTONS PERSONALIZADOS === */
.wizard-radio {
    position: relative;
    margin-bottom: 1rem;
}

.wizard-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.wizard-radio label {
    display: block;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    background-color: white;
}

.wizard-radio input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background-color: #f0f9ff;
}

.wizard-radio label:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.wizard-radio .radio-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.wizard-radio .radio-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* === ESTILOS PARA CHECKLIST === */
.checklist-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
    background: white;
}

.checklist-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.item-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
}

.check-status {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-secondary);
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-stats {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
}

.verify-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.verify-btn i {
    font-size: 0.875rem;
}

.verify-btn:not(.btn-icon-only) {
    padding: 0.5rem 0.75rem;
    min-width: auto;
}

.verify-btn:not(.btn-icon-only) i {
    margin-right: 0.375rem;
}

.btn-icon-only {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
}

/* === TÍTULOS === */
h1 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 4rem;
    height: 0.25rem;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: var(--radius-sm);
}

h4 {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* === SEPARADOR === */
hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 1.5rem 0;
}

/* === BOTONES === */
button,
button[type="button"],
button[type="submit"],
input[type="button"],
input[type="submit"],
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1;
    border-radius: var(--radius-md);
    border: none;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer !important;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1; /* Asegurar que el botón esté por encima del pseudo-elemento */
}

/* Asegurar que el contenido del botón (texto e iconos) tenga z-index */
.btn > *,
button > * {
    position: relative;
    z-index: 2;
    /* NO usar pointer-events: none aquí, puede causar problemas con el cursor */
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-normal);
    pointer-events: none; /* No bloquear eventos del cursor */
    z-index: 0;
}

.btn:hover::before {
    left: 100%;
}

/* Botón "Create New" compacto */
a[href$="/Create"],
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white !important;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-decoration: none !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Solo agregar icono fa-plus a botones específicos, no a todos los .btn-primary */
a[href$="/Create"]::before {
    content: "\f067";  /* fa-plus */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    pointer-events: none; /* No bloquear eventos del cursor */
}

/* Los botones .btn-primary normales NO deben tener el icono fa-plus */
.btn-primary::before {
    /* Solo el efecto de brillo, no icono */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-normal);
    pointer-events: none;
    z-index: 0;
}

.btn-primary:hover::before {
    left: 100%;
}

a[href$="/Create"]:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-hover), #1e40af);
}




/* Tooltip por title */
.action-links a[title] {
  cursor: help;
}
.action-links a[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.7rem;
  pointer-events: none;
  z-index: 1000;
}

/* === TABLAS === */
/* Los estilos de tabla se manejan automáticamente por DataTables.js */

.table thead {
    background: linear-gradient(135deg, #1E5AA8, #1E5AA8);
    color: white;
}

/* === TABS / PESTAÑAS === */
/* IMPORTANTE: Estos estilos tienen !important para sobrescribir estilos globales */
/* Los selectores son específicos (.nav-tabs .nav-link) para evitar conflictos con .nav-link global */
/* NOTA: Los estilos de .nav-pills están comentados para evitar conflictos con el sidebar Bootstrap 5 */

.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(145deg, #1e40af, #1e40af);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0.75rem 1rem 0;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    
    /* Asegurar disposición horizontal */
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.25rem;
    width: 100%;
}

.nav-tabs::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.nav-tabs .nav-link {
    border: 1px solid var(--border-color);
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    color: #1e293b !important;
    background: linear-gradient(145deg, #1e40af, #1e40af);
    transition: all var(--transition-fast);
    position: relative;
    padding: 0.875rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    margin-right: 0.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    
    /* Asegurar disposición horizontal */
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: auto;
    text-align: left;
}

.nav-tabs .nav-link:hover {
    border-color: var(--border-color) var(--border-color) transparent;
    background: linear-gradient(145deg, #1e40af, #1e40af);
    color: #0f172a !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: #0f172a !important;
    background: linear-gradient(145deg, #1e40af, #1e40af);
    border-color: var(--primary-color) var(--primary-color) white;
    font-weight: 600;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
    border-bottom-color: var(--primary-color);
    z-index: 2;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: var(--radius-sm);
}

/* Estilos para badges en tabs */
.nav-tabs .nav-link .badge {
    font-size: 0.7em;
    margin-left: 0.5rem;
    opacity: 0.9;
    transition: all var(--transition-fast);
    padding: 0.3em 0.6em;
    border-radius: 50px;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link:hover .badge,
.nav-tabs .nav-link.active .badge {
    opacity: 1;
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Variantes de colores para badges en tabs con mejor contraste */
.nav-tabs .badge-primary {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.nav-tabs .badge-success {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.nav-tabs .badge-warning {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.nav-tabs .badge-info {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.3);
}

/* Iconos en tabs - más específicos para evitar conflictos con sidebar */
.nav-tabs .nav-link i {
    margin-right: 0.5rem;
    font-size: 0.9em;
    transition: all var(--transition-fast);
    opacity: 0.8;
}

.nav-tabs .nav-link:hover i {
    transform: scale(1.1);
    opacity: 1;
}

.nav-tabs .nav-link.active i {
    transform: scale(1.1);
    opacity: 1;
}

/* Estilos específicos por color de icono - con !important para overrides */
.nav-tabs .nav-link i.text-primary {
    color: #2563eb !important;
    opacity: 0.7;
}

.nav-tabs .nav-link i.text-success {
    color: #059669 !important;
    opacity: 0.7;
}

.nav-tabs .nav-link i.text-warning {
    color: #d97706 !important;
    opacity: 0.7;
}

.nav-tabs .nav-link i.text-info {
    color: #0891b2 !important;
    opacity: 0.7;
}

.nav-tabs .nav-link.active i.text-primary,
.nav-tabs .nav-link:hover i.text-primary {
    color: #1d4ed8 !important;
    opacity: 1;
    text-shadow: 0 0 8px rgba(29, 78, 216, 0.2);
}

.nav-tabs .nav-link.active i.text-success,
.nav-tabs .nav-link:hover i.text-success {
    color: #047857 !important;
    opacity: 1;
    text-shadow: 0 0 8px rgba(4, 120, 87, 0.2);
}

.nav-tabs .nav-link.active i.text-warning,
.nav-tabs .nav-link:hover i.text-warning {
    color: #b45309 !important;
    opacity: 1;
    text-shadow: 0 0 8px rgba(180, 83, 9, 0.2);
}

.nav-tabs .nav-link.active i.text-info,
.nav-tabs .nav-link:hover i.text-info {
    color: #0e7490 !important;
    opacity: 1;
    text-shadow: 0 0 8px rgba(14, 116, 144, 0.2);
}

/* === OVERRIDES ESPECÍFICOS PARA FORZAR TABS HORIZONTALES === */
/* Estas reglas aseguran que los tabs se muestren horizontalmente */

/* Override de cualquier estilo que fuerce vertical */
.nav-tabs,
.nav-tabs.nav-pills,
ul.nav-tabs,
div.nav-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

/* Asegurar que los nav-links estén en línea */
.nav-tabs .nav-link,
.nav-tabs li .nav-link,
.nav-tabs > li > .nav-link,
.nav-tabs .nav-item .nav-link {
    display: inline-flex !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    flex-direction: row !important;
    vertical-align: top !important;
}

/* Override de estilos de lista que puedan forzar vertical */
.nav-tabs li,
.nav-tabs .nav-item {
    display: inline-block !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin: 0 !important;
    list-style: none !important;
}

/* Responsive: permitir wrap solo en móviles muy pequeños */
@media (max-width: 480px) {
    .nav-tabs {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .nav-tabs .nav-link {
        margin-bottom: 0.25rem;
        margin-right: 0.25rem;
    }
}

/* Headers de cards con tabs */
.card-header-tabs {
    margin-bottom: -1px;
    border-bottom: none;
    background-color: var(--bg-primary);
    padding: 0.5rem 1rem 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header-tabs .nav-tabs {
    background-color: transparent;
    border-bottom: none;
    padding: 0;
    border-radius: 0;
}

/* Selectores específicos adicionales para overrides forzados */
.card-header-tabs .nav-tabs .nav-link,
.card .nav-tabs .nav-link {
    color: #0f172a !important;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9) !important;
}

.card-header-tabs .nav-tabs .nav-link:hover,
.card .nav-tabs .nav-link:hover {
    color: #0f172a !important;
    background: linear-gradient(145deg, #ffffff, #f8fafc) !important;
}

.card-header-tabs .nav-tabs .nav-link.active,
.card .nav-tabs .nav-link.active {
    color: #0f172a !important;
    background: linear-gradient(145deg, #ffffff, #fafbff) !important;
}

/* Contenido de tabs */
.tab-content {
    padding: 1.5rem;
    background-color: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    min-height: 200px;
    border: 1px solid var(--border-color);
    border-top: none;
}

.tab-pane {
    min-height: 200px;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-normal);
}

.tab-pane.show.active {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp var(--transition-normal) ease-out;
}

/* === TABS RESPONSIVE OPTIMIZADOS === */
/* Tabs horizontales con scroll suave y indicadores visuales */

/* Mobile First - Móviles */
@media (max-width: 575.98px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem 0.75rem 0;
        margin: 0 -0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) transparent;
        scroll-behavior: smooth;
        position: relative;
    }
    
    .nav-tabs::-webkit-scrollbar {
        height: 3px;
    }
    
    .nav-tabs::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .nav-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    /* Indicador visual de scroll disponible */
    .nav-tabs::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 100%;
        background: linear-gradient(270deg, var(--bg-primary), transparent);
        pointer-events: none;
        z-index: 5;
        opacity: 0;
        transition: opacity var(--transition-fast);
    }
    
    .nav-tabs.scrollable::before {
        opacity: 1;
    }
    
    .nav-tabs .nav-link {
        padding: 0.625rem 1rem;
        white-space: nowrap;
        min-width: auto;
        font-size: 0.75rem;
        font-weight: 600;
        margin-right: 0.5rem;
        flex-shrink: 0;
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }
    
    .nav-tabs .nav-link i {
        font-size: 0.8em;
        margin-right: 0.375rem;
    }
    
    .nav-tabs .nav-link .badge {
        font-size: 0.65em;
        margin-left: 0.25rem;
        padding: 0.2em 0.4em;
        min-width: 1.2em;
        text-align: center;
    }
    
    .tab-content {
        padding: 1rem 0.75rem;
    }
}

/* Tablets - Small */
@media (min-width: 576px) and (max-width: 767.98px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.625rem 1rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--bg-primary);
        scroll-behavior: smooth;
    }
    
    .nav-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-tabs::-webkit-scrollbar-track {
        background: var(--bg-primary);
        border-radius: 2px;
    }
    
    .nav-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1.125rem;
        white-space: nowrap;
        font-size: 0.8rem;
        margin-right: 0.375rem;
        flex-shrink: 0;
    }
    
    .nav-tabs .nav-link .badge {
        font-size: 0.7em;
        margin-left: 0.375rem;
    }
    
    .tab-content {
        padding: 1.25rem;
    }
}

/* Tablets - Medium y superiores */
@media (min-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
        justify-content: flex-start;
        gap: 0.25rem;
    }
    
    .nav-tabs .nav-link {
        flex-shrink: 0;
        min-width: auto;
        max-width: none;
    }
    
    /* Si hay muchos tabs, permitir wrap con mejor diseño */
    .nav-tabs.many-tabs {
        gap: 0.125rem;
    }
    
    .nav-tabs.many-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .nav-tabs.many-tabs .nav-link .badge {
        font-size: 0.7em;
        margin-left: 0.25rem;
    }
}

/* Desktop - Large y extra large */
@media (min-width: 992px) {
    .nav-tabs {
        gap: 0.375rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
        font-weight: 500;
        margin-right: 0;
    }
    
    .nav-tabs .nav-link .badge {
        font-size: 0.75em;
        margin-left: 0.5rem;
        padding: 0.3em 0.6em;
    }
    
    .nav-tabs .nav-link i {
        margin-right: 0.5rem;
        font-size: 0.9em;
    }
}

/* Tabs secundarios (para subtabs) - COMENTADO PARA EVITAR CONFLICTOS CON SIDEBAR BOOTSTRAP 5 */
/*
.nav-pills {
    gap: 0.25rem;
    padding: 0.5rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.nav-pills .nav-link {
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    background-color: transparent;
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.8rem;
}

.nav-pills .nav-link:hover {
    background-color: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: var(--shadow-md);
}
*/

/* === MEJORAS ESPECÍFICAS PARA TABS HORIZONTALES === */

/* Animaciones mejoradas para cambio de tabs */
.tab-pane {
    min-height: 200px;
    opacity: 0;
    transform: translateX(20px);
    transition: all var(--transition-normal);
    display: none;
}

.tab-pane.show {
    display: block;
}

.tab-pane.show.active {
    opacity: 1;
    transform: translateX(0);
    animation: slideInRight var(--transition-normal) ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mejoras visuales para tabs activos */
.nav-tabs .nav-link.active {
    position: relative;
    z-index: 3;
}

.nav-tabs .nav-link.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -1px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    z-index: -1;
    opacity: 0.15;
}

/* Indicador de contenido cargando en tabs */
.tab-content.loading {
    position: relative;
    min-height: 200px;
}

.tab-content.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.tab-content.loading .tab-pane {
    opacity: 0.3;
    pointer-events: none;
}

/* Contador de tabs visible en mobile (opcional) */
.nav-tabs.scrollable::after {
    content: attr(data-tab-count);
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.3rem;
    border-radius: 50px;
    min-width: 1.2rem;
    text-align: center;
    z-index: 6;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.nav-tabs.scrollable.show-count::after {
    opacity: 1;
}

/* Estados hover mejorados para mobile */
@media (max-width: 767.98px) {
    .nav-tabs .nav-link:active {
        background: linear-gradient(145deg, var(--primary-color), var(--primary-hover)) !important;
        color: white !important;
        transform: scale(0.98);
    }
    
    .nav-tabs .nav-link.active:active {
        transform: scale(0.98) translateY(-2px);
    }
}

/* Separador visual entre grupos de tabs (si hay muchos) */
.nav-tabs .nav-divider {
    width: 1px;
    height: 60%;
    background: var(--border-color);
    margin: 0 0.5rem;
    align-self: center;
}

/* Tab con notificación/alerta */
.nav-tabs .nav-link.has-alert {
    position: relative;
}

.nav-tabs .nav-link.has-alert::after {
    content: '';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
    z-index: 4;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tab deshabilitado */
.nav-tabs .nav-link.disabled {
    color: var(--text-muted) !important;
    background: var(--bg-secondary) !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-tabs .nav-link.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background: var(--bg-secondary) !important;
}

.nav-tabs .nav-link.disabled .badge {
    opacity: 0.5;
}

/* Tabs con progreso/estado */
.nav-tabs .nav-link.completed {
    background: linear-gradient(145deg, #dcfce7, #bbf7d0) !important;
    border-color: var(--success-color) !important;
}

.nav-tabs .nav-link.completed i {
    color: var(--success-color) !important;
}

.nav-tabs .nav-link.in-progress {
    background: linear-gradient(145deg, #fef3c7, #fde68a) !important;
    border-color: var(--warning-color) !important;
}

.nav-tabs .nav-link.in-progress i {
    color: var(--warning-color) !important;
    animation: spin 2s linear infinite;
}

.nav-tabs .nav-link.error {
    background: linear-gradient(145deg, #fee2e2, #fecaca) !important;
    border-color: var(--danger-color) !important;
}

.nav-tabs .nav-link.error i {
    color: var(--danger-color) !important;
}

/* Los estilos de tabla responsive se manejan automáticamente por DataTables.js */

/* Los estilos de thead se manejan automáticamente por DataTables.js */

/* Los estilos de tabla se manejan automáticamente por DataTables.js */

/* === FORMULARIOS === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:hover {
    border-color: var(--secondary-color);
}

/* === VALIDACIÓN === */
.text-danger {
    color: var(--danger-color);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

.field-validation-error {
    color: var(--danger-color);
    font-size: 0.75rem;
    font-weight: 500;
}

.input-validation-error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* === CHECKBOXES Y RADIOS === */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: white;
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

/* === NAVEGACIÓN DE ACCIÓN === */
/* === NAVEGACIÓN DE ACCIÓN === */
.action-links {
  display: flex;
    gap: 0.125rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.125rem 0.25rem;
    height: auto;
    min-height: 32px;
}

/* Botón extra pequeño - btn-xs */
.btn-xs {
  padding: 0.125rem 0.375rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  border-radius: 0.25rem !important;
  min-width: auto !important;
  margin: 0 0.125rem !important;
}

.btn-xs i {
  font-size: 0.7rem !important;
  margin-right: 0.25rem !important;
}

/* Los estilos de dropdown en tablas se manejan automáticamente por DataTables.js */

.col-actions-sticky .dropdown-menu {
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    margin-top: 0.125rem !important;
    z-index: 2100 !important;
}

/* Botones más compactos dentro de action-links */
.action-links .btn {
  padding: 0.25rem 0.5rem !important;
  margin: 0 !important;
  min-width: auto !important;
  font-size: 0.875rem;
  line-height: 1.2;
}

/* Asegurar que todos los botones outline sean visibles */
.action-links .btn-outline-primary {
  color: #0d6efd !important;
  border-color: #0d6efd !important;
  background-color: transparent !important;
}

.action-links .btn-outline-primary:hover {
  color: #fff !important;
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

.action-links .btn-outline-info {
  color: #0dcaf0 !important;
  border-color: #0dcaf0 !important;
  background-color: transparent !important;
}

.action-links .btn-outline-info:hover {
  color: #000 !important;
  background-color: #0dcaf0 !important;
  border-color: #0dcaf0 !important;
}

.action-links .btn-outline-danger {
  color: #dc3545 !important;
  border-color: #dc3545 !important;
  background-color: transparent !important;
}

.action-links .btn-outline-danger:hover {
  color: #fff !important;
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

.action-links .btn-outline-danger:focus {
  color: #fff !important;
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}


/* Los estilos responsive de tabla se manejan automáticamente por DataTables.js */

/* === OPTIMIZACIÓN PARA DATATABLES === */
/* Distribución optimizada de columnas para DataTables */
.dataTables_wrapper .table {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Distribución de anchos optimizada */
.dataTables_wrapper .table thead th:nth-child(1) { width: 12% !important; } /* REFERENCIA */
.dataTables_wrapper .table thead th:nth-child(2) { width: 8% !important; }  /* AÑO */
.dataTables_wrapper .table thead th:nth-child(3) { width: 25% !important; } /* CLIENTE */
.dataTables_wrapper .table thead th:nth-child(4) { width: 12% !important; } /* PRODUCTO */
.dataTables_wrapper .table thead th:nth-child(5) { width: 10% !important; } /* ESTADO */
.dataTables_wrapper .table thead th:nth-child(6) { width: 12% !important; } /* CREADO */
.dataTables_wrapper .table thead th:nth-child(7) { width: 8% !important; }  /* SISTEMA */
.dataTables_wrapper .table thead th:nth-child(8) { width: 8% !important; }  /* DOCS */
.dataTables_wrapper .table thead th:nth-child(9) { width: 5% !important; }  /* ACCIONES */

/* Aplicar la misma distribución a las celdas del cuerpo */
.dataTables_wrapper .table tbody td:nth-child(1) { width: 12% !important; }
.dataTables_wrapper .table tbody td:nth-child(2) { width: 8% !important; }
.dataTables_wrapper .table tbody td:nth-child(3) { 
    width: 25% !important; 
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    line-height: 1.4 !important;
}
.dataTables_wrapper .table tbody td:nth-child(4) { width: 12% !important; }
.dataTables_wrapper .table tbody td:nth-child(5) { width: 10% !important; }
.dataTables_wrapper .table tbody td:nth-child(6) { width: 12% !important; }
.dataTables_wrapper .table tbody td:nth-child(7) { width: 8% !important; }
.dataTables_wrapper .table tbody td:nth-child(8) { width: 8% !important; }
.dataTables_wrapper .table tbody td:nth-child(9) { width: 5% !important; }


/* === RESPONSIVE PARA DATATABLES === */
@media (max-width: 768px) {
    /* Redistribución para DataTables en móviles */
    .dataTables_wrapper .table thead th:nth-child(1) { width: 15% !important; } /* REFERENCIA */
    .dataTables_wrapper .table thead th:nth-child(2) { width: 10% !important; }  /* AÑO */
    .dataTables_wrapper .table thead th:nth-child(3) { width: 35% !important; } /* CLIENTE - más espacio */
    .dataTables_wrapper .table thead th:nth-child(4) { width: 15% !important; } /* PRODUCTO */
    .dataTables_wrapper .table thead th:nth-child(5) { width: 12% !important; } /* ESTADO */
    .dataTables_wrapper .table thead th:nth-child(6) { width: 13% !important; } /* CREADO */
    .dataTables_wrapper .table thead th:nth-child(7) { display: none !important; } /* SISTEMA - ocultar */
    .dataTables_wrapper .table thead th:nth-child(8) { display: none !important; } /* DOCS - ocultar */
    .dataTables_wrapper .table thead th:nth-child(9) { width: 10% !important; }  /* ACCIONES */
    
    .dataTables_wrapper .table tbody td:nth-child(7),
    .dataTables_wrapper .table tbody td:nth-child(8) {
        display: none !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    /* Redistribución para DataTables en tablets */
    .dataTables_wrapper .table thead th:nth-child(1) { width: 12% !important; } /* REFERENCIA */
    .dataTables_wrapper .table thead th:nth-child(2) { width: 8% !important; }  /* AÑO */
    .dataTables_wrapper .table thead th:nth-child(3) { width: 30% !important; } /* CLIENTE - más espacio */
    .dataTables_wrapper .table thead th:nth-child(4) { width: 12% !important; } /* PRODUCTO */
    .dataTables_wrapper .table thead th:nth-child(5) { width: 10% !important; } /* ESTADO */
    .dataTables_wrapper .table thead th:nth-child(6) { width: 12% !important; } /* CREADO */
    .dataTables_wrapper .table thead th:nth-child(7) { width: 8% !important; }  /* SISTEMA */
    .dataTables_wrapper .table thead th:nth-child(8) { width: 8% !important; }  /* DOCS */
    .dataTables_wrapper .table thead th:nth-child(9) { width: 5% !important; }  /* ACCIONES */
}

@media (min-width: 769px) and (max-width: 991px) {
    /* Redistribución para DataTables en desktop pequeño */
    .dataTables_wrapper .table thead th:nth-child(1) { width: 11% !important; } /* REFERENCIA */
    .dataTables_wrapper .table thead th:nth-child(2) { width: 7% !important; }  /* AÑO */
    .dataTables_wrapper .table thead th:nth-child(3) { width: 28% !important; } /* CLIENTE */
    .dataTables_wrapper .table thead th:nth-child(4) { width: 11% !important; } /* PRODUCTO */
    .dataTables_wrapper .table thead th:nth-child(5) { width: 9% !important; } /* ESTADO */
    .dataTables_wrapper .table thead th:nth-child(6) { width: 11% !important; } /* CREADO */
    .dataTables_wrapper .table thead th:nth-child(7) { width: 7% !important; }  /* SISTEMA */
    .dataTables_wrapper .table thead th:nth-child(8) { width: 7% !important; }  /* DOCS */
    .dataTables_wrapper .table thead th:nth-child(9) { width: 5% !important; }  /* ACCIONES */
}

/* === UTILIDADES RESPONSIVE === */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-inline-block { display: inline-block !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-inline { display: inline !important; }
    .d-xl-inline-block { display: inline-block !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
}

/* === ANIMACIONES === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeInUp var(--transition-normal);
}

/* === LOADING STATES === */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === ASEGURAR CARGA DE FONT AWESOME === */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/fontawesome/fa-solid-900.woff2') format('woff2'),
       url('../fonts/fontawesome/fa-solid-900.woff') format('woff'),
       url('../fonts/fontawesome/fa-solid-900.ttf') format('truetype');
}

/* === VARIABLE PARA VERIFICAR CARGA DE FONT AWESOME === */
:root {
  --fa-loaded: 0;
}

/* Detectar si Font Awesome está cargado */
.fa-test::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-style: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === UTILIDADES === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

/* === SCROLLBAR PERSONALIZADO === */
.table-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Firefox */
.table-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) var(--bg-primary);
}

/* === INDICADOR DE SCROLL === */
.table-responsive-actions::after {
    content: '';
    position: absolute;
    top: 0;
    right: 180px;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1));
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
    z-index: 10;
}

.table-responsive-actions.has-scroll::after {
    opacity: 1;
}

/* === HOVER SINCRONIZADO === */
.table tbody tr:hover + .actions-cell-fixed,
.actions-cell-fixed:hover {
    background-color: var(--bg-secondary) !important;
}

/* === ESTADOS DE CARGA === */
.table-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.table-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 100;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 101;
}

/* === BADGES Y ESTADOS === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Badge Primary - Usando color corporativo */
.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* === CARDS Y ESTADÍSTICAS === */
.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Cards de estadísticas específicas */
.card.bg-light {
    background-color: var(--bg-primary) !important;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.card.bg-light:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background-color: white !important;
}

.card.bg-light .card-body {
    text-align: center;
    padding: 1.5rem 1rem;
}

/* Efectos para iconos en cards */
.fa-2x {
    transition: transform var(--transition-normal);
    margin-bottom: 0.5rem;
}

.card:hover .fa-2x {
    transform: scale(1.1) rotate(5deg);
}

/* === TABLAS MEJORADAS === */
.table-hover tbody tr {
    transition: all var(--transition-fast);
}

.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05) !important;
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* === CÓDIGOS Y ELEMENTOS TÉCNICOS === */
code {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid var(--border-color);
}

/* === UTILIDADES ADICIONALES === */
.text-muted {
    color: var(--text-muted) !important;
}

.small {
    font-size: 0.875em;
}

/* Separadores mejorados */
.hr-gradient {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
}

/* === EFECTOS DE FOCUS === */
button:focus,
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* === TOOLTIPS === */
[title] {
    position: relative;
    cursor: help;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-primary);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: fadeInUp 200ms forwards;
}

/* Tooltip styling */
.gex-tooltip {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 1000;
    position: absolute;
    white-space: nowrap;
}

/* === DETAILS & DELETE DL STYLES === */
dl.row dt.col-sm-2 {
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    opacity: 0;
    animation: fadeInUp var(--transition-normal) forwards;
}

dl.row dd.col-sm-10 {
    color: var(--text-primary);
    padding: 0.5rem 0;
    opacity: 0;
    animation: fadeInUp var(--transition-normal) forwards;
    animation-delay: 0.1s;
}

/* Highlight dt on hover */
dl.row dt.col-sm-2:hover {
    color: var(--primary-color);
}


/* ——— Botón “Volver a Lista” ——— */
a[href*="/Index"] {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white !important;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-decoration: none !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

a[href*="/Index"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
a


/* Botón “Volver a Lista” reutilizable */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, var(--info-color), var(--info-hover));
  color: white !important;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-decoration: none !important;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--info-hover), var(--info-color));
}

/* Tooltip (opcional) */
.btn-back[title] {
  cursor: help;
}
.btn-back[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  pointer-events: none;
  z-index: 1000;
  opacity: 1;
}

/* ===================================================
   DASHBOARD DE GESTIÓN DE CLIENTES
   ================================================== */

/* === Estilos de Tarjetas del Dashboard === */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 0;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === Fondos con Opacidad === */
.bg-opacity-10 {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(37, 99, 235, 0.1) !important;
}

.bg-success.bg-opacity-10 {
    background-color: rgba(5, 150, 105, 0.1) !important;
}

.bg-info.bg-opacity-10 {
    background-color: rgba(8, 145, 178, 0.1) !important;
}

.bg-warning.bg-opacity-10 {
    background-color: rgba(217, 119, 6, 0.1) !important;
}

.bg-danger.bg-opacity-10 {
    background-color: rgba(220, 38, 38, 0.1) !important;
}

/* === Estilos de Tablas === */
.table-responsive {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    transition: background-color var(--transition-fast);
}

/* === Lista de Actividades === */
.list-group-item:last-child {
    border-bottom: none !important;
}

.list-group-item {
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
}

.list-group-item:first-child {
    border-top: none;
}

/* === Notificaciones Flotantes === */
.position-fixed {
    position: fixed !important;
}

.alert-floating {
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    border: 0;
    animation: slideInRight 0.3s ease-out;
}

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

/* === Iconos Circulares === */
.icon-circle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
}

/* === Badges Mejorados === */
.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
    padding: 0.375rem 0.75rem;
}

/* === Estados de Carga === */
.loading-overlay {
    position: relative;
}

.loading-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    border-radius: inherit;
}

.loading-overlay .spinner-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .h3 {
        font-size: 1.5rem;
    }
    
    .alert-floating {
        left: 10px;
        right: 10px;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: var(--radius-sm) !important;
        margin-bottom: 2px;
    }
    
    .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .card-header .d-flex > div:last-child {
        margin-top: 0.5rem;
    }
}

/* === Animaciones de Entrada === */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Estados de Filtros === */
.filter-active {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* === Mejoras de Accesibilidad === */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
    border-color: var(--primary-color);
}

/* === Estilos para Gráficos === */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Custom styles for SweetAlert2 in wizard */
        .swal2-popup.swal2-toast {
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        
        .swal2-popup.swal2-modal {
            border-radius: 12px;
        }
        
        .swal2-title {
            font-size: 1.5rem;
            font-weight: 600;
        }
        
        .swal2-content {
            font-size: 1rem;
        }
        
        .swal2-confirm.btn-danger {
            background-color: #dc3545 !important;
            border-color: #dc3545 !important;
        }
        
        .swal2-cancel.btn-secondary {
            background-color: #6c757d !important;
            border-color: #6c757d !important;
        }
        
        .swal2-button {
            border-radius: 6px;
            font-weight: 500;
            padding: 8px 16px;
        }
        
        /* Animation for the confirmation dialog */
        .animated.fadeIn {
            animation: fadeIn 0.3s ease-in-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

/* === OPTIMIZACIONES PARA MODALES DE DOCUMENTOS === */
/* Eliminar todas las transiciones en modales para evitar parpadeo */
#documentViewerModal,
#documentInfoModal {
    --bs-modal-fade-transform: none !important;
    z-index: 1060; /* Mayor que el modal estándar (1055) pero menor que tooltips (1070) */
    /* Prevenir efectos de hover/focus que pueden causar parpadeo */
    pointer-events: auto;
}

#documentViewerModal .modal-dialog,
#documentInfoModal .modal-dialog {
    transition: none !important;
    transform: none !important;
    /* Estabilizar el modal durante cambios de focus */
    will-change: auto;
}

#documentViewerModal .modal-content,
#documentInfoModal .modal-content {
    transition: none !important;
    transform: none !important;
    /* Prevenir repaints innecesarios */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Prevenir parpadeo durante cambios de visibility */
#documentViewerModal.show,
#documentInfoModal.show {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Backdrop específico para modales de documentos */
#documentViewerModal + .modal-backdrop,
#documentInfoModal + .modal-backdrop {
    z-index: 1059; /* Justo debajo del modal */
    /* Estabilizar backdrop durante cambios de estado */
    will-change: auto;
    pointer-events: auto;
}

/* Backdrop optimizado */
.modal-backdrop.fade {
    transition: opacity 0.1s linear !important;
}

.modal-backdrop.show {
    opacity: 0.5 !important;
}

/* Prevenir conflictos con otros modales */
body.modal-open {
    overflow: hidden;
}

/* Solo aplicar overflow hidden cuando específicamente sea nuestro modal */
body:has(#documentViewerModal.show),
body:has(#documentInfoModal.show) {
    overflow: hidden !important;
    padding-right: 0 !important; /* Evitar scrollbar jump */
}

/* Contenedor del visor optimizado */
#documentViewerContent {
    min-height: 400px;
    position: relative;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    overflow: hidden;
    isolation: isolate; /* Crear nuevo stacking context */
    /* Prevenir efectos de hover que pueden causar parpadeo */
    pointer-events: auto;
}

/* Deshabilitar eventos de mouse cuando sea necesario */
body.disable-mouse-events {
    pointer-events: none;
    user-select: none;
}

body.disable-mouse-events #documentViewerModal,
body.disable-mouse-events #documentInfoModal {
    pointer-events: auto;
}

/* Asegurar que los botones del wizard siempre funcionen */
body.disable-mouse-events .wizard-progress,
body.disable-mouse-events .step-icon,
body.disable-mouse-events .btn,
body.disable-mouse-events button[type="submit"],
body.disable-mouse-events button[type="button"],
body.disable-mouse-events .wizard-radio label,
body.disable-mouse-events .wizard-radio input[type="radio"] {
    pointer-events: auto !important;
    user-select: auto !important;
}

/* Preloader optimizado */
#documentViewerContent .spinner-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 3rem;
    height: 3rem;
    /* Prevenir que el spinner cause parpadeo */
    will-change: auto;
}

/* Elementos de contenido con fade-in suave */
#documentViewerContent iframe,
#documentViewerContent img,
#documentViewerContent pre {
    opacity: 0;
    transition: opacity 0.2s ease-out;
    will-change: opacity;
    transform: translateZ(0); /* Forzar aceleración por hardware */
    /* Prevenir efectos de hover/focus */
    pointer-events: auto;
}

#documentViewerContent iframe.loaded,
#documentViewerContent img.loaded,
#documentViewerContent pre.loaded {
    opacity: 1;
    will-change: auto; /* Resetear will-change después de la carga */
}

/* Prevenir flash of unstyled content */
#documentViewerContent iframe {
    background-color: white;
    border: none;
    /* Estabilizar iframe durante cambios de state */
    contain: layout style paint;
}

#documentViewerContent img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Prevenir reflow durante carga */
    display: block;
}

/* Modal de información optimizado */
#documentInfoContent {
    min-height: 200px;
    position: relative;
    isolation: isolate;
    /* Prevenir parpadeo en contenido dinámico */
    contain: layout style;
}

/* Botones de acción optimizados */
.btn-group-sm .btn {
    transition: all 0.15s ease-out;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    /* Prevenir efectos de hover que causen parpadeo */
    backface-visibility: hidden;
}

.btn-group-sm .btn:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Prevenir conflictos de z-index con otros elementos */
#documentViewerModal .modal-header,
#documentViewerModal .modal-body,
#documentViewerModal .modal-footer,
#documentInfoModal .modal-header,
#documentInfoModal .modal-body,
#documentInfoModal .modal-footer {
    position: relative;
    z-index: 1;
    /* Estabilizar durante cambios de estado */
    will-change: auto;
}

/* Optimizaciones específicas para cambios de focus/blur de ventana */
@media (prefers-reduced-motion: no-preference) {
    #documentViewerModal,
    #documentInfoModal {
        /* Solo aplicar animaciones si el usuario no prefiere movimiento reducido */
        animation: modalStabilize 0.1s ease-out;
    }
}

@keyframes modalStabilize {
    from {
        opacity: 0.95;
    }
    to {
        opacity: 1;
    }
}

/* Prevenir cambios visuales durante focus/blur de ventana */
:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Estabilizar durante cambios de visibility */
html.document-hidden #documentViewerModal,
html.document-hidden #documentInfoModal {
    will-change: auto;
    transform: none !important;
}

/* Estados específicos para window blur y tab change */
body.modal-window-blur {
    pointer-events: none;
    user-select: none;
}

body.modal-window-blur #documentViewerModal,
body.modal-window-blur #documentInfoModal {
    pointer-events: auto;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
}

/* Asegurar que los botones del wizard siempre funcionen incluso con modal-window-blur */
body.modal-window-blur .wizard-progress,
body.modal-window-blur .step-icon,
body.modal-window-blur .btn,
body.modal-window-blur button[type="submit"],
body.modal-window-blur button[type="button"],
body.modal-window-blur .wizard-radio label,
body.modal-window-blur .wizard-radio input[type="radio"] {
    pointer-events: auto !important;
    user-select: auto !important;
}

body.modal-tab-hidden {
    visibility: hidden;
}

body.modal-tab-hidden #documentViewerModal,
body.modal-tab-hidden #documentInfoModal {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Clase para hover state del modal */
#documentViewerModal.mouse-over,
#documentInfoModal.mouse-over {
    z-index: 1061; /* Ligeramente mayor cuando tiene hover */
}

/* Clase para modal durante throttled mouse events */
#documentViewerModal.mouse-stabilizing,
#documentInfoModal.mouse-stabilizing {
    pointer-events: auto;
    will-change: auto;
    transform: translateZ(0); /* Forzar GPU acceleration */
}

/* Optimizaciones adicionales para el contenido del modal */
#documentViewerContent.stabilizing,
#documentInfoContent.stabilizing {
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Prevenir efectos no deseados en elementos hijos durante estabilización */
#documentViewerModal.mouse-stabilizing *,
#documentInfoModal.mouse-stabilizing * {
    pointer-events: inherit;
    will-change: auto;
}

/* Mejorar performance durante scroll dentro del modal */
#documentViewerContent {
    overflow: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Estilo específico para cuando el modal está cargando */
#documentViewerContent:has(.spinner-border) {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Transiciones suaves solo cuando sea seguro aplicarlas */
@media (prefers-reduced-motion: no-preference) {
    #documentViewerModal:not(.mouse-stabilizing),
    #documentInfoModal:not(.mouse-stabilizing) {
        transition: z-index 0.1s ease-out;
    }
    
    #documentViewerModal.mouse-over:not(.mouse-stabilizing),
    #documentInfoModal.mouse-over:not(.mouse-stabilizing) {
        transition: z-index 0.05s ease-out;
    }
}


/* Personalización de Fancybox para documentos */
.fancybox__container {
    --fancybox-bg: rgba(24, 24, 27, 0.92);
}

.fancybox__toolbar {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.fancybox__toolbar__items {
    color: white;
}

.fancybox__button {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

    .fancybox__button:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: scale(1.05);
    }

/* Estilo para botones de acción en la tabla */
.doc-actions {
    white-space: nowrap;
}

    .doc-actions .btn {
        margin: 0 2px;
        padding: 4px 8px;
        font-size: 0.875rem;
    }

/* Indicador de tipo de documento para Fancybox */
.doc-type-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 5px;
}

.doc-type-pdf {
    background: #dc3545;
    color: white;
}

.doc-type-image {
    background: #28a745;
    color: white;
}

.doc-type-office {
    background: #007bff;
    color: white;
}

.doc-type-other {
    background: #6c757d;
    color: white;
}

    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .loading-content {
        background: white;
        padding: 2rem;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-width: 300px;
    }

    .loading-content p {
        margin: 0;
        color: #333;
    }

    .loading-content .fa-spinner {
        color: #007bff;
    }

    .records-ajax-display {
        margin-top: 1rem;
    }

    .records-ajax-display .list-group-item {
        transition: all 0.2s ease;
    }

    .records-ajax-display .list-group-item:hover {
        background-color: #f8f9fa;
        border-color: #007bff;
    }

    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .loading-content {
        background: white;
        padding: 2rem;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-width: 300px;
    }

    .loading-content p {
        margin: 0;
        color: #333;
    }

    .loading-content .fa-spinner {
        color: #007bff;
    }

/* Estilos personalizados para SweetAlert2 Document Info */
.swal2-document-info {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.swal2-document-info .document-info-container {
    text-align: left;
}

.swal2-document-info .table td {
    padding: 0.5rem 0.25rem;
    border: none;
    vertical-align: top;
}

.swal2-document-info .table td:first-child {
    width: 35%;
    font-weight: 600;
    color: #6c757d;
}

.swal2-document-info .border-bottom {
    border-bottom: 2px solid #dee2e6 !important;
    margin-bottom: 0.5rem;
}

.swal2-document-info .badge {
    font-size: 0.75em;
}

.swal2-document-info .text-break {
    word-break: break-all;
}

.swal2-document-info .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.swal2-document-info .btn i {
    margin-right: 0.25rem;
}

/* Responsive para SweetAlert2 */
@media (max-width: 768px) {
    .swal2-document-info {
        width: 95% !important;
        margin: 0 auto;
    }
    
    .swal2-document-info .table td:first-child {
        width: 40%;
    }
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
}

.user-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
    border: 2px solid white;
}

.user-avatar-container {
    position: relative;
    display: inline-block;
}

.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #6c757d;
}

.status-locked {
    background-color: #dc3545;
}

.status-warning {
    background-color: #ffc107;
}

.avatar-color-1 {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.avatar-color-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.avatar-color-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.avatar-color-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.avatar-color-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.avatar-color-6 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin: 0.1rem;
}

.user-card {
    transition: all 0.3s ease;
}

    .user-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.card-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e3e6f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }

.btn-action {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #1e3a8a 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
}

.activity-item {
    border-left: 3px solid #667eea;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fc;
    border-radius: 0 0.5rem 0.5rem 0;
    transition: all 0.3s ease;
}

    .activity-item:hover {
        background: #e3e6f0;
        transform: translateX(5px);
    }

.required-field::after {
    content: " *";
    color: #e74a3b;
}

.form-section {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.section-header {
    background: linear-gradient(90deg, #f8f9fc 0%, #eaecf4 100%);
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e3e6f0;
}

.section-content {
    padding: 2rem;
}

.info-box {
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.page-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: white;
}

.swal-wide {
    max-width: none !important;
    width: 90% !important;
}

.swal2-html-container dl {
    margin-bottom: 0.5rem;
}

.swal2-html-container dt {
    font-weight: 600;
    color: #495057;
}

.swal2-html-container dd {
    margin-bottom: 0.25rem;
}

/* Custom styles for validation errors */
.alert-warning ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.alert-warning li {
    margin-bottom: 0.25rem;
}

.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.field-validation-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.validation-summary {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

    .validation-summary h6 {
        color: #856404;
        margin-bottom: 0.5rem;
    }

    .validation-summary ul {
        color: #856404;
        margin-bottom: 0;
    }

.bg-primary-dark {
    background-color: rgba(13, 110, 253, 0.8) !important;
}

.bg-success-dark {
    background-color: rgba(25, 135, 84, 0.8) !important;
}

.bg-info-dark {
    background-color: rgba(13, 202, 240, 0.8) !important;
}

.bg-warning-dark {
    background-color: rgba(255, 193, 7, 0.8) !important;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-dark-50 {
    color: rgba(33, 37, 41, 0.5) !important;
}

.text-dark-75 {
    color: rgba(33, 37, 41, 0.75) !important;
}

.opacity-75 {
    opacity: 0.75 !important;
}

/* Efectos hover para las tarjetas de métricas */
.card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Animación de números */
.card h2 {
    font-weight: 700;
    font-size: 2.5rem;
}

/* Estilos para la actividad reciente */
.list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transition: background-color 0.2s ease-in-out;
}

.list-group-item .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

/* Iconos de actividad */
.fa-file-upload {
    color: #28a745;
}

.fa-folder-plus {
    color: #007bff;
}

.fa-history {
    color: #6c757d;
}

.fa-check-circle {
    color: #28a745;
}

.fa-exclamation-triangle {
    color: #ffc107;
}

/* Notificaciones */
.alert {
    border-left: 4px solid;
    border-radius: 0.375rem;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-success {
    border-left-color: #28a745;
}

.alert-info {
    border-left-color: #17a2b8;
}

.card .card-footer {
    border-top: none;
    font-size: 0.875rem;
}

.upload-zone {
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .upload-zone:hover {
        border-color: #0d6efd !important;
        background-color: rgba(13, 110, 253, 0.05);
    }

    .upload-zone.drag-over {
        border-color: #0d6efd !important;
        background-color: rgba(13, 110, 253, 0.1);
    }

.file-item {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
}

    .file-item .file-size {
        font-size: 0.875rem;
        color: #6c757d;
    }

.card:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

#submitBtn:disabled {
    opacity: 0.6;
}

.progress {
    height: 0.25rem;
    margin-top: 0.5rem;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge {
    font-size: 0.75rem;
}

.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.modal-xl {
    max-width: 1200px;
}

.pagination {
    margin-bottom: 0;
}

.text-muted {
    color: #6c757d !important;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 300px;
}

    .loading-content p {
        margin: 0;
        color: #333;
    }

    .loading-content .fa-spinner {
        color: #007bff;
    }

/* ===================================================
   PROFILE SETTINGS PAGE STYLES
   ================================================== */

/* Settings Header */
.settings-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.form-section {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.section-header {
    background: linear-gradient(90deg, #f8f9fc 0%, #eaecf4 100%);
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e3e6f0;
}

.section-content {
    padding: 2rem;
}

.settings-page .form-control,
.settings-page .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e3e6f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.settings-page .form-control:focus,
.settings-page .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.settings-page .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-action {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.settings-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.settings-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.settings-header .breadcrumb-item.active {
    color: white;
}

/* Theme Preview Styles */
.theme-preview {
    width: 80px;
    height: 50px;
    border-radius: 0.5rem;
    border: 2px solid #e3e6f0;
    display: inline-block;
    margin-right: 1rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-preview:hover {
    border-color: #667eea;
}

.theme-preview.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.theme-light {
    background: linear-gradient(45deg, #ffffff 50%, #f8f9fa 50%);
}

.theme-dark {
    background: linear-gradient(45deg, #343a40 50%, #495057 50%);
}

.theme-blue {
    background: linear-gradient(45deg, #007bff 50%, #0056b3 50%);
}

/* Preference Items */
.preference-item {
    padding: 1rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.preference-item:hover {
    background: #f8f9fc;
    border-color: #667eea;
}

.profile-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.15);
}

/* === STATS CARDS MINIMALISTAS === */
.stats-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    padding: 1rem;
}

.stats-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 0.875rem;
    color: white;
    box-shadow: none;
}

/* Stats Cards Compactas */
.stats-card .card-body {
    padding: 0.75rem;
}

.stats-card .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #374151;
}

.stats-card .h4,
.stats-card .h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #111827;
}

.stats-card .card-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0;
}

/* Stats Cards Extra Compactas */
.stats-card.compact {
    padding: 0.5rem;
}

.stats-card.compact .card-body {
    padding: 0.5rem;
}

.stats-card.compact .stat-icon {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.stats-card.compact .card-title {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
}

.stats-card.compact .h4,
.stats-card.compact .h5 {
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.stats-card.compact .card-text {
    font-size: 0.625rem;
}

.form-section {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.section-header {
    background: linear-gradient(90deg, #f8f9fc 0%, #eaecf4 100%);
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e3e6f0;
}

.section-content {
    padding: 2rem;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e3e6f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }

.btn-action {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.activity-item {
    border-left: 3px solid #667eea;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fc;
    border-radius: 0 0.5rem 0.5rem 0;
    transition: all 0.3s ease;
}

    .activity-item:hover {
        background: #e3e6f0;
        transform: translateX(5px);
    }

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: white;
}

/* ===================================================
   PROFILE HELP PAGE STYLES
   ================================================== */

/* Help Header */
.help-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.help-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.help-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.help-header .breadcrumb-item.active {
    color: white;
}

/* Help Search Section */
.help-search-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.search-container .position-relative {
    position: relative;
}

.search-container .form-control {
    padding-right: 3.5rem;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
}

.search-container .search-btn {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

.popular-searches .badge {
    cursor: pointer;
    transition: all 0.3s ease;
}

.popular-searches .badge:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Quick Actions */
.quick-actions-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.quick-action-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.quick-action-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.quick-action-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quick-action-card h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quick-action-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Help Categories */
.help-categories-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.help-category-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.help-category-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.category-header {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.category-header:hover {
    background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 100%);
}

.category-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.collapse-icon {
    transition: transform 0.3s ease;
}

.category-content {
    padding: 1rem 1.5rem;
}

.help-article {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.help-article:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.help-article.search-highlight {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

/* Video Tutorials */
.video-tutorials-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.video-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.video-card:hover .play-button {
    font-size: 3.5rem;
    color: white;
}

.video-info {
    padding: 1rem;
}

.video-info h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Sidebar */
.help-sidebar-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.help-sidebar-section h5 {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Contact Info */
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.contact-item i {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    font-size: 1.25rem;
}

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

.contact-item a:hover {
    text-decoration: underline;
}

/* Feedback Form */
.feedback-form {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.feedback-form .form-control,
.feedback-form .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feedback-form .form-control:focus,
.feedback-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* FAQ Accordion */
.help-page .accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem !important;
    margin-bottom: 0.5rem;
}

.help-page .accordion-button {
    background: #f8fafc;
    border: none;
    border-radius: 0.5rem !important;
    font-weight: 500;
    color: var(--text-primary);
}

.help-page .accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.help-page .accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.help-page .accordion-item.search-highlight {
    border-color: #f59e0b;
    background: #fef3c7;
}

/* Article Modal */
.article-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h1, .article-content h2, .article-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content code {
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: "Monaco", "Consolas", monospace;
}


/* Quick Navigation Section */
.quick-nav-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.quick-nav-section .btn {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    font-weight: 500;
}

.quick-nav-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}


/* ===================================================
   PROFILE ABOUT PAGE STYLES
   ================================================== */

/* About Header */
.about-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.about-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.about-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.about-header .breadcrumb-item.active {
    color: white;
}

.version-info .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Platform Overview */
.platform-overview-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.description-content .lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.mission-vision .info-card {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    height: 100%;
    transition: all 0.3s ease;
}

.mission-vision .info-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.company-info {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: fit-content;
}

.info-items .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
}

.info-items .info-item i {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    font-size: 1.25rem;
}

.info-items .info-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-items .info-item a:hover {
    text-decoration: underline;
}

/* System Statistics */
.system-stats-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card h5 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.stat-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.bg-purple {
    background-color: #8b5cf6 !important;
}

.text-purple {
    color: #8b5cf6 !important;
}

/* Features Section */
.features-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.25rem;
    color: white;
}

.feature-content h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-content p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.feature-category {
    background: #e2e8f0;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Version History */
.version-history-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.version-timeline {
    position: relative;
    padding-left: 2rem;
}

.version-timeline::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), #e2e8f0);
}

.version-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.version-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.version-content {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.version-header h6 {
    margin-bottom: 0;
    font-weight: 600;
}

.version-changes {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.version-changes li {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

/* Team Section */
.team-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.team-member-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.team-member-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-color);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h6 {
    font-weight: 600;
    color: var(--text-primary);
}

.member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.skill-badge {
    background: #e2e8f0;
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.skill-badge.more {
    background: var(--primary-color);
    color: white;
}

.member-contact {
    display: flex;
    gap: 0.5rem;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-color);
    background: #f8fafc;
}

/* Feedback Section */
.feedback-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.feedback-section .form-control,
.feedback-section .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feedback-section .form-control:focus,
.feedback-section .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Copyright */
.copyright-section {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .version-timeline {
        padding-left: 1rem;
    }
    
    .version-timeline::before {
        left: 0.5rem;
    }
    
    .version-marker {
        left: -1.25rem;
        width: 2rem;
        height: 2rem;
    }
    
    .version-item {
        padding-left: 1rem;
    }
}


/* ===================================================
   PROFILE PRIVACY POLICY PAGE STYLES
   ================================================== */

/* Privacy Header */
.privacy-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.privacy-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.privacy-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.privacy-header .breadcrumb-item.active {
    color: white;
}

.policy-meta small {
    color: rgba(255, 255, 255, 0.8);
}

/* Sidebar */
.policy-sidebar {
    top: 2rem;
}

.policy-sidebar .nav-link {
    color: var(--text-secondary);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: none;
}

.policy-sidebar .nav-link:hover,
.policy-sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.contact-quick a {
    color: inherit;
    text-decoration: none;
}

.contact-quick a:hover {
    text-decoration: underline;
}

/* Policy Summary */
.policy-summary-section .alert {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.privacy-stats .stat-item {
    text-align: center;
}

.privacy-stats .stat-item .fw-bold {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Policy Sections */
.policy-section {
    scroll-margin-top: 2rem;
}

.section-title {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem !important;
}

.section-content {
    line-height: 1.8;
}

.section-content h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.section-content ul {
    margin-bottom: 1.5rem;
}

.section-content ul li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.section-content .alert {
    margin: 1.5rem 0;
}

.section-content .contact-card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    margin: 1rem 0;
}

.section-content .contact-card h6 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.section-content .contact-card p {
    margin-bottom: 0.5rem;
}

.section-content .contact-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.section-content .contact-card a:hover {
    text-decoration: underline;
}

/* User Rights */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.right-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background: white;
}

.right-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.right-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.right-icon i {
    font-size: 1.25rem;
    color: white;
}

.right-content {
    flex: 1;
}

.right-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.right-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Policy Acceptance */
.policy-acceptance-section .card-header {
    background: linear-gradient(135deg, #059669, #10b981) !important;
}

.acceptance-benefits {
    background: #f0fdf4;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #bbf7d0;
}

.acceptance-benefits i.fa-check {
    font-size: 0.9rem;
}

/* Contact Section */
.contact-section .card-header {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4) !important;
}

.contact-details p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.contact-details i {
    width: 20px;
    text-align: center;
}

.response-commitment {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.commitment-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: white;
}

.commitment-item:last-child {
    margin-bottom: 0;
}

.commitment-item i {
    width: 20px;
    text-align: center;
}

/* Legal Notice */
.legal-notice {
    margin-top: 2rem;
}

.legal-notice .card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
}

/* Toast Notifications */
.toast {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .policy-sidebar {
        position: static !important;
        margin-bottom: 2rem;
    }
    
    .rights-grid {
        grid-template-columns: 1fr;
    }
    
    .privacy-header .row {
        text-align: center;
    }
    
    .privacy-header .col-md-4 {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .privacy-header {
        padding: 1.5rem 0;
    }
    
    .privacy-header h1 {
        font-size: 1.75rem;
    }
    
    .right-card {
        flex-direction: column;
        text-align: center;
    }
    
    .right-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .policy-acceptance-section .row {
        text-align: center;
    }
    
    .contact-section .row {
        text-align: center;
    }
    
    .contact-section .col-md-6:first-child {
        margin-bottom: 2rem;
    }
}

/* Print Styles */
@media print {
    .privacy-header,
    .policy-sidebar,
    .policy-acceptance-section,
    .toast {
        display: none !important;
    }
    
    .policy-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .section-title {
        page-break-after: avoid;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
}

.contact-card {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

    .contact-card h6 {
        color: var(--primary-color);
        margin-bottom: 0.75rem;
    }

    .contact-card p {
        margin-bottom: 0.5rem;
    }

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

        .contact-card a:hover {
            text-decoration: underline;
        }

/* ===================================================
   ADVANCED DOCUMENT SEARCH STYLES
   ================================================== */

/* Search Header */
.search-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.search-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.search-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.search-header .breadcrumb-item.active {
    color: white;
}

.search-stats .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.search-stats .stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
}

/* Search Panel */
.search-panel .card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}


.search-group {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.search-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.search-group .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.search-group .form-label i {
    color: var(--primary-color);
    width: 16px;
}

.search-group .form-control,
.search-group .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.search-group .form-control:focus,
.search-group .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn-search {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Quick Stats */
.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: white;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #059669, #10b981);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.stat-number {
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Results Panel */
.results-panel .card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.results-panel .card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

/* Table View */
.table-responsive {
    border-radius: 0.5rem;
}


.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
}

.document-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.document-type {
    display: inline-block;
    background: #e2e8f0;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Grid View */
.results-grid {
    padding: 1rem;
}

.document-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: white;
    transition: all 0.3s ease;
    height: 100%;
}

.document-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.document-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 1rem 1rem 0.5rem;
}

.file-icon-large {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 0.75rem;
    font-size: 2rem;
    margin: 0 auto;
}

.document-actions {
    margin-left: auto;
}

.document-body {
    padding: 0.5rem 1rem 1rem;
}

.document-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-item i {
    width: 16px;
    text-align: center;
    color: var(--primary-color);
}

/* No Results */
.no-results {
    max-width: 500px;
    margin: 0 auto;
}

.no-results i {
    opacity: 0.5;
}

.suggestions ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.suggestions li {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

/* Search Welcome */
.search-welcome {
    max-width: 600px;
    margin: 0 auto;
}

.search-tips {
    text-align: left;
    margin-top: 2rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.tip-item i {
    margin-top: 0.125rem;
    width: 20px;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .search-header {
        text-align: center;
        padding: 1.5rem 0;
    }
    
    .search-stats {
        margin-top: 1rem;
    }
    
    .results-panel {
        margin-top: 2rem;
    }
    
    .file-name {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .search-header h1 {
        font-size: 1.75rem;
    }
    
    .search-group {
        margin-bottom: 1.5rem;
    }
    
    .document-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .file-name {
        max-width: none;
        white-space: normal;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .results-grid .col-lg-6 {
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Loading States */
.btn-search:disabled {
    opacity: 0.7;
    transform: none !important;
}

.table tbody tr.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Advanced Features */
.search-group .input-group-text {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: var(--text-secondary);
}

.badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Print Styles */
@media print {
    .search-header,
    .search-panel,
    .card-header,
    .pagination,
    .btn-group {
        display: none !important;
    }
    
    .results-panel {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .container-fluid {
        max-width: none !important;
        padding: 0 !important;
    }
}


/* ===================================================
   FILE PATH DISPLAY STYLES
   ================================================== */

.file-path {
    max-width: 250px;
    overflow: hidden;
}

.file-path-text {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #475569;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
}

.file-path-text:hover {
    background: #e2e8f0;
    cursor: help;
}

.file-path-small {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.7rem;
    color: #64748b;
    display: inline-block;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
}

.file-path-small:hover {
    background: #e2e8f0;
    cursor: help;
}

/* Responsive adjustments for file paths */
@media (max-width: 768px) {
    .file-path {
        max-width: 150px;
    }
    
    .file-path-text {
        max-width: 140px;
        font-size: 0.7rem;
    }
    
    .file-path-small {
        max-width: 120px;
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .file-path {
        max-width: 120px;
    }
    
    .file-path-text {
        max-width: 110px;
    }
    
    .file-path-small {
        max-width: 100px;
    }
}


/* ===================================================
   WORKFLOW NOTES STYLES
   ================================================== */

.note-card {
    transition: var(--transition-normal);
    border-left: 4px solid var(--primary-color);
}

.note-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.note-header {
    flex: 1;
}

.note-content {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.note-actions {
    flex-shrink: 0;
}

.notes-container {
    max-height: 500px;
    overflow-y: auto;
}

.notes-container::-webkit-scrollbar {
    width: 6px;
}

.notes-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.notes-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

.notes-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Character counter styles */
#noteCharCount {
    font-weight: 600;
    transition: color 0.3s ease;
}

/* Note textarea styles */
textarea[name="NewNote.Note"] {
    resize: vertical;
    min-height: 120px;
}

textarea[name="NewNote.Note"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* === NAVEGACIÓN SUPERIOR === */
.top-navigation {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-section .brand-logo {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.brand-section .brand-logo:hover {
    color: #f1f5f9;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
}

.quick-actions .quick-search {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.quick-actions .quick-search:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.notification-btn:hover {
    color: #f1f5f9;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 1rem;
    min-width: 1.25rem;
    text-align: center;
}

/* === USER DROPDOWN === */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-avatar {
    font-size: 1.25rem;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.dropdown-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.25rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .top-nav-content {
        padding: 0.5rem 1rem;
    }
    
    .quick-actions {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown-menu {
        right: -1rem;
        min-width: 180px;
    }
}

/* ===================================================
   ESTILOS PARA PÁGINA DE CREACIÓN DE USUARIOS
   ================================================== */

/* Estilos personalizados para la página de creación de usuarios */

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
}

.card-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.card-header h3, .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.card-tools {
    float: right;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group .btn {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .form-control {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .form-control:focus {
    border-right: 1px solid #667eea;
}

.password-strength {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-success {
    color: #28a745 !important;
}

/* Animaciones */
.card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-header {
        text-align: center;
    }
    
    .card-tools {
        float: none;
        margin-top: 1rem;
        text-align: center;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
}

/* Iconos FontAwesome */
.fas {
    margin-right: 0.5rem;
}

/* Hover effects */
.form-group:hover .form-label {
    color: #667eea;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success message styling */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* ===== REGLA FINAL - MÁXIMA PRIORIDAD PARA BOTONES SUBMIT ===== */
/* Esta regla debe estar al final para asegurar máxima prioridad */
form button[type="submit"],
form button[type="submit"].btn,
.wizard-navigation form button[type="submit"],
.wizard-navigation form button[type="submit"].btn,
.wizard-navigation form button[type="submit"].btn-primary,
.wizard-navigation form button[type="submit"].btn-success,
.wizard-navigation form button[type="submit"].btn-outline-secondary,
button[type="submit"][name="action"],
button[type="submit"][name="action"].btn,
button[type="submit"][name="action"].btn-primary,
button[type="submit"][name="action"].btn-success,
.container-fluid form button[type="submit"],
.container-fluid .wizard-navigation button[type="submit"],
.card-body form button[type="submit"],
.card-body .wizard-navigation button[type="submit"] {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Regla adicional para asegurar que funcione incluso con Bootstrap */
.btn[type="submit"],
button.btn[type="submit"],
button[type="submit"].btn-primary,
button[type="submit"].btn-success,
button[type="submit"].btn-outline-secondary,
button[type="submit"].btn-outline-primary {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Regla específica para botones del wizard - asegurar que todo el área sea clickeable */
.wizard-navigation button[type="submit"],
.wizard-navigation button[type="button"],
.wizard-navigation .btn {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
}

.wizard-navigation button[type="submit"] *,
.wizard-navigation button[type="button"] *,
.wizard-navigation .btn * {
    pointer-events: none !important; /* Los hijos no bloquean, el botón maneja todo */
    cursor: inherit !important; /* Heredar el cursor del botón */
}

/* Marca de agua para PDFs de ESCRITURAS en visualización */
.pdf-watermark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-watermark-text {
    font-size: 4rem;
    color: rgba(255, 0, 0, 0.3);
    transform: rotate(-45deg);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    white-space: nowrap;
    user-select: none;
    position: relative;
}
