/* ═══════════════════════════════════════════════════════════════ TBS Straddle Backtest — Premium Dark Theme ═══════════════════════════════════════════════════════════════ */ /* ── CSS Tokens ──────────────────────────────────────────────── */ :root { /* surfaces */ --bg-deep: #f0f4f8; --bg-body: #f8fafc; --bg-card: rgba(255, 255, 255, 0.9); --bg-card-solid: #ffffff; --bg-sidebar: rgba(255, 255, 255, 0.95); --bg-hover: rgba(99, 102, 241, 0.08); --bg-input: rgba(0, 0, 0, 0.03); /* borders */ --border: rgba(0, 0, 0, 0.08); --border-hover: rgba(99, 102, 241, 0.4); --border-input: rgba(0, 0, 0, 0.15); /* accents */ --accent: #4f46e5; --accent-light: #6366f1; --accent-glow: rgba(79, 70, 229, 0.15); --violet: #7c3aed; --emerald: #059669; --emerald-soft: rgba(5, 150, 105, 0.12); --red: #dc2626; --red-soft: rgba(220, 38, 38, 0.12); --amber: #d97706; --amber-soft: rgba(217, 119, 6, 0.12); --cyan: #0891b2; --gold: #d97706; /* text */ --text-primary: #0f172a; --text-secondary: #334155; --text-muted: #64748b; --text-inverse: #ffffff; /* misc */ --radius: 12px; --radius-sm: 8px; --radius-lg: 16px; --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04); --glass-blur: blur(20px); --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* layout */ --sidebar-w: 280px; } /* ── Reset ───────────────────────────────────────────────────── */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 14px; scroll-behavior: smooth; } body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg-body); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; } /* subtle grid background */ body::before { content: ''; position: fixed; inset: 0; background-image: radial-gradient(circle at 25% 25%, rgba(79,70,229,0.06) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(124,58,237,0.05) 0%, transparent 50%); pointer-events: none; z-index: 0; } /* ── Scrollbar ───────────────────────────────────────────────── */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 8px; } ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); } /* ── Loading Overlay ─────────────────────────────────────────── */ .loader-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(255, 255, 255, 0.85); backdrop-filter: var(--glass-blur); display: flex; align-items: center; justify-content: center; opacity: 1; transition: opacity 0.4s; } .loader-overlay.hidden { opacity: 0; pointer-events: none; } .loader-content { text-align: center; } .loader-spinner { width: 48px; height: 48px; margin: 0 auto 16px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; } .loader-spinner.small { width: 24px; height: 24px; margin: 0; border-width: 2px; } .loader-text { color: var(--text-secondary); font-weight: 500; } @keyframes spin { to { transform: rotate(360deg); } } .inline-loader { display: flex; align-items: center; gap: 12px; padding: 20px; color: var(--text-secondary); font-weight: 500; } /* ── Sidebar ─────────────────────────────────────────────────── */ .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); background: var(--bg-sidebar); backdrop-filter: var(--glass-blur); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; overflow-y: auto; } .sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px 20px; border-bottom: 1px solid var(--border); } .brand-icon { font-size: 28px; width: 44px; height: 44px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--violet)); border-radius: var(--radius); box-shadow: 0 4px 20px var(--accent-glow); } .brand-title { font-size: 1.15rem; font-weight: 700; background: linear-gradient(135deg, var(--text-primary), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .brand-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; } .sidebar-section { padding: 20px; border-bottom: 1px solid var(--border); } /* ── Inputs ──────────────────────────────────────────────────── */ .input-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; margin-top: 14px; } .input-label:first-child { margin-top: 0; } .input-select, .input-text { width: 100%; padding: 10px 12px; background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border-input); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.9rem; transition: border-color var(--transition), box-shadow var(--transition); outline: none; } .input-select:focus, .input-text:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); } .input-select option { background: var(--bg-card-solid); color: var(--text-primary); } /* ── Buttons ─────────────────────────────────────────────────── */ .btn-primary { width: 100%; margin-top: 20px; padding: 12px; background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff; font-weight: 600; font-size: 0.95rem; border: none; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform var(--transition), box-shadow var(--transition); box-shadow: 0 4px 20px var(--accent-glow); } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--accent-glow); } .btn-primary:active { transform: translateY(0); } .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; } .btn-icon { font-size: 0.85rem; } .btn-secondary { padding: 10px 20px; background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border-input); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition); } .btn-secondary:hover { border-color: var(--accent); background: var(--bg-hover); } .btn-secondary.active { background: linear-gradient(135deg, var(--accent), var(--violet)); border-color: transparent; color: #fff; } /* ── Navigation ──────────────────────────────────────────────── */ .sidebar-nav { padding: 16px 12px; flex: 1; } .nav-heading { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; padding: 0 8px 8px; margin-bottom: 4px; } .nav-btn { width: 100%; padding: 10px 12px; display: flex; align-items: center; gap: 10px; background: transparent; color: var(--text-secondary); border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: all var(--transition); text-align: left; margin-bottom: 2px; } .nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); } .nav-btn.active { background: var(--bg-hover); color: var(--accent-light); box-shadow: inset 3px 0 0 var(--accent); } .nav-icon { font-size: 1rem; width: 20px; text-align: center; } .sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); } .data-badge { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-muted); } .badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); animation: pulse-dot 2s infinite; } @keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } /* ── Main ────────────────────────────────────────────────────── */ .main { margin-left: var(--sidebar-w); padding: 28px 32px; min-height: 100vh; position: relative; z-index: 1; } /* ── Welcome ─────────────────────────────────────────────────── */ .welcome-section { display: flex; align-items: center; justify-content: center; min-height: 70vh; } .welcome-card { text-align: center; max-width: 560px; padding: 48px; background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); animation: fadeUp 0.6s ease-out; } .welcome-icon { font-size: 56px; margin-bottom: 20px; } .welcome-card h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; background: linear-gradient(135deg, var(--text-primary), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .welcome-card p { color: var(--text-secondary); line-height: 1.6; } .welcome-features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; } .feature-chip { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 100px; font-size: 0.8rem; color: var(--text-secondary); } @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* ── Cards ───────────────────────────────────────────────────── */ .card { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 24px; overflow: hidden; animation: fadeUp 0.5s ease-out both; transition: border-color var(--transition); } .card:hover { border-color: var(--border-hover); } .card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; } .card-header h3 { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 10px; } .sort-hint { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; } .sl-badge { font-size: 0.7rem; padding: 3px 10px; background: var(--accent-glow); color: var(--accent-light); border-radius: 100px; font-weight: 600; } /* ── Chart container ─────────────────────────────────────────── */ .chart-container { padding: 20px 24px; position: relative; height: 360px; } .chart-container.chart-tall { height: 440px; } /* ── Metric cards ────────────────────────────────────────────── */ .metrics-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; } .metric-card { padding: 20px 22px; background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: all var(--transition); animation: fadeUp 0.5s ease-out both; } .metric-card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--shadow-lg); } .metric-label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; } .metric-value { font-size: 1.75rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; line-height: 1; } .metric-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; } .metric-card.green .metric-value { color: var(--emerald); } .metric-card.green { border-left: 3px solid var(--emerald); } .metric-card.red .metric-value { color: var(--red); } .metric-card.red { border-left: 3px solid var(--red); } .metric-card.blue .metric-value { color: var(--accent-light); } .metric-card.blue { border-left: 3px solid var(--accent); } .metric-card.amber .metric-value { color: var(--amber); } .metric-card.amber { border-left: 3px solid var(--amber); } .metric-card.cyan .metric-value { color: var(--cyan); } .metric-card.cyan { border-left: 3px solid var(--cyan); } /* ── Tables ──────────────────────────────────────────────────── */ .table-wrap { overflow-x: auto; padding: 0 0 8px; } .data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; } .data-table th { padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.06em; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2; white-space: nowrap; } .data-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; white-space: nowrap; transition: background var(--transition); } .data-table tbody tr:hover td { background: var(--bg-hover); } .data-table .positive { color: var(--emerald); } .data-table .negative { color: var(--red); } .data-table .highlight-row td { background: var(--accent-glow); font-weight: 600; } /* ── Basket controls ─────────────────────────────────────────── */ .basket-controls { display: flex; gap: 10px; margin-bottom: 20px; } /* ── Grid layouts ────────────────────────────────────────────── */ .grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 24px; } /* ── Responsive ──────────────────────────────────────────────── */ @media (max-width: 900px) { :root { --sidebar-w: 0px; } .sidebar { transform: translateX(-100%); } .main { margin-left: 0; padding: 20px 16px; } .metrics-row { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }