:root { --bg:#050818; --sidebar:#070b22; --panel:#0a1030; --panel-2:#0c1439; --line:#24376f; --line-soft:rgba(92,124,229,.18); --ink:#eef1ff; --muted:#8390bd; --accent:#8494ff; --accent-2:#b073ff; --good:#76e7bb; --warm:#f6c76c; --danger:#ff899c; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; min-width:320px; font-family:Inter,ui-sans-serif,system-ui,"Microsoft YaHei",sans-serif; color:var(--ink); background:radial-gradient(circle at 82% -12%,rgba(91,79,230,.22),transparent 31rem),radial-gradient(circle at 35% 105%,rgba(52,115,217,.13),transparent 25rem),var(--bg); }
body::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.35; background-image:linear-gradient(rgba(124,140,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(124,140,255,.025) 1px,transparent 1px); background-size:36px 36px; }
.app-shell { width:min(1480px,100%); min-height:100vh; margin:auto; display:grid; grid-template-columns:220px minmax(0,1fr); grid-template-rows:76px 1fr; position:relative; border-left:1px solid rgba(98,119,218,.08); border-right:1px solid rgba(98,119,218,.08); }
[hidden] { display:none !important; }
.auth-gate { min-height:100vh; display:grid; place-items:center; padding:32px 18px; background:radial-gradient(circle at 50% 15%,rgba(63,86,202,.10),transparent 34%),#f4f6f8; }
.auth-card { width:min(440px,100%); padding:34px; border:1px solid #dfe3e8; border-radius:14px; background:#fff; box-shadow:0 20px 55px rgba(30,39,63,.13); }
.auth-brand { display:flex; align-items:center; gap:12px; padding-bottom:22px; margin-bottom:24px; border-bottom:1px solid #e7e9ed; }.auth-brand>span { display:grid; place-items:center; width:42px; height:42px; color:#fff; font-size:1.6rem; border-radius:11px; background:#151a23; }.auth-brand strong,.auth-brand small { display:block; }.auth-brand strong { letter-spacing:.1em; }.auth-brand small { margin-top:3px; color:#777f89; font-size:.65rem; letter-spacing:.16em; }
.auth-form { display:grid; gap:14px; }.auth-form h1 { margin:0; font-size:1.65rem; }.auth-form .muted { margin:-4px 0 4px; line-height:1.65; }.auth-form label { display:grid; gap:6px; color:#3d434c; font-size:.76rem; font-weight:650; }.auth-form input { width:100%; }.auth-submit { width:100%; margin-top:4px; padding:11px 14px; }.auth-message { min-height:0; margin-bottom:0; color:#bd2b2b; font-size:.75rem; }.auth-message:not(:empty) { margin-bottom:14px; padding:10px 12px; border-radius:8px; background:#fff0f0; }.auth-security-note { margin:22px 0 0; color:#8b9199; font-size:.64rem; text-align:center; }
.user-badge { max-width:210px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#4e5660; font-size:.68rem; }.top-logout { padding:5px 9px; border-radius:999px; }
.account-profile { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:18px 0; border:1px solid #e0e4e9; border-radius:8px; overflow:hidden; }.account-profile>div { padding:13px 15px; border-right:1px solid #e0e4e9; }.account-profile>div:last-child { border-right:0; }.account-profile span,.account-profile strong { display:block; }.account-profile span { color:#7a818b; font-size:.66rem; }.account-profile strong { margin-top:6px; overflow-wrap:anywhere; font-size:.84rem; }
.account-form,.member-admin { margin-top:22px; padding-top:20px; border-top:1px solid #e5e8ec; }.account-form h3,.member-admin h3 { margin:0; }.temporary-password-box { margin:4px 0 16px; padding:14px 16px; border:1px solid #e1b96d; border-radius:8px; background:#fff8e9; color:#654719; }.temporary-password-box code { display:block; margin:8px 0; padding:9px 12px; font-size:1rem; letter-spacing:.06em; background:#fff; border:1px solid #ead7ad; border-radius:6px; user-select:all; }.temporary-password-box p { margin:0; font-size:.72rem; }.member-admin .table-wrap { margin-top:14px; }.member-admin td:last-child { white-space:nowrap; }.member-admin td .button { margin:2px; padding:5px 8px; }
@media(max-width:760px){.auth-card{padding:24px}.account-profile{grid-template-columns:1fr 1fr}.account-profile>div:nth-child(2){border-right:0}.account-profile>div{border-bottom:1px solid #e0e4e9}}
.account-settings-form.notification-form { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; gap:0; margin:22px 0 0; padding:20px 0 0; border-top:1px solid #e5e8ec; }
.account-settings-form h3 { margin:0; line-height:1.35; }
.account-settings-form .settings-grid { width:100%; margin:16px 0 0; align-items:start; gap:12px; }
.account-settings-form .settings-grid>label { display:grid; grid-template-rows:auto 34px; align-content:start; gap:6px; min-width:0; color:#69717c; font-size:.68rem; }
.account-settings-form .settings-grid input { width:100%; height:34px; margin:0; }
.account-settings-form .form-actions { width:100%; min-height:34px; justify-content:flex-end; margin-top:12px; }
.account-settings-form .form-actions .muted { margin-right:auto; }
.input-with-unit { display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; gap:8px; }.input-with-unit span { color:#747b85; font-size:.7rem; }
@media(max-width:760px){.account-settings-form .settings-grid{grid-template-columns:1fr}.account-settings-form .settings-grid>label{grid-template-rows:auto 36px}.account-settings-form .settings-grid input{height:36px}}
.topbar { grid-column:2; grid-row:1; min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:0 28px; border-bottom:1px solid var(--line-soft); background:rgba(5,8,24,.52); backdrop-filter:blur(16px); position:sticky; top:0; z-index:4; }
.topbar h1 { margin:0; font-size:1.05rem; letter-spacing:.01em; font-weight:650; }.topbar h1 span { color:var(--muted); font-size:.79rem; font-weight:500; margin-left:8px; }.eyebrow,.section-label { margin:0 0 5px; color:#a9b4ff; letter-spacing:.1em; font-size:.64rem; font-weight:750; }
.top-actions { display:flex; align-items:center; gap:10px; }.market-pill,.mode-pill { border:1px solid var(--line); border-radius:11px; padding:8px 11px; color:#b7c1ec; font-size:.73rem; background:linear-gradient(145deg,rgba(23,35,88,.78),rgba(8,13,40,.82)); }.mode-pill { color:#ccd3ff; }.mode-pill span { display:inline-block; width:7px; height:7px; margin-right:6px; border-radius:50%; background:var(--good); box-shadow:0 0 10px var(--good); }
.page-nav { grid-row:1 / 3; grid-column:1; display:flex; flex-direction:column; gap:5px; padding:22px 14px; border-right:1px solid var(--line-soft); background:linear-gradient(180deg,rgba(8,12,34,.96),rgba(5,8,24,.88)); position:sticky; top:0; height:100vh; z-index:5; }.brand-mark { display:flex; align-items:center; gap:9px; min-height:42px; padding:0 8px 26px; color:#dce1ff; letter-spacing:.08em; line-height:1.05; font-size:.67rem; }.brand-mark i { font-size:2.4rem; color:var(--accent); font-style:normal; text-shadow:0 0 18px rgba(130,145,255,.85); }.brand-mark span { color:#8292ff; }.nav-caption { margin:15px 9px 5px; color:#53608e; font-size:.6rem; letter-spacing:.11em; text-transform:uppercase; }.page-nav a { display:flex; align-items:center; gap:10px; padding:10px 11px; color:#7e8ab6; text-decoration:none; border:1px solid transparent; border-radius:10px; font-size:.8rem; transition:.18s ease; }.page-nav a:first-of-type { color:#d9deff; border-color:#344887; background:linear-gradient(90deg,rgba(86,101,227,.29),rgba(27,38,93,.2)); box-shadow:inset 3px 0 0 var(--accent); }.page-nav a:hover { color:#e2e6ff; border-color:rgba(122,142,255,.38); background:rgba(87,101,229,.1); }.page-nav a span { letter-spacing:.01em; }.nav-upgrade { margin-top:auto; border:1px solid #354987; border-radius:14px; padding:13px; background:radial-gradient(circle at 85% 0%,rgba(134,92,255,.36),transparent 5rem),linear-gradient(145deg,#101a4a,#0b1334); font-size:.7rem; color:#9ca8d4; }.nav-upgrade b { color:#c6ceff; font-size:.69rem; }.nav-upgrade p { margin:8px 0; line-height:1.45; }.nav-upgrade span { display:inline-block; padding:5px 7px; border-radius:7px; color:#e0e4ff; background:rgba(126,143,255,.18); font-size:.64rem; }
main { grid-column:2; grid-row:2; width:min(1240px,calc(100% - 48px)); margin:26px auto 44px; }.hero-grid { display:grid; grid-template-columns:2.2fr repeat(3,1fr); gap:14px; margin-bottom:16px; }.panel { border:1px solid var(--line); border-radius:16px; padding:18px; background:linear-gradient(145deg,rgba(13,21,58,.92),rgba(7,12,36,.88)); box-shadow:inset 0 1px 0 rgba(181,192,255,.05),0 18px 48px rgba(0,0,0,.14); }.intro { position:relative; overflow:hidden; min-height:154px; }.intro::after { content:"✦"; position:absolute; right:30px; bottom:8px; font-size:6rem; color:rgba(133,145,255,.14); text-shadow:0 0 32px rgba(143,96,255,.52); }.intro h2 { max-width:410px; margin:0 0 10px; font-size:1.42rem; letter-spacing:-.02em; }.intro p:last-child { max-width:430px; margin:0; position:relative; z-index:1; }.muted,.footnote,.intro p:last-child { color:var(--muted); line-height:1.55; }.metric { position:relative; overflow:hidden; }.metric::before { content:""; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,transparent,var(--accent),transparent); opacity:.8; }.metric p { margin:2px 0 13px; color:var(--muted); font-size:.74rem; }.metric strong { display:block; font-size:1.55rem; margin-bottom:6px; }.metric span { color:#7582b0; font-size:.68rem; }
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; padding:15px 18px; }.toolbar p { margin-bottom:0; }.filters { display:flex; align-items:end; justify-content:flex-end; gap:8px; flex-wrap:wrap; }.filters label,form label { display:flex; flex-direction:column; gap:5px; color:#8490bb; font-size:.68rem; } input,textarea,select { width:100%; min-width:86px; padding:8px 9px; border:1px solid #26386f; border-radius:8px; outline:none; color:#e7ebff; background:rgba(4,8,26,.72); font:inherit; font-size:.78rem; transition:.18s; } input:focus,textarea:focus,select:focus { border-color:#8999ff; box-shadow:0 0 0 3px rgba(129,146,255,.12); } textarea { resize:vertical; }.button { cursor:pointer; border:1px solid #31477f; border-radius:9px; padding:8px 11px; color:#c9d0fa; background:linear-gradient(145deg,#162451,#0c1539); font-size:.74rem; font-weight:650; transition:.18s; }.button:hover { transform:translateY(-1px); border-color:#8797ff; color:#fff; box-shadow:0 8px 20px rgba(74,96,220,.16); }.button.primary { color:#fff; border-color:#90a0ff; background:linear-gradient(135deg,#6a7cf0,#9571f2); box-shadow:0 8px 22px rgba(102,118,239,.26); }.button.block { width:100%; margin-top:4px; }
.section-heading,.strategy-title { display:flex; align-items:center; justify-content:space-between; gap:15px; }.section-heading h2,.create-panel h2 { margin:0; font-size:1rem; }.table-panel { overflow:hidden; }.table-wrap { overflow:auto; margin:12px -18px -5px; padding:0 18px; } table { width:100%; min-width:840px; border-collapse:separate; border-spacing:0; } th,td { padding:13px 10px; border-bottom:1px solid rgba(55,75,143,.34); text-align:left; font-size:.78rem; white-space:nowrap; } th { color:#7683b1; font-size:.62rem; text-transform:uppercase; letter-spacing:.07em; font-weight:700; background:rgba(4,8,26,.32); } tbody tr { transition:.15s; } tbody tr:hover { background:linear-gradient(90deg,rgba(101,120,243,.12),rgba(135,101,242,.04)); }.number-positive { color:var(--good); }.number-negative { color:var(--danger); }.footnote { margin:12px 0 0; font-size:.68rem; }
.depth-panel,.alerts-panel { margin:16px 0; }.depth-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; margin-top:14px; }.depth-summary div,.pnl-grid div { padding:10px; border:1px solid rgba(61,83,157,.55); border-radius:10px; background:rgba(5,9,30,.5); }.depth-summary span,.pnl-grid span,.strategy-details { display:block; color:#7d8ab9; font-size:.65rem; }.depth-summary strong,.pnl-grid strong { display:block; margin-top:5px; color:#e4e8ff; font-size:.79rem; }
.module-grid { display:grid; grid-template-columns:1fr; gap:16px; margin:16px 0; }.alert-list { list-style:none; padding:0; margin:13px 0 0; display:grid; gap:7px; }.alert-list li { border:1px solid rgba(242,194,109,.28); border-left:3px solid var(--warm); padding:9px 11px; border-radius:8px; background:rgba(246,199,108,.06); color:#abb5dc; font-size:.75rem; }.alert-list li.critical { border-color:rgba(255,137,156,.32); border-left-color:var(--danger); background:rgba(255,137,156,.06); }.alert-list li.ok { border-color:rgba(113,225,185,.3); border-left-color:var(--good); background:rgba(113,225,185,.05); }
.split { display:grid; grid-template-columns:1.65fr 1fr; gap:16px; margin:16px 0 0; }.strategy-list { display:grid; gap:12px; }.empty-state { color:var(--muted); padding:28px 0 10px; }.strategy-card { border-top:1px solid var(--line-soft); padding-top:15px; }.strategy-card:first-child { padding-top:0; border-top:0; }.strategy-name { display:block; font-weight:700; }.paper-tag { display:inline-block; margin:5px 0; padding:3px 6px; border:1px solid rgba(246,199,108,.35); border-radius:6px; color:var(--warm); font-size:.6rem; }.strategy-meta { margin:0; color:var(--muted); font-size:.72rem; }.strategy-actions,.connection-form { display:flex; gap:7px; flex-wrap:wrap; }.pnl-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; padding:13px 0; }.strategy-details { line-height:1.65; }.alerts { list-style:none; padding:0; margin:10px 0 0; }.alerts li { color:var(--warm); font-size:.72rem; margin-top:4px; }.alerts li.critical { color:var(--danger); }.create-panel form { display:grid; gap:11px; }.two-col { display:grid; grid-template-columns:1fr 1fr; gap:9px; }.connection-form { align-items:end; padding-top:15px; margin-top:15px; border-top:1px solid var(--line-soft); }.connection-form label { min-width:160px; flex:1; }
@media (max-width:1050px) { .app-shell { grid-template-columns:76px minmax(0,1fr); }.page-nav { padding:18px 10px; align-items:center; }.brand-mark { padding:0 0 22px; }.brand-mark strong,.nav-caption,.page-nav a span,.nav-upgrade { display:none; }.page-nav a { width:44px; justify-content:center; font-size:1rem; }.hero-grid { grid-template-columns:repeat(3,1fr); }.intro { grid-column:1/-1; }.depth-summary { grid-template-columns:repeat(3,1fr); } }
@media (max-width:760px) { .app-shell { display:block; }.page-nav { position:static; width:100%; height:auto; overflow:auto; flex-direction:row; padding:10px 12px; border-right:0; border-bottom:1px solid var(--line-soft); }.brand-mark,.nav-caption,.nav-upgrade { display:none; }.page-nav a { width:auto; min-width:max-content; padding:8px 10px; font-size:.72rem; }.page-nav a span { display:inline; }.topbar { position:static; padding:15px 16px; }.top-actions .market-pill { display:none; } main { width:min(100% - 24px,1240px); margin:16px auto 32px; }.hero-grid { grid-template-columns:1fr 1fr; }.intro { grid-column:1/-1; }.toolbar,.section-heading,.strategy-title { align-items:flex-start; flex-direction:column; }.filters { justify-content:flex-start; }.split { grid-template-columns:1fr; }.depth-summary,.pnl-grid { grid-template-columns:1fr 1fr; } }

.intro::before { content:""; position:absolute; width:126px; height:126px; right:42px; top:14px; border:1px solid rgba(164,176,255,.48); border-radius:50%; box-shadow:0 0 0 14px rgba(114,126,255,.05),0 0 0 28px rgba(114,126,255,.035),0 0 46px rgba(126,95,255,.42),inset 0 0 34px rgba(115,95,255,.2); transform:rotate(-18deg); }
.intro::after { content:"✦"; display:grid; place-items:center; right:80px; top:42px; bottom:auto; width:58px; height:58px; border-radius:50%; font-size:1.8rem; color:#f0edff; background:radial-gradient(circle at 30% 30%,#bca3ff,#7355e9 60%,#3e2c94); box-shadow:0 0 30px rgba(152,108,255,.88); }
.intro h2 { position:relative; z-index:1; }

.page-nav a:first-of-type { color:#7e8ab6; border-color:transparent; background:transparent; box-shadow:none; }
.page-nav a.active { color:#d9deff; border-color:#344887; background:linear-gradient(90deg,rgba(86,101,227,.29),rgba(27,38,93,.2)); box-shadow:inset 3px 0 0 var(--accent); }
.page-view { display:none; }
.page-view.active { display:block; animation:page-enter .32s cubic-bezier(.2,.8,.2,1); }
@keyframes page-enter { from { opacity:0; transform:translateY(12px) scale(.992); } to { opacity:1; transform:translateY(0) scale(1); } }
.account-panel { margin-top:16px; }
.model-panel { margin:0 0 16px; padding:16px 18px; background:radial-gradient(circle at 93% 5%,rgba(103,114,245,.22),transparent 17rem),linear-gradient(145deg,rgba(18,29,77,.94),rgba(8,13,39,.9)); }
.model-live { display:inline-flex; align-items:center; gap:6px; padding:6px 9px; border:1px solid rgba(113,225,185,.34); border-radius:999px; color:var(--good); background:rgba(113,225,185,.08); font-size:.67rem; }
.model-gates { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:14px; }
.model-gates article { min-height:86px; padding:12px; border:1px solid rgba(87,110,202,.56); border-radius:11px; background:linear-gradient(145deg,rgba(8,14,42,.78),rgba(16,25,66,.58)); }
.model-gates span,.model-gates small { display:block; color:#8390be; font-size:.66rem; line-height:1.45; }.model-gates strong { display:block; margin:5px 0; color:#e8ebff; font-size:1.04rem; }
.account-summary-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; margin-top:14px; }
.account-summary-grid > div { padding:11px; border:1px solid rgba(61,83,157,.55); border-radius:10px; background:rgba(5,9,30,.5); }
.account-summary-grid span { display:block; color:#7d8ab9; font-size:.65rem; }.account-summary-grid strong { display:block; margin-top:5px; color:#e4e8ff; font-size:.86rem; }
@media (max-width:900px) { .account-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px) { .model-gates { grid-template-columns:1fr 1fr; } }
@media (max-width:600px) { .account-summary-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:600px) { .model-gates { grid-template-columns:1fr; } }

.page-nav a { align-items:center; min-height:48px; }
.page-nav a b { width:16px; font-size:.9rem; font-weight:500; text-align:center; }
.page-nav a span { display:grid; gap:2px; }
.page-nav a strong { color:inherit; font-size:.76rem; font-weight:650; }
.page-nav a small { color:#65729f; font-size:.6rem; line-height:1.1; }
.page-nav a.active small { color:#9ba9e5; }
@media (min-width:761px) and (max-width:1050px) { .app-shell { grid-template-columns:184px minmax(0,1fr); }.page-nav { padding:18px 11px; align-items:stretch; }.brand-mark { display:flex; padding:0 7px 22px; }.brand-mark strong,.nav-caption,.nav-upgrade { display:block; }.page-nav a { width:auto; justify-content:flex-start; font-size:.8rem; }.page-nav a span { display:grid; } }
@media (max-width:760px) { .page-nav a { min-height:auto; }.page-nav a small { display:none; }.page-nav a b { width:auto; }.page-nav a span { display:inline; }.page-nav a strong { font-size:.72rem; } }

.account-summary-grid { grid-template-columns:1fr; }
.account-card { padding:13px; border:1px solid rgba(61,83,157,.55); border-radius:11px; background:rgba(5,9,30,.5); }
.account-card header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:10px; border-bottom:1px solid rgba(61,83,157,.3); text-transform:capitalize; }.account-card header strong { color:#e4e8ff; font-size:.9rem; }.account-card header span { font-size:.68rem; }
.account-card-grid { display:grid; grid-template-columns:1.1fr 1.5fr 1fr; gap:12px; margin-top:11px; }.account-card-grid section { min-width:0; }.account-card-grid section > span { display:block; color:#7d8ab9; font-size:.65rem; }.account-card-grid p { margin:5px 0 0; color:#d7dcfb; font-size:.72rem; line-height:1.65; overflow-wrap:anywhere; }
@media (max-width:760px) { .account-card-grid { grid-template-columns:1fr; } }

.balance-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.balance-cards article { padding:15px 17px; border:1px solid rgba(61,83,157,.5); border-radius:10px; background:rgba(5,9,30,.44); }.balance-cards span,.balance-cards small { display:block; color:#7d8ab9; font-size:.66rem; }.balance-cards strong { display:block; margin:8px 0 5px; color:#e7ebff; font-size:1.55rem; letter-spacing:.02em; }
.holdings-page > .balance-cards { grid-template-columns:repeat(4,minmax(0,1fr)); margin:16px 0; }.holdings-page > .panel { margin-top:14px; }.holdings-page .section-heading h3 { margin:0; }.dust-toggle { display:flex; align-items:center; gap:6px; color:#707680; font-size:.72rem; white-space:nowrap; }.dust-toggle input { accent-color:#1d7650; }.venue-tag { display:inline-block; padding:3px 7px; border-radius:4px; background:#f3ece7; color:#a25526; font-size:.65rem; font-weight:700; }.holdings-page td a { color:#252a32; text-decoration:none; border-bottom:1px dotted #6d737c; }
.balance-table-wrap { overflow:auto; margin-top:18px; border:1px solid rgba(61,83,157,.5); border-radius:10px; }.balance-table { min-width:680px; }.balance-table th,.balance-table td { padding:12px 14px; }.balance-table tbody tr:last-child td { border-bottom:0; }
@media (max-width:1000px) { .holdings-page > .balance-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } } @media (max-width:760px) { .balance-cards,.holdings-page > .balance-cards { grid-template-columns:1fr; }.balance-cards strong { font-size:1.35rem; } }

.task-filters { display:flex; gap:7px; flex-wrap:wrap; margin:16px 0 2px; }.task-filters .button.active { color:#fff; border-color:#90a0ff; background:linear-gradient(135deg,#6a7cf0,#9571f2); }
.task-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:16px 0 2px; }.task-toolbar > input { width:220px; }.task-toolbar .task-filters { margin:0; }
.opportunity-tabs { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 16px; }.opportunity-tabs > button span { display:inline-block; min-width:18px; margin-left:4px; color:var(--warm); }.opportunity-tabs > button.active { color:#fff; border-color:#90a0ff; background:linear-gradient(135deg,#6a7cf0,#9571f2); }.venue-switch { display:flex; gap:6px; flex-wrap:wrap; margin-left:auto; }.venue-switch .button.active { color:#fff; border-color:#90a0ff; background:rgba(105,124,240,.45); }
.compact-grid { grid-template-columns:repeat(3,minmax(0,1fr)); margin:18px 0 0; }
.referral-grid { grid-template-columns:repeat(3,minmax(0,1fr)); margin:18px 0 0; }
.module-card { min-height:132px; padding:16px; border:1px solid rgba(61,83,157,.55); border-radius:12px; background:rgba(5,9,30,.5); }
.module-card span { display:block; color:#7d8ab9; font-size:.65rem; letter-spacing:.06em; text-transform:uppercase; }
.module-card strong { display:block; margin:7px 0; color:#e8ebff; font-size:.9rem; }
.module-card p { min-height:38px; margin:0 0 12px; color:var(--muted); font-size:.72rem; line-height:1.55; }
.module-card select { margin-bottom:6px; }
.risk-config,.settings-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; gap:12px; margin:20px 0; }
.safety-banner { display:flex; flex-direction:column; gap:5px; margin-top:18px; padding:14px 16px; border:1px solid rgba(113,225,185,.3); border-left:3px solid var(--good); border-radius:10px; background:rgba(113,225,185,.06); color:#b7c6dd; font-size:.74rem; }
.safety-banner strong { color:var(--good); }
@media (max-width:760px) { .compact-grid,.referral-grid,.risk-config,.settings-grid { grid-template-columns:1fr; } .module-card p { min-height:0; } }
.paper-task-form,.task-detail { margin:18px 0; padding:18px; border:1px solid rgba(91,115,212,.52); border-radius:14px; background:linear-gradient(145deg,rgba(13,21,58,.78),rgba(7,12,36,.74)); }
.symbol-input-row { display:flex; align-items:center; gap:7px; }.symbol-input-row input { min-width:0; flex:1; }.symbol-input-row .button { flex:0 0 auto; padding:.54rem .68rem; white-space:nowrap; }.favorite-symbols { display:flex; flex-wrap:wrap; align-items:center; gap:7px; min-height:0; margin:-8px 0 14px; }.favorite-symbols:empty { display:none; }.favorite-symbols > span { color:var(--muted); font-size:.68rem; }.favorite-symbol { display:inline-flex; align-items:center; gap:2px; padding:4px 5px 4px 8px; border:1px solid rgba(104,124,214,.45); border-radius:999px; background:rgba(86,104,200,.12); color:#dce3ff; font:.68rem ui-monospace,SFMono-Regular,Consolas,monospace; }.favorite-symbol button { padding:1px 4px; border:0; border-radius:50%; background:transparent; color:#aeb9df; font-size:.92rem; line-height:1; cursor:pointer; }.favorite-symbol button:hover { background:rgba(255,255,255,.13); color:#fff; }
.task-quote-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:12px 0 14px; padding:11px; border:1px solid #e0e4e8; border-radius:7px; background:#fbfcfd; }.task-quote-summary div { min-width:0; }.task-quote-summary span,.task-quote-summary small { display:block; color:#737a84; font-size:.64rem; }.task-quote-summary strong { display:block; margin:5px 0 4px; color:#20252d; font:700 .8rem ui-monospace,SFMono-Regular,Consolas,monospace; }.task-quote-summary small { overflow-wrap:anywhere; }
.form-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }.form-heading h3,.task-detail h3 { margin:0; font-size:1rem; }
.leg-config-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0; }.leg-config { min-width:0; padding:14px; border:1px solid rgba(61,83,157,.52); border-radius:11px; }.leg-config legend { padding:0 7px; color:#aeb9ff; font-size:.75rem; font-weight:700; }.leg-config .settings-grid { grid-template-columns:repeat(3,minmax(0,1fr)); margin:10px 0; gap:8px; }.form-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:16px; }.task-detail { border-color:rgba(118,231,187,.28); }.task-detail .pnl-grid { margin-top:14px; }.leg-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }.leg-card { padding:12px; border:1px solid rgba(61,83,157,.52); border-radius:10px; background:rgba(5,9,30,.45); }.leg-card header { display:flex; justify-content:space-between; gap:8px; color:#dfe4ff; }.leg-card header span,.leg-card p,.leg-card small { color:var(--muted); font-size:.68rem; }.leg-card p { margin:8px 0 4px; }
@media (max-width:760px) { .leg-config-grid,.leg-cards,.task-quote-summary { grid-template-columns:1fr; }.leg-config .settings-grid { grid-template-columns:1fr; }.symbol-input-row { align-items:stretch; flex-direction:column; }.symbol-input-row .button { width:100%; } }

.dashboard-panel { margin-top:16px; }
.dashboard-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:16px 0; }
.dashboard-metrics article { min-height:94px; padding:14px; border:1px solid rgba(61,83,157,.52); border-radius:11px; background:linear-gradient(145deg,rgba(9,16,47,.72),rgba(15,23,61,.54)); }
.dashboard-metrics span,.dashboard-metrics small { display:block; color:#7d8ab9; font-size:.65rem; }.dashboard-metrics strong { display:block; margin:8px 0 6px; color:#edf0ff; font-size:1.15rem; }
.dashboard-grid { display:grid; grid-template-columns:1.45fr .95fr; gap:12px; }.chart-panel,.sync-panel { min-width:0; padding:14px; border:1px solid rgba(61,83,157,.52); border-radius:11px; background:rgba(5,9,30,.42); }.chart-panel .section-heading,.sync-panel .section-heading { margin-bottom:4px; }.chart-panel strong,.sync-panel strong { color:#e6eaff; font-size:.81rem; }.chart-panel p,.sync-panel p { margin:4px 0 0; font-size:.67rem; }
#dashboardChart { display:block; width:100%; height:188px; overflow:visible; }.chart-axis { stroke:rgba(105,126,207,.4); stroke-width:1; }.chart-line { stroke:#8e9cff; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 0 5px rgba(130,145,255,.6)); }.chart-dot { fill:#bda3ff; stroke:#f2efff; stroke-width:2; }.chart-empty { fill:#7e8bb7; font-size:12px; }
.sync-log { display:grid; gap:8px; padding:0; margin:12px 0 0; list-style:none; }.sync-log li { display:grid; grid-template-columns:1fr auto; gap:3px 10px; padding:9px 10px; border:1px solid rgba(61,83,157,.38); border-radius:8px; color:#cdd4f5; font-size:.7rem; }.sync-log span,.sync-log small { color:#8290bd; font-size:.63rem; }.sync-log small { grid-column:1/-1; }
.strategy-workspace { margin-top:0; }.strategy-panel { margin:0; }.strategy-panel .strategy-list { margin-top:4px; }.fill-toolbar,.notification-form { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin:16px 0; }.fill-toolbar label { display:flex; flex-direction:column; gap:5px; min-width:145px; color:#8490bb; font-size:.68rem; }.fill-toolbar .button { margin-bottom:0; }
@media (max-width:900px) { .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.dashboard-grid { grid-template-columns:1fr; } }
@media (max-width:760px) { .dashboard-metrics { grid-template-columns:1fr; }.fill-toolbar,.notification-form { align-items:stretch; }.fill-toolbar label { min-width:100%; } }

/* Desktop paper terminal: follows the compact, high-information layout of the reference product. */
:root { --bg:#f6f7f9; --sidebar:#ffffff; --panel:#ffffff; --panel-2:#fbfcfd; --line:#dfe3e8; --line-soft:#e7e9ed; --ink:#1b1e24; --muted:#737982; --accent:#151922; --accent-2:#4b5568; --good:#26824d; --warm:#b56b20; --danger:#cf3434; }
body { color:var(--ink); background:var(--bg); } body::before { display:none; }
.app-shell { width:100%; grid-template-columns:208px minmax(0,1fr); grid-template-rows:50px 1fr; border:0; }
.topbar { min-height:50px; padding:0 28px; background:rgba(255,255,255,.94); border-bottom:1px solid var(--line); backdrop-filter:blur(10px); }
.topbar h1 { font-size:.88rem; font-weight:650; }.topbar h1 span { font-size:.72rem; color:#777d86; }.eyebrow,.section-label { color:#757b85; font-size:.58rem; letter-spacing:.18em; }.top-actions { gap:8px; }.market-pill,.mode-pill { padding:5px 9px; border-color:#dfe3e8; color:#666d76; background:#fff; border-radius:999px; font-size:.65rem; }.mode-pill span { box-shadow:none; }
.page-nav { gap:1px; padding:18px 12px; border-right:1px solid var(--line); background:#fff; }.brand-mark { min-height:108px; padding:0 12px 18px; align-items:center; color:#151820; letter-spacing:.04em; }.brand-logo { display:grid; place-items:center; width:48px; height:48px; color:#171a21; border:1px solid #dfe3e8; border-radius:13px; background:linear-gradient(145deg,#fff,#f1f3f5); box-shadow:0 5px 14px rgba(30,35,43,.08); }.brand-logo svg { width:36px; height:36px; }.brand-wordmark { display:grid; gap:4px; }.brand-wordmark strong { color:#151820; font-size:1.2rem; letter-spacing:-.04em; line-height:1; }.brand-wordmark small { color:#9ca1a8; font-size:.46rem; letter-spacing:.25em; }.nav-caption { margin:13px 10px 8px; color:#a0a5ad; font-size:.55rem; }.page-nav a { min-height:34px; gap:8px; padding:7px 10px; border-radius:5px; color:#5e646d; font-size:.72rem; }.page-nav a b { color:#757b84; font-size:.76rem; }.page-nav a strong { font-size:.72rem; }.page-nav a small { display:none; }.page-nav a:first-of-type { color:#5e646d; }.page-nav a:hover { color:#12151b; border-color:transparent; background:#f1f2f4; }.page-nav a.active { color:#171a20; border-color:transparent; background:#eceef1; box-shadow:none; }.page-nav a.active b { color:#111; }.nav-upgrade { display:none; }
main { width:min(100% - 44px,1460px); margin:22px auto 42px; }.panel { border:1px solid var(--line); border-radius:7px; padding:16px; background:#fff; box-shadow:none; }.hero-grid { grid-template-columns:2.2fr repeat(3,1fr); gap:12px; }.intro { min-height:138px; background:#fff; }.intro::before,.intro::after { display:none; }.intro h2 { font-size:1.28rem; }.metric::before { background:#171b22; opacity:.22; }.metric strong { font-size:1.35rem; }.muted,.footnote,.intro p:last-child { color:var(--muted); }
input,textarea,select { color:#20242b; border-color:#d9dde3; background:#fff; border-radius:4px; padding:7px 8px; }.filters label,form label { color:#737983; }.button { padding:7px 10px; color:#282d35; border-color:#d4d8de; border-radius:4px; background:#fff; box-shadow:none; }.button:hover { transform:none; color:#111; border-color:#9ba1aa; box-shadow:none; }.button.primary { color:#fff; border-color:#161a21; background:#161a21; box-shadow:none; }.table-wrap { margin:12px -16px -4px; padding:0 16px; } th,td { border-bottom-color:#e8eaed; color:#4d535c; padding:12px 10px; } th { color:#7d838c; background:#fafbfc; } tbody tr:hover { background:#fafbfc; }.number-positive { color:#188247; }.number-negative { color:#cf3434; }
.model-panel { background:#fff; }.model-gates article,.depth-summary div,.pnl-grid div,.account-summary-grid > div,.module-card,.leg-card,.dashboard-metrics article,.chart-panel,.sync-panel { border-color:#e0e4e8; background:#fbfcfd; }.model-gates span,.model-gates small,.account-summary-grid span,.depth-summary span,.pnl-grid span,.strategy-details,.dashboard-metrics span,.dashboard-metrics small { color:#7b828b; }.model-gates strong,.depth-summary strong,.pnl-grid strong,.account-summary-grid strong,.module-card strong,.dashboard-metrics strong,.chart-panel strong,.sync-panel strong { color:#22262d; }.strategy-card { border-top-color:#e7e9ed; }.paper-tag { color:#a55a17; border-color:#efd8c4; background:#fff8f1; }.alert-list li { color:#6f5b3b; }.task-filters .button.active,.opportunity-tabs > button.active,.venue-switch .button.active { color:#fff; border-color:#161a21; background:#161a21; }.paper-task-form,.task-detail { border-color:#dfe3e8; background:#fff; }.leg-config { border-color:#e0e4e8; }.leg-config legend { color:#4f5661; }.balance-cards article,.balance-table-wrap { border-color:#e0e4e8; background:#fbfcfd; }.balance-cards strong { color:#22262d; }.safety-banner { border-color:#cfe7d9; background:#f5fbf7; color:#53605a; }.chart-axis { stroke:#dde1e6; }.chart-line { stroke:#242931; filter:none; }.chart-dot { fill:#fff; stroke:#242931; }.chart-empty { fill:#9298a1; }.sync-log li { border-color:#e1e4e8; color:#40464f; }.sync-log span,.sync-log small { color:#858b94; }
@media (max-width:1050px) { .app-shell { grid-template-columns:184px minmax(0,1fr); }.page-nav { align-items:stretch; }.page-nav a { width:auto; justify-content:flex-start; }.page-nav a span { display:grid; } }
@media (max-width:760px) { .page-nav { background:#fff; }.brand-mark { display:none; }.topbar { padding:12px 16px; }.top-actions { display:none; }.page-nav a { width:auto; }.page-nav a span { display:inline; }.page-nav a small { display:none; } }

.execution-monitor { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:12px; margin:14px 0; }.execution-monitor .leg-cards { margin:0; }
.leg-card dl { display:grid; grid-template-columns:1fr 1fr; gap:0; margin:12px 0 0; border-top:1px solid #e7e9ed; border-left:1px solid #e7e9ed; }.leg-card dl div { min-width:0; padding:7px 8px; border-right:1px solid #e7e9ed; border-bottom:1px solid #e7e9ed; }.leg-card dt { color:#777e87; font-size:.61rem; }.leg-card dd { margin:4px 0 0; color:#313740; font-size:.67rem; overflow-wrap:anywhere; }.leg-card dd b { font-size:.79rem; color:#151a22; }
.leg-card .leg-fee-box { background:#fffaf5; }.leg-card .leg-fee-box dd { color:#a85a18; font-weight:700; }
.exposure-gauge { display:grid; align-content:start; justify-items:center; padding:14px; border:1px solid #e0e4e8; border-radius:8px; background:#fff; }.exposure-gauge > strong { justify-self:start; font-size:.76rem; color:#292e36; }.exposure-gauge svg { width:220px; max-width:100%; margin-top:8px; }.exposure-gauge text { fill:#868c95; font-size:9px; }.gauge-track { fill:none; stroke:#e2e5e9; stroke-width:14; stroke-linecap:round; }.gauge-safe { fill:none; stroke:#23834c; stroke-width:14; stroke-linecap:round; }.gauge-needle { stroke:#3f4751; stroke-width:3; stroke-linecap:round; }.gauge-center { fill:#3f4751; }.exposure-gauge b { color:#23834c; font-size:.82rem; }.exposure-gauge small { margin-top:4px; color:#787f88; font-size:.65rem; }
.execution-tabs { display:flex; gap:18px; padding:0 0 10px; border-bottom:1px solid #dfe3e8; }.execution-tabs .button { position:relative; padding:4px 0; border:0; color:#686f78; background:transparent; font-size:.73rem; }.execution-tabs .button.active { color:#171b21; font-weight:750; }.execution-tabs .button.active::after { content:""; position:absolute; right:0; bottom:-11px; left:0; height:2px; background:#171b21; }.task-detail-view { display:none; }.task-detail-view.active { display:block; }.execution-log { display:grid; gap:0; margin:14px 0 0; padding:0; list-style:none; border:1px solid #e1e4e8; border-radius:6px; overflow:hidden; background:#fafbfc; }.execution-log li { display:grid; grid-template-columns:135px 145px 1fr; gap:10px; padding:8px 10px; border-top:1px solid #e7e9ed; color:#4f5660; font:500 .68rem ui-monospace,SFMono-Regular,Consolas,monospace; }.execution-log li:first-child { border-top:0; }.execution-log time,.execution-log b { color:#7c838c; font-weight:500; }.execution-log li.success b { color:#23834c; }.execution-log li.warning b { color:#ad671b; }
.task-detail-page .task-detail { margin:0; min-height:calc(100vh - 146px); }
.strategy-detail { min-height:calc(100vh - 146px); }.strategy-detail > .section-heading > div:first-child { display:flex; align-items:center; gap:10px; }.strategy-detail > .section-heading h2 { font-size:1.2rem; }.strategy-detail-metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin:16px 0; }.strategy-detail-metrics article { padding:13px; border:1px solid #e0e4e8; border-radius:9px; background:#fff; box-shadow:0 7px 18px rgba(28,34,48,.05); }.strategy-detail-metrics span,.strategy-detail-metrics small { display:block; color:#7d838c; font-size:.64rem; }.strategy-detail-metrics strong { display:block; margin:6px 0 4px; color:#20242b; font-size:1rem; }.strategy-leg-layout { display:grid; grid-template-columns:2fr 1fr; gap:14px; margin:16px 0 22px; }.strategy-leg-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.strategy-leg-panel { overflow:hidden; border:1px solid #dfe3e8; border-radius:10px; background:#fff; box-shadow:0 8px 20px rgba(29,35,48,.05); }.strategy-leg-panel header { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #e4e7eb; }.strategy-leg-panel header small { display:block; margin-top:4px; color:#858b94; }.strategy-leg-panel dl,.exposure-analysis dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; padding:14px 16px; gap:0; }.strategy-leg-panel dl div,.exposure-analysis dl div { padding:9px; border:1px solid #e3e6ea; margin:-1px 0 0 -1px; }.strategy-leg-panel dt,.exposure-analysis dt { color:#747b84; font-size:.65rem; }.strategy-leg-panel dd,.exposure-analysis dd { margin:4px 0 0; color:#252930; font-size:.76rem; }.exposure-analysis { margin:0; }.exposure-analysis h3 { margin:0 0 12px; }.strategy-detail-view { display:none; }.strategy-detail-view.active { display:block; }.strategy-detail-view > .panel { margin-top:14px; }
.task-detail-breadcrumb { display:flex; align-items:center; gap:14px; margin:-4px 0 18px; padding-bottom:13px; border-bottom:1px solid #e2e5e9; color:#858b94; font-size:.65rem; letter-spacing:.08em; }
.task-detail-breadcrumb .back-button { padding:6px 10px; }
.danger-button { color:#b82e2e; border-color:#e9c6c6; background:#fff8f8; }.danger-button:hover { color:#a31919; border-color:#d88484; background:#fff3f3; }
button.is-loading { cursor:wait; opacity:.78; pointer-events:none; } button.is-loading::before { content:""; display:inline-block; width:.78em; height:.78em; margin-right:.45em; vertical-align:-.08em; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:button-spin .7s linear infinite; } @keyframes button-spin { to { transform:rotate(360deg); } }
.strategy-detail .strategy-actions { align-items:flex-end; }.close-quantity { display:flex; flex-direction:column; gap:4px; min-width:132px; color:#737a84; font-size:.62rem; }.close-quantity[hidden] { display:none; }.close-quantity input { width:132px; min-width:132px; height:31px; padding:6px 8px; border-color:#d5d9df; color:#22272e; background:#fff; }
.close-batch-hint { color:#9a5d2b !important; font-size:.58rem !important; white-space:nowrap; }.close-batch-hint.number-negative { color:#b82e2e !important; }
.close-task-config { display:flex; gap:10px; align-items:flex-end; }.close-task-config label { display:flex; flex-direction:column; gap:4px; min-width:120px; color:#737a84; font-size:.62rem; }.close-task-config input { min-width:0; }
.modal-open { overflow:hidden; }
.close-modal[hidden] { display:none; }.close-modal { position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:24px; }.close-modal-backdrop { position:absolute; inset:0; background:rgba(16,19,24,.58); backdrop-filter:blur(1px); }.close-modal-dialog { position:relative; width:min(900px,calc(100vw - 38px)); max-height:calc(100vh - 48px); overflow:auto; border:1px solid #d9dde2; border-radius:11px; background:#fff; box-shadow:0 24px 70px rgba(11,15,22,.28); }.close-modal-header { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid #e4e7eb; background:rgba(255,255,255,.96); }.close-modal-header h2 { margin:0; font-size:.92rem; }.close-modal-x { width:30px; height:30px; padding:0; border:0; border-radius:50%; color:#666d76; background:transparent; font-size:1.2rem; cursor:pointer; }.close-modal-x:hover { background:#f0f1f3; color:#171a20; }.close-modal-dialog form { padding:18px 22px 0; }
.close-modal-legs { display:grid; gap:14px; }.close-leg-card { min-width:0; padding:0; overflow:hidden; border:1px solid #dfe3e8; border-radius:8px; background:#fff; box-shadow:0 6px 16px rgba(28,34,48,.05); }.close-leg-card.disabled { opacity:.45; }.close-leg-card legend { box-sizing:border-box; display:flex; align-items:center; gap:9px; width:100%; padding:14px 16px; border-bottom:1px solid #e4e7eb; color:#4f5660; font-size:.69rem; }.close-leg-card legend label { display:flex; align-items:center; gap:6px; margin:0; color:#20242b; }.close-leg-card legend input { min-width:0; width:auto; margin:0; accent-color:#171b22; }.close-leg-card legend code { padding:4px 7px; border-radius:4px; color:#59606a; background:#f0f2f4; font-size:.62rem; }.close-leg-card legend strong { margin-left:auto; color:#20242b; font-size:.74rem; }.close-leg-card legend em { padding:4px 7px; border-radius:4px; color:#b33c35; background:#fff0ef; font-size:.61rem; font-style:normal; }.close-market-tag { padding:3px 7px; border-radius:4px; color:#a15c25; background:#f7ede5; font-size:.61rem; font-weight:700; }.close-market-tag.spot { color:#277b42; background:#eef8ec; }
.close-leg-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; padding:16px 18px 18px; }.close-leg-fields label { display:flex; flex-direction:column; gap:5px; min-width:0; color:#69717b; font-size:.64rem; }.close-leg-fields input,.close-leg-fields select { width:100%; min-width:0; }.close-leg-fields small { min-height:1.2em; color:#9298a1; font-size:.57rem; line-height:1.35; }.close-switch-label { justify-content:flex-start; }.close-switch-label input { width:36px; height:20px; margin-top:2px; accent-color:#171b22; }
.close-sync-toggle { display:flex; align-items:center; gap:8px; margin:17px 0 10px; color:#3f464f; font-size:.7rem; }.close-sync-toggle input { width:auto; min-width:0; accent-color:#171b22; }.close-modal-note { display:flex; gap:9px; margin:10px 0 0; padding:10px 12px; border:1px solid #eccf9e; border-radius:6px; background:#fffaf2; color:#745324; font-size:.66rem; line-height:1.45; }.close-modal-note strong { white-space:nowrap; }.close-modal-actions { position:sticky; bottom:0; display:flex; justify-content:flex-end; gap:8px; margin:18px -22px 0; padding:14px 22px; border-top:1px solid #e4e7eb; background:rgba(255,255,255,.97); }
@media (max-width:850px) { .close-leg-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }.close-leg-card legend { flex-wrap:wrap; }.close-leg-card legend strong { width:100%; margin-left:0; } } @media (max-width:540px) { .close-modal { padding:8px; }.close-modal-dialog { width:calc(100vw - 16px); max-height:calc(100vh - 16px); }.close-leg-fields { grid-template-columns:1fr; }.close-modal-note { flex-direction:column; } }
.testnet-range { color:#1b6f3e; font-size:.64rem; }
.inline-depth-row:hover { background:transparent; }.inline-depth-row > td { padding:8px 0 14px; white-space:normal; }.inline-depth { padding:12px 14px; border:1px solid #cfd7e5; border-left:3px solid #171b21; border-radius:7px; background:#f8fafc; }.inline-depth header { display:flex; align-items:center; justify-content:space-between; gap:12px; }.inline-depth header strong { display:block; color:#20252d; font-size:.8rem; }.inline-depth header small,.inline-depth p { display:block; margin:4px 0 0; color:#737b85; font-size:.64rem; }.inline-depth .depth-summary { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:7px; margin-top:10px; }.inline-depth .depth-summary div { min-width:0; padding:7px 8px; border-color:#dfe4eb; background:#fff; }.inline-depth .depth-summary span { overflow:hidden; color:#737b85; font-size:.59rem; text-overflow:ellipsis; white-space:nowrap; }.inline-depth .depth-summary strong { overflow-wrap:anywhere; color:#252b33; font-size:.68rem; line-height:1.25; }
@media (max-width:980px) { .inline-depth .depth-summary { grid-template-columns:repeat(5,minmax(118px,1fr)); overflow-x:auto; } } @media (max-width:760px) { .inline-depth .depth-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }.inline-depth header { align-items:flex-start; flex-direction:column; } }
.testnet-confirm { display:flex; align-items:flex-start; gap:8px; margin:4px 0 12px; padding:10px 12px; border:1px solid #eccf9e; border-radius:6px; background:#fffaf2; color:#7b5520; font-size:.71rem; line-height:1.45; }.testnet-confirm input { width:auto; min-width:0; margin:2px 0 0; accent-color:#a96719; }
@media (max-width:900px) { .execution-monitor { grid-template-columns:1fr; }.exposure-gauge { min-height:0; } }
@media (max-width:640px) { .leg-card dl { grid-template-columns:1fr; }.execution-log li { grid-template-columns:1fr; gap:3px; }.execution-tabs { gap:12px; } }
@media (max-width:1000px) { .strategy-detail-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }.strategy-leg-layout { grid-template-columns:1fr; } } @media (max-width:700px) { .strategy-detail-metrics,.strategy-leg-details { grid-template-columns:1fr; } }

/* Credential management */
.connection-page { min-height:calc(100vh - 118px); }.connection-page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }.connection-page-heading h2 { margin:0 0 7px; font-size:1.55rem; font-weight:500; }.connection-page-heading p:last-child { margin:0; font-size:.72rem; }.connection-table-panel { padding-top:10px; }.connection-summary { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:30px; }.connection-summary span { font-size:.66rem; }.connection-table { min-width:1120px; }.connection-table th:last-child,.connection-table td:last-child { text-align:right; }.connection-table td { vertical-align:middle; }.connection-table td small { display:block; margin-top:4px; color:#8b9199; font-size:.61rem; }.connection-error { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:help; }.connection-actions { display:flex; justify-content:flex-end; gap:6px; }.connection-actions .button { padding:5px 8px; font-size:.66rem; }.credential-status { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:4px; font-size:.62rem; font-weight:700; }.credential-status::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }.credential-status.verified { color:#237a45; background:#edf8f0; }.credential-status.unverified,.credential-status.external { color:#8a6726; background:#fff6df; }.credential-status.failed,.credential-status.expired { color:#bd3030; background:#fff0f0; }.credential-environment { display:inline-block; padding:3px 6px; border-radius:4px; color:#9a5524; background:#f7ede6; font-size:.59rem; font-weight:700; }.credential-environment.live { color:#4e5968; background:#edf0f3; }.connection-empty td { padding:34px 12px; color:#8a9098; text-align:center !important; }
.connection-modal-dialog { width:min(620px,calc(100vw - 38px)); }.credential-warning { padding:14px 16px; border:1px solid #efcaca; border-left:3px solid #d33a3a; border-radius:7px; background:#fff3f3; color:#654343; font-size:.68rem; line-height:1.55; }.credential-warning > strong { display:block; color:#c62929; font-size:.74rem; }.credential-warning ul { margin:8px 0; padding-left:18px; }.credential-warning li { margin:3px 0; }.credential-warning p { margin:8px 0; }.credential-warning small { display:block; color:#8b6060; }.outbound-ip-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:11px 0 6px; padding-top:10px; border-top:1px solid #eccfcf; }.outbound-ip-row code { padding:3px 6px; border-radius:4px; color:#30353c; background:#fff; font-size:.68rem; }.outbound-ip-row .button { flex:0 0 auto; padding:5px 8px; }.credential-ack { display:flex; flex-direction:row; align-items:flex-start; gap:8px; margin-top:11px; padding:9px 10px; border:1px solid #efcaca; border-radius:5px; color:#7b3535; background:#ffeaea; }.credential-ack input { width:auto; min-width:0; margin-top:2px; accent-color:#c52f2f; }.credential-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }.credential-form-grid .credential-wide { grid-column:1/-1; }.credential-edit-hint { margin:11px 0 0; color:#7b828b; font-size:.64rem; }.form-message { min-height:1.2em; margin:10px 0 0; color:#6e747c; font-size:.67rem; }.form-message.error { color:#bd3030; }.form-message.success { color:#237a45; }
@media (max-width:700px) { .connection-page-heading { align-items:stretch; flex-direction:column; }.connection-page-heading .button { width:100%; }.credential-form-grid { grid-template-columns:1fr; }.credential-form-grid .credential-wide { grid-column:auto; }.outbound-ip-row { align-items:flex-start; flex-direction:column; } }

/* Balance overview */
.balance-overview-page { min-height:calc(100vh - 118px); }.balance-page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; }.balance-page-heading h2 { margin:0 0 6px; font-size:1.55rem; font-weight:500; }.balance-page-heading p:last-child { margin:0; font-size:.7rem; }.balance-refresh-actions { display:flex; align-items:center; gap:12px; }.balance-sync-status { color:#6f767f; font:500 .64rem ui-monospace,SFMono-Regular,Consolas,monospace; }.balance-sync-status::first-letter { color:#30925a; }.balance-overview-page .account-summary-grid { display:block; margin:0; }.balance-overview-cards { gap:12px; }.balance-overview-cards article { min-height:116px; padding:20px 22px; border:1px solid #d9dde2; border-radius:7px; background:rgba(255,255,255,.68); }.balance-overview-cards span { color:#747b84; font:.58rem ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.2em; }.balance-overview-cards strong { margin:11px 0 7px; font:600 1.7rem ui-monospace,SFMono-Regular,Consolas,monospace; }.balance-overview-cards strong.number-positive { color:#188247; }.balance-overview-cards strong.number-negative { color:#cf3434; }.balance-overview-cards small { color:#91979f; font-size:.62rem; }.balance-account-table-wrap { overflow:auto; margin-top:26px; border:1px solid #dfe3e7; border-radius:7px; background:rgba(255,255,255,.76); }.balance-account-table { min-width:1040px; }.balance-account-table th,.balance-account-table td { padding:13px 12px; }.balance-account-table tbody tr:last-child td { border-bottom:0; }.balance-account-table td small { display:block; margin-top:4px; color:#8e949c; font-size:.58rem; }.balance-number { font:500 .72rem ui-monospace,SFMono-Regular,Consolas,monospace; }.equity-number { color:#262b32; font-weight:700; }.balance-venue-tag { display:inline-block; padding:4px 8px; border-radius:3px; color:#a05729; background:#f4e9e1; font-size:.61rem; font-weight:700; }.balance-venue-tag.gate { color:#646a72; background:#f0f1f3; }.account-type-tag { display:inline-block; padding:4px 7px; border-radius:3px; color:#60666f; background:#f0f1f3; font-size:.6rem; }.account-health { display:inline-block; padding:4px 7px; border-radius:3px; font-size:.59rem; font-weight:700; }.account-health.ok { color:#287d48; background:#edf7e9; }.account-health.error { color:#bd3030; background:#fff0f0; }.balance-footnote { margin:14px 0 0; color:#888e96; font-size:.62rem; line-height:1.55; }
@media (max-width:760px) { .balance-page-heading { align-items:stretch; flex-direction:column; }.balance-refresh-actions { justify-content:space-between; }.balance-overview-cards { grid-template-columns:1fr; } }

/* Task list: replace the wide execution table with readable cards on narrow screens. */
@media (max-width:1050px) {
  #tasks .task-table-wrap { overflow:visible; margin:14px 0 0; padding:0; }
  #tasks .task-table { width:100%; min-width:0; border:0; }
  #tasks .task-table thead { display:none; }
  #tasks .task-table tbody { display:grid; gap:12px; }
  #tasks .task-table tbody tr { display:grid; gap:0; padding:8px 14px; border:1px solid #dfe3e8; border-radius:8px; background:#fff; box-shadow:0 5px 16px rgba(28,34,48,.045); }
  #tasks .task-table tbody tr:hover { background:#fff; }
  #tasks .task-table tbody td { display:grid; grid-template-columns:minmax(82px,28%) minmax(0,1fr); align-items:start; gap:12px; width:auto; padding:9px 0; border-bottom:1px solid #edf0f2; white-space:normal; overflow-wrap:anywhere; }
  #tasks .task-table tbody td::before { content:attr(data-label); color:#7d838c; font-size:.62rem; font-weight:700; letter-spacing:.05em; }
  #tasks .task-table tbody td:last-child { border-bottom:0; }
  #tasks .task-table .task-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  #tasks .task-table .task-row-actions::before { flex:0 0 28%; min-width:82px; }
  #tasks .task-table .task-row-actions .button { margin:0; }
  #tasks .task-table .task-empty-row { display:block; }
  #tasks .task-table .task-empty-row td { display:block; border:0; text-align:center; }
  #tasks .task-table .task-empty-row td::before { display:none; }
}

@media (max-width:520px) {
  #tasks .task-table tbody td { grid-template-columns:76px minmax(0,1fr); gap:9px; }
  #tasks .task-table .task-row-actions::before { flex-basis:76px; min-width:76px; }
}

/* Overview dashboard reference layout */
#overview.hero-grid { grid-template-columns:repeat(7,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
#overview.hero-grid .intro { grid-column:1/-1; min-height:0; padding:0 0 4px; border:0; background:transparent; box-shadow:none; }
#overview.hero-grid .intro h2 { margin:0; font-size:1.45rem; }
#overview.hero-grid .intro p:last-child { display:none; }
#overview.hero-grid .metric { min-height:88px; padding:16px; border-radius:7px; background:#fff; box-shadow:0 8px 20px rgba(28,34,48,.06); }
#overview.hero-grid .metric.metric-navigation { padding:0; transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
#overview.hero-grid .metric.metric-navigation:hover { transform:translateY(-2px); border-color:#b9c0c9; box-shadow:0 12px 24px rgba(28,34,48,.1); }
#overview.hero-grid .metric-link { display:block; min-height:88px; padding:16px; box-sizing:border-box; color:inherit; text-decoration:none; cursor:pointer; }
#overview.hero-grid .metric-link:focus-visible { outline:2px solid #242a32; outline-offset:-3px; border-radius:7px; }
#overview.hero-grid .metric-link span { color:#526b9e; font-weight:600; }
#overview.hero-grid .expected-funding-card strong { color:#187044; }
#overview.hero-grid .metric:has(#opportunityCount),#overview.hero-grid .metric:has(#accountAvailable) { display:none; }
#overview + .model-panel { display:none; }
.dashboard-panel { margin-top:14px; padding:0; border:0; background:transparent; }
.dashboard-metrics:empty { display:none; }
.dashboard-heading { align-items:flex-start; padding:0 0 12px; }
.dashboard-heading h2 { margin:0 0 4px; font-size:1.18rem; }
.dashboard-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.dashboard-filters { display:flex; gap:0; }
.dashboard-filters .button { border-radius:0; margin-left:-1px; padding:5px 9px; font-size:.66rem; }
.dashboard-filters .button:first-child { border-radius:4px 0 0 4px; margin-left:0; }
.dashboard-filters .button:last-child { border-radius:0 4px 4px 0; }
.dashboard-filters .button.active { color:#fff; border-color:#171b22; background:#171b22; }
.dashboard-chart-grid,.dashboard-lower-grid { grid-template-columns:1fr; gap:14px; margin-top:0; }
.dashboard-lower-grid { grid-template-columns:1fr; margin-top:14px; }
.dashboard-trend-panel { position:relative; padding:14px 16px 10px; border-radius:7px; background:#fff; box-shadow:0 8px 20px rgba(28,34,48,.06); }
.dashboard-trend-panel .section-heading { margin-bottom:6px; }
.dashboard-trend-panel strong { font-size:.82rem; }
#dashboardChart,#dashboardNetChart { width:100%; height:270px; }
.dashboard-primary-chart { padding:0 0 10px; overflow:hidden; }
.dashboard-primary-chart > .section-heading { min-height:42px; margin:0; padding:8px 12px; border-bottom:1px solid #e1e4e8; flex-direction:row; align-items:center; }
.dashboard-primary-chart > .section-heading > strong { color:#171c23; font-size:.78rem; }
.dashboard-primary-chart #dashboardChart { display:block; height:330px; padding:8px 16px 0; box-sizing:border-box; }
.dashboard-chart-summary { display:none; }
.chart-gridline { stroke:#e6e8eb; stroke-width:1; stroke-dasharray:3 3; }
.chart-axis-label,.chart-label,.chart-axis-value,.chart-axis-name { fill:#81878f; font-size:10px; }
.chart-axis-name { font-size:10px; font-weight:600; }
.chart-bar-funding { fill:#b98a00; opacity:.92; }
.chart-bar-fee { fill:#17653c; opacity:.92; }
.chart-bar-net { fill:#17653c; opacity:.9; }
.chart-cumulative { stroke:#1680bb; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.chart-cumulative-area { fill:#1680bb; fill-opacity:.12; }
.chart-rate-line { stroke:#d4a314; stroke-width:1.5; stroke-dasharray:4 3; stroke-linecap:round; stroke-linejoin:round; }
.chart-hover-zone { fill:#fff; fill-opacity:.001; pointer-events:all; cursor:crosshair; }
.dashboard-tooltip { position:absolute; z-index:4; min-width:166px; max-width:220px; padding:10px 12px; border:1px solid #dce1e6; border-radius:4px; background:rgba(255,255,255,.98); box-shadow:0 6px 16px rgba(27,34,45,.22); color:#353b43; font-size:.66rem; line-height:1.55; pointer-events:none; }.dashboard-tooltip strong,.dashboard-tooltip span { display:block; }.dashboard-tooltip strong { margin-bottom:3px; color:#222831; font-size:.7rem; }.dashboard-tooltip b { color:#187044; }.tooltip-dot { display:inline-block; width:7px; height:7px; margin:0 5px 1px 0; border-radius:50%; }.tooltip-dot.funding { background:#b98a00; }.tooltip-dot.fee { background:#17653c; }.tooltip-dot.net { background:#17653c; }.tooltip-dot.line { background:#1680bb; }.tooltip-dot.rate { background:#d4a314; }
.dashboard-legend { display:flex; justify-content:center; gap:18px; color:#737a83; font-size:.64rem; }.dashboard-legend span { display:inline-flex; align-items:center; gap:5px; }.dashboard-legend i { display:inline-block; width:12px; height:8px; border-radius:2px; }.legend-funding { background:#b98a00; }.legend-fee { background:#17653c; }.legend-line { width:20px!important; height:2px!important; border-radius:0!important; background:#1680bb; }.legend-rate { width:20px!important; height:0!important; border-top:2px dashed #d4a314; border-radius:0!important; }
.legend-net { background:#17653c; }
.dashboard-sync-panel { margin-top:14px; padding:14px 16px; border-radius:7px; background:#fff; box-shadow:0 8px 20px rgba(28,34,48,.06); }
.dashboard-trend-panel .chart-axis { stroke:#cfd4da; }
@media (max-width:1200px) { #overview.hero-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:1050px) { #overview.hero-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } #overview.hero-grid .intro { grid-column:1/-1; } .dashboard-lower-grid { grid-template-columns:1fr; } }
@media (max-width:760px) { #overview.hero-grid { grid-template-columns:1fr 1fr; } .dashboard-toolbar { justify-content:flex-start; } .dashboard-heading { flex-direction:column; } }

/* Opportunities scanner: separate live status, scan criteria and result controls. */
.opportunity-scanner { margin-bottom:12px; padding:20px; }
.opportunity-scanner-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.opportunity-scanner-heading h2 { margin:0 0 6px; font-size:1.35rem; font-weight:600; }
.opportunity-scanner-heading p:last-child { margin:0; font-size:.7rem; }
.scan-live-badge { display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; padding:6px 9px; border:1px solid #d9e7de; border-radius:999px; color:#3d6e50; background:#f5fbf7; font-size:.63rem; font-weight:650; }
.scan-live-badge i { width:7px; height:7px; border-radius:50%; background:#2d965a; box-shadow:0 0 0 3px rgba(45,150,90,.1); }
.scan-status-strip { display:grid; grid-template-columns:76px minmax(0,1fr); align-items:start; gap:12px; margin-top:16px; padding:10px 12px; border:1px solid #e2e6ea; border-radius:6px; background:#fafbfc; }
.scan-status-strip > span { color:#6f7781; font-size:.62rem; font-weight:700; }
.scan-status-strip p { margin:0; color:#59616b; font-size:.68rem; line-height:1.55; overflow-wrap:anywhere; }
.opportunity-filter-body { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:16px; margin-top:16px; padding-top:16px; border-top:1px solid #e7e9ec; }
.opportunity-filter-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:11px; }
.opportunity-filter-grid label { display:grid; gap:6px; min-width:0; color:#69717b; font-size:.63rem; }
.filter-input-unit { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; min-width:0; height:34px; border:1px solid #d7dce2; border-radius:5px; background:#fff; transition:.15s ease; }
.filter-input-unit:focus-within { border-color:#8c949e; box-shadow:0 0 0 3px rgba(48,57,68,.07); }
.filter-input-unit input { width:100%; min-width:0; height:32px; padding:6px 8px; border:0; border-radius:5px; background:transparent; box-shadow:none; }
.filter-input-unit input:focus { border:0; box-shadow:none; }
.filter-input-unit em { min-width:24px; padding:0 8px; border-left:1px solid #e4e7ea; color:#9298a0; font-size:.58rem; font-style:normal; text-align:center; }
.opportunity-filter-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; min-width:280px; }
.opportunity-filter-actions .button { min-height:34px; white-space:nowrap; }
.opportunity-filter-bar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:12px; padding:11px 14px; }
.opportunity-control-group { display:flex; align-items:center; gap:10px; min-width:0; }
.opportunity-control-label { flex:0 0 auto; color:#8a9098; font-size:.58rem; font-weight:700; letter-spacing:.08em; }
.opportunity-filter-bar .opportunity-tabs,.opportunity-filter-bar .venue-switch { display:flex; align-items:center; gap:6px; margin:0; }
.opportunity-filter-bar .venue-switch { margin-left:0; }
.opportunity-filter-bar .button { padding:6px 9px; font-size:.66rem; white-space:nowrap; }
.opportunity-filter-bar .opportunity-tabs > button span { color:#a85d1c; }
.opportunity-filter-bar .opportunity-tabs > button.active span { color:#fff; }
.opportunity-direction-note { display:inline-flex; align-items:center; padding:5px 8px; border-radius:4px; color:#31704b; background:#f0f8f3; font-size:.62rem; font-weight:650; white-space:nowrap; }
.opportunity-table-heading h2 { margin-top:2px; }
/* A 14-column market matrix must scroll before its price columns are squeezed.
   This keeps every venue quote readable at intermediate desktop widths. */
.opportunity-table-wrap { margin-bottom:-4px; padding-bottom:9px; overscroll-behavior-inline:contain; scrollbar-gutter:stable both-edges; }
.opportunity-table { width:1540px; min-width:1540px; table-layout:fixed; }
.opportunity-table th,.opportunity-table td { padding:11px 10px; vertical-align:middle; }
.opportunity-table th { white-space:nowrap; }
.opportunity-table td { white-space:normal; line-height:1.35; }
.opportunity-table td small { white-space:nowrap; }
.opportunity-table th:nth-child(1),.opportunity-table td:nth-child(1) { width:112px; }
.opportunity-table th:nth-child(2),.opportunity-table td:nth-child(2) { width:100px; }
.opportunity-table th:nth-child(3),.opportunity-table td:nth-child(3) { width:128px; }
.opportunity-table th:nth-child(4),.opportunity-table td:nth-child(4) { width:74px; }
.opportunity-table th:nth-child(n+5):nth-child(-n+9),.opportunity-table td:nth-child(n+5):nth-child(-n+9) { width:116px; }
.opportunity-table th:nth-child(10),.opportunity-table td:nth-child(10) { width:74px; }
.opportunity-table th:nth-child(11),.opportunity-table td:nth-child(11) { width:122px; }
.opportunity-table th:nth-child(12),.opportunity-table td:nth-child(12) { width:132px; }
.opportunity-table th:nth-child(13),.opportunity-table td:nth-child(13) { width:132px; }
.opportunity-table th:nth-child(14),.opportunity-table td:nth-child(14) { width:170px; }
.opportunity-table th:nth-child(14),.opportunity-table td:nth-child(14) { position:sticky; right:0; z-index:2; background:#fff; box-shadow:-10px 0 14px -14px rgba(26,33,46,.58); }
.opportunity-table th:nth-child(14) { z-index:3; background:#fafbfc; }
.opportunity-table td:nth-child(14) { min-width:170px; white-space:nowrap; }
.opportunity-table tbody tr:hover td:nth-child(14) { background:#fafbfc; }
@media (max-width:1600px) {
  .opportunity-table-wrap { border-top:1px solid #edf0f2; border-bottom:1px solid #edf0f2; }
  .opportunity-table-wrap::after { content:"左右滚动可查看全部行情字段"; display:block; position:sticky; left:0; width:max-content; margin:7px 0 -1px; color:#8c939b; font-size:.58rem; }
}
@media (min-width:1601px) { .opportunity-table-wrap::after { display:none; } }
@media (max-width:1180px) {
  .opportunity-filter-body { grid-template-columns:1fr; }
  .opportunity-filter-actions { justify-self:end; }
  .opportunity-filter-bar { align-items:flex-start; flex-direction:column; }
}
@media (max-width:820px) {
  .opportunity-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .opportunity-filter-actions { width:100%; min-width:0; }
  .opportunity-control-group { align-items:flex-start; flex-direction:column; }
  .opportunity-filter-bar .opportunity-tabs,.opportunity-filter-bar .venue-switch { flex-wrap:wrap; }
  .opportunity-table-heading { align-items:flex-start; }
}
@media (max-width:520px) {
  .opportunity-scanner-heading { flex-direction:column; }
  .scan-status-strip { grid-template-columns:1fr; gap:5px; }
  .opportunity-filter-grid { grid-template-columns:1fr; }
  .opportunity-filter-actions { grid-template-columns:1fr; }
}

/* The positions summary has three reference cards, not a four-column grid. */
.holdings-page > .balance-cards { grid-template-columns:repeat(3,minmax(0,1fr)); }

/* Strategies reference layout: compact summary cards and a single aligned ledger table. */
#strategySummary.dashboard-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); margin:16px 0 20px; }
.strategy-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:wrap; }
.strategy-header-actions #strategyFilters { justify-content:flex-end; margin:0; }
.strategy-table-wrap { overflow:auto; border:1px solid #e0e4e8; border-radius:7px; background:#fff; }
.strategy-table { min-width:1060px; width:100%; table-layout:fixed; }
.strategy-table th,.strategy-table td { padding:10px 8px; vertical-align:middle; font-size:.7rem; }
.strategy-table th { white-space:nowrap; }
.strategy-table th:nth-child(1),.strategy-table td:nth-child(1) { width:7%; }
.strategy-table th:nth-child(2),.strategy-table td:nth-child(2) { width:13%; }
.strategy-table th:nth-child(3),.strategy-table td:nth-child(3) { width:8%; }
.strategy-table th:nth-child(4),.strategy-table td:nth-child(4) { width:7%; }
.strategy-table th:nth-child(5),.strategy-table td:nth-child(5),.strategy-table th:nth-child(6),.strategy-table td:nth-child(6) { width:8%; }
.strategy-table th:nth-child(7),.strategy-table td:nth-child(7),.strategy-table th:nth-child(8),.strategy-table td:nth-child(8),.strategy-table th:nth-child(9),.strategy-table td:nth-child(9) { width:7%; }
.strategy-table th:nth-child(10),.strategy-table td:nth-child(10) { width:12%; }
.strategy-table th:nth-child(11),.strategy-table td:nth-child(11) { width:16%; }
.strategy-table td:not(:last-child) { overflow:hidden; text-overflow:ellipsis; }
.strategy-table td:first-child strong { display:block; }
.strategy-name-cell { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.strategy-table th:last-child,.strategy-table td:last-child { position:sticky; right:0; z-index:1; background:#fff; box-shadow:-8px 0 12px -12px rgba(25,31,40,.55); }
.strategy-table th:last-child { z-index:2; background:#fafbfc; }
.strategy-table tbody tr:hover td:last-child { background:#fafbfc; }
.strategy-kind { display:inline-block; padding:3px 6px; border-radius:4px; color:#555d66; background:#eef0f2; font-size:.59rem; }
.strategy-status { display:inline-block; padding:4px 7px; border-radius:4px; font-size:.62rem; font-weight:700; }
.strategy-status-running { color:#237a45; background:#edf8f0; }
.strategy-status-closed { color:#6c727b; background:#f0f1f3; }
.strategy-row-actions { white-space:nowrap; }
.compact-button { padding:5px 6px; margin-right:2px; font-size:.6rem; }
.strategy-row-actions .close-button { color:#fff; border-color:#9a3d0d; background:#9a3d0d; }
.strategy-row-actions .end-button { color:#424850; }
.strategy-row-actions .danger-button { color:#b83232; border-color:#e5bcbc; background:#fff4f4; }
#strategySummary.dashboard-metrics article { min-height:94px; background:#fff; }
@media (max-width:760px) { #strategySummary.dashboard-metrics { grid-template-columns:1fr; } .strategy-header-actions { justify-content:flex-start; width:100%; } .strategy-header-actions #strategyFilters { justify-content:flex-start; } }

/* Running strategies use glanceable cards; the closed history remains a compact ledger. */
.strategy-list { gap:20px; }
.strategy-list-section { display:grid; gap:10px; }
.strategy-list-section-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; padding:0 2px; }
.strategy-list-section-heading h3 { margin:0; color:#252a31; font-size:.86rem; }
.strategy-list-section-heading span { display:block; margin-top:3px; color:#858b94; font-size:.65rem; }
.strategy-list-section-heading > strong { min-width:25px; padding:4px 7px; border-radius:999px; color:#4f5660; background:#f0f2f4; font-size:.67rem; text-align:center; }
.strategy-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(335px,1fr)); gap:12px; }
.strategy-live-card { display:grid; gap:13px; min-width:0; padding:16px; border:1px solid #dfe3e8; border-radius:8px; background:#fff; box-shadow:0 5px 16px rgba(28,34,48,.045); }
.strategy-live-card:hover { border-color:#c7cdd5; box-shadow:0 8px 22px rgba(28,34,48,.08); }
.strategy-live-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.strategy-live-card-header h3 { margin:4px 0 3px; overflow:hidden; color:#20242b; font-size:.92rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.strategy-live-card-header p { margin:0; color:#6f7680; font:600 .7rem ui-monospace,SFMono-Regular,Consolas,monospace; }
.strategy-code { color:#9a9fa7; font:600 .6rem ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.04em; }
.strategy-route { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border:1px solid #e7e9ed; border-radius:5px; color:#555d66; background:#fafbfc; font-size:.67rem; }
.strategy-route span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.strategy-route b { margin-left:4px; color:#252a31; font-weight:750; }
.strategy-route i { color:#a1a7af; font-size:.82rem; font-style:normal; }
.strategy-live-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.strategy-live-metrics > div { min-width:0; padding:9px 10px; border:1px solid #e7e9ed; border-radius:5px; background:#fbfcfd; }
.strategy-live-metrics span,.strategy-live-details dt { display:block; color:#818791; font-size:.61rem; }
.strategy-live-metrics strong { display:block; margin-top:6px; overflow:hidden; color:#252a31; font-size:.87rem; text-overflow:ellipsis; white-space:nowrap; }
.strategy-live-metrics strong.number-positive { color:#188247; }.strategy-live-metrics strong.number-negative { color:#cf3434; }
.strategy-live-metrics strong small { margin-left:3px; color:#858b94; font-size:.58rem; font-weight:500; }
.strategy-live-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; padding:0 1px; }
.strategy-live-details dd { margin:4px 0 0; overflow:hidden; color:#353b43; font-size:.68rem; text-overflow:ellipsis; white-space:nowrap; }
.strategy-live-details dd small { margin-left:5px; font-size:.62rem; }
.strategy-health { display:flex; align-items:flex-start; gap:8px; min-width:0; padding:9px 10px; border:1px solid #d8ecdf; border-radius:5px; background:#f5fbf7; }
.strategy-health.warning { border-color:#efdfc7; background:#fffaf2; }
.strategy-health.danger { border-color:#efcdcd; background:#fff6f6; }
.strategy-health-dot { flex:0 0 auto; width:7px; height:7px; margin-top:4px; border-radius:50%; background:#2c9457; box-shadow:0 0 0 3px rgba(44,148,87,.12); }
.strategy-health.warning .strategy-health-dot { background:#b77a26; box-shadow:0 0 0 3px rgba(183,122,38,.12); }
.strategy-health.danger .strategy-health-dot { background:#c53b3b; box-shadow:0 0 0 3px rgba(197,59,59,.12); }
.strategy-health strong,.strategy-health small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.strategy-health strong { color:#267345; font-size:.67rem; }
.strategy-health.warning strong { color:#98651e; }.strategy-health.danger strong { color:#b32f2f; }
.strategy-health small { margin-top:3px; color:#7b828b; font-size:.6rem; }
.strategy-closed-section { margin-top:2px; }
.strategy-closed-section .strategy-table-wrap { margin-top:0; }
.strategy-closed-section .strategy-row-actions { display:flex; align-items:center; gap:2px; }
@media (max-width:760px) {
  .strategy-card-grid { grid-template-columns:1fr; }
  .strategy-live-card { padding:14px; }
  .strategy-live-card-header h3 { max-width:210px; }
}

/* Auto-refresh countdown pill (top bar) */
.refresh-countdown { font-variant-numeric: tabular-nums; cursor: default; color:#2f9e63; border-color:rgba(47,158,99,.4); white-space:nowrap; }.refresh-countdown.is-refreshing { color:#b07d1a; border-color:rgba(176,125,26,.45); }

/* Mobile shell: use an off-canvas menu instead of a horizontally scrolling nav. */
.mobile-nav-toggle,.mobile-nav-backdrop { display:none; }
@media (max-width:760px) {
  html,body { max-width:100%; overflow-x:hidden; }
  body.mobile-nav-open { overflow:hidden; }
  .app-shell { display:block; width:100%; min-width:0; }
  .topbar { position:sticky; top:0; display:grid; grid-template-columns:38px minmax(0,1fr); gap:10px; min-height:58px; padding:8px 12px; z-index:15; }
  .topbar > div:first-of-type { min-width:0; }
  .topbar h1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-nav-toggle { display:grid; place-items:center; width:38px; height:38px; padding:0; border:1px solid #d9dde3; border-radius:6px; color:#252a31; background:#fff; font-size:1.15rem; cursor:pointer; }
  .page-nav { position:fixed; inset:0 auto 0 0; display:flex; width:min(300px,84vw); height:100dvh; overflow-x:hidden; overflow-y:auto; align-items:stretch; flex-direction:column; gap:2px; padding:16px 12px 24px; border-right:1px solid #dfe3e8; border-bottom:0; background:#fff; transform:translateX(-105%); transition:transform .2s ease; z-index:30; }
  .app-shell.mobile-nav-open .page-nav { transform:translateX(0); box-shadow:18px 0 45px rgba(24,30,40,.22); }
  .page-nav .brand-mark { display:flex; min-height:72px; padding:5px 8px 16px; }
  .page-nav .brand-mark strong { display:block; }
  .page-nav .nav-caption { display:block; margin:8px 10px 6px; }
  .page-nav a { width:100%; min-width:0; min-height:42px; justify-content:flex-start; padding:9px 10px; }
  .page-nav a span { display:grid; }
  .page-nav a strong { font-size:.76rem; }
  .page-nav a small { display:block; }
  .mobile-nav-backdrop { position:fixed; inset:0; width:100%; height:100%; padding:0; border:0; background:rgba(16,21,29,.38); opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:25; }
  .app-shell.mobile-nav-open .mobile-nav-backdrop { display:block; opacity:1; pointer-events:auto; }
  main { width:calc(100% - 24px); max-width:100%; margin:16px auto 32px; }

  /* API connections become vertical cards, with no horizontal table scrollbar. */
  .connection-summary { align-items:flex-start; flex-direction:column; gap:5px; }
  .connection-table-panel { padding:12px; }
  .connection-table-wrap { overflow:visible; margin:12px 0 0; padding:0; }
  .connection-table { width:100%; min-width:0; border:0; }
  .connection-table thead { display:none; }
  .connection-table tbody { display:grid; gap:12px; }
  .connection-table tbody tr { display:grid; padding:8px 12px; border:1px solid #dfe3e8; border-radius:8px; background:#fff; }
  .connection-table tbody tr:hover { background:#fff; }
  .connection-table tbody td { display:grid; grid-template-columns:90px minmax(0,1fr); align-items:start; gap:9px; width:auto; padding:9px 0; border-bottom:1px solid #edf0f2; text-align:left; white-space:normal; overflow-wrap:anywhere; }
  .connection-table tbody td::before { content:attr(data-label); color:#7d838c; font-size:.62rem; font-weight:700; letter-spacing:.04em; }
  .connection-table tbody td:last-child { border-bottom:0; text-align:left; }
  .connection-table code { max-width:100%; overflow-wrap:anywhere; white-space:normal; }
  .connection-error { max-width:100%; white-space:normal; }
  .connection-actions { justify-content:flex-start; flex-wrap:wrap; }
  .connection-empty { display:block !important; }
  .connection-empty td { display:block !important; border:0 !important; text-align:center !important; }
.connection-empty td::before { display:none; }
}

/* Every data table becomes a labeled vertical card list on phones. */
@media (max-width:760px) {
  .table-wrap,
  .strategy-table-wrap,
  .balance-account-table-wrap,
  .balance-table-wrap { max-width:100%; overflow:visible !important; scrollbar-width:none; }

  .responsive-card-table { display:block; width:100% !important; min-width:0 !important; table-layout:auto !important; border:0; }
  .responsive-card-table > thead { display:none; }
  .responsive-card-table > tbody { display:grid; gap:12px; width:100%; }
  .responsive-card-table > tbody > tr { display:grid; width:100%; min-width:0; padding:8px 12px; border:1px solid #dfe3e8; border-radius:8px; background:#fff; box-shadow:0 5px 16px rgba(28,34,48,.045); }
  .responsive-card-table > tbody > tr:hover { background:#fff; }
  .responsive-card-table > tbody > tr > td { position:static !important; display:grid; grid-template-columns:92px minmax(0,1fr); align-items:start; gap:9px; width:auto !important; min-width:0 !important; max-width:none !important; padding:9px 0; border-right:0; border-bottom:1px solid #edf0f2; color:#4d535c; background:transparent !important; box-shadow:none !important; text-align:left !important; white-space:normal !important; overflow:visible !important; overflow-wrap:anywhere; text-overflow:clip; }
  .responsive-card-table > tbody > tr > td::before { content:attr(data-label); color:#7d838c; font-size:.61rem; font-weight:700; letter-spacing:.04em; line-height:1.45; }
  .responsive-card-table > tbody > tr > td:last-child { border-bottom:0; }
  .responsive-card-table > tbody > tr > td br + small { display:inline-block; margin-top:3px; }
  .responsive-card-table .responsive-wide-cell { display:block; padding:14px 4px; border-bottom:0; text-align:center !important; }
  .responsive-card-table .responsive-wide-cell::before { display:none; }
  .responsive-card-table .button { margin:2px 3px 2px 0; }
  .responsive-card-table .connection-actions,
  .responsive-card-table .strategy-row-actions { justify-content:flex-start; flex-wrap:wrap; white-space:normal; }

  .opportunity-table-wrap::after { display:none !important; }
  .inline-depth .depth-summary { overflow:visible; }
}

@media (max-width:380px) {
  .responsive-card-table > tbody > tr > td { grid-template-columns:78px minmax(0,1fr); gap:8px; }
}
