/* ==========================================================================
   VaiDelivery Pro — Sistema de Gestão de Delivery, Radar GPS & KDS
   Arquitetura Moderna com Suporte a Dark/Light Mode e Alta Performance
   ========================================================================== */

:root {
    --deliv-bg: #090d16;
    --deliv-surface: #111726;
    --deliv-surface-card: #182238;
    --deliv-surface-hover: #1f2d4a;
    --deliv-border: rgba(255, 255, 255, 0.08);
    --deliv-border-active: rgba(249, 115, 22, 0.4);
    
    --deliv-text: #f8fafc;
    --deliv-text-muted: #94a3b8;
    --deliv-text-light: #cbd5e1;
    
    --deliv-orange: #f97316;
    --deliv-orange-hover: #ea580c;
    --deliv-orange-subtle: rgba(249, 115, 22, 0.15);
    
    --deliv-amber: #f59e0b;
    --deliv-green: #10b981;
    --deliv-green-subtle: rgba(16, 185, 129, 0.15);
    --deliv-blue: #3b82f6;
    --deliv-blue-subtle: rgba(59, 130, 246, 0.15);
    --deliv-purple: #8b5cf6;
    --deliv-purple-subtle: rgba(139, 92, 246, 0.15);
    --deliv-red: #ef4444;
    --deliv-red-subtle: rgba(239, 68, 68, 0.15);

    --deliv-radius: 12px;
    --deliv-radius-sm: 8px;
    --deliv-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"], [data-bs-theme="light"] {
    --deliv-bg: #f8fafc;
    --deliv-surface: #ffffff;
    --deliv-surface-card: #f1f5f9;
    --deliv-surface-hover: #e2e8f0;
    --deliv-border: rgba(0, 0, 0, 0.08);
    --deliv-border-active: rgba(249, 115, 22, 0.5);
    
    --deliv-text: #0f172a;
    --deliv-text-muted: #64748b;
    --deliv-text-light: #334155;
    
    --deliv-orange-subtle: rgba(249, 115, 22, 0.1);
    --deliv-green-subtle: rgba(16, 185, 129, 0.1);
    --deliv-blue-subtle: rgba(59, 130, 246, 0.1);
    --deliv-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--deliv-bg);
    color: var(--deliv-text);
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ══════════════════════════════════════════════════
   BARRA DE DEMO SUPERIOR (DIFRATIVA STANDARDS)
   ══════════════════════════════════════════════════ */
.difrativa-demo-bar {
    background: #060911;
    color: #ffffff;
    padding: 9px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1060;
    font-size: 13px;
}

.demo-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-back-btn {
    color: #94a3b8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    transition: color 0.2s;
}
.demo-back-btn:hover { color: #ffffff; }

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.35);
    padding: 3px 10px;
    border-radius: 999px;
    color: #fb923c;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 600;
}

.demo-pulse {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: livePulseAnim 1.8s infinite;
}

.btn-simulate-pulse {
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid var(--deliv-orange);
    color: #fb923c;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 12px;
    transition: all 0.25s;
    animation: glowPulseBtn 2.2s infinite;
}
.btn-simulate-pulse:hover {
    background: var(--deliv-orange);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.6);
}

@keyframes glowPulseBtn {
    0%, 100% { box-shadow: 0 0 4px rgba(249, 115, 22, 0.2); }
    50% { box-shadow: 0 0 12px rgba(249, 115, 22, 0.5); }
}

.demo-cta-btn {
    background: #25D366;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s;
    font-size: 12.5px;
}
.demo-cta-btn:hover {
    background: #1EBE5A;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* ══════════════════════════════════════════════════
   ESTRUTURA GERAL DA APLICAÇÃO (DELIV-APP)
   ══════════════════════════════════════════════════ */
.deliv-app {
    display: flex;
    min-height: calc(100vh - 46px);
    background-color: var(--deliv-bg);
}

/* ══════════════════════════════════════════════════
   SIDEBAR LATERAL
   ══════════════════════════════════════════════════ */
.deliv-sidebar {
    width: 270px;
    background: var(--deliv-surface);
    border-right: 1px solid var(--deliv-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 46px;
    height: calc(100vh - 46px);
    overflow-y: auto;
    z-index: 1040;
    transition: all 0.3s ease;
}

.deliv-sidebar-top {
    padding: 20px 16px;
}

.deliv-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 6px;
}

.deliv-brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
}

.deliv-brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--deliv-text);
    display: block;
}

.deliv-brand-tag {
    font-size: 11px;
    color: var(--deliv-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.deliv-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deliv-nav-section {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--deliv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 10px 6px;
}

.deliv-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--deliv-radius-sm);
    color: var(--deliv-text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.deliv-nav a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.deliv-nav a:hover {
    color: var(--deliv-text);
    background: var(--deliv-surface-hover);
}

.deliv-nav a.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0.05) 100%);
    border-left: 3px solid var(--deliv-orange);
    padding-left: 9px;
}

.nav-label {
    flex-grow: 1;
}

.nav-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--deliv-surface-card);
    color: var(--deliv-text-muted);
}
.nav-badge.orange { background: var(--deliv-orange); color: #ffffff; }
.nav-badge.green { background: var(--deliv-green); color: #ffffff; }
.nav-badge.gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; }
.nav-badge.pulse-orange {
    background: var(--deliv-orange-subtle);
    color: var(--deliv-orange);
    border: 1px solid var(--deliv-orange);
}

.deliv-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--deliv-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deliv-store-status-card {
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius-sm);
    padding: 12px;
}

.store-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.store-status-dot.online {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.store-name {
    font-size: 12.5px;
    color: var(--deliv-text);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: var(--deliv-radius-sm);
    transition: background 0.2s;
    cursor: pointer;
}
.sidebar-user:hover {
    background: var(--deliv-surface-hover);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--deliv-border);
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--deliv-text);
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--deliv-text-muted);
}

