/* =============================================
   PRO-UI.CSS — TEMA GRIS PROFESIONAL (SLATE)
   Fundación del Niño - Municipio Iribarren
   -------------------------------------------------
   Paleta: GRIS PIZARRA EJECUTIVO
   - Gris muy oscuro (Textos/Header):  #0F172A
   - Gris oscuro (Sidebar/Títulos):    #1E293B
   - Gris medio (Botones/Hover):       #334155
   - Gris suave (Bordes/Fondos):       #E2E8F0
   - Fondo general (Canvas):           #F8FAFC
   -------------------------------------------------
   Acentos (para mantener identidad):
   - Magenta embarazadas: #BE185D
   - Rojo reclamos:       #DC2626
   - Verde aprobadas:     #10B981
   - Ámbar pendientes:    #F59E0B
   ============================================= */

/* =============================================
   0. VARIABLES GLOBALES
   ============================================= */
:root {
    /* Escala de Grises (Slate) */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Alias para compatibilidad con código antiguo */
    --turquoise-50:  var(--slate-50);
    --turquoise-100: var(--slate-100);
    --turquoise-200: var(--slate-200);
    --turquoise-300: var(--slate-300);
    --turquoise-400: var(--slate-400);
    --turquoise-500: var(--slate-500);
    --turquoise-600: var(--slate-600);
    --turquoise-700: var(--slate-700);
    --turquoise-800: var(--slate-800);
    --turquoise-900: var(--slate-900);
    --turquoise-950: var(--slate-950);

    /* Magenta (embarazadas) */
    --magenta-100: #fce7f3;
    --magenta-300: #f9a8d4;
    --magenta-500: #BE185D;
    --magenta-600: #9d174d;
    --magenta-800: #831843;

    /* Alias rosa */
    --pink-100: var(--magenta-100);
    --pink-300: var(--magenta-300);
    --pink-500: var(--magenta-500);
    --pink-600: var(--magenta-600);
    --pink-800: var(--magenta-800);

    /* Semánticos */
    --success: #10B981;
    --warning: #F59E0B;
    --danger:  #DC2626;
    --info:    #3B82F6;

    /* Textos y fondos */
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --bg-soft: #f8fafc;
    --bg-softer: #ffffff;
    --border-light: #e2e8f0;
    --border-primary: rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] {
    --slate-50:  #0f172a;
    --slate-100: #1e293b;
    --slate-200: #334155;
    --slate-300: #475569;
    --slate-400: #64748b;
    --slate-500: #94a3b8;
    --slate-600: #cbd5e1;
    --slate-700: #e2e8f0;
    --slate-800: #f1f5f9;
    --slate-900: #f8fafc;

    --bg-soft: #020617;
    --bg-softer: #0f172a;
    --text-dark: #f8fafc;
    --text-medium: #cbd5e1;
    --text-light: #64748b;
    --border-light: #1e293b;
    --border-primary: rgba(255, 255, 255, 0.1);
}

/* =============================================
   1. FONDOS GENERALES
   ============================================= */
body {
    background-color: var(--bg-soft) !important;
    color: var(--text-dark);
}

.main-content,
.main-content.expanded {
    background: var(--bg-soft) !important;
}

/* =============================================
   2. TOP HEADER (Gris Muy Oscuro)
   ============================================= */
body .top-header {
    background: #0f172a !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border-bottom: 1px solid #1e293b !important;
}

body .top-header::before,
body .top-header::after {
    display: none !important; /* Quitamos los brillos turquesas antiguos */
}

body .top-header .brand .brand-sub,
body .top-header .user-info .user-details .user-rol {
    color: #94a3b8 !important;
}

body .top-header .icon-btn .notification-dot {
    border-color: #0f172a !important;
}

