:root {
  color-scheme: light;
  --bg: #f5f7fa; --surface: #fff; --ink: #182230; --muted: #697586;
  --line: #e5e9ef; --accent: #2563eb; --accent-soft: #eff5ff;
  --green: #07815e; --red: #d04444; --nav: #101828; --radius: 10px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; color: var(--ink); font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #93b4fc; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 14px; font-weight: 600; letter-spacing: -.2px; }
h3 { font-size: 14px; }
.muted { color: var(--muted); }
.positive { color: var(--green); }
.negative { color: var(--red); }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 1.4px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 38px; padding: 9px 14px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 600; transition: background .15s, border-color .15s; }
.button .icon { width: 15px; height: 15px; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.secondary { background: #fff; border-color: #d9dfe8; box-shadow: 0 1px 2px #10182804; }
.secondary:hover { background: #f8fafc; border-color: #b9c4d4; }
.full-width { width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; color: #f8fafc; font-size: 22px; font-weight: 650; letter-spacing: -.7px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: #2563eb; color: #fff; }
.brand-mark .icon { width: 22px; height: 22px; stroke-width: 2; }
.brand-word { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-word small { font-size: 8px; letter-spacing: 2.4px; font-weight: 500; color: #8493ac; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; background: #12b981; flex-shrink: 0; }
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 224px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 29px 18px 20px; background: var(--nav); color: #98a6bc; z-index: 5; border-right: 1px solid #1c293e; }
.sidebar .brand { margin-left: 10px; }
.workspace-label { font-size: 9px; letter-spacing: 1.5px; font-weight: 600; color: #66758e; margin: 45px 12px 14px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-bottom: 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #98a6bc; font-size: 12px; font-weight: 500; text-align: left; }
.nav-item.active { background: #1d2c47; border-color: #2b3f62; color: #e8efff; }
.nav-item.active .icon { color: #83acff; }
.nav-item:not(.active):hover { background: #192436; color: #f1f5f9; }
.sidebar-bottom { margin-top: auto; }
.mode-card { margin-top: 40px; padding: 16px 12px; border-top: 1px solid #273246; border-bottom: 1px solid #273246; font-size: 9px; font-weight: 600; letter-spacing: 1px; color: #becbdf; }
.mode-card .status-dot { background: #70a3ff; }
.mode-card p { font-size: 11px; font-weight: 400; line-height: 1.7; letter-spacing: 0; margin-top: 8px; color: #7d8da6; }
.logout { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; padding: 20px 10px 0; background: none; color: #92a2ba; }
.logout span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.workspace { flex: 1; min-width: 0; margin-left: 224px; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px; background: #fff; border-bottom: 1px solid var(--line); font-size: 11px; }
.breadcrumb { color: #8a95a5; }
.slash { color: #c4cbd5; margin: 0 12px; }
.topbar-right { display: flex; align-items: center; gap: 21px; }
.connection { display: flex; align-items: center; font-size: 10px; color: var(--muted); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; color: #64748b; }
.avatar .icon { width: 15px; height: 15px; }
.content { max-width: 1680px; margin: auto; padding: 32px 36px 20px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-title .eyebrow { font-size: 9px; margin-bottom: 8px; letter-spacing: 1.3px; color: #8390a2; }
.page-title h1 { font-size: 28px; line-height: 1.3; font-weight: 650; letter-spacing: -.9px; }
.page-title p { color: var(--muted); font-size: 12px; margin-top: 7px; line-height: 1.6; }
.title-actions { display: flex; align-items: center; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid transparent; border-radius: 4px; font-size: 10px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.paper { color: #526581; background: #fff; border-color: #dbe2eb; }
.paper:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #7191bd; }
.neutral, .hold { color: #64748b; background: #f4f6f9; border-color: #e9edf3; }
.buy { color: #087653; background: #ecfdf5; border-color: #d2f4e5; }
.sell { color: #b34637; background: #fff2ef; border-color: #fce2dc; }
.failed { color: #c23d3d; background: #fff1f1; border-color: #fbdcdc; }
.running { color: #295cc7; background: #eff5ff; border-color: #dce8ff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { min-width: 0; padding: 21px 22px 19px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 500; color: var(--muted); }
.stat-label .icon { color: #9ba9ba; width: 16px; height: 16px; }
.stat-value { font-size: clamp(23px, 2.2vw, 34px); font-weight: 600; line-height: 1.4; letter-spacing: -1px; margin-top: 18px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 10px; margin-top: 10px; line-height: 1.6; }
.main-stat { background: #162338; border-color: #162338; color: #fff; }
.main-stat .stat-label, .main-stat .stat-label .icon, .main-stat .muted { color: #98abc8; }
.main-stat .positive { color: #60d6af; }
.main-stat .negative { color: #ff9a9a; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; margin-bottom: 22px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 2px #10182803; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 22px 18px; }
.panel-heading p { color: #8793a3; font-size: 10px; margin-top: 5px; }
.panel-heading > .muted { font-size: 10px; }
.chart-wrap { height: 240px; position: relative; padding: 10px 19px 0; }
.chart-wrap canvas { width: 100%; height: 100%; }
.chart-empty { position: absolute; top: 42%; left: 18%; right: 12%; padding: 13px; text-align: center; color: #8390a2; background: #fffffff2; font-size: 11px; line-height: 1.7; border: 1px solid var(--line); border-radius: 6px; }
.chart-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; padding: 17px 20px 22px; color: #8894a5; font-size: 9px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: #3977ed; }
.baseline-key { width: 13px; border-top: 1px dashed #aab5c5; margin-left: 14px; }
.agent-panel { padding-bottom: 20px; }
.agent-panel .panel-heading { padding-bottom: 10px; }
.agent-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: #eff5ff; color: #3972d8; }
.agent-icon .icon { width: 17px; height: 17px; }
.agent-state { margin: 0 22px; display: inline-flex; align-items: center; font-size: 10px; color: #64748b; }
.agent-state[data-state="paused"] .status-dot { background: #9aa5b4; }
.agent-state[data-state="error"] .status-dot { background: #e29639; }
.agent-model-label { margin: 25px 22px 8px; font-size: 9px; letter-spacing: 1.1px; color: #8793a5; }
.active-model { margin: 0 22px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.agent-divider { margin: 20px 22px 15px; border-top: 1px solid var(--line); }
.agent-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 13px 22px; color: #7b8798; font-size: 11px; }
.agent-row strong { color: #344155; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.agent-panel .button { width: calc(100% - 44px); margin: 12px 22px 0; background: #2563eb; border-color: #2563eb; color: #fff; }
.agent-panel .button:hover { background: #1d4ed8; }
.agent-note { font-size: 10px; text-align: center; color: #8a96a7; margin: 12px 20px 0; }
.bottom-columns { grid-template-columns: 1.1fr 1fr; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #456baf; font-size: 11px; font-weight: 500; white-space: nowrap; }
.text-button:hover { color: #1d4ed8; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 4px; background: #f0f3f8; color: #738198; font-size: 10px; margin-left: 7px; }
.subtle-icon { color: #8a9bb3; }
.empty-state { padding: 32px 22px 37px; color: #8490a1; font-size: 11px; line-height: 1.8; text-align: center; }
.empty-state strong { display: block; color: #4d5b6d; font-size: 12px; font-weight: 500; margin-bottom: 3px; }
.empty-icon { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 11px; border: 1px solid #e5eaf2; border-radius: 8px; background: #f8fafc; color: #8b9bb0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; white-space: nowrap; }
th { padding: 11px 22px; color: #8390a3; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; background: #fafbfd; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 14px 22px; border-bottom: 1px solid #eef1f5; font-variant-numeric: tabular-nums; font-size: 11px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
.numeric { text-align: right; }
.coin-cell { display: flex; align-items: center; gap: 10px; }
.coin-icon { display: grid; place-items: center; flex-shrink: 0; width: 31px; height: 31px; border-radius: 50%; background: #eef2f7; color: #66758a; font-size: 12px; font-weight: 600; }
.coin-icon.btc { background: #fff5e7; color: #c58a2b; }
.coin-icon.eth { background: #eff1fa; color: #7786b5; }
.coin-icon.ltc { background: #eef4fc; color: #648ec0; }
.coin-cell strong { font-size: 12px; font-weight: 600; }
.coin-cell small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; color: #8d99aa; margin-top: 3px; }
.last-decision-content { padding: 0 22px 22px; }
.decision-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 10px; color: #8996a8; margin-bottom: 13px; }
.decision-copy { color: #637085; font-size: 12px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.last-decision-content .decision-copy { max-height: 128px; overflow: auto; }
.decision-signature { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); margin-top: 17px; padding-top: 13px; font-size: 10px; color: #8b97a9; }
.decision-signature span { overflow-wrap: anywhere; }
.decision-entry { padding: 22px; border-top: 1px solid var(--line); }
.decision-entry-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.decision-entry-top .decision-meta { margin: 0; }
.decision-entry > .text-button { margin-top: 13px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 27px 0 16px; }
.radar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.radar-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; }
.radar-price { font-size: 17px; font-weight: 600; letter-spacing: -.4px; text-align: right; font-variant-numeric: tabular-nums; }
.radar-price small { display: block; margin-top: 6px; font-size: 10px; font-weight: 400; letter-spacing: 0; }
.workspace-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid var(--line); padding-top: 19px; margin-top: 29px; font-size: 9px; color: #929daf; }
.workspace-footer .status-dot { width: 4px; height: 4px; background: #8da6cd; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.settings-panel { padding: 0 24px 25px; }
.settings-panel .panel-heading { padding-left: 0; padding-right: 0; }
.settings-panel > p { font-size: 12px; line-height: 1.8; }
.settings-panel > .button { margin: 24px 5px 0 0; }
.settings-note { padding: 16px; margin-top: 26px; border: 1px solid #e9edf4; border-radius: 6px; background: #fafbfd; color: #7c889b; font-size: 11px; line-height: 1.8; }
.settings-note strong { color: #52637e; font-weight: 600; }
.settings-note p { margin-top: 5px; }
.field-help { color: #8b96a6; font-size: 10px; line-height: 1.7; margin-top: 8px; }
label { display: block; font-size: 11px; font-weight: 500; margin: 23px 0 9px; color: #4c5b70; }
input { width: 100%; padding: 11px 12px; border: 1px solid #d9e0ea; border-radius: 6px; background: #fff; color: #243247; font-size: 12px; min-height: 40px; box-shadow: 0 1px 2px #10182803; }
input::placeholder { color: #a0aaba; }
input:focus { border-color: #719bf1; }
.panel-heading input { max-width: 230px; }
.reset-panel { margin-top: 22px; border-left: 3px solid #c6cfdb; }
#reset-portfolio { color: #b13b3b; border-color: #e4caca; }
#reset-portfolio:hover { background: #fff7f7; }
.error-banner { padding: 13px 17px; margin-bottom: 20px; border: 1px solid #f0d9c1; border-radius: 6px; background: #fffaf4; color: #a0672c; font-size: 12px; line-height: 1.7; }
.error { min-height: 18px; margin-top: 14px; color: var(--red); font-size: 12px; line-height: 1.6; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 30; max-width: 90vw; padding: 13px 19px; border: 1px solid #34445b; border-radius: 7px; background: #182538; color: #f1f5f9; box-shadow: 0 6px 24px #1018281f; font-size: 12px; line-height: 1.7; }
.toast.error-toast { background: #9b3434; border-color: #9b3434; }
.login-layout { display: grid; grid-template-columns: 42% 58%; min-height: 100vh; background: #fafbfd; }
.login-brand { background: #101c30; padding: 48px 50px; color: #e2e8f0; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-brand:after { content: ''; position: absolute; pointer-events: none; inset: 0; opacity: .14; background-image: linear-gradient(#647b9c 1px, transparent 1px), linear-gradient(90deg, #647b9c 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(transparent 20%, #000); }
.login-brand > * { z-index: 1; position: relative; }
.login-brand .brand { margin-bottom: 60px; }
.login-brand .eyebrow { color: #7c9ac6; font-size: 9px; }
.login-brand h1 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.2; font-weight: 500; letter-spacing: -1.5px; margin: 24px 0; }
.login-brand p { max-width: 310px; font-size: 13px; color: #90a3bf; line-height: 1.9; }
.auth-features { display: flex; flex-direction: column; gap: 19px; margin-top: 40px; padding-top: 29px; border-top: 1px solid #2b3950; }
.auth-feature { display: flex; align-items: center; gap: 13px; color: #becbe0; font-size: 12px; }
.auth-feature .icon { color: #7696c6; width: 17px; height: 17px; }
.login-brand footer { color: #7187a7; font-size: 10px; margin-top: 50px; }
.login-brand footer span { margin: 0 10px; color: #506785; }
.login-form-wrap { padding: 45px; display: grid; place-items: center; }
.login-form-wrap form { width: 100%; max-width: 360px; }
.login-form-wrap .eyebrow { font-size: 9px; color: #8c99ab; }
.login-form-wrap h2 { font-size: 28px; font-weight: 600; letter-spacing: -.8px; margin: 13px 0 11px; }
.login-form-wrap .muted { font-size: 12px; margin-bottom: 30px; line-height: 1.7; }
.login-form-wrap input { min-height: 44px; }
.login-form-wrap .button { width: 100%; margin-top: 10px; min-height: 44px; justify-content: space-between; }
.login-note { text-align: center; color: #8d99aa; font-size: 10px; margin-top: 24px; }
.login-note .status-dot { background: #9aadc8; }
dialog { width: 850px; max-width: 94vw; max-height: 85vh; padding: 0 24px 24px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); box-shadow: 0 24px 60px #10182830; }
dialog::backdrop { background: #10182888; backdrop-filter: blur(3px); }
dialog .panel-heading { padding-left: 0; padding-right: 0; }
dialog h3 { margin-top: 18px; }
dialog p { font-size: 12px; line-height: 1.8; }
dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 400px; overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; font-size: 11px; color: #53637b; }
dialog summary { cursor: pointer; font-size: 12px; margin: 17px 0; }
.stale-label { color: #aa7b39; font-size: 9px; }
@media (min-width: 1600px) { .content { padding: 38px 48px; } .topbar { padding: 0 48px; } .chart-wrap { height: 275px; } .overview-columns { grid-template-columns: minmax(0, 1fr) 340px; } .bottom-columns { grid-template-columns: 1.1fr 1fr; } }
@media (max-width: 1200px) { .sidebar { width: 196px; padding-left: 13px; padding-right: 13px; } .workspace { margin-left: 196px; } .content { padding: 27px 24px; } .topbar { padding: 0 24px; } .stat-card { padding: 18px 16px; } .stat-value { font-size: 25px; } .overview-columns { grid-template-columns: minmax(0, 1fr) 280px; gap: 17px; } .bottom-columns { grid-template-columns: 1fr 1fr; } .stats-grid, .radar-grid { gap: 12px; } .radar-card { padding: 16px; } .radar-price { font-size: 14px; } .title-actions .paper { display: none; } td, th { padding-left: 16px; padding-right: 16px; } }
@media (max-width: 1000px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-columns { grid-template-columns: 1fr; } .bottom-columns { grid-template-columns: 1fr; } .settings-grid { grid-template-columns: 1fr; } .radar-grid { grid-template-columns: 1fr; } .radar-card { padding: 17px 22px; } .radar-price { font-size: 17px; } .page-title h1 { font-size: 25px; } .workspace-footer > span:last-child { display: none; } .login-brand { padding: 35px; } .login-brand h1 { font-size: 34px; } .login-form-wrap { padding: 35px; } }
@media (max-width: 700px) {
  .app-layout { display: block; } .sidebar { position: static; width: 100%; padding: 18px 16px 0; } .sidebar .brand { margin-left: 3px; font-size: 20px; }
  .workspace-label, .sidebar-bottom { display: none; } .sidebar nav { display: flex; gap: 5px; overflow: auto; margin-top: 18px; padding-bottom: 8px; }
  .nav-item { width: auto; flex-shrink: 0; padding: 10px 11px; gap: 7px; font-size: 10px; } .nav-item .icon { width: 15px; height: 15px; }
  .workspace { margin-left: 0; } .topbar { padding: 0 18px; height: 53px; font-size: 10px; } .topbar-right { gap: 12px; } .connection { font-size: 9px; }
  .content { padding: 24px 16px; } .page-title { align-items: flex-start; gap: 12px; margin-bottom: 22px; } .page-title h1 { font-size: 24px; } .page-title p { font-size: 11px; max-width: 230px; } .page-title .eyebrow { font-size: 8px; } .title-actions .button { padding: 9px 10px; font-size: 10px; }
  .stats-grid { gap: 10px; margin-bottom: 18px; } .stat-card { padding: 17px 14px; } .stat-label { font-size: 10px; } .stat-label .icon { display: none; } .stat-value { font-size: 25px; margin-top: 15px; } .stat-foot { font-size: 9px; }
  .panel-heading { padding: 20px 18px 17px; } .panel-heading h2 { font-size: 13px; } .panel-heading > .muted { font-size: 9px; } .panel-heading input { max-width: 140px; min-width: 0; }
  .chart-wrap { height: 230px; padding: 8px 13px 0; } .chart-empty { font-size: 10px; left: 24%; right: 6%; } .chart-legend { font-size: 8px; } .radar-grid { gap: 10px; }
  .settings-panel { padding: 0 18px 22px; } .settings-panel .button { font-size: 11px; } .workspace-footer { font-size: 8px; gap: 8px; line-height: 1.7; }
  .login-layout { display: block; } .login-brand { padding: 24px; } .login-brand .brand { margin-bottom: 0; } .login-brand > div, .login-brand > footer, .login-brand:after { display: none; } .login-form-wrap { padding: 45px 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { transition: none !important; } }