/* ══════════════════════════════════════════════════
   ÁREA PRINCIPAL (MAIN & TOP HEADER)
   ══════════════════════════════════════════════════ */
.deliv-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.deliv-top-header {
    background: var(--deliv-surface);
    border-bottom: 1px solid var(--deliv-border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 46px;
    z-index: 1030;
}

.deliv-top-header h1 {
    font-size: 19px;
    font-weight: 800;
    color: var(--deliv-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.deliv-breadcrumb {
    font-size: 12px;
    color: var(--deliv-text-muted);
    margin-top: 2px;
}

.deliv-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius-sm);
    padding: 6px 12px;
    width: 260px;
    transition: all 0.2s;
}
.search-box:focus-within {
    border-color: var(--deliv-orange);
    box-shadow: 0 0 0 2px var(--deliv-orange-subtle);
}
.search-box input {
    background: transparent;
    border: none;
    color: var(--deliv-text);
    font-size: 12.5px;
    outline: none;
    width: 100%;
}
.search-box input::placeholder {
    color: var(--deliv-text-muted);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--deliv-radius-sm);
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--deliv-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.icon-btn:hover {
    color: var(--deliv-text);
    background: var(--deliv-surface-hover);
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--deliv-orange);
    border-radius: 50%;
    position: absolute;
    top: 6px;
    right: 6px;
    box-shadow: 0 0 6px var(--deliv-orange);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}
.user-pill:hover {
    background: var(--deliv-surface-hover);
}
.user-pill .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.user-pill .user-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--deliv-text);
    line-height: 1.1;
}
.user-pill .user-role {
    font-size: 10.5px;
    color: var(--deliv-text-muted);
}

.deliv-content {
    padding: 24px 28px;
    flex-grow: 1;
}

/* Páginas e Transições */
.deliv-page {
    display: none;
}
.deliv-page.active {
    display: block;
    animation: pageFadeIn 0.25s ease-out;
}

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

/* ══════════════════════════════════════════════════
   CARDS DE MÉTRICAS (KPIs)
   ══════════════════════════════════════════════════ */
.deliv-metric-card {
    background: var(--deliv-surface);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--deliv-shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.deliv-metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--deliv-border-active);
}

.metric-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--deliv-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.bg-orange-subtle { background: var(--deliv-orange-subtle); color: var(--deliv-orange); }
.bg-green-subtle { background: var(--deliv-green-subtle); color: var(--deliv-green); }
.bg-blue-subtle { background: var(--deliv-blue-subtle); color: var(--deliv-blue); }
.bg-amber-subtle { background: rgba(245, 158, 11, 0.15); color: var(--deliv-amber); }
.bg-purple-subtle { background: var(--deliv-purple-subtle); color: var(--deliv-purple); }

.metric-label {
    font-size: 12px;
    color: var(--deliv-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--deliv-text);
    margin: 2px 0;
    letter-spacing: -0.02em;
}

.metric-badge {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-up { color: #10b981; }
.badge-neutral { color: var(--deliv-text-muted); }
.badge-gold { color: #f59e0b; }

.deliv-card {
    background: var(--deliv-surface);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius);
    box-shadow: var(--deliv-shadow);
}

/* ══════════════════════════════════════════════════
   PÁGINA 1: RADAR & MAPA GPS AO VIVO
   ══════════════════════════════════════════════════ */
.deliv-map-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: 640px;
    border-radius: var(--deliv-radius);
    overflow: hidden;
    border: 1px solid var(--deliv-border);
    background: var(--deliv-surface);
    box-shadow: var(--deliv-shadow);
}

.deliv-live-orders-panel {
    background: var(--deliv-surface);
    border-right: 1px solid var(--deliv-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-header {
    padding: 16px;
    border-bottom: 1px solid var(--deliv-border);
}

.live-pulse {
    animation: livePulseAnim 1.5s infinite;
}
@keyframes livePulseAnim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.15); }
}

.order-status-tabs {
    display: flex;
    gap: 4px;
    background: var(--deliv-surface-card);
    padding: 3px;
    border-radius: var(--deliv-radius-sm);
    overflow-x: auto;
}

.status-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--deliv-text-muted);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.status-tab-btn.active {
    background: var(--deliv-orange);
    color: #ffffff;
}

.live-orders-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deliv-order-card {
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.deliv-order-card:hover {
    border-color: rgba(249, 115, 22, 0.4);
    background: var(--deliv-surface-hover);
}
.deliv-order-card.active {
    border-color: var(--deliv-orange);
    background: linear-gradient(180deg, var(--deliv-surface-hover) 0%, var(--deliv-surface-card) 100%);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.2);
}

.order-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.order-id {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 800;
    color: var(--deliv-text);
    font-size: 13.5px;
}

.order-eta-badge {
    font-size: 11.5px;
    font-weight: 700;
}

.order-client-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--deliv-text);
    margin-bottom: 4px;
}

.order-dest-addr {
    font-size: 12px;
    color: var(--deliv-text-light);
    margin-bottom: 6px;
}

.order-items-snippet {
    font-size: 11px;
    color: var(--deliv-text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.courier-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--deliv-text);
}

.courier-mini-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.order-card-actions {
    display: flex;
    gap: 6px;
    border-top: 1px solid var(--deliv-border);
    padding-top: 8px;
}

/* Map Wrapper & Overlays */
.deliv-map-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

.deliv-leaflet-map {
    height: 100%;
    width: 100%;
    background: #0b0f19;
}

.map-floating-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-simulate-route {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: var(--deliv-radius-sm);
    padding: 8px 16px;
    transition: all 0.25s;
    font-size: 12.5px;
}
.btn-simulate-route:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.5);
    color: #ffffff;
}

