:root { --primary: #ffffff; --bg: #0a0a0a; --card: #161616; --text: #fff; --danger: #ff4d4d; --success: #28a745; --purple: #ccff01; }
        * { box-sizing: border-box; }
        body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); margin: 0; overflow: hidden; }
        .auth-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; justify-content: center; align-items: center; z-index: 9999; }
        .auth-card { background: var(--card); padding: 40px; border-radius: 20px; border: 1px solid #333; width: 100%; max-width: 350px; text-align: center; position: relative; }
        .back-btn { position: absolute; top: 20px; left: 25px; font-size: 24px; color: #555; cursor: pointer; transition: 0.3s; display: none; }
        .back-btn:hover { color: var(--primary); transform: translateX(-3px); }
        .typing-container { font-family: 'Courier New', Courier, monospace; color: #888; font-size: 14px; height: 20px; letter-spacing: 1px; margin-bottom: 20px; }
        .cursor { display: inline-block; width: 2px; background-color: var(--primary); margin-left: 2px; animation: blink 0.7s infinite; }
        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
        .pass-wrapper { position: relative; margin-bottom: 20px; }
        .pass-wrapper input { margin-bottom: 0; padding-right: 46px; }
        .pass-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #555; cursor: pointer; padding: 4px; font-size: 15px; transition: color 0.2s; }
        .pass-toggle:hover { color: #aaa; }
        #dashboard { display: flex; height: 100vh; width: 100vw; }
        .sidebar { width: 260px; background: #000; border-right: 1px solid #333; padding: 25px; display: flex; flex-direction: column; flex-shrink: 0; }
        .sidebar-logo { width: 100%; max-width: 100%; height: auto; margin: 0 auto 30px auto; display: block; object-fit: contain; }
        .menu-content { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
        .user-info-bottom { text-align: center; margin-bottom: 30px; border-top: 1px solid #222; padding-top: 15px; }
        .user-name-tag { font-size: 12px; font-weight: 900; color: var(--primary); letter-spacing: 2px; text-transform: uppercase; }
        .menu-btn { width: 100%; padding: 11px 14px; background: none; border: none; color: #888; text-align: left; cursor: pointer; font-size: 14px; border-radius: 10px; margin-bottom: 2px; transition: 0.3s; display: flex; align-items: center; gap: 10px; }
        #btn-admin, #btn-webhook, #btn-gerenciar { color: var(--primary); border: 1px dashed rgba(204,255,1,0.35); background: rgba(204,255,1,0.04); margin-bottom: 2px; }
        #btn-admin:hover, #btn-webhook:hover, #btn-gerenciar:hover { background: rgba(204,255,1,0.1); border-color: var(--primary); color: var(--primary); }
        #btn-admin.active, #btn-webhook.active, #btn-gerenciar.active { background: rgba(204,255,1,0.12); border-color: var(--primary); color: var(--primary); }
        .menu-btn.active { background: #1a1a1a; color: #fff; font-weight: bold; border-left: 3px solid var(--primary); }
        .menu-btn.admin-only { color: var(--purple); border: 1px dashed #444; margin-top: 20px; }
        .logout-btn { width: 100%; padding: 12px; background: rgba(255,77,77,0.05); border: 1px solid rgba(255,77,77,0.3); color: var(--danger); text-align: center; cursor: pointer; font-size: 13px; border-radius: 8px; transition: 0.3s; font-weight: bold; }
        .main { flex: 1; padding: 40px; overflow-y: auto; }
        .container { max-width: 100%; display: none; }
        .container.active { display: block; animation: fadeIn 0.3s ease; }
        .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
        .stats-grid-vendas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
        .stat-card { background: var(--card); padding: 20px; border-radius: 15px; border: 1px solid #333; text-align: center; }
        .stat-value { font-size: 42px; font-weight: 900; margin-top: 5px; }
        .stat-label { font-size: 12px; color: #666; text-transform: uppercase; font-weight: bold; }
        .card { background: var(--card); padding: 30px; border-radius: 20px; border: 1px solid #333; margin-bottom: 20px; }
        label { font-size: 11px; color: #666; font-weight: bold; text-transform: uppercase; display: block; margin-bottom: 5px; }
        input, select, textarea { width: 100%; padding: 14px; margin-bottom: 20px; background: #000; border: 1px solid #333; color: #fff; border-radius: 10px; outline: none; font-size: 16px; }
        button.primary { width: 100%; padding: 18px; background: var(--primary); color: #000; border: none; border-radius: 10px; font-weight: 900; cursor: pointer; text-transform: uppercase; transition: 0.3s; }
        button.primary:hover { background: #e6e6e6; transform: scale(1.01); }
        button.secondary { width: 100%; padding: 12px; background: #333; color: #fff; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; text-transform: uppercase; font-size: 12px; }
        table { width: 100%; border-collapse: collapse; }
        td, th { padding: 15px; border-bottom: 1px solid #222; text-align: left; }
        th { font-size: 11px; color: #555; text-transform: uppercase; }
        .badge { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; text-transform: uppercase; }
        .badge-admin { background: var(--purple); color: #000; }
        .badge-intermediario { background: #1a2a3a; border: 1px solid #3b82f6; color: #3b82f6; }
        .badge-enterprise { background: #1a1a2e; border: 1px solid #a855f7; color: #a855f7; }
        .badge-basico { background: #333; color: #ccc; }
        .hidden { display: none !important; }
        .copy-box { width: 100%; background: #000; color: #ccc; border: 1px solid #333; padding: 10px; border-radius: 10px; font-family: monospace; font-size: 13px; margin-bottom: 15px; }
        .modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; justify-content: center; align-items: center; z-index: 10000; }
        .modal-content { background: var(--card); border: 1px solid #444; padding: 30px; border-radius: 20px; width: 90%; max-width: 600px; position: relative; }
        .close-modal { position: absolute; top: 15px; right: 20px; font-size: 25px; cursor: pointer; color: #666; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
        .chart-wrapper { position: relative; height: 220px; }
        .toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
        .toast { padding: 14px 20px; border-radius: 10px; font-size: 13px; font-weight: bold; color: #fff; min-width: 250px; max-width: 350px; display: flex; align-items: center; gap: 10px; animation: slideIn 0.3s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
        .toast.success { background: #1a3a2a; border: 1px solid var(--success); }
        .toast.error { background: #3a1a1a; border: 1px solid var(--danger); }
        .toast.warning { background: #3a2e1a; border: 1px solid #f59e0b; }
        .toast-icon { font-size: 16px; }
        .toast-msg { flex: 1; }
        @keyframes slideIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
        @keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(50px); } }
        .confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: none; justify-content: center; align-items: center; z-index: 99998; }
        .confirm-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
        .confirm-box { background: rgba(22,22,22,0.96); border: 1px solid #2a2a2a; border-radius: 24px; padding: 40px 35px; max-width: 380px; width: 90%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.7); animation: popIn 0.25s cubic-bezier(0.34,1.56,0.64,1); }
        @keyframes popIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
        .confirm-icon { font-size: 44px; margin-bottom: 16px; }
        .confirm-title { font-size: 18px; font-weight: 900; margin-bottom: 8px; color: #fff; }
        .confirm-msg { font-size: 13px; color: #777; margin-bottom: 28px; line-height: 1.6; }
        .confirm-buttons { display: flex; gap: 10px; }
        .confirm-btn-cancel { flex: 1; padding: 13px; background: #1e1e1e; border: 1px solid #333; color: #888; border-radius: 12px; cursor: pointer; font-weight: bold; font-size: 13px; transition: 0.2s; }
        .confirm-btn-cancel:hover { background: #2a2a2a; color: #fff; }
        .confirm-btn-ok { flex: 1; padding: 13px; background: rgba(255,77,77,0.08); border: 1px solid var(--danger); color: var(--danger); border-radius: 12px; cursor: pointer; font-weight: bold; font-size: 13px; transition: 0.2s; }
        .confirm-btn-ok:hover { background: var(--danger); color: #fff; }
        .toggle-wrapper { display: flex; align-items: center; }
        .ios-toggle { position: relative; width: 44px; height: 26px; }
        .ios-toggle input { opacity: 0; width: 0; height: 0; }
        .ios-toggle .slider { position: absolute; inset: 0; background: #333; border-radius: 26px; cursor: pointer; transition: 0.3s; }
        .ios-toggle .slider:before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
        .ios-toggle input:checked + .slider { background: var(--success); }
        .ios-toggle input:checked + .slider:before { transform: translateX(18px); }

        .mobile-header { display: none; background: #000; border-bottom: 1px solid #222; padding: 0 20px; height: 56px; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
        .mobile-header-logo { height: 26px; object-fit: contain; }
        .mobile-header-center { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 900; color: var(--primary); letter-spacing: 2px; text-transform: uppercase; }
        .mobile-logout { background: none; border: none; color: #555; font-size: 18px; cursor: pointer; padding: 6px; display: flex; align-items: center; }
        .mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #000; border-top: 1px solid #222; z-index: 1000; padding: 8px 0 calc(16px + env(safe-area-inset-bottom)); }
        .mobile-nav-inner { display: flex; justify-content: space-around; align-items: center; }
        .mobile-nav-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; color: #555; cursor: pointer; padding: 6px 12px; border-radius: 10px; transition: 0.2s; flex: 1; }
        .mobile-nav-btn.active { color: var(--primary); }
        .mobile-nav-btn i { font-size: 20px; }
        .mobile-nav-btn span { font-size: 9px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
        .mobile-nav-btn.admin-nav { color: var(--purple); }
        .mobile-nav-btn.admin-nav.active { color: var(--purple); filter: brightness(1.3); }
        @media (max-width: 768px) {
            body { overflow: auto; }
            #dashboard { flex-direction: column; height: auto; min-height: 100vh; }
            .sidebar { display: none; }
            .mobile-header { display: flex; }
            .mobile-nav { display: block; }
            .mobile-header { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
            .main { padding: 16px 16px calc(95px + env(safe-area-inset-bottom)); overflow-y: visible; }
            .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
            .stats-grid-vendas { grid-template-columns: repeat(1, 1fr); gap: 10px; margin-bottom: 20px; }
            .stat-card { padding: 14px 8px; }
            .stat-value { font-size: 30px; }
            .stat-label { font-size: 11px; }
            .card { padding: 18px; border-radius: 16px; }
            table { font-size: 12px; }
            td, th { padding: 10px 8px; }
            .hide-mobile { display: none; }
            .auth-card { padding: 30px 24px; margin: 16px; }
            .toast-container { top: auto; bottom: 90px; right: 12px; left: 12px; }
            .toast { min-width: unset; max-width: 100%; }
            .chart-wrapper { height: 180px; }
            .graficos-grid { grid-template-columns: 1fr !important; }
            .auth-left { display: none !important; }
            .auth-divider { display: none !important; }
            .auth-right { width: 100% !important; background: #0a0a0a !important; align-items: center !important; justify-content: center !important; padding: 40px 24px !important; }
            .auth-right > div { background: #161616 !important; border-radius: 20px !important; padding: 36px 28px !important; box-shadow: 0 8px 40px rgba(0,0,0,0.6) !important; }
            .auth-desktop-header { display: none !important; }
            .auth-mobile-logo { display: flex !important; }
            .suporte-grid { grid-template-columns: 1fr !important; }
            .graficos-grid > .card { min-width: 0; width: 100%; }
        }

        .onboarding-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: none; justify-content: center; align-items: center; z-index: 99999; padding: 20px; }
        .onboarding-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
        .onboarding-box { background: #111; border: 1px solid #2a2a2a; border-radius: 28px; padding: 40px 35px; max-width: 480px; width: 100%; box-shadow: 0 40px 100px rgba(0,0,0,0.8); animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1); }
        .onboarding-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 32px; }
        .onboarding-step-dot { width: 8px; height: 8px; border-radius: 50%; background: #333; transition: 0.3s; }
        .onboarding-step-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }
        .onboarding-step-dot.done { background: var(--success); }
        .onboarding-icon { font-size: 52px; text-align: center; margin-bottom: 16px; }
        .onboarding-title { font-size: 22px; font-weight: 900; color: #fff; text-align: center; margin-bottom: 10px; }
        .onboarding-desc { font-size: 14px; color: #777; text-align: center; line-height: 1.7; margin-bottom: 28px; }
        .onboarding-desc code { background: #1e1e1e; color: var(--primary); padding: 2px 7px; border-radius: 5px; font-size: 13px; }
        .onboarding-desc b { color: #ccc; }
        .onboarding-buttons { display: flex; gap: 10px; }
        .onboarding-btn-skip { flex: 1; padding: 13px; background: none; border: 1px solid #2a2a2a; color: #555; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: bold; transition: 0.2s; }
        .onboarding-btn-skip:hover { color: #888; border-color: #444; }
        .onboarding-btn-next { flex: 2; padding: 13px; background: var(--primary); color: #000; border: none; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 900; transition: 0.2s; }
        .onboarding-btn-next:hover { background: #e6e6e6; }
        @media (max-width: 768px) { .onboarding-box { padding: 30px 24px; } }

        .faq-item { border:1px solid #222; border-radius:12px; margin-bottom:10px; overflow:hidden; transition:0.2s; }
        .faq-item:hover { border-color:#333; }
        .faq-pergunta { width:100%; background:none; border:none; color:#fff; text-align:left; padding:16px 20px; font-size:14px; font-weight:bold; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:12px; }
        .faq-pergunta i { color:#555; font-size:12px; transition:0.3s; flex-shrink:0; }
        .faq-item.open .faq-pergunta i { transform:rotate(180deg); color:#aaa; }
        .faq-resposta { display:none; padding:0 20px 16px; color:#777; font-size:13px; line-height:1.7; }
        .faq-item.open .faq-resposta { display:block; animation:fadeIn 0.2s ease; }
