/* ==========================================================================
   DASHBOARD WIDGETS STYLESHEET (SIREP - FILAMENT PANEL)
   Proporciona estilos completos para los widgets personalizados del dashboard,
   evitando problemas de purga de Tailwind en Filament.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Contenedores de Tarjetas y Secciones
   -------------------------------------------------------------------------- */
.fi-widgets-widget .fi-section,
.dw-section-card {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.875rem !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    margin-bottom: 1.5rem !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.dark .fi-widgets-widget .fi-section,
.dark .dw-section-card {
    background-color: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

/* --------------------------------------------------------------------------
   2. Flexbox Utilities
   -------------------------------------------------------------------------- */
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.flex-col { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.justify-start { justify-content: flex-start !important; }
.justify-end { justify-content: flex-end !important; }

/* --------------------------------------------------------------------------
   3. Grid Utilities & Breakpoints
   -------------------------------------------------------------------------- */
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
    .sm\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
    .lg\:col-span-1 { grid-column: span 1 / span 1 !important; }
    .lg\:col-span-2 { grid-column: span 2 / span 2 !important; }
}

/* Gaps */
.gap-1 { gap: 0.25rem !important; }
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }

/* --------------------------------------------------------------------------
   4. Spacing & Padding
   -------------------------------------------------------------------------- */
.space-y-2 > * + * { margin-top: 0.5rem !important; }
.space-y-3 > * + * { margin-top: 0.75rem !important; }
.space-y-4 > * + * { margin-top: 1rem !important; }
.space-y-6 > * + * { margin-top: 1.5rem !important; }

.p-1 { padding: 0.25rem !important; }
.p-1\.5 { padding: 0.375rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }

.px-1\.5 { padding-left: 0.375rem !important; padding-right: 0.375rem !important; }
.py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.pt-2 { padding-top: 0.5rem !important; }

.mt-1 { margin-top: 0.25rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-1\.5 { margin-bottom: 0.375rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }

/* --------------------------------------------------------------------------
   5. Dimensiones & Posicionamiento
   -------------------------------------------------------------------------- */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.inset-0 { top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; }
.pointer-events-none { pointer-events: none !important; }
.overflow-hidden { overflow: hidden !important; }
.truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }

.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.w-2 { width: 0.5rem !important; }
.h-2 { height: 0.5rem !important; }
.w-2\.5 { width: 0.625rem !important; }
.h-2\.5 { height: 0.625rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-5 { width: 1.25rem !important; }
.h-5 { height: 1.25rem !important; }
.w-10 { width: 2.5rem !important; }
.h-10 { height: 2.5rem !important; }

.w-48 { width: 12rem !important; }
.h-44 { height: 11rem !important; min-height: 11rem !important; }
.h-48 { height: 12rem !important; min-height: 12rem !important; }
.h-52 { height: 13rem !important; min-height: 13rem !important; }
.h-56 { height: 14rem !important; min-height: 14rem !important; }
.h-64 { height: 16rem !important; min-height: 16rem !important; }

/* --------------------------------------------------------------------------
   6. Canvas & Contenedores de Gráficas Chart.js
   -------------------------------------------------------------------------- */
.relative.h-44.w-full,
.relative.h-48.w-full,
.relative.h-56.w-full,
.relative.h-64.w-full {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

.relative.w-48.h-48 {
    position: relative !important;
    width: 12rem !important;
    height: 12rem !important;
    min-width: 12rem !important;
    min-height: 12rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.fi-widgets-widget canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}

/* --------------------------------------------------------------------------
   7. Bordes & Radio de Bordes
   -------------------------------------------------------------------------- */
.border { border: 1px solid #e5e7eb !important; }
.border-b { border-bottom: 1px solid #e5e7eb !important; }
.border-t { border-top: 1px solid #e5e7eb !important; }

.rounded { border-radius: 0.25rem !important; }
.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 9999px !important; }

.border-gray-100 { border-color: #f3f4f6 !important; }
.border-gray-200 { border-color: #e5e7eb !important; }
.border-gray-300 { border-color: #d1d5db !important; }
.border-emerald-100 { border-color: #d1fae5 !important; }
.border-amber-100 { border-color: #fef3c7 !important; }
.border-blue-100 { border-color: #dbeafe !important; }
.border-pink-100 { border-color: #fce7f3 !important; }
.border-purple-100 { border-color: #f3e8ff !important; }

.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.dark .dark\:border-white\/5 { border-color: rgba(255, 255, 255, 0.05) !important; }
.dark .dark\:border-white\/10 { border-color: rgba(255, 255, 255, 0.10) !important; }
.dark .dark\:border-emerald-950\/40 { border-color: rgba(6, 78, 59, 0.4) !important; }
.dark .dark\:border-amber-950\/40 { border-color: rgba(120, 53, 15, 0.4) !important; }
.dark .dark\:border-blue-950\/30 { border-color: rgba(30, 58, 138, 0.3) !important; }
.dark .dark\:border-pink-950\/30 { border-color: rgba(131, 24, 67, 0.3) !important; }
.dark .dark\:border-purple-950\/30 { border-color: rgba(88, 28, 135, 0.3) !important; }
.dark .dark\:border-gray-700 { border-color: #374151 !important; }

/* --------------------------------------------------------------------------
   8. Fondos de Color & Paleta
   -------------------------------------------------------------------------- */
.bg-white { background-color: #ffffff !important; }
.bg-gray-50 { background-color: #f9fafb !important; }
.bg-gray-50\/60 { background-color: rgba(249, 250, 251, 0.6) !important; }
.bg-gray-50\/40 { background-color: rgba(249, 250, 251, 0.4) !important; }
.bg-gray-100 { background-color: #f3f4f6 !important; }
.bg-gray-500 { background-color: #6b7280 !important; }

.bg-emerald-50 { background-color: #ecfdf5 !important; }
.bg-emerald-50\/40 { background-color: rgba(236, 253, 245, 0.4) !important; }
.bg-emerald-50\/50 { background-color: rgba(236, 253, 245, 0.5) !important; }
.bg-emerald-100 { background-color: #d1fae5 !important; }
.bg-emerald-600 { background-color: #059669 !important; }

.bg-amber-50 { background-color: #fffbeb !important; }
.bg-amber-50\/40 { background-color: rgba(255, 251, 235, 0.4) !important; }
.bg-amber-50\/50 { background-color: rgba(255, 251, 235, 0.5) !important; }
.bg-amber-100 { background-color: #fef3c7 !important; }
.bg-amber-600 { background-color: #d97706 !important; }

.bg-blue-50 { background-color: #eff6ff !important; }
.bg-blue-50\/30 { background-color: rgba(239, 246, 255, 0.3) !important; }
.bg-blue-50\/50 { background-color: rgba(239, 246, 255, 0.5) !important; }
.bg-blue-100 { background-color: #dbeafe !important; }
.bg-blue-600 { background-color: #2563eb !important; }

.bg-pink-50 { background-color: #fdf2f8 !important; }
.bg-pink-50\/30 { background-color: rgba(253, 242, 248, 0.3) !important; }
.bg-pink-50\/50 { background-color: rgba(253, 242, 248, 0.5) !important; }
.bg-pink-100 { background-color: #fce7f3 !important; }
.bg-pink-500 { background-color: #ec4899 !important; }

.bg-purple-50 { background-color: #faf5ff !important; }
.bg-purple-50\/30 { background-color: rgba(250, 245, 255, 0.3) !important; }
.bg-purple-100 { background-color: #f3e8ff !important; }
.bg-purple-500 { background-color: #a855f7 !important; }
.bg-purple-600 { background-color: #9333ea !important; }

.bg-teal-50 { background-color: #f0fdf4 !important; }
.bg-teal-100 { background-color: #ccfbf1 !important; }
.bg-teal-600 { background-color: #0d9488 !important; }

.bg-orange-50 { background-color: #fff7ed !important; }
.bg-orange-100 { background-color: #ffedd5 !important; }
.bg-orange-600 { background-color: #ea580c !important; }

.bg-cyan-50\/50 { background-color: rgba(236, 254, 255, 0.5) !important; }
.bg-indigo-50 { background-color: #eef2ff !important; }
.bg-indigo-50\/50 { background-color: rgba(238, 242, 255, 0.5) !important; }

/* Dark Mode Backgrounds */
.dark .dark\:bg-gray-800\/40 { background-color: rgba(31, 41, 55, 0.4) !important; }
.dark .dark\:bg-gray-800 { background-color: #1f2937 !important; }
.dark .dark\:bg-gray-900 { background-color: #111827 !important; }
.dark .dark\:bg-emerald-950\/20 { background-color: rgba(6, 78, 59, 0.2) !important; }
.dark .dark\:bg-emerald-900\/60 { background-color: rgba(6, 95, 70, 0.6) !important; }
.dark .dark\:bg-emerald-950 { background-color: #022c22 !important; }
.dark .dark\:bg-amber-950\/20 { background-color: rgba(120, 53, 15, 0.2) !important; }
.dark .dark\:bg-amber-900\/60 { background-color: rgba(120, 53, 15, 0.6) !important; }
.dark .dark\:bg-blue-950\/10 { background-color: rgba(30, 58, 138, 0.1) !important; }
.dark .dark\:bg-blue-950\/20 { background-color: rgba(30, 58, 138, 0.2) !important; }
.dark .dark\:bg-blue-950\/60 { background-color: rgba(30, 58, 138, 0.6) !important; }
.dark .dark\:bg-blue-900\/40 { background-color: rgba(30, 58, 138, 0.4) !important; }
.dark .dark\:bg-blue-950 { background-color: #172554 !important; }
.dark .dark\:bg-pink-950\/10 { background-color: rgba(131, 24, 67, 0.1) !important; }
.dark .dark\:bg-pink-950\/20 { background-color: rgba(131, 24, 67, 0.2) !important; }
.dark .dark\:bg-purple-950\/10 { background-color: rgba(88, 28, 135, 0.1) !important; }
.dark .dark\:bg-purple-950\/60 { background-color: rgba(88, 28, 135, 0.6) !important; }
.dark .dark\:bg-purple-900\/40 { background-color: rgba(88, 28, 135, 0.4) !important; }
.dark .dark\:bg-purple-950 { background-color: #3b0764 !important; }
.dark .dark\:bg-teal-950\/60 { background-color: rgba(19, 78, 74, 0.6) !important; }
.dark .dark\:bg-teal-900\/40 { background-color: rgba(19, 78, 74, 0.4) !important; }
.dark .dark\:bg-teal-950 { background-color: #042f2e !important; }
.dark .dark\:bg-orange-950\/60 { background-color: rgba(124, 45, 18, 0.6) !important; }
.dark .dark\:bg-orange-900\/40 { background-color: rgba(124, 45, 18, 0.4) !important; }
.dark .dark\:bg-orange-950 { background-color: #431407 !important; }
.dark .dark\:bg-cyan-950\/20 { background-color: rgba(22, 78, 99, 0.2) !important; }
.dark .dark\:bg-indigo-950\/20 { background-color: rgba(49, 46, 129, 0.2) !important; }
.dark .dark\:bg-indigo-950 { background-color: #1e1b4b !important; }

/* --------------------------------------------------------------------------
   9. Tipografía y Textos
   -------------------------------------------------------------------------- */
.text-\[10px\] { font-size: 10px !important; line-height: 14px !important; }
.text-\[11px\] { font-size: 11px !important; line-height: 15px !important; }
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
.text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }

.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-black { font-weight: 900 !important; }

.tracking-tight { letter-spacing: -0.025em !important; }
.tracking-wider { letter-spacing: 0.05em !important; }
.uppercase { text-transform: uppercase !important; }
.text-center { text-align: center !important; }

/* Colores de Texto (Light) */
.text-white { color: #ffffff !important; }
.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-700 { color: #374151 !important; }
.text-gray-800 { color: #1f2937 !important; }
.text-gray-900 { color: #111827 !important; }
.text-gray-950 { color: #030712 !important; }

.text-emerald-600 { color: #059669 !important; }
.text-emerald-700 { color: #047857 !important; }
.text-emerald-800 { color: #065f46 !important; }
.text-emerald-900 { color: #064e3b !important; }

.text-amber-600 { color: #d97706 !important; }
.text-amber-700 { color: #b45309 !important; }
.text-amber-800 { color: #92400e !important; }
.text-amber-900 { color: #78350f !important; }

.text-blue-600 { color: #2563eb !important; }
.text-blue-700 { color: #1d4ed8 !important; }
.text-blue-800 { color: #1e40af !important; }
.text-blue-900 { color: #1e3a8a !important; }

.text-pink-600 { color: #db2777 !important; }
.text-pink-700 { color: #be185d !important; }
.text-pink-900 { color: #831843 !important; }

.text-purple-600 { color: #9333ea !important; }
.text-purple-700 { color: #7e22ce !important; }
.text-purple-800 { color: #6b21a8 !important; }
.text-purple-900 { color: #581c87 !important; }

.text-teal-600 { color: #0d9488 !important; }
.text-teal-700 { color: #0f766e !important; }
.text-teal-800 { color: #115e59 !important; }

.text-orange-600 { color: #ea580c !important; }
.text-orange-700 { color: #c2410c !important; }
.text-orange-800 { color: #9a3412 !important; }

.text-cyan-700 { color: #0e7490 !important; }
.text-cyan-900 { color: #164e63 !important; }
.text-indigo-700 { color: #4338ca !important; }
.text-indigo-900 { color: #312e81 !important; }

/* Colores de Texto (Dark Mode) */
.dark .dark\:text-white { color: #ffffff !important; }
.dark .dark\:text-gray-100 { color: #f3f4f6 !important; }
.dark .dark\:text-gray-200 { color: #e5e7eb !important; }
.dark .dark\:text-gray-300 { color: #d1d5db !important; }
.dark .dark\:text-gray-400 { color: #9ca3af !important; }
.dark .dark\:text-emerald-200 { color: #a7f3d0 !important; }
.dark .dark\:text-emerald-300 { color: #6ee7b7 !important; }
.dark .dark\:text-emerald-400 { color: #34d399 !important; }
.dark .dark\:text-amber-200 { color: #fde68a !important; }
.dark .dark\:text-amber-300 { color: #fcd34d !important; }
.dark .dark\:text-amber-400 { color: #fbbf24 !important; }
.dark .dark\:text-blue-100 { color: #dbeafe !important; }
.dark .dark\:text-blue-300 { color: #93c5fd !important; }
.dark .dark\:text-blue-400 { color: #60a5fa !important; }
.dark .dark\:text-pink-100 { color: #fce7f3 !important; }
.dark .dark\:text-pink-300 { color: #f9a8d4 !important; }
.dark .dark\:text-purple-100 { color: #f3e8ff !important; }
.dark .dark\:text-purple-300 { color: #d8b4fe !important; }
.dark .dark\:text-purple-400 { color: #c084fc !important; }
.dark .dark\:text-teal-300 { color: #5eead4 !important; }
.dark .dark\:text-teal-400 { color: #2dd4bf !important; }
.dark .dark\:text-orange-300 { color: #fdba74 !important; }
.dark .dark\:text-orange-400 { color: #fb923c !important; }
.dark .dark\:text-cyan-200 { color: #a5f3fc !important; }
.dark .dark\:text-cyan-400 { color: #22d3ee !important; }
.dark .dark\:text-indigo-200 { color: #c7d2fe !important; }
.dark .dark\:text-indigo-400 { color: #818cf8 !important; }

/* --------------------------------------------------------------------------
   10. Enlaces y Micro-Interacciones
   -------------------------------------------------------------------------- */
.transition {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

a.inline-flex:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

/* Hover en tarjetas de estadísticas */
.fi-widgets-widget .p-4.rounded-xl {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fi-widgets-widget .p-4.rounded-xl:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
}
