:root {
    --sidebar-width: 250px;
    --primary-color: #2c3e50;
    --accent-color: #FFD700;
    --border-color: #e2e8f0;
    --bg-surface: #ffffff;
    --bg-muted: #f8fafc;
    --bg-page: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL DE PEDIDO MANUAL
   ═══════════════════════════════════════════════════════════════ */
.manual-order-modal .manual-order-product-preview {
    display: flex;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-muted);
    margin-top: 12px;
}

.manual-order-preview-image {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}

.manual-order-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manual-order-preview-body {
    flex: 1;
    min-width: 0;
}

.manual-order-preview-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 6px 0 0;
}

.manual-order-preview-total {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.manual-order-preview-total strong {
    color: var(--text-primary);
}

.manual-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-surface);
    width: 100%;
    max-width: 160px;
}

.manual-qty-btn {
    border: none;
    background: transparent;
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 0.85rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.manual-qty-btn:hover {
    background: rgba(44,62,80,0.08);
}

.manual-qty-value {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.manual-order-addons {
    margin-top: 16px;
    border: 1px dashed var(--border-color);
}

.manual-order-addons .manual-addon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.manual-order-addons .manual-addon-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.manual-order-addons .manual-addon-info {
    flex: 1;
    margin-right: 16px;
}

.manual-order-addons .manual-addon-info small {
    display: block;
    color: var(--text-secondary);
}

.manual-order-items-list .manual-order-item-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.manual-order-summary {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
    padding: 12px 18px;
    min-width: 230px;
}

.manual-order-summary > div {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.manual-order-summary > div strong {
    color: var(--text-primary);
}

.manual-order-summary .manual-order-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

.manual-order-summary .manual-order-total strong {
    color: #089981;
    font-size: 1.1rem;
}

.manual-section-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.4rem;
    font-weight: 600;
    margin: 28px 0 18px;
    user-select: none;
}

.manual-section-divider::before,
.manual-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.12));
}

.manual-section-divider::after {
    background: linear-gradient(90deg, rgba(0,0,0,0.12), transparent);
}

.manual-section-divider span {
    padding: 4px 10px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 999px;
    background: var(--bg-surface);
    font-size: 0.65rem;
    letter-spacing: 0.2rem;
}

.manual-coupon-group .btn {
    font-size: 0.8rem;
}

#manual-order-coupon-feedback {
    font-size: 0.8rem;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .manual-order-modal .manual-order-product-preview {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .manual-order-summary {
        width: 100%;
    }
}
body { background-color: var(--bg-page); font-family: 'Segoe UI', sans-serif; overflow: hidden; }

/* Garantir que modais fiquem acima da sidebar fixa */
.modal {
    z-index: 1400;
}

/* Modal de Pedido Manual - garantir que fique acima da sidebar */
#manualOrderModal {
    z-index: 1450 !important;
}

#manualOrderModal .modal-dialog {
    z-index: 1451 !important;
}

/* Modal de Produto - garantir que fique acima da sidebar */
div#productModal.modal.fade {
    z-index: 1400 !important;
}

div#productModal.modal .modal-dialog,
div#productModal.modal .modal-dialog.modal-lg {
    z-index: 1401 !important;
}

div#productModal.modal .modal-content {
    z-index: 1402 !important;
}

/* Fix para backdrop quando productModal está aberto */
.modal-backdrop.show {
    z-index: 1390 !important;
}

/* Modal de Endereço da Loja - garantir que fique acima da sidebar */
#storeAddressModal {
    z-index: 1450 !important;
}

#storeAddressModal .modal-dialog {
    z-index: 1451 !important;
}

/* Modal de Funcionários - garantir que fique acima da sidebar */
#employeeModal {
    z-index: 1450 !important;
}

#employeeModal .modal-dialog {
    z-index: 1451 !important;
}

.modal-backdrop {
    z-index: 1300;
}

/* Garantir que conteúdo de todos os modais seja sempre interativo */
.modal-content {
    pointer-events: auto !important;
}

/* Fix final para modal de funcionários - máxima especificidade */
body > div.modal.fade.show#employeeModal,
html body div#employeeModal.modal.fade,
html body div#employeeModal.modal.fade.show {
    z-index: 9999 !important;
}

body > div.modal.fade.show#employeeModal .modal-dialog,
html body div#employeeModal.modal .modal-dialog,
html body div#employeeModal.modal.fade .modal-dialog.modal-dialog-centered {
    z-index: 10000 !important;
}

body > div.modal.fade.show#employeeModal .modal-content,
html body div#employeeModal.modal .modal-content {
    z-index: 10001 !important;
}

/* ═══════════════════════════════════════════════════════════════
   DESIGN SYSTEM UNIFICADO - Componentes reutilizáveis
   ═══════════════════════════════════════════════════════════════ */