.btn-map-control {
    background: rgba(17, 23, 38, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--deliv-border);
    color: #ffffff;
    border-radius: var(--deliv-radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-map-control:hover {
    background: var(--deliv-surface-hover);
    color: #ffffff;
}

.map-floating-legend {
    position: absolute;
    bottom: 20px;
    left: 16px;
    z-index: 1000;
    background: rgba(17, 23, 38, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius-sm);
    padding: 10px 14px;
    display: flex;
    gap: 14px;
    font-size: 11.5px;
    color: var(--deliv-text);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.legend-dot.hub { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.legend-dot.courier { background: #f97316; box-shadow: 0 0 6px #f97316; }
.legend-dot.dest { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

/* Custom Leaflet Marker Styles */
.custom-hub {
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-courier {
    display: flex;
    align-items: center;
    justify-content: center;
}
.courier-marker-pulse {
    background: #f97316;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.8);
    position: relative;
}
.courier-marker-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #f97316;
    animation: courierPulseWave 1.6s infinite;
}
@keyframes courierPulseWave {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.8); opacity: 0; }
}

.destination-marker {
    background: #ef4444;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

/* ══════════════════════════════════════════════════
   PÁGINA 2: PEDIDOS & KDS COZINHA (KANBAN)
   ══════════════════════════════════════════════════ */
.deliv-filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--deliv-surface-card);
    padding: 3px;
    border-radius: var(--deliv-radius-sm);
    overflow-x: auto;
}

.filter-tab {
    background: transparent;
    border: none;
    color: var(--deliv-text-muted);
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-tab.active {
    background: var(--deliv-orange);
    color: #ffffff;
}

.tab-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}
.tab-badge.badge-danger { background: #ef4444; color: #fff; }
.tab-badge.badge-warning { background: #f59e0b; color: #000; }
.tab-badge.badge-info { background: #3b82f6; color: #fff; }
.tab-badge.badge-orange { background: #ea580c; color: #fff; }

.kds-kanban-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(280px, 1fr));
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.kds-column {
    background: var(--deliv-surface);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius);
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.kds-col-header {
    padding: 12px 14px;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kds-col-header.novos { border-bottom-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
.kds-col-header.cozinha { border-bottom-color: #f59e0b; background: rgba(245, 158, 11, 0.05); }
.kds-col-header.prontos { border-bottom-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }
.kds-col-header.em-rota { border-bottom-color: #f97316; background: rgba(249, 115, 22, 0.05); }
.kds-col-header.concluidos { border-bottom-color: #10b981; background: rgba(16, 185, 129, 0.05); }

.col-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--deliv-text);
}

.col-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.col-pulse.red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.col-pulse.amber { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.col-pulse.blue { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.col-pulse.orange { background: #f97316; box-shadow: 0 0 6px #f97316; }
.col-pulse.green { background: #10b981; box-shadow: 0 0 6px #10b981; }

.col-count-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--deliv-surface-card);
    color: var(--deliv-text);
}

.kds-col-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.kds-card {
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius-sm);
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, border-color 0.2s;
}
.kds-card:hover {
    transform: translateY(-2px);
    border-color: var(--deliv-border-active);
}
.kds-card.urgent {
    border-left: 3px solid #ef4444;
}
.kds-card.in-prep {
    border-left: 3px solid #f59e0b;
}
.kds-card.ready {
    border-left: 3px solid #3b82f6;
}
.kds-card.in-transit {
    border-left: 3px solid #f97316;
}

.kds-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.kds-id {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--deliv-text);
}

.kds-timer {
    font-size: 11px;
    font-weight: 600;
}

.kds-customer {
    font-size: 13px;
    color: var(--deliv-text);
    margin-bottom: 4px;
}

.kds-type {
    font-size: 11px;
    color: var(--deliv-text-muted);
    margin-bottom: 8px;
}

.kds-items-list {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.kds-item-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
    color: var(--deliv-text-light);
    margin-bottom: 3px;
}

.item-qty {
    font-weight: 800;
    color: var(--deliv-orange);
    font-size: 11.5px;
}

.kds-item-obs {
    font-size: 11px;
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 4px;
    padding-left: 12px;
}

.courier-badge-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.25);
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.courier-name { font-size: 12px; font-weight: 700; color: #ffffff; }
.courier-bike { font-size: 10.5px; color: var(--deliv-text-muted); }

.kds-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--deliv-border);
    padding-top: 8px;
}

.kds-total {
    font-size: 14px;
    font-weight: 800;
    color: #10b981;
}

/* ══════════════════════════════════════════════════
   PÁGINA 3: CARDÁPIO DIGITAL & PRODUTOS
   ══════════════════════════════════════════════════ */
.category-pill-btn {
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    color: var(--deliv-text-muted);
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}
.category-pill-btn:hover {
    color: var(--deliv-text);
    background: var(--deliv-surface-hover);
}
.category-pill-btn.active {
    background: var(--deliv-orange);
    border-color: var(--deliv-orange);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.deliv-product-card {
    background: var(--deliv-surface);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    box-shadow: var(--deliv-shadow);
}
.deliv-product-card:hover {
    transform: translateY(-3px);
    border-color: var(--deliv-border-active);
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.3);
}

.product-img-box {
    position: relative;
    height: 160px;
    overflow: hidden;
}
.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.deliv-product-card:hover .product-thumb {
    transform: scale(1.05);
}

.badge-tag-popular {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.badge-tag-special {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f59e0b;
    color: #000000;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.product-availability-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(17, 23, 38, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 3px 8px;
}

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-cat {
    font-size: 10px;
    font-weight: 700;
    color: var(--deliv-orange);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.product-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--deliv-text);
    margin-bottom: 6px;
}

.product-desc {
    font-size: 12px;
    color: var(--deliv-text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--deliv-border);
    padding-top: 12px;
}

.product-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.current-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--deliv-text);
}
.original-price {
    font-size: 12px;
    color: var(--deliv-text-muted);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 4px;
}

/* ══════════════════════════════════════════════════
   PÁGINA 4: ENTREGADORES & FROTA
   ══════════════════════════════════════════════════ */
.courier-profile-card {
    background: var(--deliv-surface);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius);
    padding: 18px;
    box-shadow: var(--deliv-shadow);
    transition: transform 0.2s, border-color 0.2s;
}
.courier-profile-card:hover {
    transform: translateY(-2px);
    border-color: var(--deliv-border-active);
}

.courier-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.courier-avatar-wrap {
    position: relative;
}
.courier-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--deliv-border);
}
.courier-online-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid var(--deliv-surface);
}
.courier-online-dot.online {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.courier-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--deliv-text);
    margin: 0;
}

