/* Estilos Globais Unificados - Premium UI/UX */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Customização Mercado Pago */
.mercadopago-button {
    background-color: var(--accent-color, #00A3FF) !important;
    transition: filter 0.2s ease !important;
    font-size: 1.125rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}
.mercadopago-button:hover { filter: brightness(1.1); }

.checkout-summary-box {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}
.checkout-summary-box hr { border-top-style: dashed; }

/* Base Sidebar Responsiva */
#sidebar, #admin-sidebar {
    position: fixed;
    top: 80px;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 100%;
    max-width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
#sidebar.open, #admin-sidebar.open { transform: translateX(0); }

/* Overlays */
#sidebar-overlay, #admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 30;
    display: none;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}
#sidebar-overlay.open, #admin-sidebar-overlay.open { display: block; opacity: 1; }

#sidebar-toggle, #admin-sidebar-toggle { display: flex; }

@media (min-width: 768px) {
    #sidebar, #admin-sidebar {
        transform: translateX(0);
        width: 256px;
        box-shadow: none;
    }
    #sidebar-toggle, #admin-sidebar-toggle { display: none !important; }
    #sidebar-overlay, #admin-sidebar-overlay { display: none !important; opacity: 0 !important; }
}

/* Sidebar Active Link Animado (Premium Neon) */
.sidebar-active-link {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.3) 0%, rgba(245, 158, 11, 0.15) 100%);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.sidebar-active-link::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    height: 100%; width: 4px;
    background: linear-gradient(180deg, #f97316, #f59e0b);
    box-shadow: 0 0 10px #f97316, 0 0 20px rgba(249, 115, 22, 0.5);
}

/* Glassmorphism Classes Reusáveis */
.glass-header {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}
.glass-sidebar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0,0,0,0.05) !important;
}

/* DARK MODE GERAL (Padrão Preto/Cinza Neutro) */
.dark body { background: #0a0a0a !important; color: #f4f4f5; }
.dark header, .dark .glass-header {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.dark #sidebar, .dark #admin-sidebar, .dark .glass-sidebar {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05) !important;
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
}
.dark .bg-white { background-color: #18181b !important; border: 1px solid rgba(255, 255, 255, 0.05); }
.dark .bg-gray-50, .dark.bg-gray-50 { background-color: transparent !important; }
.dark .bg-gray-100 { background-color: #27272a !important; }
.dark .text-gray-800, .dark .text-gray-900 { color: #f1f5f9 !important; }
.dark .text-gray-700 { color: #e2e8f0 !important; }
.dark .text-gray-600 { color: #cbd5e1 !important; }
.dark .text-gray-500 { color: #94a3b8 !important; }
.dark .border-gray-200 { border-color: #27272a !important; }
.dark .shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important; }

/* Dark inputs */
.dark input[type="text"], .dark input[type="email"], .dark input[type="password"],
.dark input[type="number"], .dark input[type="tel"], .dark input[type="url"],
.dark textarea, .dark select {
    background-color: #27272a !important; border-color: #3f3f46 !important; color: #ffffff !important;
}
.dark input:focus, .dark textarea:focus, .dark select:focus {
    background-color: #18181b !important; border-color: #f97316 !important;
}

/* Dark Texts Override */
.dark h1, .dark h2, .dark h3, .dark h4 { color: #ffffff !important; }
.dark p { color: #cbd5e1 !important; }
.dark a:not(.sidebar-active-link):hover { filter: brightness(1.2); }

/* Correção de Dark Backgrounds Específicos */
.dark .bg-blue-50 { background-color: rgba(30, 58, 138, 0.3) !important; border: 1px solid rgba(59, 130, 246, 0.3) !important; }
.dark .bg-yellow-50 { background-color: rgba(120, 53, 15, 0.3) !important; border: 1px solid rgba(245, 158, 11, 0.3) !important; }
.dark .bg-green-50 { background-color: rgba(20, 83, 45, 0.3) !important; border: 1px solid rgba(34, 197, 94, 0.3) !important; }
.dark .bg-orange-50 { background-color: rgba(124, 45, 18, 0.3) !important; border: 1px solid rgba(249, 115, 22, 0.3) !important; }
.dark .text-blue-800 { color: #93c5fd !important; }
.dark .text-yellow-800 { color: #fcd34d !important; }
.dark .text-green-800 { color: #86efac !important; }
.dark .text-orange-800 { color: #fdba74 !important; }

/* Tabelas Premium */
.dark table { color: #e2e8f0 !important; }
.dark th { color: #f1f5f9 !important; background-color: rgba(39, 39, 42, 0.6) !important; }
.dark td { border-color: #27272a !important; }
.dark tbody tr:hover { background-color: rgba(39, 39, 42, 0.5) !important; }

/* Notificações Flutuantes Premium */
.live-notification-container {
    position: fixed; bottom: 20px; right: 20px; width: 320px;
    background-color: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1rem; display: flex; align-items: center; gap: 0.75rem;
    transform: translateY(150%); opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease-out;
    z-index: 1000;
}
.dark .live-notification-container {
    background-color: rgba(30, 41, 59, 0.95);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.live-notification-container.show { transform: translateY(0); opacity: 1; }
.live-notification-product-image {
    width: 50px; height: 50px; border-radius: 8px; object-fit: cover;
    flex-shrink: 0; border: 1px solid #e5e7eb;
}

/* Modificadores Light/Dark para body fallback */
html:not(.dark) body { background: #fafafa !important; }
html:not(.dark) .bg-white { background-color: #ffffff !important; border: 1px solid #e4e4e7 !important; }