body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Estilos para pestañas activas */
.tab-btn.active {
    border-bottom: 2px solid #4f46e5;
    color: #4f46e5;
    font-weight: bold;
    background-color: #eef2ff;
}

.inv-tab-btn.active {
    background-color: #0ea5e9;
    color: white;
    border-color: #0284c7;
}

.fin-tab-btn.active {
    background-color: #10b981;
    color: white;
    border-color: #059669;
}

/* ── RESPONSIVE ADDITIONS ── */

/* Padding responsive en main-content */
#main-content {
    padding: 1rem;
}

@media (min-width: 640px) {
    #main-content {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    #main-content {
        padding: 2rem;
    }
}

/* Scroll táctil en tablas y modales */
.overflow-x-auto,
.overflow-y-auto {
    -webkit-overflow-scrolling: touch;
}

/* Altura máxima modales con scroll interno */
.modal-inner {
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-body-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Área táctil mínima 44px en botones de acción pequeños */
.action-btn-touch {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* KPI texto escalable */
.kpi-value {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 700;
    line-height: 1.2;
}

/* Bloquear scroll del body cuando el drawer está abierto */
body.sidebar-open {
    overflow: hidden;
}