.courier-phone {
    font-size: 12px;
    color: var(--deliv-text-light);
    margin: 2px 0;
}

.courier-stars {
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
}

.courier-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--deliv-surface-card);
    border-radius: var(--deliv-radius-sm);
    padding: 10px;
    text-align: center;
    margin-bottom: 12px;
}

.courier-stat-item .stat-num {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--deliv-text);
}
.courier-stat-item .stat-label {
    font-size: 10.5px;
    color: var(--deliv-text-muted);
}

.courier-vehicle-info {
    font-size: 11.5px;
    color: var(--deliv-text-muted);
    background: rgba(0, 0, 0, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.courier-card-actions {
    display: flex;
    gap: 6px;
}

/* ══════════════════════════════════════════════════
   PÁGINA 5 & 6: CLIENTES CRM & RELATÓRIOS BI
   ══════════════════════════════════════════════════ */
.deliv-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--deliv-text-muted);
    border-bottom: 1px solid var(--deliv-border);
    padding: 12px 14px;
    font-weight: 700;
}
.deliv-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--deliv-border);
    font-size: 13px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.deliv-saving-banner {
    background: linear-gradient(135deg, #18281f 0%, #0d1b14 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--deliv-radius);
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.saving-icon-badge {
    width: 48px;
    height: 48px;
    background: #10b981;
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.saving-counter {
    font-size: 28px;
    font-weight: 900;
    color: #10b981;
    letter-spacing: -0.02em;
}

/* ══════════════════════════════════════════════════
   MODAL DA COMANDA TÉRMICA (80MM ROLL SIMULATION)
   ══════════════════════════════════════════════════ */
.thermal-receipt-preview-wrap {
    display: flex;
    justify-content: center;
    background: #1e2533;
    padding: 20px;
    border-radius: var(--deliv-radius-sm);
}

.thermal-receipt {
    width: 310px;
    background: #ffffff;
    color: #000000;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11.5px;
    line-height: 1.35;
    padding: 20px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-top: 4px dashed #cbd5e1;
    border-bottom: 4px dashed #cbd5e1;
}

.receipt-header {
    text-align: center;
}
.receipt-brand {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.05em;
}
.receipt-sub {
    font-size: 10px;
    color: #475569;
}
.receipt-divider {
    font-size: 11px;
    color: #64748b;
    margin: 4px 0;
    overflow: hidden;
}
.receipt-bold-title {
    font-size: 14px;
    font-weight: 900;
}
.receipt-time {
    font-size: 10px;
    color: #475569;
}

.receipt-customer {
    margin: 8px 0;
}
.receipt-obs {
    margin-top: 4px;
    color: #b91c1c;
    font-weight: bold;
}

.rcpt-item-line {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}
.rcpt-item-sub {
    font-size: 10px;
    color: #475569;
    padding-left: 10px;
    margin-bottom: 4px;
}

.receipt-totals {
    margin: 6px 0;
}
.rcpt-row {
    display: flex;
    justify-content: space-between;
}
.rcpt-row.total {
    font-size: 13.5px;
    margin: 4px 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 3px 0;
}

/* Timeline do Pedido */
.order-timeline-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}
.order-timeline-wrap::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: var(--deliv-border);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}
.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--deliv-surface-card);
    border: 2px solid var(--deliv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--deliv-text-muted);
}
.timeline-step.completed .step-icon {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}
.timeline-step.active .step-icon {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
}
.step-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--deliv-text);
    margin-top: 6px;
}
.step-time {
    font-size: 10px;
    color: var(--deliv-text-muted);
}

/* Modais Padronizados */
.deliv-modal-content {
    background: var(--deliv-surface);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius);
    color: var(--deliv-text);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.deliv-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--deliv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.deliv-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.deliv-modal-icon-orange { background: var(--deliv-orange-subtle); color: var(--deliv-orange); }
.deliv-modal-icon-green { background: var(--deliv-green-subtle); color: var(--deliv-green); }
.deliv-modal-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--deliv-amber); }

.deliv-modal-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: var(--deliv-text);
}
.deliv-modal-subtitle {
    font-size: 12px;
    color: var(--deliv-text-muted);
}

.deliv-modal-body {
    padding: 20px;
}

.deliv-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--deliv-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-deliv-primary {
    background: var(--deliv-orange);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}
.btn-deliv-primary:hover {
    background: var(--deliv-orange-hover);
    color: #ffffff;
}

.btn-deliv-secondary {
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    color: var(--deliv-text-muted);
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
}
.btn-deliv-secondary:hover {
    background: var(--deliv-surface-hover);
    color: var(--deliv-text);
}

.form-label-xs {
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 5px;
}

/* Responsividade */
@media (max-width: 992px) {
    .deliv-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1070;
    }
    .deliv-sidebar.open {
        left: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
    }
    .deliv-map-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .deliv-live-orders-panel {
        height: 380px;
    }
    .deliv-map-wrapper {
        height: 440px;
    }
    .kds-kanban-board {
        grid-template-columns: repeat(5, 260px);
    }
}


