/* Variáveis de cores - Esquema Moderno (Branco, Preto, Vermelho) */
:root {
    /* Cores Principais */
    --primary-red: #dc2626;          /* Vermelho principal */
    --primary-red-dark: #b91c1c;     /* Vermelho escuro */
    --primary-red-light: #ef4444;    /* Vermelho claro */
    
    /* Tons de Cinza/Preto */
    --black: #000000;                 /* Preto puro */
    --gray-900: #111827;              /* Quase preto */
    --gray-800: #1f2937;              /* Cinza muito escuro */
    --gray-700: #374151;              /* Cinza escuro */
    --gray-600: #4b5563;              /* Cinza médio escuro */
    --gray-500: #6b7280;              /* Cinza médio */
    --gray-400: #9ca3af;              /* Cinza claro */
    --gray-300: #d1d5db;              /* Cinza muito claro */
    --gray-200: #e5e7eb;              /* Cinza quase branco */
    --gray-100: #f3f4f6;              /* Cinza ultra claro */
    --white: #ffffff;                 /* Branco puro */
    
    /* Gradientes */
    --gradient-red: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    --gradient-dark: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    --gradient-light: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-red: 0 10px 15px -3px rgba(220, 38, 38, 0.2), 0 4px 6px -2px rgba(220, 38, 38, 0.1);
    
    /* === VARIÁVEIS MODERNAS 2024 === */
    /* Cores de Estado */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    
    --info-50: #eff6ff;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    
    /* Tipografia Moderna */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --font-display: 'Poppins', var(--font-primary);
    
    /* Espaçamentos Sistemáticos */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    
    /* Bordas e Raios Modernos */
    --radius-none: 0;
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;
    
    /* Transições Suaves */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
    
    /* Breakpoints (para uso em calc()) */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
}

/* === ESTILOS ESPECÍFICOS PARA DASHBOARD - ÚLTIMOS PEDIDOS === */
.dashboard-order-item {
    transition: all var(--transition-normal);
}

.dashboard-order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gradient-light);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--primary-red);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header h1 i {
    margin-right: 10px;
    color: #fff;
}

/* Navigation Tabs */
.main-nav {
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    padding: 0;
    box-shadow: var(--shadow-sm);
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
}

.nav-tab {
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab:hover {
    background: rgba(220, 38, 38, 0.05);
    color: var(--primary-red);
}

.nav-tab.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
    background: var(--white);
}

/* Destacar aba "Novo Pedido" */
.nav-tab.new-order-tab {
    background: var(--gradient-red);
    color: var(--white) !important;
    font-weight: 700;
    box-shadow: var(--shadow-red);
    transform: scale(1.02);
    border-radius: 8px 8px 0 0;
    margin: 0 4px;
}

.nav-tab.new-order-tab:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--gray-800) 100%);
}

.nav-tab.new-order-tab.active {
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--gray-800) 100%);
    border-bottom-color: transparent;
}

.nav-tab i {
    margin-right: 0.5rem;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Dashboard Styles */
.dashboard-section {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
}

/* Quick Stats Cards */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-red);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-red);
}

.stat-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-dark);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.stat-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--gradient-red);
    z-index: -1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 3rem;
}

.quick-actions h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 600;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.action-btn.primary {
    background: var(--gradient-red);
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-red);
}

.action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--gray-800) 100%);
}

.action-btn.success {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

.action-btn.success:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, var(--success-600) 0%, #047857 100%);
    transform: translateY(-3px);
}

.action-btn i {
    font-size: 2rem;
}

/* Today's Preview */
.today-preview h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.orders-preview {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

/* === SEÇÃO MAIS OPÇÕES === */
.more-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 80vh;
}

.more-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gray-800);
    font-size: 2rem;
    font-weight: 700;
    position: relative;
}

.more-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 2px;
}

/* Sub-navigation for More section */
.sub-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem auto;
    background: var(--gray-50);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    max-width: 600px;
    flex-wrap: wrap;
    animation: slideInFromTop 0.6s ease;
}

/* Responsividade para sub-nav */
@media (max-width: 768px) {
    .sub-nav {
        max-width: 100%;
        margin: 1rem 0;
        padding: 0.25rem;
        gap: 0.25rem;
    }
    
    .sub-nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-width: 0;
        flex: 1 1 auto;
    }
    
    .sub-nav-btn i {
        display: none; /* Ocultar ícones em telas menores para economizar espaço */
    }
}

@media (max-width: 480px) {
    .sub-nav {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .sub-nav-btn {
        flex: none;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }
    
    .sub-nav-btn i {
        display: inline; /* Mostrar ícones novamente em layout vertical */
    }
}

.sub-nav-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-600);
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    position: relative;
}

.sub-nav-btn:hover {
    color: var(--primary-red);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

.sub-nav-btn.active {
    color: white;
    background: var(--primary-red);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.sub-section {
    display: none;
}

.sub-section.active {
    display: block;
    padding: 1rem 0;
    margin-top: 1rem;
    animation: fadeInUp 0.6s ease, scaleIn 0.4s ease;
}

/* Animações específicas para elementos das sub-seções */
.history-item, .product-item, .analytics-card, .construction-notice {
    animation: fadeInLeft 0.5s ease;
}

.history-item:nth-child(odd) {
    animation: fadeInLeft 0.5s ease;
}

.history-item:nth-child(even) {
    animation: fadeInRight 0.5s ease;
}

.product-item:nth-child(3n+1) {
    animation: fadeInLeft 0.5s ease;
}

.product-item:nth-child(3n+2) {
    animation: fadeInUp 0.5s ease;
}

.product-item:nth-child(3n+3) {
    animation: fadeInRight 0.5s ease;
}

/* Responsividade para sub-navegação */
@media (max-width: 768px) {
    .more-section {
        max-width: none;
        padding: 0 1rem;
        min-height: auto;
    }
    
    .more-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .sub-nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
        max-width: none;
        margin: 1.5rem 0;
    }
    
    .sub-nav-btn {
        flex: none;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .sub-section.active {
        padding: 0.5rem 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .more-section {
        padding: 0 0.5rem;
    }
    
    .more-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .sub-nav {
        padding: 0.5rem;
        margin: 1rem 0;
    }
    
    .sub-nav-btn {
        padding: 0.8rem;
    }
}

/* Carrinho flutuante */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    min-width: 180px;
    animation: pulse 2s infinite;
}

.floating-cart:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(220, 53, 69, 0.6);
}

.floating-cart.empty {
    background: #333;
    cursor: not-allowed;
    animation: none;
}

.floating-cart.empty:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(51, 51, 51, 0.4);
}

@keyframes pulse {
    0% { box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 8px 25px rgba(220, 53, 69, 0.8); }
    100% { box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4); }
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User Info */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 1rem;
    color: var(--white);
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Header Buttons */
.header-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    color: var(--white);
}

