 /* --- CORES --- */
:root[data-theme="dark"] {
    /* Fundos: Azul bem escuro, quase preto, para profundidade */
    --bg-body: #0b0c15; 
    --bg-panel: #151925; 
    --bg-header: rgba(21, 25, 37, 0.85); /* Mais transparência para efeito glass */
    --bg-hover: rgba(255, 255, 255, 0.05); /* Hover sutil */

    /* Textos: Branco sujo para leitura e azul para destaques */
    --text-main: #e2e8f0; /* Branco gelo (muito melhor para leitura que o azul neon) */
    --text-sec: #94a3b8;  /* Cinza azulado */

    /* Elementos de UI */
    --border: rgba(255, 255, 255, 0.08);
    --accent: #00f2ff;   /* Ciano Neon (Mantido, bom para dark) */
    --primary: #6366f1;  /* Índigo vibrante */

    /* Status */
    --success: #10b981;  /* Verde Esmeralda */
    --danger: #ef4444;   /* Vermelho Suave */
    --warning: #f59e0b;  /* Laranja/Ouro (Melhor que o bege anterior) */
    
    /* Específicos do seu sistema */
    --tsu-color: #d946ef; 
    --tsu-bg: rgba(217, 70, 239, 0.15);
}

:root[data-theme="light"] {
    /* Fundos: Branco e cinza muito claro */
    --bg-body: #f8fafc; 
    --bg-panel: #ffffff; 
    --bg-header: rgba(255, 255, 255, 0.90);
    --bg-hover: #f1f5f9; /* Cinza bem clarinho no hover */

    /* Textos: Alto contraste */
    --text-main: #0f172a; /* Azul marinho quase preto */
    --text-sec: #64748b;  /* Cinza médio */

    /* Elementos de UI */
    --border: #e2e8f0;    /* Cinza sutil (O anterior estava azul demais) */
    --accent: #2563eb;    /* Azul Royal (O anterior estava cinza/desativado) */
    --primary: #4f46e5;   /* Índigo */

    /* Status */
    --success: #059669;   /* Verde mais escuro para ler no fundo branco */
    --warning: #d97706;   /* Ouro escuro (para ler no fundo branco) */
    --danger: #dc2626;    /* Vermelho forte */
    
    /* Específicos do seu sistema */
    --tsu-color: #a21caf; 
    --tsu-bg: #fae8ff;    /* Roxo bem clarinho, não escuro */
}
        /* --- RESET --- */
        * { box-sizing: border-box; }
        html { width: 100vw; overflow-x: hidden; }
        body {
            background-color: var(--bg-body); color: var(--text-main);
            font-family: 'Inter', sans-serif; width: 100%; max-width: 100vw;
            overflow-x: hidden !important; transition: 0.3s;
        }
        h1, h2, h3, h4, h5, h6 { color: var(--text-main); margin: 0; }
        .text-muted { color: var(--text-sec) !important; }
        .font-tech { font-family: 'Rajdhani', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; }

        /* --- LAYOUT --- */
        .sidebar {
            width: 260px; background: var(--bg-panel); height: 100vh;
            position: fixed; left: 0; top: 0; border-right: 1px solid var(--border);
            z-index: 2000; transition: transform 0.3s ease; display: flex; flex-direction: column;
        }
        .sidebar-brand {
            height: 70px; display: flex; align-items: center; justify-content: center;
            font-size: 1.6rem; font-weight: 700; color: var(--accent);
            border-bottom: 1px solid var(--border);
            background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.05), transparent);
        }
        .nav-link {
            display: flex; align-items: center; padding: 16px 24px;
            color: var(--text-sec); text-decoration: none; transition: 0.2s;
            font-weight: 500; border-left: 3px solid transparent;
        }
        .nav-link:hover, .nav-link.active { background: var(--bg-hover); color: var(--accent); border-left-color: var(--accent); }
        .nav-link i { width: 24px; margin-right: 12px; font-size: 1.1rem; text-align: center; }

        .topbar {
            height: 70px; background: var(--bg-header); backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border); position: fixed; top: 0; right: 0; left: 260px;
            z-index: 1000; display: flex; align-items: center; justify-content: space-between;
            padding: 0 20px; transition: left 0.3s ease; width: auto;
        }
        .header-actions { display: flex; align-items: center; gap: 10px; height: 100%; }
        
        .header-control {
            height: 38px; border-radius: 10px; border: 1px solid var(--border);
            background: var(--bg-panel); color: var(--text-sec); font-size: 0.9rem; font-weight: 600;
            cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center;
        }
        .header-control:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-hover); }
        button.header-control { width: 40px; padding: 0; }
        select.header-control {
            padding: 0 30px 0 12px; appearance: none; -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 10px center; width: auto; min-width: 60px; display: block;
        }
        select.header-control option { background-color: var(--bg-panel); color: var(--text-main); }

        .avatar-circle {
            width: 38px; height: 38px; background: linear-gradient(135deg, var(--primary), var(--accent));
            color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            font-weight: bold; flex-shrink: 0; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        }
        .user-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px; border-radius: 30px; }
        .dropdown-menu { background: var(--bg-panel); border-color: var(--border); margin-top: 10px; z-index: 1060; }
        .dropdown-item { color: var(--text-sec); padding: 8px 20px; }
        .dropdown-item:hover { background: var(--bg-hover); color: var(--text-main); }

        .main-content { margin-top: 70px; margin-left: 260px; padding: 25px; transition: margin-left 0.3s ease; width: auto; }

        /* CARDS */
        .stat-card {
            background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
            height: 100%; position: relative; overflow: hidden; color: var(--text-main);
            transition: transform 0.2s; display: flex; flex-direction: column; justify-content: space-between;
        }
        .stat-card:hover { transform: translateY(-3px); border-color: var(--accent); }
        .stat-header { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; }
        .stat-icon-box { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
        
        .card-diamonds .stat-icon-box { background: rgba(0, 242, 255, 0.1); color: var(--accent); }
        .card-coins .stat-icon-box { background: rgba(255, 183, 77, 0.1); color: var(--warning); }
        .card-energy .stat-icon-box { background: rgba(0, 230, 118, 0.1); color: var(--success); }
        .card-machines .stat-icon-box { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
        .card-tsucoin .stat-icon-box { background: var(--tsu-bg); color: var(--tsu-color); }
        .card-tsucoin .stat-card { border-color: rgba(217, 70, 239, 0.3); }

        .stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin-top: 5px; word-break: break-all; }
        .progress-slim { height: 6px; background: var(--bg-body); border-radius: 3px; margin-top: 10px; width: 100%; }
        .progress-fill { height: 100%; border-radius: 3px; }

        .control-panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 20px; padding: 25px; color: var(--text-main); height: 100%; }
        .btn-pulse {
            background: linear-gradient(135deg, var(--primary), var(--accent)); color: #000; font-weight: 700; border: none;
            padding: 12px; border-radius: 50px; text-transform: uppercase; letter-spacing: 1px;
            animation: pulse-cyan 2s infinite; transition: 0.3s; width: 100%;
        }
        @keyframes pulse-cyan { 0% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(0, 242, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0); } }

        .trader-widget {
            background: linear-gradient(135deg, rgba(217, 70, 239, 0.1), rgba(79, 70, 229, 0.1));
            border: 1px solid var(--border); border-left: 3px solid var(--tsu-color);
            border-radius: 16px; padding: 20px; margin-bottom: 20px; position: relative;
        }
        .btn-trader {
            background: linear-gradient(45deg, #a21caf, #d946ef); color: white; border: none; font-weight: 700;
            width: 100%; padding: 10px; border-radius: 8px; text-transform: uppercase; letter-spacing: 1px;
            transition: 0.3s; box-shadow: 0 4px 15px rgba(217, 70, 239, 0.3);
        }
        .invested-value { font-family: 'Rajdhani', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--text-main); }

        .btn-toggle-sidebar { background: none; border: none; color: var(--text-main); font-size: 1.4rem; display: none; padding: 0; }

        @media (max-width: 991px) {
            .sidebar { transform: translateX(-100%); box-shadow: 5px 0 15px rgba(0,0,0,0.5); z-index: 1060; }
            .sidebar.show { transform: translateX(0); }
            .main-content { margin-left: 0 !important; width: 100% !important; padding: 15px; }
            .topbar { left: 0 !important; width: 100% !important; padding: 0 15px; }
            .btn-toggle-sidebar { display: block; margin-right: 10px; }
            .header-control { height: 36px; padding: 0 8px; font-size: 0.8rem; }
            button.header-control { width: 36px; }
            select.header-control { min-width: 60px; padding-right: 25px; }
            .header-actions { gap: 8px; }
            .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1055; backdrop-filter: blur(4px); }
            .sidebar-overlay.show { display: block; }
            .stat-card { padding: 15px; }
            .stat-value { font-size: 1.3rem; }
        }



        /* --- INPUTS --- */
        .form-label { font-size: 0.85rem; color: var(--text-sec); margin-bottom: 8px; font-weight: 500; }
        .form-control, .form-select {
            background-color: var(--input-bg) !important;
            border: 1px solid var(--border);
            color: var(--text-main) !important;
            border-radius: 10px; padding: 12px; font-size: 1rem;
        }
        .form-control:focus, .form-select:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.2);
        }
        .form-control::placeholder { color: var(--text-sec); opacity: 0.5; }



         /* --- CONTENT --- */
        .main-content { margin-top: 70px; margin-left: 260px; padding: 25px; transition: margin-left 0.3s ease; }

        .dep-card {
            background: var(--bg-panel); border: 1px solid var(--border);
            border-radius: 16px; padding: 25px; margin-bottom: 20px;
        }

        /* CARD DE SALDO */
        .balance-card {
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(0, 242, 255, 0.1));
            border: 1px solid var(--accent);
            border-radius: 16px; padding: 20px; margin-bottom: 20px;
            display: flex; justify-content: space-between; align-items: center;
        }
        .balance-badge {
            background: rgba(0,0,0,0.3); border: 1px solid var(--border);
            color: var(--text-sec); padding: 5px 10px; border-radius: 20px; font-size: 0.8rem;
        }

        /* Tabs */
        .nav-pills { background: rgba(0,0,0,0.2); padding: 5px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 25px; }
        .nav-link { border-radius: 8px; color: var(--text-sec); font-weight: 600; padding: 12px; text-align: center; width: 100%; border-left: none; }
        .nav-item { flex: 1; text-align: center; }
        .nav-link.active { background: var(--primary); color: #fff; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4); }

        .btn-deposit { 
            width: 100%; padding: 14px; border-radius: 12px; border: none; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
            background: linear-gradient(135deg, var(--primary), var(--accent)); color: #000; margin-top: 15px; transition: 0.3s;
        }
        .btn-deposit:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0, 242, 255, 0.4); }

        /* INFO BOX (Resumo) */
        .summary-box {
            background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
            border-radius: 12px; padding: 15px; margin-bottom: 20px; font-size: 0.9rem;
        }
        .summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
        .summary-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

        /* Histórico */
        .history-scroll-container { max-height: 500px; overflow-y: auto; padding-right: 5px; }
        .history-scroll-container::-webkit-scrollbar { width: 5px; }
        .history-scroll-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

        .table-custom { width: 100%; border-collapse: collapse; }
        .table-custom th { 
            text-align: left; color: var(--text-sec); font-size: 0.75rem; text-transform: uppercase; 
            padding: 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-panel); z-index: 2;
        }
        .table-custom td { padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-main); }
        
        .status-badge { padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
        .status-completed { background: rgba(0, 230, 118, 0.15); color: var(--success); }
        .status-waiting { background: rgba(255, 183, 77, 0.15); color: var(--warning); }
        .status-failed { background: rgba(255, 82, 82, 0.15); color: var(--danger); }

        @media (max-width: 991px) {
            .sidebar { transform: translateX(-100%); box-shadow: 5px 0 15px rgba(0,0,0,0.5); z-index: 1060; }
            .sidebar.show { transform: translateX(0); }
            .main-content { margin-left: 0; padding: 15px; }
            .topbar { left: 0; padding: 0 15px; }
            .btn-toggle-sidebar { display: block; margin-right: 10px; }
            .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1055; }
            .sidebar-overlay.show { display: block; }
        }


        /* CARD DE SALDO (Estilo Diferenciado para Saque) */
        .balance-card {
            background: linear-gradient(135deg, rgba(255, 82, 82, 0.1), rgba(255, 167, 38, 0.1));
            border: 1px solid var(--accent);
            border-radius: 16px; padding: 20px; margin-bottom: 20px;
            display: flex; justify-content: space-between; align-items: center;
        }
        .balance-badge {
            background: rgba(0,0,0,0.3); border: 1px solid var(--border);
            color: var(--text-sec); padding: 5px 10px; border-radius: 20px; font-size: 0.8rem;
        }

        /* Tabs */
        .nav-pills { background: rgba(0,0,0,0.2); padding: 5px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 25px; }
        .nav-link-pill { border-radius: 8px; color: var(--text-sec); font-weight: 600; padding: 12px; text-align: center; width: 100%; border:none; background: none; }
        .nav-item { flex: 1; text-align: center; }
        .nav-link-pill.active { background: var(--accent); color: #fff; box-shadow: 0 4px 15px rgba(255, 82, 82, 0.4); }

        .btn-withdraw { 
            width: 100%; padding: 14px; border-radius: 12px; border: none; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
            background: linear-gradient(135deg, var(--accent), #f1e7e4); color: #fff; margin-top: 15px; transition: 0.3s;
        }
        .btn-withdraw:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(255, 82, 82, 0.4); }


        
        /* INFO BOX (Resumo) */
        .summary-box {
            background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
            border-radius: 12px; padding: 15px; margin-bottom: 20px; font-size: 0.9rem;
        }
        .summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
        .summary-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

        /* Histórico */
        .history-scroll-container { max-height: 500px; overflow-y: auto; padding-right: 5px; }
        .history-scroll-container::-webkit-scrollbar { width: 5px; }
        .history-scroll-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

        .table-custom { width: 100%; border-collapse: collapse; }
        .table-custom th { 
            text-align: left; color: var(--text-sec); font-size: 0.75rem; text-transform: uppercase; 
            padding: 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-panel); z-index: 2;
        }
        .table-custom td { padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-main); }
        
        .status-badge { padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
        .status-Completed { background: rgba(0, 230, 118, 0.15); color: var(--success); }
        .status-Failed { background: rgba(255, 82, 82, 0.15); color: var(--danger); }

        /* Overlay e Mobile */
        .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1055; opacity: 0; transition: opacity 0.3s; }
        .sidebar-overlay.show { display: block; opacity: 1; }

        @media (max-width: 991px) {
            .sidebar { transform: translateX(-100%); box-shadow: 5px 0 15px rgba(0,0,0,0.5); z-index: 1060; }
            .sidebar.show { transform: translateX(0); }
            .main-content { margin-left: 0; padding: 15px; }
            .topbar { left: 0; padding: 0 15px; }
            .btn-toggle-sidebar { display: block; margin-right: 10px; }
        }



        /* Balance Card */
        .balance-card {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
            border: 1px solid var(--accent);
            border-radius: 16px; padding: 20px; margin-bottom: 30px;
            display: flex; justify-content: space-between; align-items: center;
        }

        /* GRID DA LOJA */
        .shop-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }

        .machine-card {
            background: var(--bg-panel);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            transition: transform 0.2s, box-shadow 0.2s;
            display: flex; flex-direction: column;
        }
        .machine-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
            border-color: var(--accent);
        }

        .machine-img {
            width: 100%; height: 160px; object-fit: cover;
            background: #000; border-bottom: 1px solid var(--border);
        }
        
        .machine-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
        
        .machine-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 5px; }
        .machine-rate { font-size: 0.85rem; color: var(--text-sec); margin-bottom: 15px; }
        
        .machine-stats {
            display: flex; justify-content: space-between; margin-bottom: 15px;
            background: rgba(255,255,255,0.03); padding: 10px; border-radius: 8px; border: 1px solid var(--border);
        }
        .stat-item { text-align: center; }
        .stat-label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-sec); display: block; }
        .stat-value { font-weight: 700; color: var(--text-main); font-family: 'Rajdhani'; font-size: 1rem; }

        .machine-price {
            font-size: 1.4rem; font-weight: 700; color: var(--accent); 
            text-align: center; margin-bottom: 15px; font-family: 'Rajdhani';
        }

        .btn-buy {
            width: 100%; padding: 12px; border: none; border-radius: 10px;
            background: var(--accent); color: #000; font-weight: 700; text-transform: uppercase;
            transition: 0.2s; margin-top: auto;
        }
        .btn-buy:hover { filter: brightness(1.1); box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
        .btn-buy:disabled { background: var(--border); color: var(--text-sec); cursor: not-allowed; box-shadow: none; filter: none; }

        /* Overlay Mobile */
        .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1055; }
        .sidebar-overlay.show { display: block; }

        @media (max-width: 991px) {
            .sidebar { transform: translateX(-100%); box-shadow: 5px 0 15px rgba(0,0,0,0.5); z-index: 1060; }
            .sidebar.show { transform: translateX(0); }
            .main-content { margin-left: 0; padding: 15px; }
            .topbar { left: 0; padding: 0 15px; }
            .btn-toggle-sidebar { display: block; margin-right: 10px; }
        }






        /* --- ICONS GLOW EFFECT --- */
        .icon-glow-accent { color: var(--accent); filter: drop-shadow(0 0 5px var(--accent-glow)); }
        .icon-glow-gold { color: var(--gold); filter: drop-shadow(0 0 5px var(--gold-glow)); }
        .icon-glow-red { color: var(--red); filter: drop-shadow(0 0 5px var(--red-glow)); }

        
        /* STATUS BAR */
        .status-bar { display: flex; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
        .status-item {
            background: var(--bg-panel); border: 1px solid var(--border);
            border-radius: 16px; padding: 20px; flex: 1; min-width: 200px;
            display: flex; align-items: center; justify-content: space-between;
            position: relative; overflow: hidden;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        }
        
        .status-item.coins { border-bottom: 2px solid var(--gold); }
        .status-item.resources { border-bottom: 2px solid var(--accent); }
        .status-item.diamonds { border-bottom: 2px solid var(--red); }

        .status-label { font-size: 0.85rem; color: var(--text-sec); text-transform: uppercase; display: block; font-weight: 700; letter-spacing: 1px; }
        .status-val { font-family: 'Rajdhani'; font-weight: 700; font-size: 1.6rem; color: var(--text-main); margin-top: 5px; display: block;}
        
        .status-icon { 
            font-size: 2.5rem; opacity: 0.8; position: relative; z-index: 1;
        }
        .status-icon.gold { color: var(--gold); filter: drop-shadow(0 0 10px var(--gold-glow)); }
        .status-icon.cyan { color: var(--accent); filter: drop-shadow(0 0 10px var(--accent-glow)); }
        .status-icon.red { color: var(--red); filter: drop-shadow(0 0 10px var(--red-glow)); }

        /* BOTÃO CRIAR (Estilo Corpo) */
        .action-bar {
            display: flex; justify-content: flex-end; margin-bottom: 20px;
        }
        .btn-create-quest {
            background: linear-gradient(135deg, var(--accent), #3b82f6);
            color: #fff; padding: 10px 20px; border-radius: 10px; text-decoration: none;
            font-weight: 700; display: flex; align-items: center; gap: 10px;
            box-shadow: 0 4px 15px var(--accent-glow); transition: 0.3s;
        }
        .btn-create-quest:hover { transform: translateY(-3px); box-shadow: 0 8px 25px var(--accent-glow); color: #fff; }

        /* GRID */
        .quest-grid {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px;
        }

        .quest-card {
            background: var(--bg-panel); border: 1px solid var(--border);
            border-radius: 16px; padding: 25px; position: relative;
            overflow: visible; transition: all 0.3s ease;
            display: flex; flex-direction: column;
        }
        
        .quest-card:hover { 
            transform: translateY(-5px); border-color: var(--accent); 
            box-shadow: 0 10px 30px -10px var(--accent-glow);
        }
        
        .quest-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
        .quest-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin: 0; line-height: 1.4; }
        
        .quest-reward { 
            background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
            color: var(--text-main); padding: 6px 12px; border-radius: 8px; 
            font-size: 0.9rem; font-weight: 700; white-space: nowrap;
            display: flex; align-items: center; gap: 8px;
        }
        .quest-reward i { font-size: 1rem; }

        .timer-box {
            background: var(--input-bg); border-radius: 12px; padding: 15px; margin-bottom: 20px;
            text-align: center; border: 1px solid var(--border);
        }
        .timer-val { font-family: 'Rajdhani'; font-weight: 700; font-size: 1.6rem; color: var(--text-main); text-shadow: 0 0 10px rgba(255,255,255,0.2); }
        .timer-lbl { font-size: 0.75rem; color: var(--text-sec); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }

        .btn-quest {
            width: 100%; padding: 14px; border-radius: 12px; border: none;
            background: var(--accent); color: #000; font-weight: 800; text-transform: uppercase;
            transition: 0.3s; margin-top: auto; letter-spacing: 1px;
            box-shadow: 0 4px 15px var(--accent-glow);
        }
        .btn-quest:hover { filter: brightness(1.2); transform: scale(1.02); }
        .btn-quest:disabled { 
            background: var(--input-bg); color: var(--text-sec); 
            cursor: not-allowed; box-shadow: none; filter: none; transform: none;
            border: 1px solid var(--border);
        }
        .btn-quest.completed { 
            background: transparent; color: var(--success); border: 2px solid var(--success); 
            box-shadow: 0 0 10px rgba(74, 222, 128, 0.2);
        }

        .cooldown-overlay {
            position: absolute; inset: 0; background: rgba(9, 9, 11, 0.9); backdrop-filter: blur(5px);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            border-radius: 16px; z-index: 10; border: 1px solid var(--border);
        }
        .cooldown-text { color: var(--success); font-weight: 800; margin-top: 15px; font-size: 1.2rem; letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }

        /* Overlay Mobile */
        .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1055; }
        .sidebar-overlay.show { display: block; }

        @media (max-width: 991px) {
            .sidebar { transform: translateX(-100%); }
            .sidebar.show { transform: translateX(0); }
            .main-content { margin-left: 0; padding: 20px; }
            .topbar { left: 0; padding: 0 20px; }
            .btn-toggle-sidebar { display: block; margin-right: 15px; }
        }







         /* Balance Card */
        .balance-card {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(67, 56, 202, 0.1));
            border: 1px solid var(--accent);
            border-radius: 16px; padding: 20px; margin-bottom: 30px;
            display: flex; justify-content: space-between; align-items: center;
        }

        /* GRID DO MERCADO */
        .market-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }

        .market-card {
            background: var(--bg-panel);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            transition: transform 0.2s, box-shadow 0.2s;
            display: flex; flex-direction: column;
            position: relative;
        }
        .market-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
            border-color: var(--accent);
        }

        .user-tag {
            position: absolute; top: 10px; right: 10px;
            background: rgba(0,0,0,0.6); padding: 4px 8px; border-radius: 4px;
            font-size: 0.7rem; color: #fff; backdrop-filter: blur(4px);
        }

        .market-img {
            width: 100%; height: 160px; object-fit: cover;
            background: #000; border-bottom: 1px solid var(--border);
        }
        
        .market-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
        
        .market-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 5px; }
        .market-rate { font-size: 0.85rem; color: var(--text-sec); margin-bottom: 15px; }
        
        .market-price {
            font-size: 1.3rem; font-weight: 700; color: var(--accent); 
            margin-bottom: 15px; font-family: 'Rajdhani'; display: flex; align-items: center; gap: 5px;
        }

        .btn-buy {
            width: 100%; padding: 10px; border: none; border-radius: 10px;
            background: var(--accent); color: #fff; font-weight: 600; text-transform: uppercase;
            transition: 0.2s; margin-top: auto; font-size: 0.9rem;
        }
        .btn-buy:hover { filter: brightness(1.1); box-shadow: 0 0 15px rgba(139, 92, 246, 0.4); }
        .btn-buy:disabled { background: var(--border); color: var(--text-sec); cursor: not-allowed; }

        /* Overlay Mobile */
        .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1055; }
        .sidebar-overlay.show { display: block; }

        @media (max-width: 991px) {
            .sidebar { transform: translateX(-100%); box-shadow: 5px 0 15px rgba(0,0,0,0.5); z-index: 1060; }
            .sidebar.show { transform: translateX(0); }
            .main-content { margin-left: 0; padding: 15px; }
            .topbar { left: 0; padding: 0 15px; }
            .btn-toggle-sidebar { display: block; margin-right: 10px; }
        }


         /* --- STATUS BAR (HUD) --- */
        .status-bar { display: flex; gap: 25px; margin-bottom: 35px; flex-wrap: wrap; }
        .status-item {
            border-radius: 16px; padding: 25px; flex: 1; min-width: 220px;
            display: flex; align-items: center; justify-content: space-between;
            position: relative; overflow: hidden; transition: 0.3s;
            border: 1px solid var(--border); background: var(--bg-panel);
        }
        /* Ajuste de legibilidade nos labels */
        .status-label { font-size: 0.85rem; color: var(--text-sec); text-transform: uppercase; font-weight: 600; letter-spacing: 1.2px; position: relative; z-index: 1; }
        .status-val { font-family: 'Rajdhani'; font-weight: 700; font-size: 1.8rem; color: var(--text-main); display: block; margin-top: 8px; position: relative; z-index: 1; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
        .status-icon { font-size: 3rem; opacity: 0.9; position: relative; z-index: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); }
        
        .status-blue { border-bottom: 3px solid var(--blue); } .status-blue .status-icon { color: var(--blue); filter: drop-shadow(0 0 15px var(--blue-glow)); }
        .status-gold { border-bottom: 3px solid var(--gold); } .status-gold .status-icon { color: var(--gold); filter: drop-shadow(0 0 15px var(--gold-glow)); }
        .status-emerald { border-bottom: 3px solid var(--accent); } .status-emerald .status-icon { color: var(--accent); filter: drop-shadow(0 0 15px var(--accent-glow)); }

        /* --- EXCHANGE CARDS --- */
        .exchange-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 25px; margin-bottom: 35px; }
        .exchange-card {
            border-radius: 20px; padding: 35px 30px; text-align: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden;
        }
        .exchange-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -15px rgba(0,0,0,0.6); }
        .exchange-card.blue-glow:hover { border-color: var(--blue); }
        .exchange-card.gold-glow:hover { border-color: var(--gold); }

        /* Ajuste de legibilidade na badge */
        .rate-badge {
            background: rgba(0,0,0,0.4); border: 1px solid var(--border); 
            /* Texto branco para contraste máximo */
            color: #1a7dee; 
            padding: 8px 18px; border-radius: 30px; font-size: 0.9rem; font-weight: 600;
            margin-bottom: 25px; display: inline-block;
        }

        .conversion-path { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 30px 0; position: relative; }
        .conversion-line { position: absolute; height: 2px; background: var(--border); width: 60%; top: 50%; left: 20%; z-index: 0; opacity: 0.5; }
        .exchange-icon-box {
            width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            font-size: 2.5rem; position: relative; z-index: 1; background: var(--bg-panel); border: 1px solid var(--border);
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        }
        .icon-blue { color: var(--blue); filter: drop-shadow(0 0 10px var(--blue-glow)); }
        .icon-gold { color: var(--gold); filter: drop-shadow(0 0 10px var(--gold-glow)); }
        .icon-emerald { color: var(--accent); filter: drop-shadow(0 0 10px var(--accent-glow)); }
        .exchange-arrow-box { width: 40px; height: 40px; border-radius: 50%; background: var(--input-bg); display: flex; align-items: center; justify-content: center; color: var(--text-sec); font-size: 1rem; z-index: 2; border: 1px solid var(--border); }

        /* Ajuste de legibilidade na descrição */
        .exchange-card p.text-muted { color: var(--text-sec) !important; opacity: 0.9; font-size: 0.95rem; }

        .btn-exchange { width: 100%; padding: 14px; border-radius: 12px; border: none; font-weight: 700; text-transform: uppercase; margin-top: 25px; transition: 0.3s; letter-spacing: 1px; color: #67ce14; position: relative; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
        .btn-resources { background: linear-gradient(135deg, var(--blue), #1e40af); box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4); }
        .btn-coins { background: linear-gradient(135deg, var(--gold), #f3ceb1); box-shadow: 0 4px 20px rgba(217, 119, 6, 0.4); }
        .btn-exchange:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
        .btn-exchange:disabled { background: var(--input-bg); color: var(--text-sec); cursor: not-allowed; box-shadow: none; transform: none; filter: none; border: 1px solid var(--border); text-shadow: none; opacity: 0.7; }

        
        /* Glassmorphism Base - Blur aumentado para melhor difusão */
        .glass-panel {
            background: var(--bg-panel);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border);
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        }



        
        
        /* --- HISTORY LOG --- */
        .history-card { border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
        .history-header { padding: 20px 25px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.3); }
        .history-header h6 { color: var(--text-main) !important; }
        .history-header i { color: var(--text-sec); }
        .history-body { max-height: 450px; overflow-y: auto; }
        .table-custom { width: 100%; border-collapse: separate; border-spacing: 0; }
        /* Cabeçalhos mais claros */
        .table-custom th { 
            text-align: left; color: var(--text-sec); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
            padding: 18px 25px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-panel); z-index: 10; backdrop-filter: blur(16px);
        }
        .table-custom td { padding: 18px 25px; border-bottom: 1px solid var(--border); color: var(--text-main); font-size: 0.95rem; vertical-align: middle; }
        .table-custom tr:last-child td { border-bottom: none; }
        .table-custom tr:hover td { background: rgba(255,255,255,0.03); }

        .badge-tech { padding: 6px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
        .badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
        .badge-gold { background: rgba(251, 191, 36, 0.2); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.4); }
        .gain-val { font-family: 'Rajdhani'; font-weight: 700; font-size: 1.1rem; color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

        /* Overlay & Responsive */
        .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1055; backdrop-filter: blur(5px); }
        .sidebar-overlay.show { display: block; }
        @media (max-width: 991px) { .sidebar { transform: translateX(-100%); } .sidebar.show { transform: translateX(0); } .main-content { margin-left: 0; padding: 20px; } .topbar { left: 0; padding: 0 20px; } .btn-toggle-sidebar { display: block; margin-right: 15px; } .status-bar { gap: 15px; } .status-item { padding: 20px; } .status-val { font-size: 1.5rem; } .status-icon { font-size: 2.2rem; } }



         /* --- FORMULÁRIO (Inputs Corrigidos) --- */
       
        .create-card {
            background: var(--bg-panel); border: 1px solid var(--border);
            border-radius: 16px; padding: 30px; max-width: 800px; margin: 0 auto;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }

        .form-label { font-size: 0.9rem; color: var(--text-sec); margin-bottom: 8px; font-weight: 600; }
        
        .form-control, .form-select {
            background-color: var(--input-bg) !important;
            border: 1px solid var(--border);
            color: var(--text-main) !important;
            border-radius: 10px; padding: 12px; font-size: 1rem;
            transition: 0.3s;
        }
        
        /* CORREÇÃO DO PLACEHOLDER */
        .form-control::placeholder {
            color: var(--placeholder-color) !important;
            opacity: 1 !important; /* Força visibilidade total */
            font-weight: 400;
        }
        
        /* Fallback para navegadores Webkit/Edge */
        ::-webkit-input-placeholder {
            color: var(--placeholder-color) !important;
            opacity: 1 !important;
        }

        .form-control:focus, .form-select:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

        .package-info {
            background: rgba(6, 182, 212, 0.05); border: 1px solid var(--accent);
            border-radius: 10px; padding: 15px; margin-bottom: 20px; display: none;
        }
        .package-info.active { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
        
        .info-item { text-align: center; flex: 1; }
        .info-label { display: block; font-size: 0.75rem; color: var(--text-sec); text-transform: uppercase; }
        .info-val { font-family: 'Rajdhani'; font-weight: 700; font-size: 1.2rem; color: var(--text-main); }

        .btn-submit {
            width: 100%; padding: 14px; border-radius: 10px; border: none;
            background: var(--primary-btn); color: #fff; font-weight: 700; text-transform: uppercase;
            transition: 0.3s; letter-spacing: 1px; font-size: 1rem;
            box-shadow: 0 4px 15px var(--accent-glow);
        }
        .btn-submit:hover { filter: brightness(1.2); transform: translateY(-2px); }

        /* Overlay Mobile */
        .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1055; }
        .sidebar-overlay.show { display: block; }

        @media (max-width: 991px) {
            .sidebar { transform: translateX(-100%); }
            .sidebar.show { transform: translateX(0); }
            .main-content { margin-left: 0; padding: 20px; }
            .topbar { left: 0; padding: 0 20px; }
            .btn-toggle-sidebar { display: block; margin-right: 15px; }
        }