/* ==========================================================================
   SISTEMA DE CONTRASTE PERFEITO: TEMA CLARO & TEMA ESCURO (DUAL THEME MASTER)
   ========================================================================== */

/* Classes Semânticas Independentes de Tema */
.deliv-text-strong {
    color: var(--deliv-text) !important;
}
.deliv-text-muted {
    color: var(--deliv-text-muted) !important;
}
.deliv-box-card {
    background: var(--deliv-surface-card);
    border: 1px solid var(--deliv-border);
    border-radius: var(--deliv-radius-sm);
    color: var(--deliv-text);
}
.deliv-input {
    background-color: var(--deliv-surface) !important;
    border: 1px solid var(--deliv-border) !important;
    color: var(--deliv-text) !important;
    border-radius: var(--deliv-radius-sm);
    transition: all 0.2s ease;
}
.deliv-input:focus {
    border-color: var(--deliv-orange) !important;
    box-shadow: 0 0 0 3px var(--deliv-orange-subtle) !important;
    color: var(--deliv-text) !important;
}
.deliv-theme-table {
    --bs-table-bg: transparent;
    color: var(--deliv-text);
}

/* ══════════════════════════════════════════════════════════════════════════
   REGRAS ESPECÍFICAS PARA O TEMA CLARO (LIGHT THEME OVERRIDES)
   ══════════════════════════════════════════════════════════════════════════ */
[data-theme="light"],
[data-bs-theme="light"],
body[data-theme="light"],
body[data-bs-theme="light"] {
    --deliv-bg: #f8fafc;
    --deliv-surface: #ffffff;
    --deliv-surface-card: #f1f5f9;
    --deliv-surface-hover: #e2e8f0;
    --deliv-border: #e2e8f0;
    --deliv-border-active: rgba(249, 115, 22, 0.6);
    
    --deliv-text: #0f172a;
    --deliv-text-muted: #64748b;
    --deliv-text-light: #334155;
    
    --deliv-orange: #ea580c;
    --deliv-orange-hover: #c2410c;
    --deliv-orange-subtle: rgba(234, 88, 12, 0.12);
    
    --deliv-amber: #d97706;
    --deliv-green: #16a34a;
    --deliv-green-subtle: rgba(22, 163, 74, 0.12);
    --deliv-blue: #2563eb;
    --deliv-blue-subtle: rgba(37, 99, 235, 0.12);
    --deliv-purple: #7c3aed;
    --deliv-purple-subtle: rgba(124, 58, 237, 0.12);
    --deliv-red: #dc2626;
    --deliv-red-subtle: rgba(220, 38, 38, 0.12);

    --deliv-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
}

/* 1. Reset Global de Utilidades no Tema Claro */
[data-theme="light"] .deliv-app,
[data-bs-theme="light"] .deliv-app,
[data-theme="light"] .deliv-modal,
[data-bs-theme="light"] .deliv-modal {
    color: #0f172a;
}

[data-theme="light"] .text-white,
[data-bs-theme="light"] .text-white {
    color: #0f172a !important;
}

[data-theme="light"] .text-white-50,
[data-bs-theme="light"] .text-white-50 {
    color: #475569 !important;
}

[data-theme="light"] .text-muted,
[data-bs-theme="light"] .text-muted {
    color: #64748b !important;
}

