/* 
 * Casa Moreno ERP - Styling System (Premium Mobile)
 * Design Tokens & Section Separation
 */

:root {
    --primary: #2563eb;
    --secondary: #1e293b;
    --accent: #ef4444;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
}

/* 1. Global Reset & Performance */
html, body {
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
}

.no-print-bg {
    background-color: var(--bg-light);
}

/* 2. Section Separation (Visual Clarity) */
.tab-content {
    animation: fadeIn 0.3s ease-out;
}

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

/* 3. Card Elevations (Premium Look) */
.card-premium {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid var(--border);
}

/* Animaciones y utilidades extra */
.translate-x-0 {
    transform: translateX(0) !important;
}
.translate-x-full {
    transform: translateX(100%) !important;
}

/* 4. POS Specifics */
input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 5. Agenda & Rutas (Geo-CRM) */
#agenda-list::-webkit-scrollbar {
    width: 0px; /* Hide scrollbar but keep functionality */
}

/* 6. Batch Printing Spooler Layout */
@media print {
    .print-hidden {
        display: none !important;
    }

    .print-block {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .print-label {
        border: 1px solid #ddd;
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        page-break-inside: avoid;
    }

    .print-label.small { width: 80px; height: 120px; }
    .print-label.medium { width: 120px; height: 180px; }
    .print-label.large { width: 160px; height: 240px; }

    .label-title { font-size: 10px; font-weight: bold; margin-bottom: 2px; display: block; }
    .label-cat { font-size: 8px; color: #666; display: block; }
    .label-price { font-size: 12px; font-weight: bold; color: #000; margin-top: 5px; display: block; }
    
    .label-qr canvas, .label-qr img {
        margin-top: 10 px;
        max-width: 100% !important;
        height: auto !important;
    }
}

/* 7. Navigation Aesthetics */
.nav-button i {
    transition: transform 0.2s ease;
}

.nav-button:active i {
    transform: scale(0.9);
}

/* 8. Client Mode UI States */
body.client-mode .admin-only {
    display: none !important;
}

body.client-mode .client-only {
    display: block !important;
}

.client-only {
    display: none;
}

/* 9. AI Processing Effect (Glassmorphism + Spinner) */
.ai-processing-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s;
}

.ai-processing-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

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

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

.glass-panel {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}
