/**
 * ============================================
 * INVENTACORE v2.0.0 - CSS PRINCIPAL
 * ============================================
 * Arquitectura modular SMACSS-inspired
 *
 * Estructura:
 * 1. Base - Variables, reset, tipografía
 * 2. Layout - Navbar, footer, estructura
 * 3. Components - Cards, tables, forms, buttons
 * 4. Themes - Dark mode
 * 5. Modules - Estilos específicos de módulos
 * ============================================
 */

/* ============================================
 * 1. BASE
 * ============================================ */
@import url('base/variables.css');
@import url('base/base.css');
@import url('base/layout.css');

/* ============================================
 * 2. COMPONENTS
 * ============================================ */
@import url('components/cards.css');
@import url('components/tables.css');
@import url('components/forms.css');
@import url('components/buttons.css');
@import url('components/modals.css');
@import url('components/alerts.css');

/* ============================================
 * 3. THEMES
 * ============================================ */
@import url('themes/dark-mode.css');

/* ============================================
 * 4. RESPONSIVE
 * ============================================ */
@import url('base/responsive.css');

/* ============================================
 * 5. MODULE-SPECIFIC STYLES
 * Estilos específicos de cada módulo del sistema
 * ============================================ */
@import url('modules/common.css');
@import url('modules/pos.css');
@import url('modules/ventas.css');
@import url('modules/compras.css');
@import url('modules/caja.css');
@import url('modules/dashboard.css');
@import url('modules/inventario.css');
@import url('modules/clientes.css');
@import url('modules/admin.css');
@import url('modules/servicio-tecnico.css');
@import url('modules/reportes.css');
@import url('modules/tema.css');
@import url('modules/global-search.css');
@import url('modules/keyboard-shortcuts.css');

/* ============================================
 * 5. UTILITIES & EXTRAS
 * Estilos que no encajan en otras categorías
 * ============================================ */

/* Page Header - Usa variables para cambio automático de tema */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--header-gradient);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--header-text);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header p {
    color: var(--header-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.page-header p strong {
    color: var(--header-text-strong);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Cursores */
.cursor-pointer {
    cursor: pointer;
}

/* Texto */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Action buttons group */
.btn-group-actions {
    display: flex;
    gap: 0.25rem;
}

/* WhatsApp button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: white;
}

/* Print styles */
@media print {
    .navbar,
    .no-print,
    footer,
    .whatsapp-float {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