/* Botones del header */
body .top-header .btn-toggle,
body .top-header .icon-btn,
body .top-header .user-info {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body .top-header .btn-toggle:hover,
body .top-header .icon-btn:hover,
body .top-header .user-info:hover,
body .top-header .user-info.active {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* =============================================
   3. SIDEBAR (Gris Claro)
   ============================================= */
body .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.03) !important;
}

body .sidebar::before,
body .sidebar::after {
    display: none !important;
}

body .sidebar .menu-section .section-title {
    color: #64748b !important;
}

body .sidebar .menu-section .section-title::before {
    background: #94a3b8 !important;
    box-shadow: none !important;
}

body .sidebar .menu-section .section-divider {
    background: #e2e8f0 !important;
}

body .sidebar .menu-item {
    color: #334155 !important;
}

body .sidebar .menu-item .menu-icon-wrapper {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body .sidebar .menu-item .menu-icon {
    color: #64748b !important;
}

body .sidebar .menu-item .menu-badge {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

body .sidebar .menu-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body .sidebar .menu-item:hover .menu-icon-wrapper {
    background: #e2e8f0 !important;
    box-shadow: none !important;
}

body .sidebar .menu-item:hover .menu-icon {
    color: #0f172a !important;
}

body .sidebar .menu-item.active {
    background: #1e293b !important; /* Menú activo: Gris oscuro */
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2) !important;
}

body .sidebar .menu-item.active .menu-icon-wrapper {
    background: transparent !important;
}

body .sidebar .menu-item.active .menu-icon {
    color: #ffffff !important;
}

body .sidebar .menu-item.active .menu-badge {
    background: #334155 !important;
    color: #ffffff !important;
}

body .sidebar.collapsed .menu-item.active {
    background: #1e293b !important;
}

body .sidebar.collapsed .menu-item::after {
    background: #0f172a !important;
}

body .sidebar.collapsed .menu-item::before {
    border-color: transparent #0f172a transparent transparent !important;
}

body .sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
}

/* =============================================
   4. MENÚ EMBARAZADAS (Magenta del logo - se mantiene)
   ============================================= */
body .sidebar .menu-item.menu-pink .menu-icon-wrapper {
    background: #fce7f3 !important;
    border-color: #fbcfe8 !important;
}

body .sidebar .menu-item.menu-pink .menu-icon {
    color: #BE185D !important;
}

body .sidebar .menu-item.menu-pink:hover {
    background: #fdf2f8 !important;
    color: #831843 !important;
}

body .sidebar .menu-item.menu-pink:hover .menu-icon-wrapper {
    background: #fbcfe8 !important;
}

body .sidebar .menu-item.menu-pink.active {
    background: #BE185D !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(190, 24, 93, 0.25) !important;
}

body .sidebar .menu-item.menu-pink.active .menu-icon {
    color: #ffffff !important;
}

/* =============================================
   5. MENÚ ADMIN (Rojo - se mantiene)
   ============================================= */