[data-theme="light"] .bg-dark,
[data-bs-theme="light"] .bg-dark {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

[data-theme="light"] .bg-dark-subtle,
[data-bs-theme="light"] .bg-dark-subtle {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

[data-theme="light"] .border-secondary,
[data-bs-theme="light"] .border-secondary {
    border-color: #e2e8f0 !important;
}

/* 2. Formulários, Inputs e Selects em Ambos os Temas */
[data-theme="light"] .form-control,
[data-bs-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-bs-theme="light"] .form-select,
[data-theme="light"] textarea.form-control,
[data-bs-theme="light"] textarea.form-control,
[data-theme="light"] .deliv-input,
[data-bs-theme="light"] .deliv-input {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus,
[data-bs-theme="light"] .form-select:focus,
[data-theme="light"] .deliv-input:focus,
[data-bs-theme="light"] .deliv-input:focus {
    border-color: #ea580c !important;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15) !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control::placeholder,
[data-bs-theme="light"] .form-control::placeholder,
[data-theme="light"] .deliv-input::placeholder,
[data-bs-theme="light"] .deliv-input::placeholder {
    color: #94a3b8 !important;
}

[data-theme="light"] .form-label,
[data-bs-theme="light"] .form-label,
[data-theme="light"] .form-label-xs,
[data-bs-theme="light"] .form-label-xs {
    color: #334155 !important;
    font-weight: 600;
}

/* 3. Modais e Janelas Flutuantes */
[data-theme="light"] .deliv-modal-content,
[data-bs-theme="light"] .deliv-modal-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18) !important;
}

[data-theme="light"] .deliv-modal-header,
[data-bs-theme="light"] .deliv-modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .deliv-modal-title,
[data-bs-theme="light"] .deliv-modal-title {
    color: #0f172a !important;
    font-weight: 800 !important;
}

[data-theme="light"] .deliv-modal-subtitle,
[data-bs-theme="light"] .deliv-modal-subtitle {
    color: #64748b !important;
}

[data-theme="light"] .deliv-modal-body,
[data-bs-theme="light"] .deliv-modal-body {
    background: #ffffff !important;
    color: #0f172a !important;
}

[data-theme="light"] .deliv-modal-footer,
[data-bs-theme="light"] .deliv-modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .btn-deliv-secondary,
[data-bs-theme="light"] .btn-deliv-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

[data-theme="light"] .btn-deliv-secondary:hover,
[data-bs-theme="light"] .btn-deliv-secondary:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

[data-theme="light"] .btn-close,
[data-bs-theme="light"] .btn-close {
    filter: none !important;
    opacity: 0.6 !important;
}
[data-theme="light"] .btn-close:hover,
[data-bs-theme="light"] .btn-close:hover {
    opacity: 1 !important;
}

/* Modal de Notificações */
[data-theme="light"] .deliv-notif-list .notif-item,
[data-bs-theme="light"] .deliv-notif-list .notif-item {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
[data-theme="light"] .deliv-notif-list .notif-item.unread,
[data-bs-theme="light"] .deliv-notif-list .notif-item.unread {
    background: #fff7ed !important;
    border-left: 3px solid #ea580c !important;
}
[data-theme="light"] .notif-item strong,
[data-bs-theme="light"] .notif-item strong,
[data-theme="light"] .notif-item .deliv-text-strong,
[data-bs-theme="light"] .notif-item .deliv-text-strong {
    color: #0f172a !important;
    font-weight: 700 !important;
}
[data-theme="light"] .notif-item .text-white-50,
[data-bs-theme="light"] .notif-item .text-white-50,
[data-theme="light"] .notif-item .deliv-text-muted,
[data-bs-theme="light"] .notif-item .deliv-text-muted {
    color: #475569 !important;
}
[data-theme="light"] .notif-item .text-muted,
[data-bs-theme="light"] .notif-item .text-muted {
    color: #64748b !important;
}

/* Modal de Detalhes do Pedido */
[data-theme="light"] #orderDetailsContent .bg-dark,
[data-bs-theme="light"] #orderDetailsContent .bg-dark,
[data-theme="light"] #orderDetailsContent .deliv-box-card,
[data-bs-theme="light"] #orderDetailsContent .deliv-box-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

/* 4. Menus & Navegação Lateral (Sidebar) */
[data-theme="light"] .deliv-sidebar,
[data-bs-theme="light"] .deliv-sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .deliv-brand-name,
[data-bs-theme="light"] .deliv-brand-name {
    color: #0f172a !important;
}

[data-theme="light"] .deliv-brand-tag,
[data-bs-theme="light"] .deliv-brand-tag {
    color: #64748b !important;
}

[data-theme="light"] .deliv-nav-section,
[data-bs-theme="light"] .deliv-nav-section {
    color: #64748b !important;
    font-weight: 800 !important;
}

[data-theme="light"] .deliv-nav a,
[data-bs-theme="light"] .deliv-nav a {
    color: #334155 !important;
}

[data-theme="light"] .deliv-nav a i,
[data-bs-theme="light"] .deliv-nav a i {
    color: #64748b !important;
}

[data-theme="light"] .deliv-nav a:hover,
[data-bs-theme="light"] .deliv-nav a:hover {
    color: #ea580c !important;
    background: #f1f5f9 !important;
}

[data-theme="light"] .deliv-nav a:hover i,
[data-bs-theme="light"] .deliv-nav a:hover i {
    color: #ea580c !important;
}

/* Sidebar Nav Active Item — Light Mode (Ultra Contrast & Premium Aesthetics) */
[data-theme="light"] .deliv-nav a.active,
[data-bs-theme="light"] .deliv-nav a.active,
body[data-theme="light"] .deliv-nav a.active,
body[data-bs-theme="light"] .deliv-nav a.active,
html[data-theme="light"] .deliv-nav a.active,
html[data-bs-theme="light"] .deliv-nav a.active {
    color: #9a3412 !important;
    background: #fff7ed !important;
    border: 1px solid #fed7aa !important;
    border-left: 4px solid #ea580c !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.08) !important;
    padding-left: 9px !important;
}

[data-theme="light"] .deliv-nav a.active:hover,
[data-bs-theme="light"] .deliv-nav a.active:hover,
body[data-theme="light"] .deliv-nav a.active:hover,
body[data-bs-theme="light"] .deliv-nav a.active:hover {
    color: #7c2d12 !important;
    background: #ffedd5 !important;
}

[data-theme="light"] .deliv-nav a.active i,
[data-bs-theme="light"] .deliv-nav a.active i,
body[data-theme="light"] .deliv-nav a.active i,
body[data-bs-theme="light"] .deliv-nav a.active i,
html[data-theme="light"] .deliv-nav a.active i,
html[data-bs-theme="light"] .deliv-nav a.active i {
    color: #ea580c !important;
    font-size: 16.5px !important;
    transform: scale(1.05);
}

[data-theme="light"] .deliv-nav a.active .nav-label,
[data-bs-theme="light"] .deliv-nav a.active .nav-label,
body[data-theme="light"] .deliv-nav a.active .nav-label,
body[data-bs-theme="light"] .deliv-nav a.active .nav-label,
html[data-theme="light"] .deliv-nav a.active .nav-label,
html[data-bs-theme="light"] .deliv-nav a.active .nav-label {
    color: #9a3412 !important;
    font-weight: 700 !important;
}

[data-theme="light"] .deliv-nav a.active .nav-badge,
[data-bs-theme="light"] .deliv-nav a.active .nav-badge,
body[data-theme="light"] .deliv-nav a.active .nav-badge,
body[data-bs-theme="light"] .deliv-nav a.active .nav-badge {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .deliv-nav a.active .nav-badge.pulse-orange,
[data-bs-theme="light"] .deliv-nav a.active .nav-badge.pulse-orange,
body[data-theme="light"] .deliv-nav a.active .nav-badge.pulse-orange,
body[data-bs-theme="light"] .deliv-nav a.active .nav-badge.pulse-orange,
html[data-theme="light"] .deliv-nav a.active .nav-badge.pulse-orange,
html[data-bs-theme="light"] .deliv-nav a.active .nav-badge.pulse-orange {
    background: #ea580c !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 4px rgba(234, 88, 12, 0.3) !important;
}

[data-theme="light"] .nav-badge,
[data-bs-theme="light"] .nav-badge {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

[data-theme="light"] .nav-badge.orange,
[data-bs-theme="light"] .nav-badge.orange {
    background: #ea580c !important;
    color: #ffffff !important;
}

[data-theme="light"] .nav-badge.green,
[data-bs-theme="light"] .nav-badge.green {
    background: #16a34a !important;
    color: #ffffff !important;
}

[data-theme="light"] .nav-badge.pulse-orange,
[data-bs-theme="light"] .nav-badge.pulse-orange {
    background: #fff7ed !important;
    color: #ea580c !important;
    border: 1px solid #fdba74 !important;
}

[data-theme="light"] .deliv-store-status-card,
[data-bs-theme="light"] .deliv-store-status-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .store-name,
[data-bs-theme="light"] .store-name {
    color: #0f172a !important;
    font-weight: 700 !important;
}

[data-theme="light"] .store-subinfo,
[data-bs-theme="light"] .store-subinfo {
    color: #64748b !important;
}

[data-theme="light"] .sidebar-user,
[data-bs-theme="light"] .sidebar-user {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .sidebar-user:hover,
[data-bs-theme="light"] .sidebar-user:hover {
    background: #f1f5f9 !important;
}

[data-theme="light"] .sidebar-user-name,
[data-bs-theme="light"] .sidebar-user-name {
    color: #0f172a !important;
}

[data-theme="light"] .sidebar-user-role,
[data-bs-theme="light"] .sidebar-user-role {
    color: #64748b !important;
}

/* 5. Top Header */
[data-theme="light"] .deliv-top-header,
[data-bs-theme="light"] .deliv-top-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .deliv-top-header h1,
[data-bs-theme="light"] .deliv-top-header h1 {
    color: #0f172a !important;
}

[data-theme="light"] .deliv-breadcrumb,
[data-bs-theme="light"] .deliv-breadcrumb {
    color: #64748b !important;
}

[data-theme="light"] .search-box,
[data-bs-theme="light"] .search-box {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .search-box input,
[data-bs-theme="light"] .search-box input {
    color: #0f172a !important;
}

[data-theme="light"] .search-box input::placeholder,
[data-bs-theme="light"] .search-box input::placeholder {
    color: #94a3b8 !important;
}

[data-theme="light"] .search-box i,
[data-bs-theme="light"] .search-box i {
    color: #64748b !important;
}

[data-theme="light"] .icon-btn,
[data-bs-theme="light"] .icon-btn {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

[data-theme="light"] .icon-btn:hover,
[data-bs-theme="light"] .icon-btn:hover {
    background: #f1f5f9 !important;
    color: #ea580c !important;
}

[data-theme="light"] .user-pill,
[data-bs-theme="light"] .user-pill {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .user-pill .user-name,
[data-bs-theme="light"] .user-pill .user-name {
    color: #0f172a !important;
}

[data-theme="light"] .user-pill .user-role,
[data-bs-theme="light"] .user-pill .user-role {
    color: #64748b !important;
}

[data-theme="light"] .store-quick-toggle label,
[data-bs-theme="light"] .store-quick-toggle label {
    color: #0f172a !important;
}

/* 6. Todas as Tabelas (Clientes, Bairros, Pedidos) */
[data-theme="light"] .table,
[data-bs-theme="light"] .table,
[data-theme="light"] .table-dark,
[data-bs-theme="light"] .table-dark,
[data-theme="light"] .deliv-table,
[data-bs-theme="light"] .deliv-table,
[data-theme="light"] .deliv-theme-table,
[data-bs-theme="light"] .deliv-theme-table {
    --bs-table-bg: #ffffff !important;
    --bs-table-striped-bg: #f8fafc !important;
    --bs-table-hover-bg: #f1f5f9 !important;
    --bs-table-color: #0f172a !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
    background-color: #ffffff !important;
}

[data-theme="light"] .table th,
[data-bs-theme="light"] .table th,
[data-theme="light"] .deliv-table th,
[data-bs-theme="light"] .deliv-table th,
[data-theme="light"] .deliv-theme-table th,
[data-bs-theme="light"] .deliv-theme-table th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    font-weight: 700 !important;
}

[data-theme="light"] .table td,
[data-bs-theme="light"] .table td,
[data-theme="light"] .deliv-table td,
[data-bs-theme="light"] .deliv-table td,
[data-theme="light"] .deliv-theme-table td,
[data-bs-theme="light"] .deliv-theme-table td {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

[data-theme="light"] .table tr:hover td,
[data-bs-theme="light"] .table tr:hover td,
[data-theme="light"] .deliv-table tr:hover td,
[data-bs-theme="light"] .deliv-table tr:hover td {
    background-color: #f8fafc !important;
}

[data-theme="light"] #neighborhoodRatesTable input,
[data-bs-theme="light"] #neighborhoodRatesTable input {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #16a34a !important;
}

[data-theme="light"] .btn-outline-light,
[data-bs-theme="light"] .btn-outline-light {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

[data-theme="light"] .btn-outline-light:hover,
[data-bs-theme="light"] .btn-outline-light:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* 7. Telas e Componentes: Live Map, KDS, Cardápio, Frota */
[data-theme="light"] .deliv-card,
[data-bs-theme="light"] .deliv-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .deliv-metric-card,
[data-bs-theme="light"] .deliv-metric-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .metric-label,
[data-bs-theme="light"] .metric-label {
    color: #64748b !important;
}

[data-theme="light"] .metric-val,
[data-bs-theme="light"] .metric-val {
    color: #0f172a !important;
}

[data-theme="light"] .deliv-map-layout,
[data-bs-theme="light"] .deliv-map-layout {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .deliv-live-orders-panel,
[data-bs-theme="light"] .deliv-live-orders-panel {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .panel-header h5,
[data-bs-theme="light"] .panel-header h5 {
    color: #0f172a !important;
}

[data-theme="light"] .order-status-tabs,
[data-bs-theme="light"] .order-status-tabs {
    background: #f1f5f9 !important;
}

[data-theme="light"] .status-tab-btn,
[data-bs-theme="light"] .status-tab-btn {
    color: #475569 !important;
}

[data-theme="light"] .status-tab-btn.active,
[data-bs-theme="light"] .status-tab-btn.active {
    background: #ea580c !important;
    color: #ffffff !important;
}

[data-theme="light"] .deliv-order-card,
[data-bs-theme="light"] .deliv-order-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .deliv-order-card:hover,
[data-bs-theme="light"] .deliv-order-card:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .deliv-order-card.active,
[data-bs-theme="light"] .deliv-order-card.active {
    background: #fff7ed !important;
    border: 2px solid #ea580c !important;
}

[data-theme="light"] .order-id,
[data-bs-theme="light"] .order-id {
    color: #ea580c !important;
}

[data-theme="light"] .order-client-name,
[data-bs-theme="light"] .order-client-name {
    color: #0f172a !important;
}

[data-theme="light"] .order-dest-addr,
[data-bs-theme="light"] .order-dest-addr {
    color: #475569 !important;
}

[data-theme="light"] .order-items-snippet,
[data-bs-theme="light"] .order-items-snippet {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .courier-pill,
[data-bs-theme="light"] .courier-pill {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

[data-theme="light"] .btn-map-control,
[data-bs-theme="light"] .btn-map-control {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .btn-map-control:hover,
[data-bs-theme="light"] .btn-map-control:hover {
    background: #f1f5f9 !important;
}

[data-theme="light"] .map-floating-legend,
[data-bs-theme="light"] .map-floating-legend {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Kanban KDS */
[data-theme="light"] .deliv-filter-tabs,
[data-bs-theme="light"] .deliv-filter-tabs {
    background: #f1f5f9 !important;
}

[data-theme="light"] .filter-tab,
[data-bs-theme="light"] .filter-tab {
    color: #475569 !important;
}

[data-theme="light"] .filter-tab.active,
[data-bs-theme="light"] .filter-tab.active {
    background: #ea580c !important;
    color: #ffffff !important;
}

[data-theme="light"] .kds-column,
[data-bs-theme="light"] .kds-column {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .col-title,
[data-bs-theme="light"] .col-title {
    color: #0f172a !important;
}

[data-theme="light"] .col-count-badge,
[data-bs-theme="light"] .col-count-badge {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .kds-card,
[data-bs-theme="light"] .kds-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .kds-card-top .kds-id,
[data-bs-theme="light"] .kds-card-top .kds-id {
    color: #ea580c !important;
}

[data-theme="light"] .kds-customer,
[data-bs-theme="light"] .kds-customer {
    color: #0f172a !important;
    font-weight: 700 !important;
}

[data-theme="light"] .kds-type,
[data-bs-theme="light"] .kds-type {
    color: #64748b !important;
}

[data-theme="light"] .kds-items-list,
[data-bs-theme="light"] .kds-items-list {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .kds-item-row,
[data-bs-theme="light"] .kds-item-row {
    color: #334155 !important;
}

[data-theme="light"] .courier-badge-box,
[data-bs-theme="light"] .courier-badge-box {
    background: #fff7ed !important;
    border: 1px solid #fed7aa !important;
}

[data-theme="light"] .courier-name,
[data-bs-theme="light"] .courier-name {
    color: #9a3412 !important;
    font-weight: 700 !important;
}

[data-theme="light"] .courier-bike,
[data-bs-theme="light"] .courier-bike {
    color: #c2410c !important;
}

/* Cardápio Digital */
[data-theme="light"] .category-pill-btn,
[data-bs-theme="light"] .category-pill-btn {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

[data-theme="light"] .category-pill-btn:hover,
[data-bs-theme="light"] .category-pill-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .category-pill-btn.active,
[data-bs-theme="light"] .category-pill-btn.active {
    background: #ea580c !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
}

[data-theme="light"] .deliv-product-card,
[data-bs-theme="light"] .deliv-product-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .product-title,
[data-bs-theme="light"] .product-title {
    color: #0f172a !important;
}

[data-theme="light"] .product-desc,
[data-bs-theme="light"] .product-desc {
    color: #64748b !important;
}

[data-theme="light"] .current-price,
[data-bs-theme="light"] .current-price {
    color: #0f172a !important;
}

/* Frota de Motoboys */
[data-theme="light"] .courier-profile-card,
[data-bs-theme="light"] .courier-profile-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .courier-title,
[data-bs-theme="light"] .courier-title {
    color: #0f172a !important;
}

[data-theme="light"] .courier-stats-row,
[data-bs-theme="light"] .courier-stats-row {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .courier-stat-item .stat-num,
[data-bs-theme="light"] .courier-stat-item .stat-num {
    color: #0f172a !important;
}

[data-theme="light"] .courier-stat-item .stat-label,
[data-bs-theme="light"] .courier-stat-item .stat-label {
    color: #64748b !important;
}

[data-theme="light"] .courier-vehicle-info,
[data-bs-theme="light"] .courier-vehicle-info {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

/* Comanda Térmica */
[data-theme="light"] .thermal-receipt-preview-wrap,
[data-bs-theme="light"] .thermal-receipt-preview-wrap {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}

/* Economia Banner */
[data-theme="light"] .deliv-saving-banner,
[data-bs-theme="light"] .deliv-saving-banner {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border: 1px solid #bbf7d0 !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.08) !important;
}

[data-theme="light"] .deliv-saving-banner h4,
[data-bs-theme="light"] .deliv-saving-banner h4 {
    color: #14532d !important;
}

[data-theme="light"] .deliv-saving-banner p,
[data-bs-theme="light"] .deliv-saving-banner p {
    color: #166534 !important;
}

[data-theme="light"] .saving-counter,
[data-bs-theme="light"] .saving-counter {
    color: #15803d !important;
}
