/*
 * Overrides del panel de administración (cargado vía FilamentAsset, estático).
 *
 * 1) Botón primary: rojo de marca + texto blanco (Filament 4 cambió el contraste).
 * 2) Utilidades Tailwind genéricas: Filament 4 ya NO las incluye en su theme por
 *    defecto y las vistas personalizadas (reporte, dashboard, etc.) las usan. Las
 *    definimos aquí de forma estática para no depender del build de Vite.
 */

/* ===================== Botón primary ===================== */
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) {
    background-color: #d31a2b !important; /* rojo de marca */
    color: #ffffff !important;
}
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link):hover {
    background-color: #b3162a !important;
    color: #ffffff !important;
}
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) .fi-btn-icon,
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) .fi-icon {
    color: #ffffff !important;
}

/* ===================== Utilidades Tailwind ===================== */
/* Display / flex / grid */
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.items-start { align-items: flex-start !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Gap */
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }

/* Espaciado entre hijos */
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem !important; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem !important; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem !important; }

/* Padding / margin */
.p-4 { padding: 1rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.my-8 { margin-top: 2rem !important; margin-bottom: 2rem !important; }

/* Tamaño */
.h-full { height: 100% !important; }
.w-full { width: 100% !important; }
.min-w-full { min-width: 100% !important; }
.container { width: 100% !important; }

/* Fondo / borde / radio / sombra */
.bg-white { background-color: #ffffff !important; }
.border { border-width: 1px !important; border-style: solid !important; }
.border-b { border-bottom-width: 1px !important; border-bottom-style: solid !important; }
.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important; }

/* Evita la "doble tarjeta" en las gráficas: el div que envuelve directamente un
   <canvas> no debe llevar fondo/sombra/padding propios (solo la tarjeta externa). */
.bg-white:has(> canvas) {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Tipografía */
.text-center { text-align: center !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !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; }
.tracking-tight { letter-spacing: -0.025em !important; }
.leading-relaxed { line-height: 1.625 !important; }
.underline { text-decoration-line: underline !important; }
.text-white { color: #ffffff !important; }
.text-gray-700 { color: #374151 !important; }
.text-gray-950 { color: #030712 !important; }

/* Utilidades del widget de noticias (resources/views/noticias-recientes.blade.php) */
.flex-1 { flex: 1 1 0% !important; }
.gap-x-3 { column-gap: 0.75rem !important; }
.p-1 { padding: 0.25rem !important; }
.mt-4 { margin-top: 1rem !important; }
.my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.h-px { height: 1px !important; }
.w-1\/2 { width: 50% !important; }
.border-0 { border-width: 0 !important; }
.bg-gray-200 { background-color: #e5e7eb !important; }
.bg-gray-700 { background-color: #374151 !important; }

/* Responsive */
@media (min-width: 640px) {
    .container { max-width: 640px !important; }
    .sm\:text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
    .sm\:text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
}
@media (min-width: 768px) {
    .container { max-width: 768px !important; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
    .container { max-width: 1024px !important; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1280px) {
    .container { max-width: 1280px !important; }
}
@media (min-width: 1536px) {
    .container { max-width: 1536px !important; }
}