body .sidebar .menu-item.menu-admin .menu-icon-wrapper {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

body .sidebar .menu-item.menu-admin .menu-icon {
    color: #dc2626 !important;
}

body .sidebar .menu-item.menu-admin:hover {
    background: #fef2f2 !important;
    color: #991b1b !important;
}

body .sidebar .menu-item.menu-admin.active {
    background: #dc2626 !important;
    color: #ffffff !important;
}

/* =============================================
   6. BOTONES PRINCIPALES (Gris Oscuro)
   ============================================= */
body .btn-primary,
body .btn-generar,
body .btn-guardar,
body .btn-search,
body .btn-login-custom,
body .btn-register,
body .btn-save,
body .btn-primary-pink:not(.pink),
body .btn-nuevo-usuario,
body .btn-add-benef-new,
body .btn-agregar-todos,
body .btn-historial,
body .btn-express,
body .btn-print-new,
body .btn-save-pink,
body .btn-registrar,
body .btn-enviar {
    background: #1e293b !important;
    border-color: #1e293b !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

body .btn-primary:hover,
body .btn-generar:hover,
body .btn-guardar:hover,
body .btn-search:hover,
body .btn-login-custom:hover,
body .btn-register:hover,
body .btn-save:hover,
body .btn-primary-pink:not(.pink):hover,
body .btn-nuevo-usuario:hover,
body .btn-add-benef-new:hover,
body .btn-agregar-todos:hover,
body .btn-historial:hover,
body .btn-express:hover,
body .btn-print-new:hover,
body .btn-save-pink:hover,
body .btn-registrar:hover,
body .btn-enviar:hover {
    background: #0f172a !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25) !important;
    transform: translateY(-2px);
}

/* Botón "success" (verde) */
body .btn-success {
    background: #10B981 !important;
    border-color: #10B981 !important;
}
body .btn-success:hover {
    background: #059669 !important;
}

/* Botón danger / rojo */
body .btn-danger,
body .btn-barra-danger,
body .btn-reclamo {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
}
body .btn-danger:hover {
    background: #B91C1C !important;
}

/* Botón warning (ámbar) */
body .btn-warning {
    background: #F59E0B !important;
    color: #ffffff !important;
}

/* =============================================
   7. TÍTULOS Y TEXTOS DESTACADOS
   ============================================= */
body h1, body h2, body h3, body h4, body h5, body h6 {
    color: var(--text-dark);
}

body .text-primary,
body .text-turquesa,
body .text-azul {
    color: #1e293b !important;
}

body a.text-primary,
body .section-title,
body .card-title,
body .title-icon {
    color: #1e293b !important;
}

body .card h4,
body .card h5,
body .form-card-header h4,
body .content-card h5,
body .result-card-new h5 {
    color: #0f172a !important;
}

/* =============================================
   8. HERO HEADERS (Login, Dashboard, etc.)
   ============================================= */
body .dashboard-hero {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body .dashboard-hero h1 {
    color: #0f172a !important;
}

body .dashboard-hero h1 .highlight-name {
    background: #1e293b !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body .dashboard-hero .hero-greeting {
    color: #64748b !important;
}

body .dashboard-hero .hero-greeting::before {
    background: #cbd5e1 !important;
}

body .dashboard-hero .hero-date {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body .dashboard-hero .hero-date .date-icon,
body .dashboard-hero .hero-date .date-info .date-day {
    color: #0f172a !important;
}

body .dashboard-hero .hero-date .date-info .date-text {
    color: #64748b !important;
}

body .dashboard-hero .stat-mini {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

body .dashboard-hero .stat-mini i {
    color: #64748b !important;
}

body .dashboard-hero .stat-mini .number {
    color: #0f172a !important;
}

body .dashboard-hero .stat-mini:hover {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body .page-hero:not(.pink) {
    background: #1e293b !important; /* Gris oscuro elegante */
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15) !important;
}

body .page-hero:not(.pink) .hero-greeting {
    color: #94a3b8 !important;
}
body .page-hero:not(.pink) .hero-greeting::before {
    background: #94a3b8 !important;
}

/* Login side */
body .login-left {
    background-color: #0f172a !important;
}

body .login-right::before {
    background: #1e293b !important; /* Línea lateral del login */
}

/* =============================================
   9. TABS / FILTROS ACTIVOS
   ============================================= */
body .filtro-tab.active,
body .filtro-tab-btn.active,
body .historial-filtro.active,
body .tab-historial.active,
body .nav-tabs .nav-link.active,
body .nav-pills .nav-link.active {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #1e293b !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

body .filtro-tab .count {
    background: rgba(255, 255, 255, 0.2) !important;
}

body .filtro-tab:not(.active) .count {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

/* Botones de ordenamiento rápido */
body .btn-orden.active {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #1e293b !important;
}

body .btn-orden.inactive:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

/* =============================================
   10. INPUTS Y FORMULARIOS
   ============================================= */
body .form-control:focus,
body .form-control-simple:focus,
body .form-control-new:focus,
body .form-select:focus,
body .input-edit:focus,
body .input-group-custom:focus-within,
body .cedula-wrapper input:focus,
body .cedula-wrapper select:focus,
body .filtro-input:focus,
body .filtro-select:focus {
    border-color: #475569 !important;
    box-shadow: 0 0 0 4px rgba(71, 85, 105, 0.1) !important;
}

body .form-label-new,
body .form-label-simple,
body .form-group-simple label {
    color: #1e293b !important;
}

body .form-label-new i,
body .form-label-simple i {
    color: #64748b !important;
}

body .cedula-wrapper select {
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* =============================================
   11. TABLAS
   ============================================= */
body .tabla-solicitudes thead th,
body .tabla-preview thead th,
body .tabla-embarazadas thead th,
body .table-reporte-new thead th,
body .tabla-solicitantes thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

body .tabla-solicitudes tbody tr:hover,
body .tabla-embarazadas tbody tr:hover,
body .table-reporte-new tbody tr:hover,
body .tabla-solicitantes tbody tr:hover {
    background: #f8fafc !important;
}

body .tabla-solicitudes tbody tr.selected,
body .tabla-embarazadas tbody tr.selected {
    background: #f1f5f9 !important;
    border-left: 4px solid #1e293b !important;
}

body .numero-sol,
body .numero-emb {
    color: #0f172a !important;
}

body .numero-sol::before,
body .numero-emb::before {
    background: #64748b !important;
    box-shadow: none !important;
}

body .tipo-badge,
body .tipo-badge-reporte {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #e2e8f0 !important;
}

body .checkbox-custom:hover {
    border-color: #475569 !important;
}

body .checkbox-custom.checked {
    background: #1e293b !important;
    border-color: #1e293b !important;
}

body .edad-badge-reporte,
body .semana-badge {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #e2e8f0 !important;
}

/* =============================================
   12. PAGINACIÓN
   ============================================= */
body .pag-btn.active,
body .paginacion .active {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #1e293b !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

body .pag-btn:hover:not(.disabled):not(.active),
body .paginacion a:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* =============================================
   13. MODALES Y HEADERS OSCUROS
   ============================================= */
body .modal-header-custom,
body .modal-nota-header,
body .form-card-header,
body .detalle-header,
body .modal-comprobante-header {
    background: #0f172a !important; /* Gris muy oscuro */
    color: white !important;
}

body .btn-action.view {
    background: #475569 !important;
    box-shadow: none !important;
}

/* =============================================
   14. LOGIN
   ============================================= */
body .logo-container h2 {
    color: #0f172a !important;
}

body .input-group-custom .input-icon {
    background: #f8fafc !important;
    color: #64748b !important;
}

body .input-group-custom:focus-within .input-icon {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

body .remember-row .form-check-input:checked {
    background-color: #1e293b !important;
    border-color: #1e293b !important;
}

/* =============================================
   15. DASHBOARD - STAT CARDS
   ============================================= */
body .stat-card-new.completada .stat-icon-circle { background: #475569 !important; }
body .stat-card-new.completada::before { background: #475569 !important; }

body .stat-card-pink.total .stat-icon-circle { background: #BE185D !important; }
body .stat-card-pink.total::before { background: #BE185D !important; }

/* =============================================
   16. HISTORIAL / TIMELINE
   ============================================= */
body .timeline::before {
    background: #cbd5e1 !important;
}

body .timeline-item {
    border-left-color: #475569 !important;
}

body .timeline-item::before {
    border-color: #475569 !important;
    box-shadow: 0 0 0 4px rgba(71, 85, 105, 0.15) !important;
}

body .benef-solicitud-item {
    border-left-color: #cbd5e1 !important;
}

body .benef-grupo-count,
body .solicitante-hist-card .avatar-large {
    background: #1e293b !important;
}

/* =============================================
   17. BARRA DE SELECCIÓN FLOTANTE
   ============================================= */
body .barra-seleccion-flotante,
body .barra-seleccion {
    background: #0f172a !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3) !important;
}

body .barra-seleccion-flotante .contador-seleccion .numero {
    background: #334155 !important;
    color: #ffffff !important;
}

body .btn-barra-primary {
    background: #475569 !important;
    color: #ffffff !important;
}

/* =============================================
   18. EMPTY STATES
   ============================================= */
body .empty-state .empty-icon,
body .empty-state-new .empty-icon {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
}

body .empty-state h5,
body .empty-state-new h5 {
    color: #334155 !important;
}

/* =============================================
   19. REPORTES / KPIS / GRÁFICOS
   ============================================= */
body .kpi-card.kpi-total,
body .kpi-card.kpi-completadas {
    border-left-color: #475569 !important;
}

body .kpi-card.kpi-total .kpi-icon,
body .kpi-card.kpi-completadas .kpi-icon {
    background: #f1f5f9 !important;
}

body .kpi-card.kpi-total .kpi-value,
body .kpi-card.kpi-completadas .kpi-value {
    color: #1e293b !important;
}

body .rank-barra-fill-detalle,
body .rank-barra-fill {
    background: #475569 !important;
}

body .rank-total-detalle,
body .rank-total {
    color: #1e293b !important;
}

body .chart-bar:not(.today) {
    background: #475569 !important;
}

body .heatmap-leyenda-gradient {
    background: linear-gradient(90deg, rgba(71, 85, 105, 0.1) 0%, rgba(71, 85, 105, 0.9) 100%) !important;
}

/* =============================================
   20. TOASTS / ALERTS
   ============================================= */
body .alert-info {
    background: #f1f5f9 !important;
    border-left-color: #475569 !important;
    color: #0f172a !important;
}

/* =============================================
   21. MODO OSCURO
   ============================================= */
[data-theme="dark"] body,
[data-theme="dark"] .main-content {
    background: #020617 !important;
    color: #f8fafc;
}

[data-theme="dark"] body .top-header {
    background: #020617 !important;
    border-bottom-color: #1e293b !important;
}

[data-theme="dark"] body .sidebar {
    background: #0f172a !important;
    border-right-color: #1e293b !important;
}

[data-theme="dark"] body .sidebar .menu-item {
    color: #cbd5e1 !important;
}

[data-theme="dark"] body .sidebar .menu-item .menu-icon-wrapper {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] body .sidebar .menu-item .menu-icon {
    color: #94a3b8 !important;
}

[data-theme="dark"] body .sidebar .menu-item:hover {
    background: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] body .sidebar .menu-item.active {
    background: #334155 !important;
}

[data-theme="dark"] body .sidebar .menu-section .section-title {
    color: #64748b !important;
}

[data-theme="dark"] body .card,
[data-theme="dark"] body .form-card,
[data-theme="dark"] body .content-card-new,
[data-theme="dark"] body .result-card-new {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc;
}

[data-theme="dark"] body .table-reporte-new tbody td,
[data-theme="dark"] body .tabla-solicitudes tbody td {
    color: #cbd5e1 !important;
    border-bottom-color: #1e293b !important;
}

[data-theme="dark"] body .table-reporte-new thead th,
[data-theme="dark"] body .tabla-solicitudes thead th {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] body .user-dropdown-menu {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] body .user-dropdown-menu .user-header {
    border-bottom-color: #1e293b !important;
}

[data-theme="dark"] body .user-dropdown-menu .dropdown-item-custom {
    color: #cbd5e1 !important;
}

[data-theme="dark"] body .user-dropdown-menu .dropdown-item-custom:hover {
    background: #1e293b !important;
}

[data-theme="dark"] body .form-control-simple,
[data-theme="dark"] body .form-control-new,
[data-theme="dark"] body .input-edit {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

[data-theme="dark"] body .dashboard-hero {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] body .dashboard-hero h1 {
    color: #f8fafc !important;
}

[data-theme="dark"] body .dashboard-hero .stat-mini {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}