/* ==========================================================
   ESTILOS PERSONALIZADOS - SISTEMA DE REPORTES TÉCNICOS
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Efectos de Tarjetas y Sombras */
.card-hover {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.08);
}

/* Canvas de Firma Digital */
.signature-pad-container {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    background-color: #ffffff;
    touch-action: none;
    overflow: hidden;
}
.signature-pad-container.active {
    border-color: #0284c7;
    background-color: #f8fafc;
}
.signature-pad-canvas {
    width: 100%;
    height: 180px;
    display: block;
    cursor: crosshair;
}

/* Estilos de Impresión y PDF */
@media print {
    nav, footer, .no-print, button, .action-buttons {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
    }
    main {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .print-sheet {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
    .page-break {
        page-break-after: always;
    }
}

/* Badges y Píldoras */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modo Oscuro - Reglas Globales y Corrección de Contraste */
html.dark body {
    background-color: #090d16;
    color: #f1f5f9;
}

/* Superficies principales */
html.dark .bg-white {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc;
}
html.dark .bg-slate-50 {
    background-color: #0b1120 !important;
    border-color: #1e293b !important;
    color: #cbd5e1;
}
html.dark .bg-slate-100 {
    background-color: #1e293b !important;
    color: #e2e8f0;
}
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300 {
    border-color: #1e293b !important;
}
html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #1e293b !important;
}

/* Tipografía en Modo Oscuro - Garantizar que ninguna letra quede invisible */
html.dark .text-slate-900 { color: #f8fafc !important; }
html.dark .text-slate-800 { color: #f1f5f9 !important; }
html.dark .text-slate-700 { color: #cbd5e1 !important; }
html.dark .text-slate-600 { color: #94a3b8 !important; }
html.dark .text-slate-500 { color: #94a3b8 !important; }
html.dark .text-slate-400 { color: #cbd5e1 !important; }
html.dark label { color: #cbd5e1; }

/* Textos oscuros específicos mapeados a variantes luminosas en modo oscuro */
html.dark .text-blue-950, html.dark .text-blue-900, html.dark .text-blue-800 { color: #93c5fd !important; }
html.dark .text-blue-700, html.dark .text-blue-600 { color: #60a5fa !important; }

html.dark .text-emerald-950, html.dark .text-emerald-900, html.dark .text-emerald-800 { color: #6ee7b7 !important; }
html.dark .text-emerald-700, html.dark .text-emerald-600 { color: #34d399 !important; }

html.dark .text-amber-950, html.dark .text-amber-900, html.dark .text-amber-800 { color: #fcd34d !important; }
html.dark .text-amber-700, html.dark .text-amber-600 { color: #fbbf24 !important; }

html.dark .text-indigo-950, html.dark .text-indigo-900, html.dark .text-indigo-800 { color: #a5b4fc !important; }
html.dark .text-indigo-700, html.dark .text-indigo-600 { color: #818cf8 !important; }

html.dark .text-sky-950, html.dark .text-sky-900, html.dark .text-sky-800 { color: #7dd3fc !important; }
html.dark .text-sky-700, html.dark .text-sky-600 { color: #38bdf8 !important; }

html.dark .text-rose-950, html.dark .text-rose-900, html.dark .text-rose-800 { color: #fda4af !important; }
html.dark .text-rose-700, html.dark .text-rose-600 { color: #fb7185 !important; }

/* Recuadros y Tarjetas con Fondos Suaves (Evita texto blanco sobre fondo amarillo/azul claro) */
html.dark [class*="bg-amber-50"] {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fef3c7 !important;
}
html.dark [class*="bg-emerald-50"] {
    background-color: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #d1fae5 !important;
}
html.dark [class*="bg-blue-50"] {
    background-color: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #dbeafe !important;
}
html.dark [class*="bg-sky-50"] {
    background-color: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    color: #e0f2fe !important;
}
html.dark [class*="bg-indigo-50"] {
    background-color: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: #e0e7ff !important;
}
html.dark [class*="bg-rose-50"] {
    background-color: rgba(244, 63, 94, 0.12) !important;
    border-color: rgba(244, 63, 94, 0.3) !important;
    color: #ffe4e6 !important;
}

/* Badges y Etiquetas tipo Píldora en Modo Oscuro */
html.dark [class*="bg-sky-100"] {
    background-color: rgba(14, 165, 233, 0.2) !important;
    color: #7dd3fc !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
}
html.dark [class*="bg-emerald-100"] {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}
html.dark [class*="bg-amber-100"] {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #fcd34d !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}
html.dark [class*="bg-blue-100"] {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}
html.dark [class*="bg-indigo-100"] {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
}
html.dark [class*="bg-rose-100"] {
    background-color: rgba(244, 63, 94, 0.2) !important;
    color: #fda4af !important;
    border-color: rgba(244, 63, 94, 0.35) !important;
}

/* Inputs, Textareas, Selects y Opciones */
html.dark input[type="text"],
html.dark input[type="number"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="datetime-local"],
html.dark input[type="date"],
html.dark textarea,
html.dark select {
    background-color: #0b1120 !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}
html.dark select option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}
html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

/* Tablas */
html.dark table thead {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}
html.dark table thead th {
    color: #cbd5e1 !important;
}
html.dark table tbody tr {
    border-color: #1e293b !important;
}
html.dark table tbody td {
    color: #f1f5f9 !important;
}

/* Canvas de Firma Digital (se preserva blanco para fidelidad de impresión) */
html.dark .signature-pad-container {
    background-color: #ffffff;
    border-color: #475569;
}

/* Scrollbar estilizada en modo oscuro */
html.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

