:root {
            --bg-color: #0b0f19;
            --card-bg: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
            --accent: #38bdf8;
            --accent-green: #22c55e;
            --accent-red: #ef4444;
            --accent-amber: #f59e0b;
            --text: #f8fafc;
            --text-muted: #94a3b8;
            --border: rgba(255, 255, 255, 0.08);
            --border-hover: rgba(56, 189, 248, 0.3);
        }
        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif; }
        body { background-color: var(--bg-color); color: var(--text); padding: 1.5rem 1rem; min-height: 100vh; }
        
        .container { max-width: 1400px; margin: 0 auto; }

        /* Header Layout */
        .header { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
        @media (min-width: 768px) {
            .header { flex-direction: row; justify-content: space-between; align-items: center; }
        }
        .title-badge { display: inline-block; background: rgba(56, 189, 248, 0.15); color: var(--accent); font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 20px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.3rem; border: 1px solid rgba(56, 189, 248, 0.2); }
        .title h1 { font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
        .title p { color: var(--text-muted); font-size: 0.85rem; }
        
        .action-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
        .btn { background: rgba(30, 41, 59, 0.8); color: var(--text); padding: 0.42rem 0.75rem; border-radius: 7px; font-weight: 600; text-decoration: none; border: 1px solid var(--border); transition: all 0.2s ease; cursor: pointer; font-size: 0.78rem; display: inline-flex; align-items: center; gap: 0.35rem; backdrop-filter: blur(8px); }
        .btn:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.1); transform: translateY(-1px); }
        .btn-primary { background: var(--accent); color: #090d16; font-weight: 700; border: none; }
        .btn-primary:hover { background: #7dd3fc; color: #000; }
        .btn-amber { background: rgba(245, 158, 11, 0.2); color: var(--accent-amber); border-color: rgba(245, 158, 11, 0.3); }
        .btn-amber:hover { background: rgba(245, 158, 11, 0.3); }

        /* Stats Grid */
        .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; align-items: stretch; margin-bottom: 2rem; width: 100%; box-sizing: border-box; }
        @media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; gap: 0.75rem; } }

        .card { background: var(--card-bg); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem 2.4rem 1rem; position: relative; transition: all 0.2s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.2); height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
        .card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(56, 189, 248, 0.1); }
        
        .card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.4rem; }
        .card h3 { color: var(--text-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
        
        .card .value-box { display: flex; align-items: baseline; gap: 0.4rem; margin-top: 0.2rem; }
        .card .value { font-size: 1.4rem; font-weight: 700; line-height: 1; }
        .card .pct-badge { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }

        .val-green { color: var(--accent-green); }
        .val-red { color: var(--accent-red); }
        .val-amber { color: var(--accent-amber); }

        .avg-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; background: rgba(0,0,0,0.25); padding: 0.2rem 0.5rem; border-radius: 6px; width: fit-content; border: 1px solid rgba(255,255,255,0.03); }

        .info-icon { background: rgba(255,255,255,0.06); color: var(--text-muted); width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; cursor: pointer; transition: 0.2s; border: 1px solid rgba(255,255,255,0.05); }
        .info-icon:hover { background: var(--accent); color: #000; border-color: var(--accent); }

        /* Single Sleek Scrollbar */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: rgba(11, 15, 25, 0.5); }
        ::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.3); border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

        /* Modal Pop-up (Mobile Responsive View) */
        .modal-overlay { 
            position: fixed; 
            top: 0; 
            left: 0; 
            right: 0;
            bottom: 0;
            width: 100vw; 
            height: 100vh; 
            background: rgba(11, 15, 25, 0.88); 
            backdrop-filter: blur(8px); 
            display: none; 
            align-items: center; 
            justify-content: center; 
            z-index: 1000; 
            padding: 1rem; 
            box-sizing: border-box;
            overflow-y: auto;
            overflow-x: hidden;
        }
        .modal-content { 
            background: #151c2c; 
            border: 1px solid rgba(56, 189, 248, 0.2); 
            border-radius: 16px; 
            width: 100%; 
            max-width: 1100px; 
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); 
            position: relative; 
            margin: auto; 
            max-height: 92vh; 
            display: flex; 
            flex-direction: column; 
            box-sizing: border-box;
        }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.8rem; position: sticky; top: -1.5rem; background: #151c2c; z-index: 20; padding-top: 0.5rem; margin-top: -0.5rem; }
        .modal-header h2 { font-size: 1.2rem; color: var(--accent); font-weight: 700; }
        .modal-controls { display: flex; align-items: center; gap: 0.35rem; }
        .modal-ctrl-btn { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-muted); padding: 0.25rem 0.55rem; border-radius: 6px; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
        .modal-ctrl-btn:hover { color: #fff; background: rgba(56, 189, 248, 0.2); border-color: var(--accent); transform: translateY(-1px); }
        .modal-ctrl-close:hover { color: var(--accent-red); background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); }
        
        .modal-content.modal-maximized { width: 97vw !important; max-width: 97vw !important; height: 95vh !important; max-height: 95vh !important; border-radius: 12px !important; }
        .modal-content.modal-maximized .modal-body { max-height: calc(95vh - 70px) !important; }

        /* Floating Task Widget (When Minimized) */
        .floating-widget {
            position: fixed;
            bottom: 1.25rem;
            right: 1.25rem;
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
            border: 1px solid rgba(56, 189, 248, 0.45);
            border-radius: 12px;
            padding: 0.75rem 1rem;
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 15px rgba(56, 189, 248, 0.25);
            backdrop-filter: blur(14px);
            z-index: 9999;
            cursor: pointer;
            min-width: 270px;
            max-width: 330px;
            transition: all 0.25s ease;
            animation: floatUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .floating-widget:hover {
            transform: translateY(-3px) scale(1.02);
            border-color: var(--accent);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.4);
        }
        @keyframes floatUp {
            from { opacity: 0; transform: translateY(20px) scale(0.95); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .floating-widget-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.4rem;
        }
        .floating-widget-header strong {
            font-size: 0.82rem;
            color: #f8fafc;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .floating-pct-badge {
            background: rgba(56, 189, 248, 0.2);
            color: #38bdf8;
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.15rem 0.45rem;
            border-radius: 6px;
            border: 1px solid rgba(56, 189, 248, 0.3);
        }
        .floating-pulse {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #22c55e;
            display: inline-block;
            box-shadow: 0 0 8px #22c55e;
            animation: pulseDot 1.5s infinite;
            flex-shrink: 0;
        }
        @keyframes pulseDot {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.4; transform: scale(0.8); }
        }
        .floating-progress-bar {
            width: 100%;
            height: 5px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 0.35rem;
        }
        .floating-progress-bar div {
            height: 100%;
            background: linear-gradient(90deg, #38bdf8, #22c55e);
            border-radius: 4px;
            transition: width 0.2s ease;
        }
        .floating-widget-footer {
            font-size: 0.72rem;
            color: #94a3b8;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-close { font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: 0.2s; padding: 0.2rem 0.5rem; border-radius: 6px; line-height: 1; }
        .modal-close:hover { color: var(--accent-red); background: rgba(239,68,68,0.15); }
        .modal-body { font-size: 0.9rem; line-height: 1.6; color: #cbd5e1; width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: hidden; word-break: break-word; overflow-wrap: break-word; }
        .modal-body p { margin-bottom: 0.8rem; }
        .modal-body ul { margin-left: 1.2rem; margin-bottom: 0.8rem; }
        .modal-body li { margin-bottom: 0.4rem; }
        
        .modal-table-wrapper { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; box-sizing: border-box; margin-bottom: 0.5rem; }
        .modal-table-wrapper table { min-width: 580px; width: 100%; }

        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
        .form-input { background: #0f172a; border: 1px solid rgba(56, 189, 248, 0.3); color: #fff; padding: 0.45rem 0.6rem; border-radius: 6px; font-size: 0.8rem; color-scheme: dark; width: 100%; max-width: 100%; box-sizing: border-box; }

        @media (max-width: 768px) {
            .modal-overlay { padding: 0.35rem; }
            .modal-content { padding: 1rem 0.75rem; width: 98%; max-height: 92vh; border-radius: 12px; }
            .modal-header { top: -1rem; }
            .modal-header h2 { font-size: 1.05rem; }
            .form-grid { grid-template-columns: 1fr; gap: 0.6rem; }
            .floating-widget { bottom: 0.75rem; right: 0.75rem; min-width: 240px; }
        }
        @media (max-width: 480px) {
            .modal-overlay { padding: 0.2rem; }
            .modal-content { padding: 0.85rem 0.55rem; width: 100%; max-height: 94vh; }
            .modal-header h2 { font-size: 0.95rem; }
            .modal-close { font-size: 1.6rem; }
        }

        /* Table Section */
        .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
        .section-header h2 { font-size: 1.1rem; font-weight: 700; color: #fff; }
        .records-count { background: rgba(56, 189, 248, 0.1); color: var(--accent); font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 12px; border: 1px solid rgba(56, 189, 248, 0.2); }

        .table-container { background: var(--card-bg); backdrop-filter: blur(12px); border-radius: 12px; border: 1px solid var(--border); overflow-x: auto; max-height: 72vh; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
        table { width: 100%; border-collapse: collapse; min-width: 700px; }
        th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
        th { background: #0f172a; color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 var(--border); }
        tr:last-child td { border-bottom: none; }
        tr:hover { background: rgba(255, 255, 255, 0.02); }
        
        .badge { padding: 0.25rem 0.55rem; border-radius: 6px; font-size: 0.72rem; font-weight: 700; display: inline-block; text-transform: uppercase; }
        .badge-tp { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); border: 1px solid rgba(34, 197, 94, 0.3); }
        .badge-be { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
        .badge-sl { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.3); }
        .badge-active { background: rgba(56, 189, 248, 0.15); color: var(--accent); border: 1px solid rgba(56, 189, 248, 0.3); }
        
        /* Position Button at Bottom Right Corner */
        .card-action-btn { position: absolute; bottom: 0.5rem; right: 0.5rem; background: rgba(56, 189, 248, 0.12); color: var(--accent); border: 1px solid rgba(56, 189, 248, 0.25); font-size: 0.65rem; font-weight: 600; padding: 0.18rem 0.45rem; border-radius: 6px; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 0.2rem; z-index: 2; }
        .card-action-btn:hover { background: var(--accent); color: #090d16; }

        /* Optimizer Container - Responsive 3 Columns */
        .optimizer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
        .opt-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem; backdrop-filter: blur(12px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
        .opt-header { margin-bottom: 0.8rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
        .opt-header h3 { font-size: 0.88rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; display: flex; align-items: center; justify-content: space-between; }
        .opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
        @media (max-width: 480px) { .opt-grid { grid-template-columns: 1fr; } }
        .opt-item { background: rgba(0,0,0,0.25); padding: 0.6rem 0.8rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.03); display: flex; flex-direction: column; gap: 0.2rem; cursor: pointer; transition: 0.2s; }
        .opt-item:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.08); }
        .opt-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
        .opt-val { font-size: 1.05rem; font-weight: 700; }

        /* Visual Timeline Modal Styling */
        .timeline-container { position: relative; padding-left: 2rem; margin-top: 1.2rem; }
        .timeline-container::before { content: ''; position: absolute; left: 0.75rem; top: 0.8rem; bottom: 0.8rem; width: 3px; background: rgba(56, 189, 248, 0.25); border-radius: 2px; }
        .timeline-item { position: relative; margin-bottom: 1.2rem; background: rgba(15, 23, 42, 0.7); border: 1px solid var(--border); padding: 0.9rem 1.1rem; border-radius: 12px; transition: 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
        .timeline-item:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.06); transform: translateX(3px); }
        .timeline-icon { position: absolute; left: -2rem; top: 0.9rem; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; border: 2px solid #151c2c; box-shadow: 0 0 10px rgba(0,0,0,0.5); z-index: 2; }
        .icon-entry { background: var(--accent); color: #000; }
        .icon-tp { background: var(--accent-green); color: #000; }
        .icon-be { background: var(--accent-amber); color: #000; }
        .icon-sl { background: var(--accent-red); color: #fff; }
        .timeline-title { font-weight: 700; font-size: 0.92rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
        .timeline-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
        .timeline-badge { background: rgba(56, 189, 248, 0.15); color: var(--accent); border: 1px solid rgba(56, 189, 248, 0.3); padding: 0.15rem 0.45rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }

        /* PnL Section at the Very Top */
        .pnl-section { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
        @media (max-width: 1024px) { .pnl-section { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 550px) { .pnl-section { grid-template-columns: 1fr; gap: 0.75rem; } }

        .pnl-card { background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.8) 100%); border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 14px; padding: 1.1rem; backdrop-filter: blur(12px); box-shadow: 0 4px 20px rgba(0,0,0,0.3); position: relative; overflow: hidden; transition: all 0.25s ease; }
        .pnl-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(56, 189, 248, 0.18); }
        .pnl-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
        .pnl-badge { font-size: 0.73rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
        .pnl-icon { font-size: 1.25rem; }
        .pnl-value { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
        .pnl-subtext { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
        .pnl-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-green), var(--accent-amber), var(--accent-red)); border-radius: 4px; transition: width 0.4s ease; }

        .interactive-subcard {
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            user-select: none;
            position: relative;
        }
        .interactive-subcard:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
        }
        .interactive-subcard.subcard-green:hover {
            border-color: rgba(34, 197, 94, 0.7) !important;
            background: rgba(34, 197, 94, 0.16) !important;
        }
        .interactive-subcard.subcard-red:hover {
            border-color: rgba(239, 68, 68, 0.7) !important;
            background: rgba(239, 68, 68, 0.16) !important;
        }

        /* Global Date Range Filter Bar */
        .date-filter-bar { background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 12px; padding: 0.85rem 1.2rem; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; backdrop-filter: blur(10px); }
        .date-filter-title { font-weight: 700; color: var(--accent); font-size: 0.88rem; display: flex; align-items: center; gap: 0.4rem; }
        .date-filter-presets { display: flex; gap: 0.45rem; flex-wrap: wrap; }
        .date-preset-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); color: var(--text-muted); padding: 0.35rem 0.75rem; border-radius: 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
        .date-preset-btn:hover { background: rgba(56, 189, 248, 0.15); color: #fff; border-color: rgba(56, 189, 248, 0.4); }
        .date-preset-btn.active { background: rgba(56, 189, 248, 0.25); color: #38bdf8; border-color: #38bdf8; box-shadow: 0 0 10px rgba(56, 189, 248, 0.3); }
        .custom-date-inputs { display: flex; align-items: center; gap: 0.6rem; background: rgba(0, 0, 0, 0.25); padding: 0.4rem 0.8rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); flex-wrap: wrap; }
        .date-input { background: #0f172a; border: 1px solid rgba(56, 189, 248, 0.3); color: #fff; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.78rem; color-scheme: dark; }
        .active-filter-label { font-size: 0.78rem; color: #94a3b8; background: rgba(255, 255, 255, 0.04); padding: 0.3rem 0.7rem; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.06); }

        @media (max-width: 768px) {
            .date-filter-bar { flex-direction: column; align-items: stretch; padding: 0.75rem 0.9rem; gap: 0.75rem; }
            .date-filter-presets { width: 100%; justify-content: flex-start; gap: 0.35rem; }
            .date-preset-btn { padding: 0.35rem 0.55rem; font-size: 0.73rem; flex: 1 1 auto; text-align: center; }
            .custom-date-inputs { flex-direction: column; align-items: stretch; width: 100%; gap: 0.5rem; padding: 0.6rem; }
            .custom-date-inputs label { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 0.78rem; }
            .custom-date-inputs .date-input { flex: 1; margin-left: 0.5rem; max-width: 180px; }
            .active-filter-label { width: 100%; text-align: center; }
        }
        /* Terminal Logs Styles */
        .terminal-window {
            background: #090d16;
            border: 1px solid rgba(56, 189, 248, 0.25);
            border-radius: 10px;
            font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
            font-size: 0.78rem;
            line-height: 1.5;
            color: #e2e8f0;
            padding: 0.85rem;
            height: 60vh;
            min-height: 360px;
            overflow-y: auto;
            overflow-x: auto;
            white-space: pre-wrap;
            word-break: break-all;
            box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
            position: relative;
        }
        .terminal-line {
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            transition: background 0.1s ease;
            border-left: 2px solid transparent;
            margin-bottom: 0.1rem;
        }
        .terminal-line:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        .terminal-line.log-pnl {
            border-left-color: #fbbf24;
            background: rgba(251, 191, 36, 0.04);
        }
        .terminal-line.log-success {
            border-left-color: #34d399;
            background: rgba(52, 211, 153, 0.04);
        }
        .terminal-line.log-error {
            border-left-color: #f87171;
            background: rgba(248, 113, 113, 0.08);
        }
        .terminal-line.log-trade {
            border-left-color: #38bdf8;
        }
        .terminal-line.log-warn {
            border-left-color: #f59e0b;
        }

        .terminal-badge {
            display: inline-block;
            padding: 0.1rem 0.4rem;
            border-radius: 4px;
            font-weight: 700;
            font-size: 0.72rem;
            margin-right: 0.35rem;
        }
        .terminal-badge-pnl { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); }
        .terminal-badge-trade { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
        .terminal-badge-bitunix { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
        .terminal-badge-error { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }
        .terminal-badge-success { background: rgba(34, 197, 94, 0.2); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.4); }

        .terminal-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.6rem;
            flex-wrap: wrap;
            margin-bottom: 0.6rem;
            padding-bottom: 0.6rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }
        .terminal-filter-pill {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #94a3b8;
            padding: 0.25rem 0.55rem;
            border-radius: 6px;
            font-size: 0.72rem;
            font-weight: 600;
            cursor: pointer;
            transition: 0.2s;
        }
        .terminal-filter-pill:hover {
            color: #fff;
            border-color: var(--accent);
        }
        .terminal-filter-pill.active {
            background: rgba(56, 189, 248, 0.2);
            color: #38bdf8;
            border-color: #38bdf8;
            box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
        }