/* View Header - Padrão para todas as abas */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.view-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-header h5 i {
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.view-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Ícones coloridos nos headers */
.icon-blue { background: #dbeafe; color: #2563eb; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-yellow { background: #fef3c7; color: #d97706; }
.icon-red { background: #fee2e2; color: #dc2626; }
.icon-purple { background: #ede9fe; color: #7c3aed; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-teal { background: #ccfbf1; color: #0d9488; }
.icon-pink { background: #fce7f3; color: #db2777; }
.icon-indigo { background: #e0e7ff; color: #4f46e5; }
.icon-gray { background: #f1f5f9; color: #475569; }

/* Filter Bar - Padrão para filtros */
.filter-bar {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-bar .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.filter-bar .form-control,
.filter-bar .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    font-size: 0.9rem;
    padding: 8px 12px;
}

.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44,62,80,0.1);
}

.filter-bar .input-group-text {
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Panel Card - Card padrão modernizado */
.panel-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.panel-card:hover {
    box-shadow: var(--shadow-md);
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-color);
}

.panel-card-header h5,
.panel-card-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-card-body {
    padding: 24px;
}

/* Table modernizada */
.modern-table {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modern-table .table {
    margin-bottom: 0;
}

.modern-table .table thead th {
    background: var(--bg-muted);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    white-space: nowrap;
}

.modern-table .table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.modern-table .table tbody tr:hover {
    background: #f8fafc;
}

.modern-table .table tbody tr:last-child td {
    border-bottom: none;
}

/* Botões padronizados */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Form styles unificados */
.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i {
    color: var(--primary-color);
}

/* Empty state padrão */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    font-size: 3.5rem;
    opacity: 0.2;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.empty-state h6 {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Tema escuro - design system */
html.theme-dark {
    --border-color: #3d4148;
    --bg-surface: #25282c;
    --bg-muted: #2d3138;
    --bg-page: #1a1d21;
    --text-primary: #e4e6eb;
    --text-secondary: #a0a5ae;
}

html.theme-auto {
    --border-color: #3d4148;
    --bg-surface: #25282c;
    --bg-muted: #2d3138;
    --bg-page: #1a1d21;
    --text-primary: #e4e6eb;
    --text-secondary: #a0a5ae;
}

html.theme-dark .view-header,
html.theme-auto .view-header {
    border-bottom-color: var(--border-color);
}

html.theme-dark .filter-bar,
html.theme-auto .filter-bar {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.theme-dark .panel-card,
html.theme-auto .panel-card {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.theme-dark .panel-card-header,
html.theme-auto .panel-card-header {
    background: var(--bg-muted);
    border-color: var(--border-color);
}

html.theme-dark .modern-table,
html.theme-auto .modern-table {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.theme-dark .modern-table .table thead th,
html.theme-auto .modern-table .table thead th {
    background: var(--bg-muted);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

html.theme-dark .modern-table .table tbody td,
html.theme-auto .modern-table .table tbody td {
    border-color: #2d3138;
}

html.theme-dark .modern-table .table tbody tr:hover,
html.theme-auto .modern-table .table tbody tr:hover {
    background: var(--bg-muted);
}

/* ═══════════════════════════════════════════════════════════════ */

/* Layout Sidebar */
.sidebar {
    height: 100vh; width: var(--sidebar-width); position: fixed; top: 0; left: 0;
    background: linear-gradient(180deg, var(--primary-color) 0%, #1a252f 100%);
    color: white; padding-top: 20px;
    transition: 0.3s; z-index: 1200;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar::-webkit-scrollbar { width: 0; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.sidebar-brand {
    font-size: 1.4rem; text-align: center; font-weight: 700;
    margin-bottom: 24px; color: var(--accent-color);
    padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-brand i { margin-left: 6px; }

/* Botão de fechar a sidebar (mobile apenas) */
.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: red;
    font-size: 1.43rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 0;
    transition: all 0.2s ease;
    box-shadow: none;
    line-height: 1;
}
.sidebar-close-btn:hover {
    background: transparent;
    color: darkred;
    transform: scale(1.1);
    box-shadow: none;
}

@media (max-width: 768px) {
    .sidebar-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
.nav-link {
    color: #9aabb5; padding: 12px 20px; font-size: 0.95rem;
    cursor: pointer; transition: all 0.2s ease;
    border-left: 3px solid transparent; margin: 1px 0;
    display: flex; align-items: center;
}
.nav-link:hover { background-color: rgba(255,255,255,0.06); color: #e4e6eb; border-left-color: rgba(255,215,0,0.3); }
.nav-link.active { background-color: rgba(255,215,0,0.08); color: white; border-left: 3px solid var(--accent-color); font-weight: 600; }
.nav-link i { margin-right: 12px; width: 22px; text-align: center; font-size: 0.9rem; }

/* Conteúdo Principal */
.main-content { margin-left: var(--sidebar-width); padding: 24px 28px; transition: 0.3s; height: 97.2vh; overflow-y: auto; }

/* Cards Dashboard */
.kpi-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    position: relative;
}
.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: rgba(255,255,255,0.08);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.kpi-card .card-body { padding: 20px 24px; }
.kpi-card .card-title { font-size: 0.85rem; font-weight: 500; opacity: 0.85; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-card h2 { font-size: 1.75rem; font-weight: 700; margin: 0; }
.kpi-icon { font-size: 2.5rem; opacity: 0.2; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); z-index: 1; }

/* Chart container */
.chart-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 24px;
}

.chart-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tabela Pedidos e Kanban */
.order-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border-left: 5px solid #ddd;
    margin-bottom: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-left-width: 5px;
}

.order-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
/* Compatibilidade + classes normalizadas (sem espaços/acentos) */
.status-Recebido, .status-recebido { border-left-color: #ffc107; } /* Amarelo */
.status-Preparo, .status-preparo { border-left-color: #17a2b8; } /* Azul */
.status-Entrega, .status-entrega { border-left-color: #fd7e14; } /* Laranja */
.status-Concluido, .status-concluido { border-left-color: #28a745; opacity: 0.7; } /* Verde */
.status-Cancelado, .status-cancelado { border-left-color: #6c757d; opacity: 0.7; } /* Cinza */

@keyframes blink-fast {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.blink-fast {
    animation: blink-fast 0.5s infinite;
}

.net-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}
.net-online { color: #1e7e34; }
.net-offline { color: #b02a37; }
.net-offline-animated { 
    animation: offline-pulse 1.2s ease-in-out infinite;
}

@keyframes offline-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(176, 42, 55, 0));
    }
    50% {
        transform: scale(2);
        filter: drop-shadow(0 0 8px rgba(176, 42, 55, 0.8)) drop-shadow(0 0 16px rgba(176, 42, 55, 0.6));
    }
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Foto de perfil da loja no cabeçalho (circular) */
.store-avatar-wrap {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
}
.store-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}
.store-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e9ecef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.1rem;
    border: 2px solid var(--accent-color);
}
.store-preview-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px dashed #ccc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto;
    background: #fff;
}
.store-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilos do Kanban */
.kanban-col {
    background-color: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 12px;
    min-height: 70vh;
    border: 1px solid var(--border-color);
}
.kanban-header {
    font-weight: 700;
    text-align: center;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    border-bottom: 3px solid #ccc;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}
.header-recebido { border-color: #ffc107; color: #b68900; background: linear-gradient(135deg, var(--bg-surface) 0%, #fffbeb 100%); }
.header-preparo { border-color: #17a2b8; color: #0f6674; background: linear-gradient(135deg, var(--bg-surface) 0%, #ecfeff 100%); }
.header-entrega { border-color: #fd7e14; color: #b3590d; background: linear-gradient(135deg, var(--bg-surface) 0%, #fff7ed 100%); }
.header-concluido { border-color: #28a745; color: #1e7e34; background: linear-gradient(135deg, var(--bg-surface) 0%, #f0fdf4 100%); }
.header-cancelado { border-color: #6c757d; color: #495057; background: linear-gradient(135deg, var(--bg-surface) 0%, #f8fafc 100%); }

/* Animação para novos pedidos (Recebido) */
@keyframes pulse-alert {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); border-color: #ffc107; }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); border-color: #ffc107; }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); border-color: #ffc107; }
}
.blink-alert {
    animation: pulse-alert 2s infinite;
    border: 2px solid #ffc107 !important; /* Força borda visível */
}

/* Animação para aba de Pedidos no sidebar quando há novos pedidos */
@keyframes swing-oscillate {
    0% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(-5deg) scale(1.02); }
    20% { transform: rotate(5deg) scale(1.02); }
    30% { transform: rotate(-4deg) scale(1.02); }
    40% { transform: rotate(4deg) scale(1.02); }
    50% { transform: rotate(0deg) scale(1.02); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes blink-slow {
    0%, 50% { opacity: 1; }
    75% { opacity: 0.6; }
    100% { opacity: 1; }
}

.nav-link.pedidos-alert {
    animation: swing-oscillate 2s ease-in-out infinite, blink-slow 3s ease-in-out infinite;
    color: #ffc107 !important;
    font-weight: 700 !important;
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
    background-color: rgba(255, 193, 7, 0.08) !important;
    border-left-color: #ffc107 !important;
}

.nav-link.pedidos-alert .badge {
    animation: pulse-alert 1.5s infinite;
}

/* Animação genérica para alertas no sidebar (Mensagens, Pagamentos) */
.sidebar .nav-link.sidebar-alert {
    animation: swing-oscillate 2s ease-in-out infinite, blink-slow 3s ease-in-out infinite !important;
    font-weight: 700 !important;
    border-left-width: 3px !important;
}

/* Alerta azul para Mensagens */
.sidebar .nav-link.sidebar-alert.alert-info {
    color: #0dcaf0 !important;
    text-shadow: 0 0 8px rgba(13, 202, 240, 0.4) !important;
    background-color: rgba(13, 202, 240, 0.15) !important;
    border-left-color: #0dcaf0 !important;
    border-left-style: solid !important;
}

.sidebar .nav-link.sidebar-alert.alert-info .badge {
    animation: pulse-alert 1.5s infinite !important;
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

/* Alerta vermelho/laranja para Pagamentos */
.sidebar .nav-link.sidebar-alert.alert-warning {
    color: #fd7e14 !important;
    text-shadow: 0 0 8px rgba(253, 126, 20, 0.4) !important;
    background-color: rgba(253, 126, 20, 0.15) !important;
    border-left-color: #fd7e14 !important;
    border-left-style: solid !important;
}

.sidebar .nav-link.sidebar-alert.alert-warning .badge {
    animation: pulse-alert 1.5s infinite !important;
    background-color: #fd7e14 !important;
    color: #fff !important;
}

/* Login Screen */
#login-screen {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 50%, #0f1419 100%);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
}
.login-box {
    background: white; padding: 40px 36px; border-radius: var(--radius-lg);
    width: 100%; max-width: 400px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-box h2 { font-weight: 700; font-size: 1.6rem; }
.login-box .form-control {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    border-color: var(--border-color);
}
.login-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44,62,80,0.12);
}
.login-box .btn { border-radius: var(--radius-sm); font-weight: 600; letter-spacing: 0.5px; }

/* Config Tabs (nav-pills modernizadas) */
.config-tabs {
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}
.config-tabs .nav-link {
    border-radius: var(--radius-sm) !important;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    margin: 0;
    border-left: none;
}
.config-tabs .nav-link:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
    border-color: var(--border-color);
    border-left: none;
}
.config-tabs .nav-link.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    font-weight: 600;
    border-left: none;
}

/* Top header bar refinado */
.main-content > .d-flex:first-child {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

#page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Form controls globais */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44,62,80,0.08);
}

/* Badges globais refinados */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Cards bootstrap - override para consistência */
.card {
    border-radius: var(--radius-lg);
    border-color: var(--border-color);
}

.card-header {
    border-bottom-color: var(--border-color);
}

/* Botões globais refinados */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-success { background: #16a34a; border-color: #16a34a; }
.btn-success:hover { background: #15803d; border-color: #15803d; transform: translateY(-1px); }

.btn-primary { background: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background: #1a252f; border-color: #1a252f; transform: translateY(-1px); }

/* Scrollbar customizada para main-content */
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

/* Responsividade do view-header */
@media (max-width: 768px) {
    .view-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .view-header-actions {
        width: 100%;
    }
    .view-header-actions .btn {
        width: 100%;
    }
    .filter-bar {
        padding: 12px 14px;
    }
    .main-content > .d-flex:first-child {
        flex-direction: column !important;
        gap: 10px;
    }
}

/* Loader (barra de progresso no topo) */
#loader { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 9999; }

/* Loading overlay - z-index abaixo dos modais Bootstrap */
#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1250;
    align-items: center;
    justify-content: center;
}
#loading-overlay.active {
    display: flex;
}
.loading-overlay-content {
    background: var(--bg-surface, #fff);
    border-radius: 12px;
    padding: 28px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 200px;
}
.loading-overlay-content .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color, #e2e8f0);
    border-top-color: var(--primary-color, #2c3e50);
    border-radius: 50%;
    animation: spin-overlay 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin-overlay {
    to { transform: rotate(360deg); }
}
.loading-overlay-content .loading-message {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}
#loader.loading { display: block; }
.bar { content: ""; display: block; width: 100%; height: 100%; background-color: var(--accent-color); animation: loading 1s linear infinite; }
@keyframes loading { 0% { width: 0%; margin-left: 0; } 50% { width: 100%; margin-left: 0; } 100% { margin-left: 100%; width: 0%; } }

/* Estilos Cropper e Adicionais */
.img-container { max-height: 400px; margin-bottom: 20px; display: none; background: #f0f0f0; }
.img-preview-box { width: 150px; height: 150px; border: 1px dashed #ccc; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 10px; background: #fff; }
.img-preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.addon-item { background: #f8f9fa; border: 1px solid #dee2e6; padding: 8px; border-radius: 5px; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; }

/* Wrapper do Cropper */
#cropper-wrapper {
    display: none;
    height: 400px;
    background-color: #333;
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}
#cropper-wrapper img {
    max-width: 100%;
    display: block;
}
#preview-step-container {
    display: block;
}

/* Estilos para Impressão Térmica (padrão 80mm) */
#print-area { display: none; }

@media print {
    body * { visibility: hidden; height: 0; overflow: hidden; }
    #print-area, #print-area * { visibility: visible; height: auto; overflow: visible; }
    #print-area { 
        display: block; 
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%; 
        margin: 0; 
        padding: 0;
    }
    @page { margin: 0; size: 80mm auto; }
    
    /* Cupom térmico padrão mercado 80mm */
    .receipt {
        font-family: 'Courier New', Courier, monospace;
        width: 80mm;
        max-width: 80mm;
        margin: 0 auto;
        padding: 5mm;
        color: #000;
        font-size: 11px;
        line-height: 1.2;
    }
    .receipt-store { text-align: center; font-weight: bold; font-size: 14px; margin-bottom: 4px; }
    .receipt-header, .receipt-footer { text-align: center; margin-bottom: 6px; }
    .receipt-atendente { text-align: center; font-size: 10px; margin-bottom: 4px; }
    .receipt-divider { border-top: 1px dashed #000; margin: 6px 0; }
    .receipt-separator { border-top: 1px dashed #000; margin: 4px 0; }
    .receipt-bold { font-weight: bold; }
    .receipt-large { font-size: 13px; font-weight: bold; }
    .receipt-item { margin-bottom: 4px; }
    .receipt-brand { font-size: 9px; color: #000; margin-top: 4px; font-weight: 600; }
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar { left: -250px; }
    .sidebar.active { left: 0; }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: block !important; }
}
.mobile-toggle { display: none; position: fixed; top: 15px; left: 15px; z-index: 1001; background: var(--primary-color); color: white; border: none; padding: 10px 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); font-size: 1rem; }

/* Skeleton Screens */
.view-section.content-loading .skeleton-overlay { display: block !important; }
.view-section.content-loading > *:not(.skeleton-overlay) { opacity: 0.5; pointer-events: none; }
.skeleton-overlay { display: none; position: absolute; inset: 0; background: var(--bg-page); z-index: 5; border-radius: var(--radius-md); padding: 1rem; }
.skeleton-line { height: 1rem; background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: 4px; margin-bottom: 0.5rem; }
.skeleton-card { height: 120px; background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: 10px; margin-bottom: 1rem; }
.skeleton-chart { height: 200px; background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: 8px; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Tema escuro (aplicado via classe no html) */
html.theme-dark body,
html.theme-auto body { background-color: var(--bg-page); }
html.theme-dark .main-content,
html.theme-auto .main-content { background-color: var(--bg-page); }
html.theme-dark .card,
html.theme-dark .kpi-card,
html.theme-dark .table-responsive,
html.theme-dark .order-card,
html.theme-dark .kanban-header,
html.theme-auto .card,
html.theme-auto .kpi-card,
html.theme-auto .table-responsive,
html.theme-auto .order-card,
html.theme-auto .kanban-header { background-color: var(--bg-surface) !important; color: var(--text-primary); border-color: var(--border-color); }
html.theme-dark .card-header,
html.theme-auto .card-header { background-color: var(--bg-muted) !important; color: var(--text-primary); border-color: var(--border-color); }
html.theme-dark .text-muted,
html.theme-auto .text-muted { color: var(--text-secondary) !important; }
html.theme-dark .bg-light,
html.theme-auto .bg-light { background-color: var(--bg-muted) !important; }
html.theme-dark .form-control,
html.theme-dark .form-select,
html.theme-auto .form-control,
html.theme-auto .form-select { background-color: var(--bg-surface); color: var(--text-primary); border-color: var(--border-color); }
html.theme-dark .kanban-col,
html.theme-auto .kanban-col { background-color: var(--bg-muted); border-color: var(--border-color); }
html.theme-dark .skeleton-overlay,
html.theme-auto .skeleton-overlay { background: var(--bg-page); }

/* Tema escuro - chart-card */
html.theme-dark .chart-card,
html.theme-auto .chart-card {
    background: var(--bg-surface);
    border-color: var(--border-color);
}
html.theme-dark .chart-card h5,
html.theme-auto .chart-card h5 { color: var(--text-primary); }

/* Tema escuro - kanban headers (override gradientes) */
html.theme-dark .header-recebido,
html.theme-auto .header-recebido { background: linear-gradient(135deg, var(--bg-surface) 0%, #332b00 100%); color: #ffc107; }
html.theme-dark .header-preparo,
html.theme-auto .header-preparo { background: linear-gradient(135deg, var(--bg-surface) 0%, #0a2a30 100%); color: #5dd5e8; }
html.theme-dark .header-entrega,
html.theme-auto .header-entrega { background: linear-gradient(135deg, var(--bg-surface) 0%, #331a00 100%); color: #fd9a47; }
html.theme-dark .header-concluido,
html.theme-auto .header-concluido { background: linear-gradient(135deg, var(--bg-surface) 0%, #0a2a12 100%); color: #5dd57c; }
html.theme-dark .header-cancelado,
html.theme-auto .header-cancelado { background: linear-gradient(135deg, var(--bg-surface) 0%, #252830 100%); color: #a0a5ae; }

/* Tema escuro - config-tabs */
html.theme-dark .config-tabs,
html.theme-auto .config-tabs { border-bottom-color: var(--border-color); }
html.theme-dark .config-tabs .nav-link,
html.theme-auto .config-tabs .nav-link { color: var(--text-secondary); }
html.theme-dark .config-tabs .nav-link:hover,
html.theme-auto .config-tabs .nav-link:hover { background: var(--bg-muted); color: var(--text-primary); border-color: var(--border-color); }
html.theme-dark .config-tabs .nav-link.active,
html.theme-auto .config-tabs .nav-link.active { background: #3d7ec7 !important; border-color: #3d7ec7 !important; color: white !important; }

/* Tema escuro - login box */
html.theme-dark .login-box,
html.theme-auto .login-box { background: var(--bg-surface); color: var(--text-primary); }
html.theme-dark .login-box label,
html.theme-auto .login-box label { color: var(--text-secondary); }

/* Tema escuro - net-badge, btn-outline */
html.theme-dark .net-badge,
html.theme-auto .net-badge { background: var(--bg-surface); border-color: var(--border-color); }
html.theme-dark .btn-outline-secondary,
html.theme-auto .btn-outline-secondary { color: var(--text-secondary); border-color: var(--border-color); }
html.theme-dark .btn-outline-secondary:hover,
html.theme-auto .btn-outline-secondary:hover { background: var(--bg-muted); color: var(--text-primary); }

/* Tema escuro - icon backgrounds */
html.theme-dark .icon-blue { background: rgba(37,99,235,0.15); }
html.theme-dark .icon-green { background: rgba(22,163,74,0.15); }
html.theme-dark .icon-yellow { background: rgba(217,119,6,0.15); }
html.theme-dark .icon-red { background: rgba(220,38,38,0.15); }
html.theme-dark .icon-purple { background: rgba(124,58,237,0.15); }
html.theme-dark .icon-orange { background: rgba(234,88,12,0.15); }
html.theme-dark .icon-teal { background: rgba(13,148,136,0.15); }
html.theme-dark .icon-pink { background: rgba(219,39,119,0.15); }
html.theme-dark .icon-indigo { background: rgba(79,70,229,0.15); }
html.theme-dark .icon-gray { background: rgba(71,85,105,0.15); }
html.theme-auto .icon-blue { background: rgba(37,99,235,0.15); }
html.theme-auto .icon-green { background: rgba(22,163,74,0.15); }
html.theme-auto .icon-yellow { background: rgba(217,119,6,0.15); }
html.theme-auto .icon-red { background: rgba(220,38,38,0.15); }
html.theme-auto .icon-purple { background: rgba(124,58,237,0.15); }
html.theme-auto .icon-orange { background: rgba(234,88,12,0.15); }
html.theme-auto .icon-teal { background: rgba(13,148,136,0.15); }
html.theme-auto .icon-pink { background: rgba(219,39,119,0.15); }
html.theme-auto .icon-indigo { background: rgba(79,70,229,0.15); }
html.theme-auto .icon-gray { background: rgba(71,85,105,0.15); }

/* Tema escuro - skeleton */
html.theme-dark .skeleton-line,
html.theme-dark .skeleton-card,
html.theme-dark .skeleton-chart,
html.theme-auto .skeleton-line,
html.theme-auto .skeleton-card,
html.theme-auto .skeleton-chart {
    background: linear-gradient(90deg, #2d3138 25%, #3d4148 50%, #2d3138 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

/* Tema escuro - table dentro de modern-table */
html.theme-dark .modern-table .table,
html.theme-auto .modern-table .table { color: var(--text-primary); }

/* Tema escuro - CORREÇÕES DE FORMULÁRIOS E TEXTOS */
html.theme-dark .form-label,
html.theme-auto .form-label { color: var(--text-primary) !important; }

html.theme-dark small,
html.theme-auto small,
html.theme-dark .small,
html.theme-auto .small { color: var(--text-secondary) !important; }

html.theme-dark .form-control::placeholder,
html.theme-auto .form-control::placeholder { color: var(--text-secondary); opacity: 0.7; }

html.theme-dark .form-control:disabled,
html.theme-dark .form-control[readonly],
html.theme-auto .form-control:disabled,
html.theme-auto .form-control[readonly] { background-color: var(--bg-muted); color: var(--text-secondary); }

html.theme-dark .form-section-title,
html.theme-auto .form-section-title { color: var(--text-secondary); border-bottom-color: var(--border-color); }

html.theme-dark .form-check-label,
html.theme-auto .form-check-label { color: var(--text-primary) !important; }

html.theme-dark .input-group-text,
html.theme-auto .input-group-text { background-color: var(--bg-muted); color: var(--text-secondary); border-color: var(--border-color); }

/* Tema escuro - card-header bg-light override */
html.theme-dark .card-header.bg-light,
html.theme-auto .card-header.bg-light { background-color: var(--bg-muted) !important; color: var(--text-primary); }

/* Tema escuro - Cadastro da Loja específico */
html.theme-dark #loja-reg-id,
html.theme-dark #loja-reg-nome,
html.theme-dark #loja-reg-zap,
html.theme-dark #loja-reg-email,
html.theme-dark #loja-reg-endereco,
html.theme-dark #loja-reg-responsavel,
html.theme-dark #loja-reg-senha,
html.theme-dark #loja-reg-pix,
html.theme-dark #loja-reg-pix-recebedor,
html.theme-dark #loja-reg-pedminimo,
html.theme-auto #loja-reg-id,
html.theme-auto #loja-reg-nome,
html.theme-auto #loja-reg-zap,
html.theme-auto #loja-reg-email,
html.theme-auto #loja-reg-endereco,
html.theme-auto #loja-reg-responsavel,
html.theme-auto #loja-reg-senha,
html.theme-auto #loja-reg-pix,
html.theme-auto #loja-reg-pix-recebedor,
html.theme-auto #loja-reg-pedminimo { background-color: var(--bg-surface); color: var(--text-primary); }

/* Tema escuro - Cupons formulário */
html.theme-dark #coupon-codigo,
html.theme-dark #coupon-tipo,
html.theme-dark #coupon-valor,
html.theme-dark #coupon-min-pedido,
html.theme-dark #coupon-max-usos,
html.theme-dark #coupon-data-inicio,
html.theme-dark #coupon-data-fim,
html.theme-auto #coupon-codigo,
html.theme-auto #coupon-tipo,
html.theme-auto #coupon-valor,
html.theme-auto #coupon-min-pedido,
html.theme-auto #coupon-max-usos,
html.theme-auto #coupon-data-inicio,
html.theme-auto #coupon-data-fim { background-color: var(--bg-surface); color: var(--text-primary); }

/* Tema escuro - Taxa de Entrega formulário */
html.theme-dark #taxa-tipo,
html.theme-dark #taxa-valor-padrao,
html.theme-dark #taxa-gratis-acima,
html.theme-dark #taxa-valor-km,
html.theme-dark #taxa-minima,
html.theme-dark #taxa-raio-max,
html.theme-dark #bairro-nome,
html.theme-dark #bairro-taxa,
html.theme-auto #taxa-tipo,
html.theme-auto #taxa-valor-padrao,
html.theme-auto #taxa-gratis-acima,
html.theme-auto #taxa-valor-km,
html.theme-auto #taxa-minima,
html.theme-auto #taxa-raio-max,
html.theme-auto #bairro-nome,
html.theme-auto #bairro-taxa { background-color: var(--bg-surface); color: var(--text-primary); }

/* Tema escuro - Configurações formulário */
html.theme-dark #config-idioma,
html.theme-dark #config-tema,
html.theme-dark #config-refresh-interval,
html.theme-dark #config-periodo-padrao,
html.theme-dark #config-impressao-largura,
html.theme-dark #config-api-timeout,
html.theme-dark #config-login-attempts,
html.theme-auto #config-idioma,
html.theme-auto #config-tema,
html.theme-auto #config-refresh-interval,
html.theme-auto #config-periodo-padrao,
html.theme-auto #config-impressao-largura,
html.theme-auto #config-api-timeout,
html.theme-auto #config-login-attempts { background-color: var(--bg-surface); color: var(--text-primary); }

/* Tema escuro - lista de bairros */
html.theme-dark #bairros-list .list-group-item,
html.theme-auto #bairros-list .list-group-item { background-color: var(--bg-surface); color: var(--text-primary); border-color: var(--border-color); }

/* Tema escuro - status-label em pagamentos */
html.theme-dark .status-label,
html.theme-auto .status-label { color: var(--text-secondary); }

/* Tema escuro - alert boxes */
html.theme-dark .alert-info,
html.theme-auto .alert-info { background: rgba(13,110,253,0.1); border-color: rgba(13,110,253,0.2); color: #6ea8fe; }
html.theme-dark .alert-warning,
html.theme-auto .alert-warning { background: rgba(255,193,7,0.1); border-color: rgba(255,193,7,0.2); color: #ffda6a; }
html.theme-dark .alert-danger,
html.theme-auto .alert-danger { background: rgba(220,53,69,0.1); border-color: rgba(220,53,69,0.2); color: #ea868f; }

@media (prefers-color-scheme: dark) {
    html.theme-auto body { background-color: var(--bg-page); }
    html.theme-auto .card,
    html.theme-auto .order-card,
    html.theme-auto .kanban-header { background-color: var(--bg-surface) !important; color: var(--text-primary); }
}

/* Layout compacto nos cards de pedido */
.order-card-compact .order-card { padding: 8px 10px; margin-bottom: 10px; }
.order-card-compact .order-card h6 { font-size: 0.9rem; }
.order-card-compact .order-card small { font-size: 0.75rem; }
.order-card-compact .order-card .bg-light { max-height: 60px !important; font-size: 0.75rem !important; padding: 6px !important; }
.order-card-compact .order-card .btn { font-size: 0.75rem; padding: 4px 8px; }

/* === LOJA INATIVA === */
#inactive-banner {
    display: none;
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 1.05rem;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(220,53,69,0.25);
    animation: inactive-pulse 2.5s infinite;
}
#inactive-banner.show { display: flex; }
#inactive-banner i { font-size: 1.5rem; }
@keyframes inactive-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(220,53,69,0.25); }
    50% { box-shadow: 0 4px 24px rgba(220,53,69,0.5); }
}
/* Esconde botões de ação em abas restritas quando loja inativa */
body.loja-inativa .order-card .btn:not(.btn-print) { display: none !important; }
body.loja-inativa #btn-add-product { display: none !important; }
body.loja-inativa .products-table .btn { display: none !important; }
body.loja-inativa #emp-form-wrapper .btn { display: none !important; }
body.loja-inativa #emp-form-wrapper input { pointer-events: none; opacity: 0.6; }
body.loja-inativa #coupon-form-wrapper .btn { display: none !important; }
body.loja-inativa #coupons-list .btn { display: none !important; }
body.loja-inativa #coupons-empty .btn { display: none !important; }
body.loja-inativa #btn-new-coupon { display: none !important; }
body.loja-inativa #view-taxaentrega .btn-primary { display: none !important; }
body.loja-inativa #view-taxaentrega input,
body.loja-inativa #view-taxaentrega select { pointer-events: none; opacity: 0.6; }
body.loja-inativa #btn-editar-loja { display: none !important; }
body.loja-inativa #loja-reg-edit-area .btn { display: none !important; }
body.loja-inativa .bairro-add-btn { display: none !important; }

/* === SISTEMA DE ALERTAS GLOBAIS === */
.global-alerts-container {
    margin-bottom: 20px;
    position: relative;
    z-index: 1050;
}

.global-alert {
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid;
    animation: slideInDown 0.3s ease-out;
    position: relative;
    z-index: 1051;
}

.global-alert.alert-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
}

.global-alert.alert-danger {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fdf2f2 0%, #fef5f5 100%);
}

.global-alert.alert-info {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0fbff 100%);
}

.global-alert.alert-success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #f5fff9 100%);
}

.global-alert .btn-close {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.global-alert .btn-close:hover {
    opacity: 1;
}

.global-alert .d-flex {
    align-items: center;
}

.global-alert i.fa-lg {
    font-size: 1.5rem;
    opacity: 0.8;
}

.global-alert strong {
    color: inherit;
    font-weight: 600;
}

.global-alert p {
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.9;
}

/* Animações */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

.global-alert.fade-out {
    animation: slideOutUp 0.3s ease-out forwards;
}

/* Responsividade */
@media (max-width: 768px) {
    .global-alert {
        margin-bottom: 8px;
        font-size: 0.85rem;
    }
    
    .global-alert .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .global-alert .btn-sm {
        width: 100%;
        margin-top: 5px;
    }
    
    .global-alert i.fa-lg {
        font-size: 1.2rem;
        align-self: center;
    }
}

.global-alert {
    margin-bottom: 12px;
    border: none;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: alert-slide-in 0.3s ease;
}

.global-alert.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.global-alert.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #fab1a0 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.global-alert.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #74b9ff 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.global-alert.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #55efc4 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.global-alert i {
    opacity: 0.8;
}

.global-alert strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.global-alert .btn-close {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.global-alert .btn-close:hover {
    opacity: 1;
}

@keyframes alert-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ABA MEUS PAGAMENTOS === */
.payment-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 10px;
    background: #f8f9fa;
    flex: 1;
    min-width: 200px;
}

.status-item i {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: white;
}

.status-item > div {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Cores por situação */
.status-em-dia i {
    color: #28a745;
    background: #d4edda;
}

.status-atrasado i {
    color: #dc3545;
    background: #f8d7da;
}

.status-trial i {
    color: #17a2b8;
    background: #d1ecf1;
}

.status-suspenso i {
    color: #6c757d;
    background: #e9ecef;
}

/* Situation Display */
.payment-situation-display {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 16px;
}

.situation-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.situation-em-dia {
    background: #d4edda;
    color: #28a745;
}

.situation-atrasado {
    background: #f8d7da;
    color: #dc3545;
    animation: pulse-danger 2s infinite;
}

.situation-trial {
    background: #d1ecf1;
    color: #17a2b8;
}

.situation-suspenso {
    background: #e9ecef;
    color: #6c757d;
}

@keyframes pulse-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

/* Animação para botão de teste de som */
@keyframes pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.situation-text h4 {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
}

/* Trial Countdown */
.trial-countdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Payment Methods Icons */
.payment-icons i {
    transition: transform 0.2s, opacity 0.2s;
}

.payment-icons i:hover {
    transform: scale(1.1);
    opacity: 1 !important;
}

/* Payment Alerts in Tab */
.payment-alerts .alert {
    margin-bottom: 12px;
    border: none;
    border-radius: 8px;
}

/* Dark theme support for payments */
html.theme-dark .payment-status-bar,
html.theme-auto .payment-status-bar { background-color: #25282c; }

html.theme-dark .status-item,
html.theme-auto .status-item { background-color: #2d3138; }

html.theme-dark .status-value,
html.theme-auto .status-value { color: #e4e6eb; }

html.theme-dark .payment-situation-display,
html.theme-auto .payment-situation-display { background-color: #2d3138; }

html.theme-dark .global-alert.alert-warning,
html.theme-auto .global-alert.alert-warning { 
    background: linear-gradient(135deg, #856404 0%, #6b5304 100%);
    color: #fff;
}

html.theme-dark .global-alert.alert-danger,
html.theme-auto .global-alert.alert-danger { 
    background: linear-gradient(135deg, #721c24 0%, #5a161b 100%);
    color: #fff;
}

html.theme-dark .global-alert.alert-info,
html.theme-auto .global-alert.alert-info { 
    background: linear-gradient(135deg, #0c5460 0%, #0a4350 100%);
    color: #fff;
}

/* Responsividade para pagamentos */
@media (max-width: 768px) {
    .payment-status-bar {
        flex-direction: column;
    }
    
    .status-item {
        min-width: 100%;
    }
    
    .payment-situation-display {
        flex-direction: column;
        text-align: center;
    }
    
    .situation-icon {
        margin: 0 auto;
    }
}

/* Bloquear interações durante loading */
body.loading-active {
    pointer-events: none;
    user-select: none;
}

body.loading-active #loading-overlay {
    pointer-events: auto;
    user-select: auto;
}

body.loading-active .sidebar,
body.loading-active .main-content {
    filter: blur(2px);
    transition: filter 0.3s ease;
}

#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#loading-overlay.active {
    display: flex;
}

.loading-overlay-content {
    background: white;
    padding: 40px 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: loading-pop 0.3s ease;
}

.loading-overlay-content .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e9ecef;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-overlay-content .loading-message {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 500;
}

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

@keyframes loading-pop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════════
   CORREÇÕES - MODAIS DE ENTREGADORES (z-index)
   ═══════════════════════════════════════════════════════════════ */

/* Modal de cadastro/edição de entregador */
#entregadorModal {
    z-index: 1350 !important;
}

#entregadorModal .modal-dialog {
    z-index: 1351 !important;
}

#entregadorModal.modal.show {
    z-index: 1350 !important;
}

/* Modal de atribuição deve ficar acima de tudo (sidebar z-index: 1200) */
#assignEntregadorModal {
    z-index: 1300 !important;
}

#assignEntregadorModal .modal-dialog {
    z-index: 1301 !important;
}

/* Backdrop do modal também precisa estar acima */
#assignEntregadorModal.modal.show {
    z-index: 1300 !important;
}

/* Força employeeModal acima de qualquer stacking context */
#employeeModal {
    z-index: 2147483647 !important;
}

#employeeModal .modal-content {
    pointer-events: auto !important;
}

/* Backdrop fica abaixo do modal e NÃO bloqueia cliques */
.modal-backdrop {
    z-index: 2147483646 !important;
    pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   CORREÇÕES - MODAIS DA ABA PRODUTOS (z-index)
   ═══════════════════════════════════════════════════════════════ */

/* Modal de produtos usa z-index padrao de .modal (1400) */

/* Modal de imagem da loja usa z-index padrao de .modal (1400) */

/* ═══════════════════════════════════════════════════════════════
   CORREÇÕES - SWEETALERT MODAIS (z-index acima de tudo)
   ═══════════════════════════════════════════════════════════════ */

/* SweetAlert2 deve ficar acima de todos os modais Bootstrap */
.swal2-container {
    z-index: 2000 !important;
}

.swal2-popup {
    z-index: 2001 !important;
}

/* Backdrop do SweetAlert */
.swal2-backdrop-show {
    z-index: 1999 !important;
}

/* ═══════════════════════════════════════════════════════════════
   CORREÇÕES - ENTREGADORES E MAPA
   ═══════════════════════════════════════════════════════════════ */

/* Controles do Leaflet abaixo da sidebar */
.leaflet-control-zoom,
.leaflet-control {
    z-index: 500 !important;
}

/* ═══════════════════════════════════════════════════════════════
   SISTEMA DE CHAT PROFISSIONAL - LOGISTA
   ═══════════════════════════════════════════════════════════════ */

.lc-chat-container {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    height: calc(100vh - 140px);
    min-height: 500px;
    overflow: hidden;
}

/* Painel de Conversas */
.lc-conversation-panel {
    width: 380px;
    min-width: 320px;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    background: #fafbfc;
}

.lc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.lc-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lc-panel-title i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.lc-panel-title h5 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* Abas - Isoladas do Bootstrap */
.lc-tabs {
    display: flex !important;
    border-bottom: 1px solid #e9ecef !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lc-tabs .lc-tab-btn {
    flex: 1 !important;
    padding: 12px 6px !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    background: #fff !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #6c757d !important;
    cursor: pointer !important;
    text-align: center !important;
    position: relative !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    display: block !important;
}

.lc-tabs .lc-tab-btn:hover {
    color: #2c3e50 !important;
    background: #f8f9fa !important;
    border-color: transparent !important;
}

.lc-tabs .lc-tab-btn.active {
    color: #2c3e50 !important;
    border-bottom-color: #2c3e50 !important;
    background: #fff !important;
}

.lc-tabs .lc-tab-badge {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 16px !important;
    height: 16px !important;
    padding: 0 4px !important;
    border-radius: 8px !important;
    background: #dc3545 !important;
    color: #fff !important;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border: none !important;
}

/* Lista de Conversas */
.lc-conversations-list {
    flex: 1;
    overflow-y: auto;
}

.lc-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.lc-conv-item:hover {
    background: #f0f4f8;
}

.lc-conv-item.lc-conv-active {
    background: #e8f0fe;
    border-left: 3px solid var(--primary-color);
}

.lc-conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.lc-conv-info {
    flex: 1;
    min-width: 0;
}

.lc-conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.lc-conv-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.lc-conv-time {
    font-size: 0.7rem;
    color: #999;
    flex-shrink: 0;
}

.lc-conv-preview {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lc-conv-tipo-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.lc-tipo-entregador {
    background: #fff3e0;
    color: #e65100;
}

.lc-tipo-cliente {
    background: #ede7f6;
    color: #4527a0;
}

.lc-conv-lastmsg {
    font-size: 0.8rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.lc-conv-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 99px;
    background: #dc3545;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.lc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.lc-empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.lc-empty-state h6 {
    margin: 0 0 6px;
    color: #666;
    font-weight: 600;
}

.lc-empty-state p {
    margin: 0;
    font-size: 0.85rem;
}

/* Painel de Chat */
.lc-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    min-width: 0;
}

.lc-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.lc-back-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f2f5;
    border-radius: 50%;
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.lc-back-btn:hover {
    background: #e0e3e7;
}

.lc-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.lc-chat-header-info {
    flex: 1;
    min-width: 0;
}

.lc-chat-header-info strong {
    display: block;
    font-size: 0.95rem;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-chat-header-info small {
    font-size: 0.75rem;
    color: #888;
}

/* Mensagens */
.lc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e0e5ec' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.lc-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.lc-date-divider span {
    background: #e0e5ec;
    color: #666;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lc-msg {
    display: flex;
    margin-bottom: 4px;
}

.lc-msg-sent {
    justify-content: flex-end;
}

.lc-msg-received {
    justify-content: flex-start;
}

.lc-msg-bubble {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-wrap: break-word;
    position: relative;
}

.lc-msg-sent .lc-msg-bubble {
    background: var(--primary-color);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.lc-msg-received .lc-msg-bubble {
    background: #fff;
    color: #1a1a2e;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.lc-msg-text {
    display: block;
}

.lc-msg-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 0.62rem;
    opacity: 0.65;
    margin-top: 3px;
}

.lc-msg-sent .lc-msg-meta {
    color: rgba(255,255,255,0.75);
}

.lc-read {
    color: #4fc3f7 !important;
    opacity: 1 !important;
}

.lc-empty-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.lc-empty-chat i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.35;
}

.lc-empty-chat p {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #777;
}

.lc-empty-chat small {
    font-size: 0.82rem;
    color: #aaa;
}

/* Input de Chat */
.lc-chat-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 12px 18px;
    border-top: 1px solid #e9ecef;
    background: #fff;
}

.lc-char-counter {
    position: absolute;
    right: 70px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.2s;
}

.lc-chat-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: #f8f9fa;
}

.lc-chat-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44,62,80,0.08);
}

.lc-send-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}

.lc-send-btn:hover {
    background: #1a252f;
    transform: scale(1.05);
}

.lc-send-btn:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════════
   SISTEMA DE CHAT PROFISSIONAL - RESPONSIVIDADE MOBILE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .lc-chat-container {
        flex-direction: column;
        height: calc(100vh - 60px);
    }
    
    .lc-conversation-panel {
        width: 100% !important;
        min-width: 100% !important;
        height: 40%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .lc-chat-panel {
        height: 60%;
    }
    
    .lc-back-btn {
        display: flex !important;
    }
    
    .lc-panel-title h5 {
        font-size: 1rem;
    }
    
    .lc-conv-item {
        padding: 10px 12px;
    }
    
    .lc-conv-name {
        font-size: 0.85rem;
    }
    
    .lc-chat-header {
        padding: 10px 16px;
    }
    
    .lc-chat-messages {
        padding: 16px;
    }
    
    .lc-chat-input-bar {
        padding: 10px 16px;
    }
}

/* Nova Conversa (SweetAlert) */
.lc-new-chat-section {
    text-align: left;
    padding: 8px 0;
}

.lc-new-chat-section h6 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lc-new-chat-list {
    max-height: 180px;
    overflow-y: auto;
}

.lc-new-chat-item {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lc-new-chat-item:hover {
    background: #f0f2f5;
}

/* Responsivo - Mobile */
@media (max-width: 768px) {
    .lc-chat-container {
        height: calc(100vh - 100px);
        flex-direction: column;
    }

    .lc-conversation-panel {
        width: 100%;
        min-width: 0;
        border-right: none;
    }

    .lc-chat-panel {
        position: absolute !important;
        inset: 0;
        z-index: 10;
        border-radius: 12px;
    }

    .lc-back-btn {
        display: flex !important;
    }

    .lc-msg-bubble {
        max-width: 80%;
    }
}

/* ═══════════════════════════════════════════════════════════════ */

/* Tema escuro para loading overlay */
html.theme-dark #loading-overlay .loading-overlay-content,
html.theme-auto #loading-overlay .loading-overlay-content {
    background: #25282c;
}

html.theme-dark .loading-overlay-content .loading-message,
html.theme-auto .loading-overlay-content .loading-message {
    color: #e4e6eb;
}

/* ═══════════════════════════════════════════════════════════════
   ESTILOS MODERNOS PARA FUNCIONÁRIOS - CARDS E MODAL
   ═══════════════════════════════════════════════════════════════ */

/* Cards de funcionários */
.employee-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.employee-card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.employee-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 16px;
}

.employee-avatar.active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.employee-avatar.inactive {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #6c757d;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-slot {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 4px;
}

.employee-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.employee-badge.active {
    background: #d4edda;
    color: #155724;
}

.employee-badge.inactive {
    background: #e9ecef;
    color: #6c757d;
}

.employee-card-body {
    padding: 16px 20px;
}

.employee-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.employee-detail:last-child {
    margin-bottom: 0;
}

.employee-detail i {
    width: 20px;
    text-align: center;
    color: #6c757d;
}

.employee-detail span {
    color: #495057;
    font-family: 'Segoe UI', sans-serif;
}

.employee-card-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
}

.employee-card-footer .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.employee-card-footer .btn:hover {
    transform: translateY(-1px);
}

/* Tema escuro para cards de funcionários */
html.theme-dark .employee-card,
html.theme-auto .employee-card {
    background: #25282c;
    border-color: #3d4148;
}

html.theme-dark .employee-card-header,
html.theme-auto .employee-card-header {
    background: linear-gradient(135deg, #2d3138 0%, #25282c 100%);
    border-color: #3d4148;
}

html.theme-dark .employee-name,
html.theme-auto .employee-name {
    color: #e4e6eb;
}

html.theme-dark .employee-detail span,
html.theme-auto .employee-detail span {
    color: #a0a5ae;
}

html.theme-dark .employee-card-footer,
html.theme-auto .employee-card-footer {
    background: #2d3138;
    border-color: #3d4148;
}

/* Responsividade para cards de funcionários */
@media (max-width: 768px) {
    .employee-card {
        margin-bottom: 12px;
    }
    
    .employee-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .employee-name {
        font-size: 1rem;
    }
    
    .employee-card-footer .btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ESTILOS MODERNOS PARA CUPONS - CARDS
   ═══════════════════════════════════════════════════════════════ */

/* Cards de cupons */
.coupon-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

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

.coupon-card.inactive {
    opacity: 0.7;
    background: #f8f9fa;
}

.coupon-card.expired {
    opacity: 0.6;
    background: #f8f9fa;
}

/* Header do cupom com código */
.coupon-header {
    background: linear-gradient(135deg, #fff8e1 0%, #ffeaa7 100%);
    padding: 20px;
    text-align: center;
    position: relative;
    border-bottom: 2px dashed #e9ecef;
}

.coupon-card.inactive .coupon-header,
.coupon-card.expired .coupon-header {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.coupon-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.coupon-card.inactive .coupon-code,
.coupon-card.expired .coupon-code {
    color: #6c757d;
    text-decoration: line-through;
}

/* Badge de tipo (Percentual, Fixo, Frete) */
.coupon-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.coupon-type-percentual {
    background: #d4edda;
    color: #155724;
}

.coupon-type-fixo {
    background: #d1ecf1;
    color: #0c5460;
}

.coupon-type-frete {
    background: #fff3cd;
    color: #856404;
}

/* Corpo do card */
.coupon-body {
    padding: 16px 20px;
}

/* Valor destacado */
.coupon-value {
    text-align: center;
    margin-bottom: 16px;
}

.coupon-value-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
}

.coupon-value-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-card.inactive .coupon-value-amount,
.coupon-card.expired .coupon-value-amount {
    color: #6c757d;
}

/* Detalhes do cupom */
.coupon-details {
    display: grid;
    gap: 10px;
}

.coupon-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.coupon-detail i {
    width: 20px;
    text-align: center;
    color: #6c757d;
}

.coupon-detail span {
    color: #495057;
}

/* Status badge no card */
.coupon-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.coupon-status-ativo {
    background: #d4edda;
    color: #155724;
}

.coupon-status-inativo {
    background: #e9ecef;
    color: #6c757d;
}

.coupon-status-expirado {
    background: #f8d7da;
    color: #721c24;
}

/* Footer com ações */
.coupon-footer {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
}

.coupon-footer .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
}

/* Tema escuro para cupons */
html.theme-dark .coupon-card,
html.theme-auto .coupon-card {
    background: #25282c;
    border-color: #3d4148;
}

html.theme-dark .coupon-card.inactive,
html.theme-dark .coupon-card.expired,
html.theme-auto .coupon-card.inactive,
html.theme-auto .coupon-card.expired {
    background: #2d3138;
    opacity: 0.8;
}

html.theme-dark .coupon-header,
html.theme-auto .coupon-header {
    background: linear-gradient(135deg, #2d3138 0%, #25282c 100%);
    border-color: #3d4148;
}

html.theme-dark .coupon-card.inactive .coupon-header,
html.theme-dark .coupon-card.expired .coupon-header,
html.theme-auto .coupon-card.inactive .coupon-header,
html.theme-auto .coupon-card.expired .coupon-header {
    background: linear-gradient(135deg, #25282c 0%, #1a1d21 100%);
}

html.theme-dark .coupon-code,
html.theme-auto .coupon-code {
    color: #e4e6eb;
}

html.theme-dark .coupon-card.inactive .coupon-code,
html.theme-dark .coupon-card.expired .coupon-code,
html.theme-auto .coupon-card.inactive .coupon-code,
html.theme-auto .coupon-card.expired .coupon-code {
    color: #a0a5ae;
}

html.theme-dark .coupon-value-amount,
html.theme-auto .coupon-value-amount {
    color: #55efc4;
}

html.theme-dark .coupon-card.inactive .coupon-value-amount,
html.theme-dark .coupon-card.expired .coupon-value-amount,
html.theme-auto .coupon-card.inactive .coupon-value-amount,
html.theme-auto .coupon-card.expired .coupon-value-amount {
    color: #a0a5ae;
}

html.theme-dark .coupon-detail span,
html.theme-auto .coupon-detail span {
    color: #a0a5ae;
}

html.theme-dark .coupon-footer,
html.theme-auto .coupon-footer {
    background: #2d3138;
    border-color: #3d4148;
}

/* ═══════════════════════════════════════════════════════════════
   TEMA ESCURO - SISTEMA DE CHAT (Mensagens)
   ═══════════════════════════════════════════════════════════════ */

html.theme-dark .lc-chat-container,
html.theme-auto .lc-chat-container {
    background: var(--bg-surface);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

html.theme-dark .lc-conversation-panel,
html.theme-auto .lc-conversation-panel {
    background: var(--bg-muted);
    border-color: var(--border-color);
}

html.theme-dark .lc-panel-header,
html.theme-auto .lc-panel-header {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.theme-dark .lc-panel-title h5,
html.theme-auto .lc-panel-title h5 {
    color: var(--text-primary);
}

html.theme-dark .lc-tabs,
html.theme-auto .lc-tabs {
    background: var(--bg-surface) !important;
    border-color: var(--border-color) !important;
}

html.theme-dark .lc-tabs .lc-tab-btn,
html.theme-auto .lc-tabs .lc-tab-btn {
    background: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    border-color: transparent !important;
}

html.theme-dark .lc-tabs .lc-tab-btn:hover,
html.theme-auto .lc-tabs .lc-tab-btn:hover {
    background: var(--bg-muted) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .lc-tabs .lc-tab-btn.active,
html.theme-auto .lc-tabs .lc-tab-btn.active {
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border-bottom-color: var(--primary-color) !important;
}

html.theme-dark .lc-conv-item,
html.theme-auto .lc-conv-item {
    border-color: var(--border-color);
}

html.theme-dark .lc-conv-item:hover,
html.theme-auto .lc-conv-item:hover {
    background: var(--bg-muted);
}

html.theme-dark .lc-conv-item.lc-conv-active,
html.theme-auto .lc-conv-item.lc-conv-active {
    background: rgba(44,62,80,0.3);
    border-left-color: var(--accent-color);
}

html.theme-dark .lc-conv-name,
html.theme-auto .lc-conv-name {
    color: var(--text-primary);
}

html.theme-dark .lc-conv-time,
html.theme-auto .lc-conv-time {
    color: var(--text-secondary);
}

html.theme-dark .lc-conv-lastmsg,
html.theme-auto .lc-conv-lastmsg {
    color: var(--text-secondary);
}

html.theme-dark .lc-chat-panel,
html.theme-auto .lc-chat-panel {
    background: var(--bg-surface);
}

html.theme-dark .lc-chat-header,
html.theme-auto .lc-chat-header {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.theme-dark .lc-chat-header-info strong,
html.theme-auto .lc-chat-header-info strong {
    color: var(--text-primary);
}

html.theme-dark .lc-chat-header-info small,
html.theme-auto .lc-chat-header-info small {
    color: var(--text-secondary);
}

html.theme-dark .lc-back-btn,
html.theme-auto .lc-back-btn {
    background: var(--bg-muted);
    color: var(--text-primary);
}

html.theme-dark .lc-back-btn:hover,
html.theme-auto .lc-back-btn:hover {
    background: var(--border-color);
}

html.theme-dark .lc-chat-messages,
html.theme-auto .lc-chat-messages {
    background: var(--bg-page);
    background-image: none;
}

html.theme-dark .lc-date-divider span,
html.theme-auto .lc-date-divider span {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

html.theme-dark .lc-msg-received .lc-msg-bubble,
html.theme-auto .lc-msg-received .lc-msg-bubble {
    background: var(--bg-muted);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.theme-dark .lc-empty-chat,
html.theme-auto .lc-empty-chat {
    color: var(--text-secondary);
}

html.theme-dark .lc-empty-chat p,
html.theme-auto .lc-empty-chat p {
    color: var(--text-secondary);
}

html.theme-dark .lc-empty-chat small,
html.theme-auto .lc-empty-chat small {
    color: var(--text-secondary);
}

html.theme-dark .lc-empty-state,
html.theme-auto .lc-empty-state {
    color: var(--text-secondary);
}

html.theme-dark .lc-empty-state h6,
html.theme-auto .lc-empty-state h6 {
    color: var(--text-primary);
}

html.theme-dark .lc-empty-state p,
html.theme-auto .lc-empty-state p {
    color: var(--text-secondary);
}

html.theme-dark .lc-chat-input-bar,
html.theme-auto .lc-chat-input-bar {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.theme-dark .lc-chat-input,
html.theme-auto .lc-chat-input {
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.theme-dark .lc-chat-input:focus,
html.theme-auto .lc-chat-input:focus {
    background: var(--bg-surface);
    border-color: var(--primary-color);
}

html.theme-dark .lc-chat-input::placeholder,
html.theme-auto .lc-chat-input::placeholder {
    color: var(--text-secondary);
}

/* Tema escuro - Employee detail icons */
html.theme-dark .employee-detail i,
html.theme-auto .employee-detail i {
    color: var(--text-secondary);
}

/* Tema escuro - Coupon detail icons */
html.theme-dark .coupon-detail i,
html.theme-auto .coupon-detail i {
    color: var(--text-secondary);
}

/* Tema escuro - Coupon value label */
html.theme-dark .coupon-value-label,
html.theme-auto .coupon-value-label {
    color: var(--text-secondary);
}

/* Tema escuro - Preview de imagem da loja no cadastro */
html.theme-dark #loja-img-preview,
html.theme-auto #loja-img-preview {
    background: var(--bg-muted) !important;
    border-color: var(--border-color) !important;
}

/* Tema escuro - Icone placeholder da camera */
html.theme-dark #loja-reg-img-placeholder,
html.theme-auto #loja-reg-img-placeholder {
    color: var(--text-secondary) !important;
}

/* Tema escuro - hr separador */
html.theme-dark hr,
html.theme-auto hr {
    border-color: var(--border-color);
    opacity: 0.5;
}

/* Tema escuro - alert alert-info small */
html.theme-dark .alert.alert-info.small,
html.theme-auto .alert.alert-info.small {
    color: #6ea8fe;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVIDADE PARA CUPONS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .coupon-card {
        margin-bottom: 12px;
    }
    
    .coupon-code {
        font-size: 1.25rem;
    }
    
    .coupon-value-amount {
        font-size: 1.5rem;
    }
    
    .coupon-footer .btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL VIBRANTE DE ALERTA DE NOVO PEDIDO
   Animações e estilos especiais para chamar atenção
   ═══════════════════════════════════════════════════════════════ */

/* Modal de novo pedido - backdrop escuro intenso */
#newOrderAlertModal.modal {
    --bs-modal-zindex: 9999;
    z-index: 9999 !important;
}

#newOrderAlertModal .modal-dialog {
    z-index: 10000 !important;
    height: 90vh;
    max-height: 90vh;
    margin: 5vh auto;
}

#newOrderAlertModal .modal-content {
    z-index: 10001 !important;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

#newOrderAlertModal .modal-header {
    flex-shrink: 0;
}

#newOrderAlertModal .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: none;
    padding: 16px;
}

#newOrderAlertModal .modal-footer {
    flex-shrink: 0;
    padding: 16px 20px;
}

#newOrderAlertModal .new-order-alert-body {
    padding: 0;
}

#newOrderAlertModal .new-order-info-card {
    padding: 12px;
    margin-bottom: 8px;
}

#newOrderAlertModal .new-order-items {
    max-height: none;
    overflow-y: visible;
}

#newOrderAlertModal .new-order-alert-footer {
    padding: 0;
}

#newOrderAlertModal .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

/* Conteúdo do modal com gradiente vibrante */
.new-order-alert-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 0 0 4px rgba(255, 107, 53, 0.3),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(255, 107, 53, 0.2);
    animation: modalAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalAppear {
    0% {
        transform: scale(0.3) rotate(-5deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.05) rotate(1deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Header do modal */
.new-order-alert-header {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ff6b35 100%);
    color: white;
    padding: 24px;
    border: none;
    position: relative;
    overflow: hidden;
}

.new-order-alert-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Ícone animado no header */
.new-order-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: 28px;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.4);
}

.pulse-animation {
    animation: pulseRing 1.5s infinite;
}

@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* ANIMAÇÃO DE VIBRAÇÃO PRINCIPAL */
.vibrate-animation {
    animation: 
        vibrate 0.3s linear infinite,
        glowPulse 2s ease-in-out infinite;
}

@keyframes vibrate {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0); }
    10% { transform: translateX(-3px) translateY(-2px) rotate(-0.5deg); }
    20% { transform: translateX(3px) translateY(2px) rotate(0.5deg); }
    30% { transform: translateX(-3px) translateY(2px) rotate(-0.5deg); }
    40% { transform: translateX(3px) translateY(-2px) rotate(0.5deg); }
    50% { transform: translateX(-2px) translateY(3px) rotate(-0.3deg); }
    60% { transform: translateX(2px) translateY(-3px) rotate(0.3deg); }
    70% { transform: translateX(-3px) translateY(-2px) rotate(-0.5deg); }
    80% { transform: translateX(3px) translateY(3px) rotate(0.5deg); }
    90% { transform: translateX(-2px) translateY(-3px) rotate(-0.3deg); }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 4px rgba(255, 107, 53, 0.3),
            0 25px 50px -12px rgba(0, 0, 0, 0.5),
            0 0 60px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 
            0 0 0 8px rgba(255, 107, 53, 0.5),
            0 25px 50px -12px rgba(0, 0, 0, 0.5),
            0 0 100px rgba(255, 107, 53, 0.5);
    }
}

/* Corpo do modal */
.new-order-alert-body {
    background: linear-gradient(180deg, #fff 0%, #fff8f5 100%);
    padding: 28px;
}

/* Cards de informação */
.new-order-info-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    height: 100%;
}

.new-order-info-card:hover {
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
}

.new-order-info-card.highlight {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8e0 100%);
    border-color: #ff6b35;
}

.new-order-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.new-order-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
}

.new-order-value.price {
    font-size: 1.5rem;
    color: #16a34a;
}

/* Subvalor (texto secundário) */
.new-order-subvalue {
    font-size: 0.85rem;
    color: #64748b;
}

/* Lista de itens */
.new-order-items {
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 8px;
}

.new-order-items::-webkit-scrollbar {
    width: 4px;
}

.new-order-items::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.new-order-items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

/* Banner de urgência */
.new-order-urgency-banner {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 16px 20px;
    color: #991b1b;
    font-weight: 500;
    text-align: center;
    animation: urgencyPulse 1.5s infinite;
}

@keyframes urgencyPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Footer do modal */
.new-order-alert-footer {
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
    padding: 20px 28px;
    gap: 12px;
}

.new-order-alert-footer .btn {
    padding: 14px 28px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
}

.new-order-alert-footer .btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.new-order-alert-footer .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

/* Botão pulsante */
.btn-pulse {
    animation: buttonPulse 1.5s infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(22, 163, 74, 0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   OTIMIZAÇÃO MOBILE COMPLETA - LOGISTA
   Responsividade profissional para todos os elementos
   ═══════════════════════════════════════════════════════════════ */

/* Mobile: 768px e abaixo */
@media (max-width: 768px) {
    /* === LAYOUT GERAL === */
    body {
        font-size: 14px;
    }
    
    .main-content {
        padding: 16px 12px;
        margin-left: 0;
    }
    
    /* === SIDEBAR MOBILE === */
    .sidebar {
        left: -250px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        z-index: 1250;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Overlay escuro quando sidebar aberta */
    .sidebar.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 250px;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }
    
    .mobile-toggle {
        display: block !important;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1100;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px 12px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        font-size: 1.1rem;
        transition: all 0.3s ease;
    }
    
    .mobile-toggle:active {
        transform: scale(0.95);
    }
    
    /* === HEADER DO PAINEL === */
    .main-content > .d-flex:first-child {
        flex-direction: column !important;
        gap: 12px;
        align-items: flex-start !important;
        padding-top: 50px;
        margin-bottom: 16px;
    }
    
    #page-title {
        font-size: 1.1rem;
        width: 100%;
    }
    
    .main-content > .d-flex:first-child > div {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .store-avatar,
    .store-avatar-placeholder {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .main-content > .d-flex:first-child .text-muted {
        font-size: 0.8rem;
    }
    
    .main-content > .d-flex:first-child .btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .net-badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    /* === VIEW HEADERS === */
    .view-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .view-header h5 {
        font-size: 1.1rem;
    }
    
    .view-header h5 i {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    
    .view-header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .view-header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* === FILTER BAR === */
    .filter-bar {
        padding: 12px 14px;
        margin-bottom: 16px;
    }
    
    .filter-bar .form-label {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    
    .filter-bar .form-control,
    .filter-bar .form-select {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    /* === CARDS KPI (DASHBOARD) === */
    .kpi-card {
        margin-bottom: 12px;
    }
    
    .kpi-card .card-body {
        padding: 16px 18px;
    }
    
    .kpi-card .card-title {
        font-size: 0.75rem;
    }
    
    .kpi-card h2 {
        font-size: 1.4rem;
    }
    
    .kpi-icon {
        font-size: 2rem;
        right: 15px;
    }
    
    /* === CHART CARD === */
    .chart-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .chart-card h5 {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    /* === KANBAN (PEDIDOS) === */
    #order-cards-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    #order-cards-container > .col-md-6,
    #order-cards-container > .col-lg-3 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .kanban-col {
        min-height: auto;
        padding: 10px;
    }
    
    .kanban-header {
        padding: 10px 12px;
        font-size: 0.75rem;
        margin-bottom: 10px;
    }
    
    .kanban-header .badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    /* === ORDER CARDS === */
    .order-card {
        padding: 12px 14px;
        margin-bottom: 10px;
        border-radius: 10px;
    }
    
    .order-card h6 {
        font-size: 0.9rem;
    }
    
    .order-card small {
        font-size: 0.75rem;
    }
    
    .order-card .btn {
        font-size: 0.75rem;
        padding: 5px 10px;
        margin: 2px;
    }
    
    .order-card .bg-light {
        max-height: 120px;
        font-size: 0.8rem;
        padding: 8px;
    }
    
    /* === TABELAS === */
    .modern-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modern-table .table {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    .modern-table .table thead th {
        font-size: 0.7rem;
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .modern-table .table tbody td {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .modern-table .table tbody td img {
        width: 35px;
        height: 35px;
    }
    
    .modern-table .table .btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    /* === PANEL CARDS === */
    .panel-card {
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .panel-card-header {
        padding: 14px 16px;
    }
    
    .panel-card-header h5,
    .panel-card-header h6 {
        font-size: 0.95rem;
    }
    
    .panel-card-body {
        padding: 16px;
    }
    
    /* === FORMULÁRIOS === */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 8px 12px;
        border-radius: 6px;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .form-check-label {
        font-size: 0.85rem;
    }
    
    .input-group-text {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    
    /* === BOTÕES === */
    .btn {
        font-size: 0.85rem;
        padding: 8px 14px;
        border-radius: 6px;
    }
    
    .btn-sm {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .btn-action {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* === MODAIS === */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-header {
        padding: 14px 16px;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 16px;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    /* === CONFIG TABS === */
    .config-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding-bottom: 8px;
    }
    
    .config-tabs .nav-link {
        font-size: 0.75rem;
        padding: 6px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* === EMPLOYEE CARDS === */
    .employee-card {
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .employee-card-header {
        padding: 16px;
    }
    
    .employee-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        margin-right: 12px;
    }
    
    .employee-name {
        font-size: 1rem;
    }
    
    .employee-slot {
        font-size: 0.7rem;
    }
    
    .employee-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .employee-card-body {
        padding: 12px 16px;
    }
    
    .employee-detail {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .employee-card-footer {
        padding: 12px 16px;
        flex-direction: column;
    }
    
    .employee-card-footer .btn {
        width: 100%;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    /* === COUPON CARDS === */
    .coupon-card {
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .coupon-header {
        padding: 16px;
    }
    
    .coupon-code {
        font-size: 1.25rem;
        letter-spacing: 1px;
    }
    
    .coupon-type-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
        margin-top: 6px;
    }
    
    .coupon-body {
        padding: 12px 16px;
    }
    
    .coupon-value-amount {
        font-size: 1.5rem;
    }
    
    .coupon-value-label {
        font-size: 0.75rem;
    }
    
    .coupon-detail {
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .coupon-footer {
        padding: 10px 16px;
        flex-direction: column;
    }
    
    .coupon-footer .btn {
        width: 100%;
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    /* === GLOBAL ALERTS === */
    .global-alerts-container {
        margin-bottom: 16px;
    }
    
    .global-alert {
        margin-bottom: 8px;
        padding: 12px 14px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .global-alert .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    
    .global-alert i.fa-lg {
        font-size: 1.2rem;
        align-self: center;
    }
    
    .global-alert .btn-sm {
        width: 100%;
        margin-top: 5px;
    }
    
    .global-alert strong {
        font-size: 0.9rem;
    }
    
    .global-alert p {
        font-size: 0.8rem;
    }
    
    /* === PAYMENT STATUS BAR === */
    .payment-status-bar {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }
    
    .status-item {
        min-width: 100%;
        padding: 10px 16px;
    }
    
    .status-item i {
        font-size: 1.5rem;
        width: 36px;
        height: 36px;
    }
    
    .status-label {
        font-size: 0.75rem;
    }
    
    .status-value {
        font-size: 1rem;
    }
    
    .payment-situation-display {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .situation-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        margin: 0 auto 12px;
    }
    
    .situation-text h4 {
        font-size: 1.1rem;
    }
    
    /* === CHAT SYSTEM === */
    .lc-chat-container {
        height: calc(100vh - 100px);
        flex-direction: column;
        border-radius: 8px;
    }
    
    .lc-conversation-panel {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .lc-panel-header {
        padding: 12px 16px;
    }
    
    .lc-panel-title h5 {
        font-size: 1rem;
    }
    
    .lc-tabs .lc-tab-btn {
        font-size: 0.7rem !important;
        padding: 10px 4px !important;
    }
    
    .lc-conv-item {
        padding: 12px 14px;
    }
    
    .lc-conv-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .lc-conv-name {
        font-size: 0.85rem;
        max-width: 150px;
    }
    
    .lc-conv-time {
        font-size: 0.65rem;
    }
    
    .lc-conv-tipo-badge {
        font-size: 0.55rem;
        padding: 1px 5px;
    }
    
    .lc-conv-lastmsg {
        font-size: 0.75rem;
    }
    
    .lc-conv-unread {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .lc-chat-panel {
        position: absolute !important;
        inset: 0;
        z-index: 10;
        border-radius: 8px;
    }
    
    .lc-back-btn {
        display: flex !important;
    }
    
    .lc-chat-header {
        padding: 12px 16px;
    }
    
    .lc-chat-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .lc-chat-header-info strong {
        font-size: 0.9rem;
    }
    
    .lc-chat-header-info small {
        font-size: 0.7rem;
    }
    
    .lc-chat-messages {
        padding: 14px;
    }
    
    .lc-date-divider span {
        font-size: 0.65rem;
        padding: 2px 10px;
    }
    
    .lc-msg-bubble {
        max-width: 80%;
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 14px;
    }
    
    .lc-msg-meta {
        font-size: 0.6rem;
    }
    
    .lc-chat-input-bar {
        padding: 10px 14px;
        gap: 8px;
    }
    
    .lc-chat-input {
        padding: 8px 14px;
        font-size: 0.85rem;
        border-radius: 20px;
    }
    
    .lc-send-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    /* === EMPTY STATES === */
    .empty-state {
        padding: 32px 16px;
    }
    
    .empty-state-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .empty-state h6 {
        font-size: 0.95rem;
    }
    
    .empty-state p {
        font-size: 0.85rem;
    }
    
    /* === INACTIVE BANNER === */
    #inactive-banner {
        padding: 12px 16px;
        font-size: 0.9rem;
        margin-bottom: 14px;
        flex-direction: column;
        text-align: center;
    }
    
    #inactive-banner i {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }
    
    /* === LOADING OVERLAY === */
    #loading-overlay .loading-overlay-content {
        padding: 30px 40px;
        border-radius: 12px;
    }
    
    .loading-overlay-content .spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 16px;
    }
    
    .loading-overlay-content .loading-message {
        font-size: 1rem;
    }
    
    /* === NEW ORDER ALERT MODAL === */
    .new-order-alert-content {
        margin: 10px;
        border-radius: 16px;
    }
    
    .new-order-alert-header {
        padding: 18px;
    }
    
    .new-order-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .new-order-alert-body {
        padding: 20px;
    }
    
    .new-order-info-card {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .new-order-label {
        font-size: 0.7rem;
    }
    
    .new-order-value {
        font-size: 1rem;
    }
    
    .new-order-value.price {
        font-size: 1.3rem;
    }
    
    .new-order-items {
        font-size: 0.85rem;
        max-height: 100px;
    }
    
    .new-order-urgency-banner {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .new-order-alert-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .new-order-alert-footer .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* === CADASTRO DA LOJA === */
    #loja-img-preview {
        width: 140px !important;
        height: 140px !important;
    }
    
    #loja-reg-cropper-wrapper {
        height: 250px !important;
    }
    
    /* === BADGES === */
    .badge {
        font-size: 0.7rem;
        padding: 3px 7px;
    }
    
    /* === SKELETON === */
    .skeleton-overlay {
        padding: 0.75rem;
    }
    
    .skeleton-line {
        height: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .skeleton-card {
        height: 100px;
        margin-bottom: 0.75rem;
    }
    
    .skeleton-chart {
        height: 150px;
    }
}

/* Mobile Small: 480px e abaixo */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .main-content {
        padding: 12px 10px;
    }
    
    .mobile-toggle {
        top: 10px;
        left: 10px;
        padding: 8px 10px;
        font-size: 1rem;
    }
    
    #page-title {
        font-size: 1rem;
    }
    
    .view-header h5 {
        font-size: 1rem;
    }
    
    .kpi-card h2 {
        font-size: 1.2rem;
    }
    
    .kpi-card .card-title {
        font-size: 0.7rem;
    }
    
    .kanban-header {
        font-size: 0.7rem;
        padding: 8px 10px;
    }
    
    .order-card {
        padding: 10px 12px;
    }
    
    .order-card h6 {
        font-size: 0.85rem;
    }
    
    .order-card small {
        font-size: 0.7rem;
    }
    
    .order-card .btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .modern-table .table {
        font-size: 0.75rem;
    }
    
    .modern-table .table thead th {
        font-size: 0.65rem;
        padding: 8px 6px;
    }
    
    .modern-table .table tbody td {
        padding: 6px;
    }
    
    .form-control,
    .form-select {
        font-size: 0.85rem;
        padding: 7px 10px;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 7px 12px;
    }
    
    .btn-sm {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    .modal-dialog {
        margin: 5px;
        max-width: calc(100% - 10px);
    }
    
    .lc-conv-name {
        max-width: 120px;
    }
    
    .lc-msg-bubble {
        max-width: 85%;
        font-size: 0.8rem;
    }
}

/* Landscape Mobile: altura pequena */
@media (max-height: 600px) and (orientation: landscape) {
    .main-content {
        padding: 10px;
    }
    
    .view-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .kpi-card .card-body {
        padding: 12px 14px;
    }
    
    .kanban-col {
        min-height: auto;
        max-height: 400px;
        overflow-y: auto;
    }
    
    .modal-body {
        max-height: calc(100vh - 150px);
    }
    
    .lc-chat-container {
        height: calc(100vh - 60px);
    }
}

/* Touch improvements - todos os dispositivos touch */
@media (hover: none) and (pointer: coarse) {
    /* Aumentar área de toque para botões */
    .btn,
    .nav-link,
    .mobile-toggle,
    .lc-send-btn,
    .lc-back-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Melhorar feedback visual no toque */
    .btn:active,
    .nav-link:active,
    .order-card:active,
    .employee-card:active,
    .coupon-card:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
    
    /* Remover hover states em touch */
    .btn:hover,
    .nav-link:hover,
    .order-card:hover,
    .employee-card:hover,
    .coupon-card:hover {
        transform: none;
    }
    
    /* Scroll suave em containers */
    .kanban-col,
    .lc-conversations-list,
    .lc-chat-messages,
    .modern-table,
    .modal-body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .new-order-alert-content {
        margin: 10px;
        border-radius: 16px;
    }
    
    .new-order-alert-header {
        padding: 18px;
    }
    
    .new-order-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .new-order-alert-header h4 {
        font-size: 1.1rem;
    }
    
    .new-order-alert-body {
        padding: 18px;
    }
    
    .new-order-value {
        font-size: 1rem;
    }
    
    .new-order-value.price {
        font-size: 1.25rem;
    }
    
    .new-order-alert-footer {
        flex-direction: column;
        padding: 16px;
    }
    
    .new-order-alert-footer .btn {
        width: 100%;
        padding: 12px;
    }
}

/* Animação de shake extra para chamar atenção */
.shake-hard {
    animation: shakeHard 0.5s ease-in-out !important;
}

@keyframes shakeHard {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL DE AVISO PARA USO MOBILE
   ═══════════════════════════════════════════════════════════════ */

#mobile-warning-modal {
    z-index: 9999;
}

#mobile-warning-modal .modal-dialog {
    max-width: none;
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
}

#mobile-warning-modal .modal-content {
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
    border: none;
    box-shadow: none;
}

#mobile-warning-modal .modal-header {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #000;
    border-bottom: 2px solid #e9ecef;
    flex-shrink: 0;
}

#mobile-warning-modal .modal-title {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

#mobile-warning-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

#mobile-warning-modal .alert {
    margin-bottom: 20px;
}

#mobile-warning-modal .alert.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #bee5eb;
    color: #0c5460;
}

#mobile-warning-modal h6.text-danger {
    margin-top: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

#mobile-warning-modal .text-muted {
    color: #6c757d !important;
}

#mobile-warning-modal .form-check {
    background: #fff;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

#mobile-warning-modal .form-check:hover {
    border-color: #ff6b35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.2);
}

#mobile-warning-modal .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

#mobile-warning-modal .form-check-label {
    cursor: pointer;
    user-select: none;
}

#mobile-warning-modal .modal-footer {
    background: #fff;
    border-top: 2px solid #e9ecef;
    flex-shrink: 0;
    justify-content: center;
    padding: 20px;
}

#mobile-warning-modal .modal-footer .btn {
    min-width: 200px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

#mobile-warning-modal .modal-footer .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#mobile-warning-modal .modal-footer .btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Tema escuro para o modal mobile */
html.theme-dark #mobile-warning-modal .modal-body,
html.theme-auto #mobile-warning-modal .modal-body {
    background: var(--bg-surface);
    color: var(--text-primary);
}

html.theme-dark #mobile-warning-modal .modal-footer,
html.theme-auto #mobile-warning-modal .modal-footer {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.theme-dark #mobile-warning-modal .form-check,
html.theme-auto #mobile-warning-modal .form-check {
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   FIXES DEFENSIVOS FINAIS - Garantir modais sempre funcionem
   ═══════════════════════════════════════════════════════════════ */

/* Forçar modais a serem sempre interativos quando abertos */
.modal.show {
    display: block !important;
    pointer-events: auto !important;
}

.modal.show .modal-dialog {
    pointer-events: auto !important;
    transform: none !important;
}

.modal.show .modal-content {
    pointer-events: auto !important;
}

/* Garantir que backdrop não bloqueie interação indevidamente */
.modal-backdrop.show {
    opacity: 0.5 !important;
    pointer-events: auto !important;
}

/* Quando modal está aberto, ele deve estar ACIMA do backdrop */
body.modal-open .modal.show {
    z-index: 1055 !important;
}

body.modal-open .modal-backdrop.show {
    z-index: 1040 !important;
}

/* Corrige problema de modais Bootstrap específicos */
#productModal.show,
#employeeModal.show,
#storeImageModal.show,
#entregadorModal.show,
#assignEntregadorModal.show {
    z-index: 1055 !important;
}

/* Garantir que conteúdo dentro de modais seja sempre clicável */
.modal.show .modal-header,
.modal.show .modal-body,
.modal.show .modal-footer {
    pointer-events: auto !important;
}

.modal.show input,
.modal.show button,
.modal.show select,
.modal.show textarea {
    pointer-events: auto !important;
}
#storeAddressModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 100%);
}

#storeAddressModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44,62,80,0.1);
}

#storeAddressModal input[readonly] {
    background-color: var(--bg-muted);
}

/* Tema escuro para o modal de endereço */
html.theme-dark #storeAddressModal .modal-content,
html.theme-auto #storeAddressModal .modal-content {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.theme-dark #storeAddressModal .modal-body,
html.theme-auto #storeAddressModal .modal-body {
    background: var(--bg-surface);
    color: var(--text-primary);
}

html.theme-dark #storeAddressModal .form-control,
html.theme-auto #storeAddressModal .form-control {
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.theme-dark #storeAddressModal .form-control:focus,
html.theme-auto #storeAddressModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44,62,80,0.2);
}

html.theme-dark #storeAddressModal .text-muted,
html.theme-auto #storeAddressModal .text-muted {
    color: var(--text-secondary) !important;
}

/* Botão de editar endereço na view de cadastro */
#btn-editar-endereco {
    white-space: nowrap;
}

#btn-editar-endereco:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   FIX ESPECÍFICO PARA MODAL DE FUNCIONÁRIOS
   Força o modal a ficar acima de TUDO
   ═══════════════════════════════════════════════════════════════ */

/* Força employeeModal acima de qualquer stacking context */
#employeeModal {
    z-index: 2147483647 !important;
}

#employeeModal .modal-content {
    pointer-events: auto !important;
}

/* ═══════════════════════════════════════════════════════════════
   CORREÇÃO DE Z-INDEX - Modais acima da sidebar
   ═══════════════════════════════════════════════════════════════ */

/* Sidebar com z-index menor que modais */
.app-sidebar {
    z-index: 1040 !important;
}

/* Modais e backdrop com z-index maior */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1045 !important;
    pointer-events: auto !important;
}

/* Garante que backdrop não bloqueie interação */
.modal-backdrop {
    pointer-events: none !important;
}

/* Modal de Recuperação de Senha - z-index alto e sem bloqueios */
#forgotPasswordModal {
    z-index: 10001 !important;
}

#forgotPasswordModal .modal-dialog {
    z-index: 10002 !important;
}

#forgotPasswordModal .modal-content {
    z-index: 10003 !important;
}

/* Garantir que o modal funcione mesmo com loading-active */
body.loading-active #forgotPasswordModal,
body.loading-active #forgotPasswordModal * {
    pointer-events: auto !important;
}

/* Link "Esqueci a senha" deve sempre funcionar */
.login-screen a[onclick*="openForgotPasswordModal"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Tela de login nunca deve ser bloqueada */
.login-screen,
.login-screen *,
.login-screen input,
.login-screen button,
.login-screen form,
#login-screen,
#login-screen *,
#login-screen input,
#login-screen button,
#login-screen form {
    pointer-events: auto !important;
}

body.loading-active .login-screen,
body.loading-active .login-screen *,
body.loading-active .login-screen input,
body.loading-active .login-screen button,
body.loading-active #login-screen,
body.loading-active #login-screen *,
body.loading-active #login-screen input,
body.loading-active #login-screen button {
    pointer-events: auto !important;
    filter: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD EXPANDIDO - Novos estilos para KPIs e análises
   ═══════════════════════════════════════════════════════════════ */

/* KPI Cards Compactos */
.kpi-card .kpi-icon-sm {
    font-size: 1.5rem;
    opacity: 0.3;
}

.kpi-card.bg-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* Variation indicators */
.variation-up {
    color: #10b981;
}
.variation-down {
    color: #ef4444;
}
.variation-neutral {
    color: #9ca3af;
}

/* Chart Cards Modernos */
.chart-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chart-card .card-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.chart-card .card-body {
    padding: 20px;
}

/* Comparison Card */
.comparison-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.comparison-card .card-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.comparison-card .card-body {
    padding: 20px;
}

.comparison-row {
    position: relative;
}

.comparison-row .progress {
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.comparison-row .progress-bar {
    transition: width 0.6s ease;
}

/* Summary Card */
.summary-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.summary-card .card-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.summary-card .card-body {
    padding: 16px 20px;
}

.summary-item {
    font-size: 0.9rem;
}

.summary-item strong {
    font-weight: 600;
}

/* Top Products List */
#top-products-list .list-group-item {
    padding: 12px 16px;
    border-left: none;
    border-right: none;
    transition: background-color 0.2s ease;
}

#top-products-list .list-group-item:hover {
    background-color: var(--bg-muted);
}

.top-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-product-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.top-product-rank.rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.top-product-rank.rank-2 {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: white;
}

.top-product-rank.rank-3 {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    color: white;
}

.top-product-rank.rank-other {
    background: #e5e7eb;
    color: #6b7280;
}

.top-product-info {
    flex: 1;
    min-width: 0;
}

.top-product-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-product-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.top-product-stats {
    text-align: right;
}

.top-product-quantity {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.top-product-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Recent Orders Table */
#recent-orders-table tr {
    transition: background-color 0.2s ease;
}

#recent-orders-table tr:hover {
    background-color: var(--bg-muted);
}

.status-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge-sm.status-recebido {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-sm.status-preparo {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge-sm.status-entrega {
    background: #ffedd5;
    color: #9a3412;
}

.status-badge-sm.status-concluido {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-sm.status-cancelado {
    background: #f3f4f6;
    color: #4b5563;
}

/* Payment Method Badge */
.payment-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Dark Theme Adjustments for Dashboard */
html.theme-dark .comparison-row .progress,
html.theme-auto .comparison-row .progress {
    background-color: #374151;
}

html.theme-dark .top-product-rank.rank-other,
html.theme-auto .top-product-rank.rank-other {
    background: #4b5563;
    color: #9ca3af;
}

html.theme-dark .summary-item.bg-light,
html.theme-auto .summary-item.bg-light {
    background-color: var(--bg-muted) !important;
}

/* Responsividade do Dashboard */
@media (max-width: 1200px) {
    .kpi-card .card-body {
        padding: 12px 16px;
    }
    
    .kpi-card h4 {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .chart-card .card-header {
        padding: 12px 16px;
    }
    
    .chart-card .card-body {
        padding: 16px;
    }
    
    .comparison-card .card-body {
        padding: 16px;
    }
    
    .summary-card .card-body {
        padding: 12px 16px;
    }
    
    .top-product-item {
        gap: 8px;
    }
    
    .top-product-rank {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
}

/* ═══════════════════════════════════════════════════════════════ */

/* Cookie Consent Banner - LGPD/GDPR */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #ffffff;
    color: #333333;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none;
    border: 1px solid rgba(0,0,0,0.05);
    animation: slideUpBanner 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
    display: block !important;
}

@keyframes slideUpBanner {
    from { transform: translateY(100%) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    font-size: 0.95rem;
    color: #333333;
    line-height: 1.5;
    flex: 1;
}

.cookie-banner-text strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.cookie-banner-text a {
    color: #ff6b35;
    text-decoration: underline;
    font-weight: 700;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-banner-actions .btn {
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cookie-banner-actions .btn-primary {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #ffffff;
}

.cookie-banner-actions .btn-primary:hover {
    background: #e85a24;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

.cookie-banner-actions .btn-outline {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.cookie-banner-actions .btn-outline:hover {
    background: #e9ecef;
    color: #212529;
}

/* Responsividade do banner */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 18px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cookie-banner-actions {
        width: 100%;
        flex-direction: column-reverse;
    }
    
    .cookie-banner-actions .btn {
        width: 100%;
    }
}

/* Tema escuro */
html.theme-dark .cookie-banner {
    background: #1a1a1a;
    color: #ffffff;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

html.theme-dark .cookie-banner-text {
    color: #eeeeee;
}

html.theme-dark .cookie-banner-actions .btn-outline {
    background: #2d2d2d;
    border-color: #444444;
    color: #cccccc;
}

html.theme-dark .cookie-banner-actions .btn-outline:hover {
    background: #3d3d3d;
    color: #ffffff;
}

/* Ajuste para sidebar - banner fica acima da sidebar em mobile */
@media (max-width: 768px) {
    .cookie-banner {
        left: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMAÇÕES DE ATUALIZAÇÃO OTIMISTA DE STATUS
   ═══════════════════════════════════════════════════════════════ */

/* Animação shake para indicar erro ao atualizar status */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Mensagem de erro no card */
.status-error-message {
    animation: slideDown 0.3s ease;
}

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

/* Alerta de erro compacto no card */
.order-card .alert-sm {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
}

.order-card .alert-sm .btn-link {
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.order-card .alert-sm .btn-link:hover {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   SISTEMA ANTI-ADBLOCK
   ═══════════════════════════════════════════════════════════════ */

/* Tela de bloqueio principal */
.adblock-blocker {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a252f 0%, #0f1419 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.adblock-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: adblockSlideIn 0.4s ease-out;
}

@keyframes adblockSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.adblock-icon {
    font-size: 4rem;
    color: #dc2626;
    margin-bottom: 20px;
}

.adblock-icon i {
    animation: adblockPulse 2s ease-in-out infinite;
}

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

.adblock-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 16px;
}

.adblock-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.adblock-instructions {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    text-align: left;
}

.adblock-instructions h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.adblock-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adblock-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.adblock-list li:last-child {
    border-bottom: none;
}

.adblock-refresh-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.adblock-refresh-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsividade mobile */
@media (max-width: 768px) {
    .adblock-content {
        padding: 30px 24px;
    }

    .adblock-title {
        font-size: 1.4rem;
    }

    .adblock-icon {
        font-size: 3rem;
    }

    .adblock-instructions {
        padding: 16px;
    }

    .adblock-list li {
        font-size: 0.85rem;
    }
}

/* Elemento de isca para detecção */
.ad-bait {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    visibility: hidden;
}

/* Avaliações - Lista com scroll */
#rating-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ============================================
   VERIFICADOR DE REQUISITOS MINIMOS
   ============================================ */

.req-checker-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1f2937;
}

.req-checker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.req-checker-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.req-checker-item:hover {
    background: #fffbeb;
    border-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.req-checker-item:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

.req-checker-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border-radius: 50%;
    color: #d97706;
    font-size: 1rem;
}

.req-checker-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.req-checker-item-body strong {
    font-size: 0.9rem;
    color: #111827;
}

.req-checker-item-desc {
    font-size: 0.78rem;
    color: #6b7280;
}

.req-checker-item-arrow {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 0.75rem;
}

.req-checker-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.theme-dark .req-checker-item {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.theme-dark .req-checker-item:hover {
    background: #2d3748;
    border-color: #f59e0b;
}

.theme-dark .req-checker-item-icon {
    background: #422006;
    color: #fbbf24;
}

.theme-dark .req-checker-item-body strong {
    color: #f1f5f9;
}

.theme-dark .req-checker-item-desc {
    color: #94a3b8;
}

.theme-dark .req-checker-footer {
    background: #1e293b;
    border-top-color: #334155;
}