.header-btn i {
    font-size: 1rem;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Auth Messages */
.auth-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: var(--z-toast);
    animation: slideInRight 0.3s ease-out;
    max-width: 350px;
    box-shadow: var(--shadow-lg);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-message--success {
    background: var(--success-500);
}

.auth-message--error {
    background: var(--error-500);
}

.auth-message--info {
    background: var(--info-500);
}

/* Esconder carrinho original do header */
.cart-btn {
    display: none;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Menu Section */
.menu-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
    font-weight: 700;
}

.menu-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 25px;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn:hover,
.category-btn.active {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
}

.history-btn {
    background: #333 !important;
    color: white !important;
    border-color: #333 !important;
}

.history-btn:hover {
    background: #000 !important;
    border-color: #000 !important;
}

.analytics-btn {
    background: #6f42c1 !important;
    color: white !important;
    border-color: #6f42c1 !important;
}

.analytics-btn:hover {
    background: #5a2d91 !important;
    border-color: #5a2d91 !important;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.menu-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #dc3545;
}

.menu-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.menu-item .description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.menu-item .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 1rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Cart Section - Modal Popup */
.cart-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.cart-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    position: relative;
    margin: auto;
}

.cart-header {
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-btn:hover {
    transform: scale(1.1);
}

.cart-items {
    padding: 1.5rem;
    max-height: 40vh;
    overflow-y: auto;
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 3px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-info h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.item-info .item-price {
    color: #dc3545;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #dc3545;
    color: white;
}

.quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.quantity-input {
    width: 50px;
    height: 35px;
    border: 2px solid #dc3545;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    background: white;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    border-color: var(--primary-red-dark);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input[type=number] {
    -moz-appearance: textfield;
}

.cart-footer {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.cart-total {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Checkout Section - Modal Popup - PRIORIDADE ALTA */
/* Estado inicial - sempre oculto */
.checkout-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none !important; /* Oculto por padrão */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
    
    /* Garantir ocultação inicial */
    visibility: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

/* Classe para forçar ocultação durante inicialização */
.checkout-section.initial-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


.checkout-content {
    background: var(--white) !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
    max-width: 500px !important;
    width: 95% !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    animation: slideUp 0.3s ease !important;
    position: relative !important;
    margin: auto !important;
}

.checkout-header {
    background: linear-gradient(135deg, #3a0c0c 0%, #a10b0b 100%) !important;
    color: white !important;
    padding: 1.5rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-radius: 15px 15px 0 0 !important;
}

.checkout-header h2 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: white !important;
}

.back-btn {
    background: rgba(255,255,255,0.2) !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    color: white !important;
    padding: 8px 15px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3) !important;
}

.checkout-form {
    background: var(--white) !important;
    padding: 1.5rem !important;
    max-height: 65vh !important;
    overflow-y: auto !important;
    border-radius: 0 0 15px 15px !important;
}

.checkout-form::-webkit-scrollbar {
    width: 6px !important;
}

.checkout-form::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

.checkout-form::-webkit-scrollbar-thumb {
    background: #dc3545 !important;
    border-radius: 3px !important;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    background: var(--white) !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #dc3545;
}

.form-group select {
    cursor: pointer;
}

/* Discount container */
.discount-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.discount-container select {
    width: 60px;
    flex-shrink: 0;
}

.discount-container input {
    flex: 1;
    min-width: 100px;
}

.order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.total-row {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    border-top: 2px solid #dee2e6;
    padding-top: 0.5rem;
    margin-top: 1rem;
}

.confirm-order-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.confirm-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .checkout-content {
        max-width: 95% !important;
        width: 95% !important;
        max-height: 90vh !important;
        margin: 10px !important;
    }
    
    .checkout-form {
        padding: 1rem !important;
        max-height: 70vh !important;
    }
    
    .checkout-header {
        padding: 1rem !important;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    .order-summary {
        margin: 1rem 0;
        padding: 0.8rem;
    }
}

/* Footer dos botões do modal de checkout */
.checkout-footer,
.modal-footer,
.order-footer {
    display: flex !important;
    gap: 10px !important;
    padding: 1rem 1.5rem !important;
    background: var(--gray-100) !important;
    border-radius: 0 0 15px 15px !important;
    border-top: 1px solid var(--gray-200) !important;
}

.checkout-footer .cancel-btn,
.checkout-footer .back-btn,
.modal-footer .cancel-btn,
.order-footer .cancel-btn {
    flex: 1 !important;
    padding: 12px 20px !important;
    background: var(--gray-500) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.checkout-footer .cancel-btn:hover,
.checkout-footer .back-btn:hover,
.modal-footer .cancel-btn:hover,
.order-footer .cancel-btn:hover {
    background: var(--gray-600) !important;
    transform: translateY(-1px) !important;
}

.checkout-footer .confirm-order-btn,
.modal-footer .confirm-btn,
.order-footer .confirm-btn {
    flex: 1 !important;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.checkout-footer .confirm-order-btn:hover,
.modal-footer .confirm-btn:hover,
.order-footer .confirm-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4) !important;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Estado ativo - quando modal deve aparecer */
.checkout-section.active,
.checkout-section[style*="display: flex"],
.checkout-section[style*="display: block"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    animation: fadeIn 0.3s ease;
    justify-content: center !important;
    align-items: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1000 !important;
}

.order-confirmed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.order-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    position: relative;
    margin: auto;
}

.order-header {
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.order-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.success-message {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #dc3545;
    border-radius: 8px;
    color: #333;
}

.success-message p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.order-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.print-btn,
.new-order-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.print-btn {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    color: white;
}

.new-order-btn {
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    color: white;
}

.print-btn:hover,
.new-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.order-details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    text-align: left;
    margin-top: 2rem;
}

.order-details h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-group h4 {
    color: #dc3545;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.info-group p {
    color: #333;
    margin-bottom: 0.25rem;
}

.order-items-list {
    margin-bottom: 1rem;
}

.order-items-list h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.order-item:last-child {
    border-bottom: none;
}

/* ===== CSS DE IMPRESSÃO TÉRMICA COMPACTA ===== */
@media print {
  @page {
    size: 80mm auto;
    margin: 2mm !important; /* Pequena margem na página para evitar cortes */
    padding: 0;
  }
  
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box;
  }
  
  body {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px !important; /* Aumentado de 9px para 12px */
    line-height: 1.3 !important; /* Aumentado de 1.2 para 1.3 */
    background: white !important;
    height: auto !important;
    overflow: visible !important;
    font-family: 'Courier New', monospace !important;
  }
  
  /* Oculta todos os elementos não relacionados à impressão */
  body * {
    visibility: hidden !important;
  }
  
  /* Remove todos os overlays, modais e backgrounds */
  .modal,
  .overlay,
  .backdrop,
  .loading,
  .toast,
  .notification,
  [class*="modal"],
  [class*="overlay"],
  [class*="backdrop"],
  [id*="modal"],
  [id*="overlay"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background: none !important;
    z-index: -1 !important;
  }
  
  /* Remove backgrounds escuros */
  body::before,
  body::after,
  *::before,
  *::after {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    opacity: 1 !important;
  }
  
  /* Esconder elementos com z-index alto (modais, overlays, etc) - mais específico */
  .modal,
  .modal-backdrop,
  .overlay,
  .backdrop,
  .toast,
  .notification,
  [class*="modal"],
  [class*="overlay"],
  [id*="modal"],
  [id*="overlay"],
  nav,
  header,
  footer,
  .header,
  .footer,
  .navbar,
  .sidebar {
    display: none !important;
    visibility: hidden !important;
    z-index: -999 !important;
  }
  
  /* Força background branco para o body */
  body {
    background: white !important;
    background-color: white !important;
    background-image: none !important;
  }
  
  html {
    background: white !important;
    background-color: white !important;
  }
  
  /* Mostra apenas a área de impressão e seu conteúdo */
  .print-area,
  .print-area *,
  .receipt,
  .receipt *,
  #temp-print-area,
  #temp-print-area *,
  #temp-print-area-order,
  #temp-print-area-order *,
  /* Elementos específicos da comanda */
  .receipt-header,
  .receipt-header *,
  .receipt-info,
  .receipt-info *,
  .receipt-items,
  .receipt-items *,
  .receipt-total,
  .receipt-total *,
  .customer-highlight,
  .customer-highlight *,
  .address-highlight,
  .address-highlight *,
  .customer-name,
  .customer-address,
  .receipt-item,
  .receipt-item *,
  .item-line,
  .item-line *,
  /* Tags básicas de conteúdo */
  h1, h2, h3, h4, h5, h6,
  p, span, div, strong, b,
  /* Apenas dentro das áreas permitidas */
  .receipt h1, .receipt h2, .receipt h3, .receipt h4,
  .receipt p, .receipt span, .receipt div, .receipt strong,
  #temp-print-area h1, #temp-print-area h2, #temp-print-area h3, #temp-print-area h4,
  #temp-print-area p, #temp-print-area div, #temp-print-area strong,
  #temp-print-area-order h1, #temp-print-area-order h2, #temp-print-area-order h3, #temp-print-area-order h4,
  #temp-print-area-order p, #temp-print-area-order div, #temp-print-area-order strong {
    visibility: visible !important;
    display: block !important;
    opacity: 1 !important;
    background: white !important;
    color: black !important;
  }
  
  /* Spans gerais ficam block, exceto spans dentro de item-line */
  #temp-print-area span:not(.item-qty):not(.item-name),
  #temp-print-area-order span:not(.item-qty):not(.item-name) {
    visibility: visible !important;
    display: block !important;
    opacity: 1 !important;
    background: white !important;
    color: black !important;
  }
  
  .print-area {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .receipt {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 80mm !important;
    max-width: 80mm !important;
    margin: 0 auto !important; /* Centralizado com margem automática */
    padding: 3mm 4mm !important; /* Aumentado padding lateral de 3mm para 4mm */
    page-break-inside: avoid;
    page-break-after: avoid;
    box-shadow: none !important;
    border: none !important;
    background: white !important;
    height: auto !important;
    overflow: visible !important;
    font-family: 'Courier New', monospace !important;
    font-size: 11px !important; /* Aumentado de 8px para 11px */
  }
  
  .receipt-header {
    text-align: center;
    margin-bottom: 4mm; /* Aumentado de 3mm para 4mm */
    border-bottom: 1px dashed #000;
    padding-bottom: 3mm; /* Aumentado de 2mm para 3mm */
  }
  
  .receipt-header h2 {
    font-size: 14px !important; /* Aumentado de 10px para 14px */
    font-weight: bold !important;
    margin: 2mm 0 !important; /* Aumentado de 1mm para 2mm */
    color: #000 !important;
    line-height: 1.2 !important;
  }
  
  .receipt-header p {
    font-size: 11px !important; /* Aumentado de 8px para 11px */
    margin: 1mm 0 !important; /* Aumentado de 0.5mm para 1mm */
    color: #000 !important;
    line-height: 1.2 !important;
  }
  
  .receipt-info {
    margin: 3mm 0; /* Aumentado de 2mm para 3mm */
  }
  
  .receipt-info p {
    font-size: 11px !important; /* Aumentado de 7px para 11px */
    margin: 1mm 0 !important; /* Aumentado de 0.5mm para 1mm */
    color: #000 !important;
    line-height: 1.2 !important;
    font-weight: bold !important; /* Adicionado negrito */
  }
  
  .receipt-items {
    margin: 3mm 0; /* Aumentado de 2mm para 3mm */
  }
  
  .receipt-items > p {
    font-size: 12px !important; /* Aumentado de 8px para 12px */
    font-weight: bold !important;
    margin: 2mm 0 !important; /* Aumentado de 1mm para 2mm */
    color: #000 !important;
  }
  
  .receipt-item {
    display: block !important;
    margin: 1mm 0 !important;
    font-size: 11px !important;
    color: #000 !important;
    line-height: 1.3 !important;
    font-weight: bold !important;
  }
  
  .item-line {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 3mm !important;
    font-family: 'Courier New', monospace !important;
    white-space: nowrap !important;
    width: 100% !important;
  }
  
  .item-qty {
    display: inline-block !important;
    min-width: 10mm !important;
    max-width: 10mm !important;
    text-align: left !important;
    font-weight: bold !important;
    color: #000 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  .item-name {
    display: inline-block !important;
    flex: 1 !important;
    color: #000 !important;
    font-weight: bold !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
  
  /* Regras específicas para garantir que os spans da item-line funcionem no flexbox */
  .item-line .item-qty,
  .item-line .item-name {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: white !important;
    color: black !important;
  }
  
  .receipt-item p {
    margin: 0.5mm 0 !important;
    font-size: 11px !important;
    color: #000 !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
  }
  
  .receipt-item span {
    color: #000 !important;
    font-weight: bold !important; /* Adicionado negrito */
  }
  
  .receipt-total {
    border-top: 1px dashed #000;
    padding-top: 3mm; /* Aumentado de 2mm para 3mm */
    margin-top: 3mm; /* Aumentado de 2mm para 3mm */
  }
  
  .receipt-total p {
    font-size: 11px !important; /* Aumentado de 8px para 11px */
    margin: 1mm 0 !important; /* Aumentado de 0.5mm para 1mm */
    color: #000 !important;
    font-weight: bold !important; /* Adicionado negrito */
  }
  
  .receipt-total .receipt-item {
    font-weight: bold !important;
    font-size: 11px !important; /* Aumentado de 7px para 11px */
  }
  
  /* Elementos do recibo devem ser compactos */
  .receipt-header,
  .receipt-info,
  .receipt-items,
  .receipt-total {
    page-break-inside: avoid;
  }
  
  /* Evitar quebras desnecessárias */
  .receipt-item {
    page-break-inside: avoid;
  }
  
  /* Estilizar elementos específicos do recibo */
  .receipt h2 {
    font-size: 18px !important;
    margin: 5px 0 !important;
    color: #000 !important;
    font-weight: bold !important;
  }
  
  .receipt h3 {
    font-size: 14px !important;
    margin: 3px 0 !important;
    color: #000 !important;
    font-weight: bold !important;
  }
  
  .receipt p {
    margin: 2px 0 !important;
    font-size: 11px !important;
    color: #000 !important;
  }
  
  .receipt strong {
    font-weight: bold !important;
    color: #000 !important;
  }
  
  /* Garantir que textos sejam pretos */
  .receipt * {
    color: #000 !important;
  }
  
  /* Rodapé da comanda */
  .receipt > div:last-child {
    margin-top: 2mm !important;
    text-align: center !important;
  }
  
  .receipt > div:last-child p {
    font-size: 6px !important;
    margin: 0.5mm 0 !important;
    color: #000 !important;
    line-height: 1.1 !important;
  }
}

/* Remover destaque excessivo do nome do cliente e telefone */
  .customer-highlight,
  .address-highlight {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .customer-name,
  .customer-address {
    font-size: 11px !important;
    font-weight: normal !important;
    color: #000 !important;
    margin: 1mm 0 !important;
    text-transform: none !important;
  }

/* ===== ESTILOS PARA MELHORIAS DOS ÚLTIMOS PEDIDOS ===== */
.customer-name {
  font-size: 0.9em;
  color: #666;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.order-items-detail {
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9em;
  border-left: 3px solid #dc3545;
}

.items-list {
  margin: 5px 0 0 0;
  padding-left: 20px;
  list-style-type: none;
}

.items-list li {
  margin: 2px 0;
  padding: 2px 0;
  position: relative;
}

.items-list li::before {
  content: "•";
  color: #dc3545;
  font-weight: bold;
  position: absolute;
  left: -15px;
}

.items-list .item-quantity {
  font-weight: bold;
  color: black;
}

.items-list .item-price {
  float: right;
  font-weight: bold;
  color: #28a745;
}

/* Melhorar visualização dos pedidos */
.history-item {
  margin-bottom: 15px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.history-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-item-header {
  background: white;
  color: #2c3e50;
  padding: 12px 15px;
  border-bottom: 2px solid #dc3545;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-number {
  font-weight: bold;
  font-size: 1.1em;
  color: #2c3e50;
}

.history-item-header .customer-name {
  color: #495057;
}

.history-item-header .order-time {
  color: #6c757d;
}

.history-item-header .delivery-info {
  color: #495057;
}

.history-item-header .order-total {
  color: #28a745;
  font-weight: bold;
}

.delivery-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 0.9em;
}

.delivery-icon {
  font-size: 1.2em;
  color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .quantity-controls {
        margin-top: 0.5rem;
    }
    
    .checkout-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    /* Modal responsivo em mobile */
    .cart-content,
    .checkout-content,
    .order-content {
        width: 95%;
        max-height: 90vh;
    }

    .cart-items {
        max-height: 50vh;
    }

    .checkout-form:not(.modern-checkout-form) {
        max-height: 60vh;
    }

    .order-body {
        max-height: 70vh;
    }

    /* Analytics responsivo */
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .kpi-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .analytics-header {
        flex-direction: column;
        text-align: center;
    }

    /* Backup responsivo */
    .backup-grid {
        grid-template-columns: 1fr;
    }

    .backup-header {
        flex-direction: column;
        text-align: center;
    }

    .backup-info {
        justify-content: center;
        gap: 1rem;
    }

    /* Navigation responsiva */
    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tab {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        min-width: 100px;
        text-align: center;
    }

    /* Carrinho flutuante em mobile */
    .floating-cart {
        bottom: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 14px;
        min-width: 160px;
    }
    
    .order-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .print-btn,
    .new-order-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* === RESPONSIVIDADE BACKUP STATS === */
@media (max-width: 768px) {
    .backup-stats .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        min-height: auto;
    }
    
    .backup-stats .stat-value {
        max-width: none;
        text-align: left;
    }
    
    .backup-stats .stat-label {
        min-width: auto;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    /* Responsividade mobile mantida sem alterações de fonte */
}

/* Estilos de impressão otimizados aplicados acima */

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close modal when clicking outside */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Order History */
.order-history {
    margin-top: 1rem;
    padding: 0 1rem;
}

.history-header {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.history-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    font-size: 0.9rem;
}

.history-list {
    display: grid;
    gap: 1.5rem;
    padding: 1rem 0;
}

.history-item {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    border-color: #dc3545;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.1);
    transform: translateY(-2px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #dc3545;
}

.order-time {
    color: #666;
    font-size: 0.9rem;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.history-item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-group h5 {
    color: #dc3545;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
}

.detail-group p {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
}

.order-items-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.order-items-summary h5 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.items-list {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.history-action-btn {
    padding: 6px 12px;
    border: 1px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.history-action-btn:hover {
    background: #dc3545;
    color: white;
}

.empty-history {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-history i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* Analytics Section */
.analytics-section {
    margin-top: 2rem;
}

.analytics-header {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.analytics-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.analytics-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.period-selector {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

/* ===== NOVOS ELEMENTOS: INDICADOR DE FONTE E BOTÃO ATUALIZAR ===== */

.data-source-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.data-source-indicator.mongodb {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.4);
    color: #2ecc71;
}

.data-source-indicator.local {
    background: rgba(241, 196, 15, 0.2);
    border-color: rgba(241, 196, 15, 0.4);
    color: #f1c40f;
}

.data-source-indicator.error {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

.refresh-data-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(52, 152, 219, 0.2);
    border: 2px solid rgba(52, 152, 219, 0.4);
    color: #3498db;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.refresh-data-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    transform: translateY(-1px);
}

.refresh-data-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.refresh-data-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.date-range-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.2);
}

.date-input {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.date-range-container span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.apply-date-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.apply-date-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.period-selector option {
    background: #6f42c1;
    color: white;
}

.analytics-grid {
    display: grid;
    gap: 2rem;
}

/* KPI Cards */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #8b0000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.kpi-label {
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0;
}

.chart-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.chart-container h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    text-align: center;
}

.chart-container canvas {
    max-height: 300px;
}

/* Backup Section */
.backup-section {
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.backup-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.backup-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.backup-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    /* Tamanho de fonte padrão restaurado */
}

.backup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0;
}

.backup-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.backup-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.card-header h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.card-header p {
    margin: 0;
    color: #666;
}

.card-content {
    padding: 1.5rem;
}

/* Export Card */
.export-card .card-header h4 {
    color: #28a745;
}

.backup-stats {
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    min-height: 2rem;
    gap: 1rem;
}

.stat-label {
    color: #666;
    flex-shrink: 0;
    min-width: 80px;
}

.backup-stats .stat-value {
    font-weight: 600;
    color: #333;
    word-break: break-word;
    max-width: 150px;
    text-align: right;
}

/* Import Card */
.import-card .card-header h4 {
    color: #007bff;
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.file-upload-area.dragover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.upload-placeholder i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.upload-placeholder p {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-weight: 500;
}

.upload-placeholder span {
    color: #666;
    font-size: 0.8rem;
}

/* Recovery Card */
.recovery-card .card-header h4 {
    color: #ffc107;
}

.recovery-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.recovery-status i {
    color: #ffc107;
}

/* Info Card */
.info-card .card-header h4 {
    color: #6f42c1;
}

.storage-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.detail-label {
    color: #666;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

/* Backup Buttons */
.backup-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.backup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.export-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.export-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    transform: translateY(-1px);
}

.import-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.import-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
}

.recovery-btn {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

.recovery-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    transform: translateY(-1px);
}

.info-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
    color: white;
}

.info-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a2d91 0%, #4e2a7e 100%);
    transform: translateY(-1px);
}

/* Backup Notes and Warnings */
.backup-note, .backup-warning {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 5px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.backup-note {
    background: #e7f3ff;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.backup-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.backup-note i, .backup-warning i {
    flex-shrink: 0;
}

/* PWA Styles */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.pwa-install-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.pwa-install-btn i {
    font-size: 1rem;
}

/* PWA Notifications */
.pwa-update-notification,
.pwa-success-notification,
.pwa-offline-notification,
.pwa-sync-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 35px;
    max-height: 80px;
    min-height: 60px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideInRight 0.3s ease;
    overflow: hidden;
}

.pwa-update-notification {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.pwa-success-notification {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.pwa-offline-notification {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
    top: 80px;
}

.pwa-sync-notification {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
    color: white;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.notification-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-content span {
    flex: 1;
    font-weight: 500;
}

.update-btn,
.dismiss-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: inherit;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.update-btn:hover,
.dismiss-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.dismiss-btn {
    padding: 0.4rem 0.6rem;
    font-weight: bold;
}

/* PWA Standalone Mode */
.pwa-standalone .header {
    padding-top: 1.5rem;
}

.pwa-standalone .floating-cart {
    bottom: 30px;
}

/* PWA Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pwa-install-btn {
    animation: pulse 3s infinite;
}

.pwa-install-btn.manual {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    animation: none;
}

.pwa-install-btn.manual:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* PWA Install Modal */
.pwa-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.pwa-install-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.pwa-install-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwa-install-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.pwa-install-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.pwa-install-body h3 {
    color: #333;
    margin-bottom: 1rem;
}

.pwa-install-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.pwa-install-body li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.pwa-benefits {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.pwa-benefits h4 {
    color: #007bff;
    margin-bottom: 1rem;
}

.pwa-benefits ul {
    margin: 0;
    padding-left: 1.5rem;
}

.pwa-benefits li {
    margin-bottom: 0.5rem;
}

/* PWA Media Queries */
@media (max-width: 768px) {
    .pwa-update-notification,
    .pwa-success-notification,
    .pwa-offline-notification,
    .pwa-sync-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .pwa-install-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .pwa-install-btn span {
        display: none;
    }
    
    .pwa-standalone .header {
        padding-top: 1rem;
    }
}

/* PWA Display Mode Detection */
@media (display-mode: standalone) {
    .pwa-install-btn {
        display: none !important;
    }
    
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* PWA iOS Safari Specific */
@media (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
    .pwa-standalone .header {
        padding-top: 2rem;
    }
}

/* Hidden elements */
.hidden {
    display: none !important;
}

/* ===== CONTROLES DE HISTÓRICO ===== */
.history-controls {
    margin-bottom: 1.5rem;
}

.search-filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 300px;
}

/* Específico para pesquisa do histórico */
#history-search {
    min-width: 350px;
    width: 100%;
    max-width: 500px;
}

.search-input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.filter-select:hover {
    border-color: #dc3545;
}

/* Responsividade para controles de histórico */
@media (max-width: 768px) {
    .search-filter-container {
        gap: 0.75rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-select {
        min-width: 100%;
    }
}

@media (min-width: 769px) {
    .search-filter-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .filter-controls {
        flex-shrink: 0;
    }
}

/* ===== CONFIGURAÇÃO DE IMPRESSORA ===== */
.printer-section {
    padding: 2rem;
}

.printer-header {
    text-align: center;
    margin-bottom: 2rem;
}

.printer-header h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.printer-header p {
    color: #666;
    font-size: 1.1rem;
}

.printer-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.printer-card {
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.printer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.printer-card .card-header {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.printer-card .card-header h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.printer-card .card-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.printer-card .card-content {
    padding: 2rem;
}

/* === Descrição do Teste === */
.test-description {
    margin: 1rem 0 0 0;
    padding: 0.75rem;
    background: var(--info-50);
    border: 1px solid var(--info-500);
    border-radius: 6px;
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.4;
}

.test-description i {
    color: var(--info-500);
    margin-right: 0.25rem;
}

.selected-printer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid #e9ecef;
}

.selected-printer i {
    font-size: 1.5rem;
    color: #28a745;
}

.selected-printer span {
    font-weight: 600;
    color: #333;
}

.printer-list {
    max-height: 300px;
    overflow-y: auto;
}

.empty-printers {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-printers i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* === Análise de Impressoras === */
.printer-analysis {
    background: linear-gradient(135deg, var(--info-50) 0%, var(--white) 100%);
    border: 1px solid var(--info-500);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.analysis-summary {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-summary i {
    color: var(--info-500);
}

.analysis-details {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.875rem;
    opacity: 0.8;
}

/* === Instruções QZ Tray === */
.qz-instructions {
    background: linear-gradient(135deg, var(--error-50) 0%, var(--white) 100%);
    border: 1px solid var(--error-500);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-md);
}

.qz-instructions h4 {
    margin: 0 0 1rem 0;
    color: var(--error-600);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qz-instructions ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.qz-instructions li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.qz-instructions a {
    color: var(--primary-red);
    text-decoration: underline;
    font-weight: 600;
}

.qz-instructions a:hover {
    color: var(--primary-red-dark);
}

.qz-instructions small {
    color: var(--gray-600);
    font-style: italic;
}

.printer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.printer-item:hover {
    border-color: #dc3545;
    background: #fff5f5;
}

.printer-item.selected {
    border-color: #28a745;
    background: #f8fff8;
}

.printer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.printer-info i {
    font-size: 1.2rem;
    color: #6c757d;
}

.printer-details h5 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.printer-details p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: #666;
}

.select-printer-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.select-printer-btn:hover {
    background: #218838;
}

.select-printer-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Responsividade */
@media (max-width: 768px) {
    .printer-config {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .printer-card .card-content {
        padding: 1.5rem;
    }
    
    .printer-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .printer-info {
        width: 100%;
    }
}

/* ===== MODAL DE TIPO DE ATENDIMENTO ===== */
.service-type-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.service-type-content {
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    max-width: 600px;
    width: 100%;
    max-height: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    margin: 1rem;
    position: relative;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.service-type-modal .modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    margin: -2px -2px 0 -2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-type-modal .modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.service-type-modal .modal-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.service-type-modal .modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.service-type-modal .modal-body {
    padding: 2rem;
}

.service-type-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.service-type-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-type-option {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.service-type-option:hover {
    border-color: #dc3545;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
}

.service-type-option.selected {
    border-color: #dc3545;
    background: #fff5f5;
}

.service-type-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.service-type-info {
    flex: 1;
}

.service-type-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.service-type-info p {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.95rem;
}

.service-type-fee {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.service-type-option[data-type="retirada"] .service-type-fee {
    background: #17a2b8;
}

.service-type-arrow {
    flex-shrink: 0;
    color: #dc3545;
    font-size: 1.2rem;
    margin-left: 1rem;
}

/* Responsividade para modal de tipo de atendimento */
@media (max-width: 768px) {
    .service-type-content {
        margin: 1rem;
        max-width: none;
    }
    
    .service-type-option {
        padding: 1.25rem;
    }
    
    .service-type-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-right: 1rem;
    }
    
    .service-type-info h3 {
        font-size: 1.2rem;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== BOTÕES DE AÇÃO DO HISTÓRICO ===== */
.history-action-btn.edit-btn {
    background: white;
    border-color: #007bff;
    color: #000;
}

.history-action-btn.edit-btn:hover {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.history-action-btn.delete-btn {
    background: white;
    border-color: #dc3545;
    color: #000;
}

.history-action-btn.delete-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Responsividade para botões de ação */
@media (max-width: 768px) {
    .history-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .history-action-btn {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* ===== SISTEMA DE GERENCIAMENTO DE PRODUTOS ===== */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.products-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.products-actions .action-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row;
    white-space: nowrap;
    min-width: auto;
}

.products-actions .action-btn i {
    font-size: 1rem;
}

.products-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #333;
}

.products-stats {
    display: flex;
    gap: 1.5rem;
}

.products-stats .stat {
    color: #666;
    font-size: 0.9rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    border-color: #dc3545;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.1);
    transform: translateY(-2px);
}

.product-card.inactive {
    opacity: 0.6;
    background: #f8f9fa;
}

.product-card.low-stock {
    border-color: #ffc107;
    background: #fff9e6;
}

.product-card.out-of-stock {
    border-color: #dc3545;
    background: #fff5f5;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.product-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2rem;
}

.product-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.product-category {
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-category.acompanhamentos {
    background: #28a745;
}

.product-category.bebidas {
    background: #17a2b8;
}

.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #dc3545;
}

.product-stock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9rem;
}

.stock-status {
    color: #28a745;
    font-weight: 600;
}

.stock-status.low {
    color: #ffc107;
}

.stock-status.out {
    color: #dc3545;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.product-action-btn {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-action-btn:hover {
    background: #dc3545;
    color: white;
}

.product-action-btn.edit {
    border-color: #007bff;
    color: #007bff;
}

.product-action-btn.edit:hover {
    background: #007bff;
    color: white;
}

.product-action-btn.delete {
    border-color: #dc3545;
    color: #dc3545;
}

.product-action-btn.delete:hover {
    background: #dc3545;
    color: white;
}

/* Modal de produtos */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.product-modal-content {
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    max-width: 700px;
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    margin: 1rem;
    position: relative;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.product-modal .modal-header {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    margin: -2px -2px 0 -2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-modal .modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.product-modal .modal-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.product-modal .modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.product-modal .modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #dc3545;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.form-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
    min-width: 120px;
}

.form-actions .btn.primary {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.form-actions .btn.primary:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
}

.form-actions .btn.secondary {
    background: white;
    border-color: #6c757d;
    color: #6c757d;
}

.form-actions .btn.secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-1px);
}

/* Responsividade para produtos */
@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .products-filters {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .products-stats {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* ===== JSON IMPORT MODAL ===== */
.json-import-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.json-import-modal.show {
    display: flex !important;
}

.json-import-content {
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.json-import-modal .modal-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.json-import-modal .modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.import-step {
    display: none !important;
}

.import-step.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garantir que apenas steps ativos sejam visíveis no modal JSON */
#json-import-modal .import-step:not(.active) {
    display: none !important;
}

.step-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.step-header h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-header p {
    margin: 0;
    color: #666;
}

/* JSON Input */
.json-input-container {
    margin: 1rem 0;
}

#json-input {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    resize: vertical;
    background: #f8f9fa;
    color: #333;
    line-height: 1.4;
}

#json-input:focus {
    outline: none;
    border-color: #28a745;
    background: white;
}

.json-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.validation-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.validation-result.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.validation-result.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.validation-result h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.validation-result ul {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

/* Import Stats */
.import-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    display: block;
    margin-top: 0.25rem;
}

/* Products Preview */
.products-preview {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.preview-item {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: between;
    align-items: center;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item.new {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.preview-item.update {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.preview-item.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.preview-info {
    flex: 1;
}

.preview-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.preview-details {
    font-size: 0.9rem;
    color: #666;
}

.preview-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.preview-status.new {
    background: #28a745;
    color: white;
}

.preview-status.update {
    background: #ffc107;
    color: #333;
}

.preview-status.error {
    background: #dc3545;
    color: white;
}

/* Progress */
.import-progress {
    margin: 1.5rem 0;
}

.progress-bar-container {
    position: relative;
    background: #e9ecef;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.progress-details {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Import Log */
.import-log {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    margin-top: 1rem;
}

.import-log .log-entry {
    margin: 0.25rem 0;
}

.import-log .log-entry.success {
    color: #28a745;
}

.import-log .log-entry.error {
    color: #dc3545;
}

.import-log .log-entry.info {
    color: #666;
}

/* Results */
.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-stat {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid;
}

.result-stat.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.result-stat.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.result-stat.info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.result-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 1rem;
    font-weight: 500;
}

.detailed-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.result-item {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-item.success {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.result-item.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.result-icon {
    font-size: 1.1rem;
}

.result-text {
    flex: 1;
}

.result-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.result-message {
    font-size: 0.9rem;
    color: #666;
}

/* Actions */
.preview-actions,
.results-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    .json-import-content {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .import-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .preview-actions,
    .results-actions {
        flex-direction: column;
    }
    
    .json-actions {
        flex-direction: column;
    }
}

/* ===== INDICADORES DE ESTOQUE NO MENU ===== */
.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.menu-item-header h3 {
    margin: 0;
    flex: 1;
}

.stock-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 1rem;
}

.stock-badge.low {
    background: #ffc107;
    color: #000;
}

.stock-badge.out {
    background: #dc3545;
}

.menu-item.low-stock {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.menu-item.out-of-stock {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #f8f9fa 100%);
    opacity: 0.7;
}

.item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.stock-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8rem;
}

.stock-warning {
    color: #ffc107;
    font-weight: 600;
}

.stock-out {
    color: #dc3545;
    font-weight: 600;
}

.add-to-cart-btn.disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.add-to-cart-btn.disabled:hover {
    background: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
}

/* ===== PESQUISA DO MENU ===== */
.menu-search {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.menu-search .search-box {
    max-width: 400px;
    width: 100%;
} 

/* ===== CLASSES ESPECÍFICAS POR DISPOSITIVO ===== */
@media print {
  /* Classes aplicadas dinamicamente pelo JavaScript */
  body.print-thermal .receipt {
    max-width: 80mm !important;
    font-size: 11px !important; /* Aumentado de 8px para 11px */
    padding: 3mm 4mm !important; /* Padding lateral aumentado */
  }
  
  body.print-mobile .receipt {
    font-size: 12px !important; /* Aumentado de 10px para 12px */
    padding: 5mm 6mm !important; /* Padding lateral aumentado */
  }
  
  body.print-tablet .receipt {
    font-size: 13px !important; /* Aumentado de 11px para 13px */
    padding: 10mm 12mm !important; /* Padding lateral aumentado */
  }
  
  body.print-desktop .receipt {
    font-size: 14px !important; /* Aumentado de 12px para 14px */
    padding: 15mm 18mm !important; /* Padding lateral aumentado */
    max-width: 190mm !important;
    margin: 0 auto !important;
  }
}

/* ===== IMPRESSÃO PARA TELAS GRANDES/DESKTOP ===== */

/* ===== ANIMAÇÕES MODERNAS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Aplicar animações aos elementos */
.stat-card {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.menu-item {
    animation: fadeInUp 0.5s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.nav-tab {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-tab:hover {
    transform: translateY(-2px);
}

.nav-tab.active {
    animation: pulse 0.6s ease-out;
}

.cart-item {
    animation: slideInFromTop 0.4s ease-out;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateX(5px);
}

.dashboard-section {
    animation: fadeInUp 0.8s ease-out;
}

.quick-actions {
    animation: fadeInLeft 0.7s ease-out 0.2s both;
}

.today-preview {
    animation: fadeInRight 0.7s ease-out 0.4s both;
}

.floating-cart {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.floating-cart:hover {
    transform: scale(1.05);
}

.floating-cart.empty:hover {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: scale(1.02);
}

.floating-cart.empty:hover::after {
    content: 'Carrinho vazio - Adicione produtos primeiro';
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--gray-800);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 1000;
    animation: fadeInUp 0.3s ease;
}

.floating-cart.empty:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% - 8px);
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--gray-800);
    z-index: 1000;
}

.floating-cart:not(.empty) {
    animation: pulse 2s infinite;
}

.modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cart-content, .checkout-content {
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.sub-nav-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-nav-btn:hover {
    transform: translateY(-1px);
}

.sub-nav-btn.active {
    animation: bounceIn 0.5s ease-out;
}

.backup-card, .printer-card {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s ease;
}

.backup-card:nth-child(1) { animation-delay: 0.1s; }
.backup-card:nth-child(2) { animation-delay: 0.2s; }
.backup-card:nth-child(3) { animation-delay: 0.3s; }

.backup-card:hover, .printer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.toast {
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text.large {
    height: 24px;
}

.skeleton-text.small {
    height: 12px;
}

.skeleton-text.title {
    height: 20px;
    width: 60%;
}

.skeleton-text.subtitle {
    height: 14px;
    width: 40%;
}

.skeleton-text.full {
    width: 100%;
}

.skeleton-text.half {
    width: 50%;
}

.skeleton-text.quarter {
    width: 25%;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: var(--radius-md);
}

.skeleton-stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skeleton-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-stat-content {
    flex: 1;
}

.skeleton-menu-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.skeleton-menu-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-menu-info {
    flex: 1;
}

.skeleton-price {
    width: 80px;
    height: 24px;
    border-radius: var(--radius-sm);
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Skeleton para diferentes seções */
.orders-skeleton {
    padding: 1rem;
}

.dashboard-skeleton {
    padding: 2rem 0;
}

.menu-skeleton {
    padding: 1rem;
}

/* ===== SEÇÃO EM CONSTRUÇÃO ===== */
.construction-notice {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300);
    margin: 2rem 0;
    max-width: 600px;
    margin: 2rem auto;
}

.construction-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.construction-notice h4 {
    color: var(--gray-800);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.construction-notice p {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.construction-features {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}

.construction-features h5 {
    color: var(--gray-800);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.construction-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.construction-features li {
    padding: 0.5rem 0;
    color: var(--gray-700);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--gray-100);
}

.construction-features li:last-child {
    border-bottom: none;
}

/* ===== HEADER DO CARRINHO ===== */
.cart-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== AÇÕES DO CARRINHO E CHECKOUT ===== */
.cart-actions, .checkout-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.cancel-order-btn {
    background: var(--gray-500);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cancel-order-btn:hover {
    background: var(--gray-600);
    transform: translateY(-1px);
}

.checkout-btn, .confirm-order-btn {
    flex: 2;
}

@media (max-width: 768px) {
    .cart-actions, .checkout-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cancel-order-btn, .checkout-btn, .confirm-order-btn {
        flex: none;
        width: 100%;
    }
}

/* ===== CALCULADORA FLUTUANTE ===== */
.floating-calculator {
    position: fixed;
    bottom: 140px;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: bounceIn 0.6s ease;
}

.floating-calculator:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.6);
}

/* ===== MODAL DA CALCULADORA ===== */
.calculator-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--gray-200);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: scaleIn 0.3s ease;
}

.calculator {
    padding: 2rem;
}

.calculator-content .modal-header {
    padding: 1.5rem 2rem;
}

.calculator-content .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.calculator-content .modal-header i {
    font-size: 1.2rem;
}

.calculator-display {
    margin-bottom: 1rem;
    background: var(--gray-100);
    border-radius: 12px;
    padding: 1rem;
}

#calculator-result {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 2rem;
    font-weight: 600;
    text-align: right;
    color: var(--gray-800);
    outline: none;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.calc-btn {
    height: 60px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-btn:hover {
    transform: scale(1.05);
}

.calc-btn:active {
    transform: scale(0.95);
}

.calc-btn.number {
    background: var(--gray-100);
    color: var(--gray-800);
}

.calc-btn.number:hover {
    background: var(--gray-200);
}

.calc-btn.operator {
    background: var(--primary-red);
    color: white;
}

.calc-btn.operator:hover {
    background: var(--primary-red-dark);
}

.calc-btn.clear {
    background: var(--warning-500);
    color: white;
}

.calc-btn.clear:hover {
    background: var(--warning-600);
}

.calc-btn.equals {
    background: var(--success-500);
    color: white;
    grid-column: span 2;
}

.calc-btn.equals:hover {
    background: var(--success-600);
}

.calc-btn.zero {
    grid-column: span 2;
}

/* ===== CAMPO DE TROCO ===== */
.change-group {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.change-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.change-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-red);
}

.change-checkbox label {
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
}

.change-amount {
    animation: fadeInUp 0.3s ease;
}

.change-amount label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.change-amount input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.change-amount input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ===== MODAL DE TIPO DE ATENDIMENTO ===== */
.service-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.service-modal-footer .cancel-order-btn {
    background: var(--error-500);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-modal-footer .cancel-order-btn:hover {
    background: var(--error-600);
    transform: translateY(-2px);
}

/* ===== SEÇÃO DO RESTAURANTE ===== */
.restaurant-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.restaurant-header {
    text-align: center;
    margin-bottom: 3rem;
}

.restaurant-header h3 {
    color: var(--gray-800);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.restaurant-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin: 0;
}

.restaurant-config {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.restaurant-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

.restaurant-card .card-header {
    background: var(--gray-50);
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.restaurant-card .card-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.restaurant-card .card-content {
    padding: 2rem;
}

.restaurant-card .form-group {
    margin-bottom: 1.5rem;
}

.restaurant-card .form-group:last-child {
    margin-bottom: 0;
}

.restaurant-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.restaurant-card input,
.restaurant-card textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.restaurant-card input:focus,
.restaurant-card textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.restaurant-card textarea {
    resize: vertical;
    min-height: 80px;
}

.restaurant-card .action-btn {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.restaurant-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.btn-small {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-small.primary {
    background: var(--primary-red);
    color: white;
}

.btn-small.primary:hover {
    background: var(--primary-red-dark);
    transform: translateY(-1px);
}

.btn-small.secondary {
    background: var(--gray-500);
    color: white;
}

.btn-small.secondary:hover {
    background: var(--gray-600);
    transform: translateY(-1px);
}

/* ===== HINT STYLES ===== */
.hint, small.hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
    display: block;
    font-style: italic;
}

@media (max-width: 768px) {
    .restaurant-config {
        grid-template-columns: 1fr;
    }
    
    .restaurant-section {
        padding: 1rem;
    }
}

/* ===== MODAL DE CONFIRMAÇÃO CUSTOMIZADO ===== */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--gray-200);
    max-width: 450px;
    width: 90%;
    overflow: hidden;
    animation: scaleIn 0.3s ease;
}

.confirmation-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.confirmation-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.confirmation-icon.warning {
    background: var(--warning-100);
    color: var(--warning-600);
}

.confirmation-icon.danger {
    background: var(--error-100);
    color: var(--error-600);
}

.confirmation-icon.info {
    background: var(--info-100);
    color: var(--info-600);
}

.confirmation-icon.success {
    background: var(--success-100);
    color: var(--success-600);
}

#confirmation-text {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin: 0;
    line-height: 1.5;
}

.confirmation-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.confirmation-footer .cancel-btn {
    background: var(--gray-500);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confirmation-footer .cancel-btn:hover {
    background: var(--gray-600);
    transform: translateY(-2px);
}

.confirmation-footer .confirm-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confirmation-footer .confirm-btn:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
}

.confirmation-footer .confirm-btn.danger {
    background: var(--error-500);
}

.confirmation-footer .confirm-btn.danger:hover {
    background: var(--error-600);
}

/* ===== MODAIS MODERNOS ===== */
.modern-modal {
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    overflow: hidden;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.modern-header {
    background: linear-gradient(135deg, var(--primary-red), #e53e3e);
    color: white;
    padding: 2rem;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
}

.header-text h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.header-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.modern-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modern-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modern-body {
    padding: 2rem;
    background: var(--gray-50);
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1.1rem;
}

.section-title i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-grid.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.modern-input label,
.modern-textarea label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.85rem;
}

.modern-input input,
.modern-input select,
.modern-textarea textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.modern-input input:focus,
.modern-input select:focus,
.modern-textarea textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

.modern-textarea textarea {
    resize: vertical;
    min-height: 100px;
}

.modern-toggle {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 10px;
    border: 2px solid var(--gray-200);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-700);
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--gray-400);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-red);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.modern-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 1rem;
}

.btn-modern {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.btn-modern.primary {
    background: linear-gradient(135deg, var(--primary-red), #e53e3e);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-modern.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-modern.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-modern.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

.btn-modern.secondary {
    background: var(--gray-500);
    color: white;
}

.btn-modern.secondary:hover {
    background: var(--gray-600);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .modern-modal {
        max-width: 95%;
        margin: 1rem;
    }
    
    .modern-header {
        padding: 1.5rem;
    }
    
    .modern-body {
        padding: 1.5rem;
    }
    
    .form-grid,
    .form-grid.three-cols {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modern-actions {
        flex-direction: column;
    }
    
    .btn-modern {
        width: 100%;
    }
}

/* ===== DADOS DO PEDIDO MODERNOS ===== */
.modern-order-details {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    animation: fadeInUp 0.5s ease;
}

.order-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
}

.order-id-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-red);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
}

.order-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success-100);
    color: var(--success-700);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-header i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

.info-header h4 {
    margin: 0;
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
}

.info-content p {
    margin: 0.25rem 0;
    color: var(--gray-700);
    line-height: 1.5;
}

.customer-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gray-800) !important;
}

.customer-phone {
    color: var(--gray-600) !important;
}

.order-items-modern,
.order-summary-modern {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.items-header,
.summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.items-header i,
.summary-header i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

.items-header h4,
.summary-header h4 {
    margin: 0;
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
}

.modern-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.modern-order-item:last-child {
    border-bottom: none;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-qty {
    color: black;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 40px;
    text-align: center;
}

.item-name {
    color: var(--gray-800);
    font-weight: 500;
}

.item-price {
    color: var(--gray-800);
    font-weight: 600;
    font-size: 1.1rem;
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.summary-row.discount span:last-child {
    color: var(--error-500);
    font-weight: 600;
}

.summary-row.total {
    border-top: 2px solid var(--gray-200);
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: var(--success-600);
}

.info-card.notes {
    margin-top: 1rem;
    background: var(--blue-50);
    border-color: var(--blue-200);
}

@media (max-width: 768px) {
    .modern-order-details {
        padding: 1.5rem;
    }
    
    .order-header-modern {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .order-info-grid {
        grid-template-columns: 1fr;
    }
    
    .item-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===== SISTEMA DE PROMOÇÕES ===== */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.main-actions,
.promo-actions {
    display: flex;
    gap: 0.5rem;
}

.promo-actions {
    justify-content: center;
}

.product-action-btn.promo-create {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    flex: 1;
}

.product-action-btn.promo-create:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

.product-action-btn.promo-edit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    flex: 1;
}

.product-action-btn.promo-edit:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
}

.product-action-btn.promo-cancel {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    flex: 1;
}

.product-action-btn.promo-cancel:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

/* Badge de promoção */
.product-card.on-promotion {
    position: relative;
    border: 2px solid #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.product-card.on-promotion::before {
    content: '🏷️ PROMOÇÃO';
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
    animation: pulse 2s infinite;
}

.promotion-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.original-price {
    text-decoration: line-through;
    color: #6b7280;
    font-size: 0.9rem;
}

.promo-price {
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
}

.discount-badge {
    background: #ef4444;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Modal de promoção simplificado */
.promotion-modal-content {
    background: white;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.promotion-modal-content .modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    position: relative;
}

.promotion-modal-content .modal-header h2 {
    margin: 0 0 0.5rem 0;
    color: var(--gray-800);
    font-size: 1.5rem;
}

.promotion-modal-content .product-name {
    margin: 0;
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
}

.promotion-form {
    padding: 2rem;
}

.promotion-form .form-group {
    margin-bottom: 1.5rem;
}

.promotion-form label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #dc3545;
    background: var(--gray-50);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #dc3545;
}

.radio-option input[type="radio"]:checked {
    border-color: #dc3545;
}

.radio-option:has(input:checked) {
    border-color: #dc3545;
    background: var(--primary-red);
    color: white;
}

.radio-option:has(input:checked) strong,
.radio-option:has(input:checked) small {
    color: white;
}

.radio-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.radio-text strong {
    font-size: 1rem;
    color: var(--gray-800);
}

.radio-text small {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.promotion-form input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.promotion-form input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.price-preview-simple {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.preview-row:last-child {
    border-bottom: none;
    font-weight: 600;
}

.preview-row .new-price {
    color: var(--success-600);
    font-weight: 600;
}

.preview-row .savings {
    color: var(--success-600);
    font-weight: 600;
}

.promotion-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.promotion-form .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.promotion-form .btn.primary {
    background: var(--primary-red);
    color: white;
}

.promotion-form .btn.primary:hover {
    background: var(--primary-red-dark);
    transform: translateY(-1px);
}

.promotion-form .btn.secondary {
    background: var(--gray-500);
    color: white;
}

.promotion-form .btn.secondary:hover {
    background: var(--gray-600);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .radio-group {
        gap: 0.5rem;
    }
    
    .radio-option {
        padding: 0.75rem;
    }
    
    .promotion-form .form-actions {
        flex-direction: column;
    }
    
    .promotion-form .btn {
        width: 100%;
    }
}

/* ===== BOTÕES DE IMPRESSORA ===== */
.printer-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.printer-buttons .action-btn {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .printer-buttons {
        flex-direction: column;
    }
    
    .printer-buttons .action-btn {
        flex: none;
        width: 100%;
    }
}

/* Remover destaque excessivo do nome do cliente e telefone */
  .customer-highlight,
  .address-highlight {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .customer-name,
  .customer-address {
    font-size: 11px !important;
    font-weight: normal !important;
    color: #000 !important;
    margin: 1mm 0 !important;
    text-transform: none !important;
  }
