/* ============================================
   Sistema de Inventario — Campaña Lince 2026
   Custom CSS & Design Tokens
   ============================================ */

/* Personalización del Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9; 
}

::-webkit-scrollbar-thumb {
    background: #a7f3d0; 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #34d399; 
}

/* Sidebar scrollbar */
aside ::-webkit-scrollbar-track {
    background: transparent;
}

aside ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
}

/* Animaciones Flotantes para elementos decorativos (Login) */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.animate-float { 
    animation: float 6s ease-in-out infinite; 
}

.animate-float-delayed { 
    animation: float 8s ease-in-out 2s infinite; 
}

/* Animación de Pulso Suave (Alertas) */
@keyframes pulse-soft {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.animate-pulse-soft {
    animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade in animation for page content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content {
    animation: fadeInUp 0.3s ease-out;
}

/* Utilidad Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Transiciones para elementos interactivos */
button, a, input, select, textarea {
    transition-property: color, background-color, border-color, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Tipografías Globales Base */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Leaflet Map Overrides
   ============================================ */
.leaflet-container {
    font-family: 'Inter', sans-serif !important;
    border-radius: 1rem;
}

.leaflet-popup-content-wrapper {
    border-radius: 1rem !important;
    padding: 0 !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,.15) !important;
    border: 1px solid #e2e8f0;
}

.leaflet-popup-content {
    margin: 0 !important;
    min-width: 220px;
}

.leaflet-popup-tip {
    box-shadow: none !important;
}

.zone-popup {
    padding: 16px;
}

.zone-popup h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 10px;
    color: #1e293b;
}

.zone-popup .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
    color: #64748b;
}

.zone-popup .stat-row:last-child {
    border-bottom: none;
}

.zone-popup .stat-value {
    font-weight: 700;
    color: #334155;
}

/* ============================================
   Sidebar Content Layout
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: 16rem; /* 256px = w-64 */
    min-height: 100vh;
    width: 100%;
}

@media (max-width: 1023px) {
    .app-main {
        margin-left: 0;
        padding-top: 4.5rem !important; /* Spacing for mobile hamburger button */
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ============================================
   Table Styles
   ============================================ */
.data-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
}

/* ============================================
   Card hover micro-animations
   ============================================ */
.metric-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.1);
}

/* ============================================
   Estilos de Impresión
   ============================================ */
@media print {
    aside, button, form, .fixed, .absolute, footer, .no-print {
        display: none !important;
    }
    .app-main {
        margin-left: 0 !important;
    }
    body {
        background-color: white !important;
    }
    .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl {
        box-shadow: none !important;
    }
}
