[hidden]{display:none!important}

/* Production shell synchronized with the approved design preview. */
:root {
  --header-h: 62px;
  --sidebar-w: 220px;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f7;
  --faint: #9aa6b6;
  --primary: #356fe8;
  --primary-soft: #eaf1ff;
  --green: #178c64;
  --green-soft: #e6f6ef;
  --red: #d0545b;
  --red-soft: #fdebed;
  --amber: #bc7b13;
  --amber-soft: #fff3dc;
  --violet: #7b61d1;
  --sidebar-line: #e2e8f0;
  --sidebar-label: #8290a2;
  --sidebar-soft: #edf3ff;
  --sidebar-text: #526174;
  --bg: #f4f7fb;
  --panel: var(--surface);
  --panel-strong: var(--surface);
  --panel-soft: var(--surface-2);
  --line: #e1e7ef;
  --line-strong: #cfd9e5;
  --text: #172235;
  --muted: #718096;
  --accent: var(--primary);
  --accent-hover: #245ed6;
  --accent-soft: var(--primary-soft);
  --positive: var(--green);
  --positive-soft: var(--green-soft);
  --danger: var(--red);
  --danger-soft: var(--red-soft);
  --warning: var(--amber);
  --warning-soft: var(--amber-soft);
  --sidebar: #f8faff;
  --sidebar-panel: var(--sidebar-soft);
  --shadow: 0 8px 24px rgba(27, 46, 74, .055);
  --topbar-height: var(--header-h);
  --sidebar-width: var(--sidebar-w);
}

:root[data-theme="dark"] {
  --surface: #141b26;
  --surface-2: #101722;
  --surface-3: #202b3a;
  --faint: #718096;
  --primary: #71a4ff;
  --primary-soft: #1b3157;
  --green: #55d6a4;
  --green-soft: #14372d;
  --red: #fb7e84;
  --red-soft: #47262c;
  --amber: #f2bd62;
  --amber-soft: #42351e;
  --violet: #b9a6ff;
  --sidebar-line: #263447;
  --sidebar-label: #7d8da1;
  --sidebar-soft: #1d2b40;
  --sidebar-text: #aebcd0;
  --bg: #0d131c;
  --panel: var(--surface);
  --panel-strong: var(--surface);
  --panel-soft: var(--surface-2);
  --line: #263447;
  --line-strong: #3a4a60;
  --text: #edf3fb;
  --muted: #9aa9bc;
  --accent: var(--primary);
  --accent-hover: #96bbff;
  --accent-soft: var(--primary-soft);
  --positive: var(--green);
  --positive-soft: var(--green-soft);
  --danger: var(--red);
  --danger-soft: var(--red-soft);
  --warning: var(--amber);
  --warning-soft: var(--amber-soft);
  --sidebar: #101823;
  --sidebar-panel: var(--sidebar-soft);
  --shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

body { background: var(--bg); }
.topbar { height: var(--header-h); padding: 0; border-color: var(--line); background: var(--surface); backdrop-filter: none; }
.topbar .brand { width: var(--sidebar-w); min-width: var(--sidebar-w); height: 100%; gap: 11px; padding: 0 18px; border-right: 1px solid var(--line); }
.brand-mark { width: 32px; height: 32px; border: 0; border-radius: 5px; background: var(--primary); color: #fff; font-size: 10px; }
.brand-name { font-size: 14px; }.brand-name small { margin-top: 2px; color: var(--faint); font-size: 7px; letter-spacing: 1.2px; }
.market-strip { height: 100%; display: flex; align-items: center; margin-right: auto; }
.market-strip > span { min-width: 146px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 0 17px; border-right: 1px solid var(--line); }
.market-strip b { color: var(--muted); font-size: 9px; }.market-strip strong { grid-row: 2; font-size: 12px; }.market-strip small { grid-row: 2; color: var(--positive); font-size: 9px; }
.topbar-actions, .top-actions { height: 100%; display: flex; align-items: center; gap: 8px; padding-right: 16px; }
.connection { margin-right: 6px; color: var(--muted); font-size: 10px; }.connection i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 4px var(--positive-soft); }
.status-dot { margin: 0; color: var(--muted); font-size: 10px; }.status-dot::before { width: 7px; height: 7px; margin-right: 7px; box-shadow: 0 0 0 4px var(--positive-soft); }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--text); }
.profile-button { height: 36px; max-width: 270px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 10px; }.profile-button span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: var(--surface-3); color: var(--primary); font-size: 9px; font-weight: 800; }.profile-button b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }.profile-button i { color: var(--muted); font-style: normal; }

.sidebar { top: var(--header-h); width: var(--sidebar-w); padding: 16px 10px 12px; border-right-color: var(--sidebar-line); background: var(--sidebar); }
.sidebar nav { gap: 3px; }.sidebar nav p { margin: 15px 10px 5px; color: var(--sidebar-label); font-size: 9px; font-weight: 800; letter-spacing: 1px; }.sidebar nav p:first-child { margin-top: 0; }
.sidebar nav button { position: relative; width: 100%; height: 38px; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 0 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--sidebar-text); text-align: left; }
.sidebar nav button span { font-size: 12px; }.sidebar nav button:hover, .sidebar nav button.active { border-color: var(--line); background: var(--sidebar-soft); color: var(--text); }.sidebar nav button.active::before { content: ""; position: absolute; left: -10px; width: 2px; height: 20px; background: var(--primary); }
.side-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 0; border-top: 1px solid var(--sidebar-line); }.side-foot span, .side-foot strong { display: block; }.side-foot span { color: var(--sidebar-label); font-size: 8px; }.side-foot strong { margin-top: 3px; color: var(--sidebar-text); font-size: 10px; }.side-foot button { width: 30px; height: 30px; border: 1px solid var(--sidebar-line); border-radius: 5px; background: transparent; color: var(--sidebar-text); }

.content { max-width: none; min-height: 100vh; margin: 0 0 0 var(--sidebar-w); padding: calc(var(--header-h) + 28px) 28px 42px; }.content > * { max-width: 1540px; margin-left: auto; margin-right: auto; }
.page-head { min-height: 62px; align-items: flex-start; margin-bottom: 22px; }.page-head h1 { font-size: 22px; line-height: 1.3; }.page-head p { margin-top: 5px; font-size: 11px; }.page-head > strong { font-size: 20px; }.page-head > .button-row, .page-head > button { margin-top: 8px; }
.primary, .secondary, .button-row button { min-height: 34px; padding: 7px 12px; border-radius: 5px; font-size: 12px; }.primary { border: 1px solid var(--primary); background: var(--primary); }.secondary, .button-row button { border-color: var(--line); background: var(--surface); }.secondary:hover, .button-row button:hover { border-color: var(--line-strong); background: var(--surface-2); }
.metrics { gap: 12px; margin-bottom: 14px; }.metric, .panel, .strategy-card { border-color: var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }.metric { min-height: 116px; padding: 16px; }.metric::after { width: 7px; height: 7px; top: 17px; right: 17px; border-radius: 50%; background: var(--faint); }.metric span { font-size: 10px; }.metric strong { margin-top: 11px; font-size: 21px; }.metric strong::first-letter { font-variant-numeric: tabular-nums; }
.metric-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }.metric-head i { width: 7px; height: 7px; border-radius: 50%; }.neutral-dot { background: var(--faint); }.positive-dot { background: var(--positive); }.warning-dot { background: var(--warning); }.blue-dot { background: var(--primary); }.metric footer { display: flex; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 9px; }.metric footer b { color: var(--text); }
.layout-two { grid-template-columns: minmax(0, 1.7fr) minmax(280px, .68fr); gap: 14px; }.panel { padding: 17px; }.panel h2 { font-size: 13px; }.panel p { font-size: 10px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.panel-header h2 { margin: 0; }.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }.period-tabs { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }.period-tabs button { min-width: 36px; height: 25px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 9px; }.period-tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(20,31,44,.08); }.chart-summary { display: flex; align-items: baseline; gap: 10px; margin-top: 15px; }.chart-summary strong { font-size: 23px; }.chart-summary span { font-size: 10px; }
.risk-score { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 16px; border-bottom: 1px solid var(--line); }.risk-score span { display: block; color: var(--muted); font-size: 9px; }.risk-score strong { display: block; margin-top: 5px; font-size: 27px; }.risk-score strong small { color: var(--faint); font-size: 9px; }.risk-ring { width: 72px; height: 72px; display: grid; place-items: center; border: 8px solid var(--positive-soft); border-top-color: var(--positive); border-right-color: var(--positive); border-radius: 50%; transform: rotate(25deg); }.risk-ring b { color: var(--positive); font-size: 12px; transform: rotate(-25deg); }.risk-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 15px; color: var(--muted); font-size: 9px; }.risk-row strong { color: var(--text); }.risk-row > div { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 2px; background: var(--surface-3); }.risk-row > div i { display: block; height: 100%; background: var(--positive); }.risk-row > div i.amber { background: var(--warning); }.risk-foot { display: grid; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }.risk-foot span i { display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: var(--positive); }
.table-wrap { margin-top: 14px; border-color: var(--line); border-radius: 0; } th { height: 37px; background: var(--surface-2); color: var(--muted); font-size: 9px; } th, td { padding: 9px 12px; border-bottom-color: var(--line); } td { font-size: 10px; }.badge { min-height: 22px; padding: 3px 7px; border-radius: 4px; font-size: 9px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 3px 7px; border-radius: 4px; font-size: 8px; font-weight: 800; white-space: nowrap; }.status-badge.safe, .status-badge.running { background: var(--positive-soft); color: var(--positive); }.status-badge.watching, .status-badge.demo { background: var(--accent-soft); color: var(--accent); }.status-badge.stopped { background: var(--surface-3); color: var(--muted); }.status-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.strategy-table-panel { padding-bottom: 6px; }.strategy-name { display: flex; align-items: center; gap: 9px; }.strategy-name > i { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 5px; font-style: normal; font-weight: 800; background: var(--amber-soft); color: var(--amber); }.strategy-name strong, .strategy-name small { display: block; }.strategy-name small { margin-top: 2px; color: var(--muted); font-size: 8px; }.side-badge { padding: 3px 7px; border-radius: 3px; font-size: 8px; font-weight: 800; }.side-badge.long { background: var(--positive-soft); color: var(--positive); }.side-badge.short { background: var(--danger-soft); color: var(--danger); }.text-button { border: 0; background: transparent; color: var(--accent); font-weight: 700; }
.chart { height: 280px; }.calendar { gap: 6px; }.day { min-height: 64px; border-radius: 5px; background: var(--surface-2); font-size: 10px; }
.strategy-grid { gap: 12px; }.strategy-card { padding: 16px; }.strategy-card h3 { font-size: 13px; }.strategy-meta, .strategy-card dt { font-size: 9px; }.strategy-card dd { font-size: 10px; }
.account-card { border-color: var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }.account-identity h3 { font-size: 13px; }.account-identity p, .account-stat span { font-size: 9px; }.account-stat strong { font-size: 10px; }
.account-setup-head, .account-form { background: var(--surface); }.exchange-option span, .credential-hint, .switch-line { background: var(--surface-2); border-color: var(--line); }
.mobile-nav-button, .sidebar-scrim { display: none; }.tier-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 0 0; padding: 12px 0; border-top: 1px solid var(--line); }.tier-toolbar strong, .tier-toolbar small { display: block; }.tier-toolbar strong { font-size: 12px; }.tier-toolbar small { margin-top: 3px; color: var(--muted); font-size: 10px; }.professional-tier-table { overflow-x: auto; }.professional-tier-table table { min-width: 920px; }.tier-number { color: var(--muted); font-weight: 800; }.tier-remove { min-height: 28px; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: 4px; background: var(--danger-soft); color: var(--danger); font-size: 10px; }
.profit-workspace { padding: 0; overflow: hidden; }.profit-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 18px 14px; border-bottom: 1px solid var(--line); }.profit-panel-header h2 { margin: 0; font-size: 14px; }.profit-panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }.profit-header-actions { display: flex; align-items: center; gap: 10px; }.profit-total { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 9px; border-radius: 12px; background: var(--positive-soft); font-size: 10px; font-weight: 800; }.profit-view-switch { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }.profit-view-switch button { min-width: 54px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 10px; }.profit-view-switch button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(20,31,44,.08); font-weight: 800; }.profit-view { padding: 0 18px 18px; }.profit-filter-bar { display: flex; align-items: end; gap: 10px; padding: 14px 0 4px; }.profit-filter-bar label { min-width: 160px; }.profit-filter-bar input { height: 34px; min-height: 34px; margin-top: 4px; padding: 6px 8px; font-size: 11px; }.profit-filter-bar > button { height: 34px; }.profit-quick-ranges { display: flex; gap: 4px; margin-left: auto; }.profit-quick-ranges button { height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 10px; }.profit-quick-ranges button:hover { border-color: var(--accent); color: var(--accent); }.profit-chart { display: block; width: 100%; height: 330px; margin-top: 8px; }.profit-month-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 0 12px; }.profit-month-toolbar strong { min-width: 92px; text-align: center; font-size: 13px; }.profit-month-toolbar .icon-button { width: 30px; height: 30px; font-size: 20px; }.profit-month-toolbar .secondary { margin-left: 4px; height: 30px; min-height: 30px; padding: 4px 11px; font-size: 10px; }.profit-calendar-summary { display: flex; justify-content: flex-end; gap: 14px; margin: 0 0 10px; color: var(--muted); font-size: 10px; }.profit-weekdays, .profit-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }.profit-weekdays { border: 1px solid var(--line); border-bottom: 0; background: var(--surface-2); }.profit-weekdays span { padding: 9px 10px; border-right: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 10px; font-weight: 700; }.profit-weekdays span:last-child { border-right: 0; }.profit-month-grid { border-left: 1px solid var(--line); }.profit-calendar-day { min-height: 92px; padding: 9px 10px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }.profit-calendar-day > span, .profit-calendar-day > strong, .profit-calendar-day > small { display: block; }.profit-calendar-day > span { color: var(--text); font-size: 10px; }.profit-calendar-day > strong { min-height: 24px; margin-top: 11px; font-size: 11px; }.profit-calendar-day > small { margin-top: 9px; color: var(--muted); font-size: 9px; }.profit-calendar-day.positive { background: color-mix(in srgb, var(--positive-soft) 46%, var(--surface)); }.profit-calendar-day.negative { background: color-mix(in srgb, var(--danger-soft) 42%, var(--surface)); }.profit-calendar-day.outside { background: var(--surface-2); }.profit-calendar-day.outside > span, .profit-calendar-day.outside > strong, .profit-calendar-day.outside > small { color: var(--faint); }.profit-calendar-day.today { box-shadow: inset 0 0 0 2px var(--warning); }

@media (max-width: 1040px) { .market-strip { display: none; } .content { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 760px) {
  :root { --header-h: 58px; --topbar-height: 58px; --sidebar-w: 280px; --sidebar-width: 0px; }
  .topbar { padding: 0 10px; }.topbar .brand { width: auto; min-width: 0; padding: 0 8px 0 2px; border-right: 0; }.brand-name { display: flex; }.brand-name small { display: none; }.top-actions { padding-right: 0; gap: 6px; }.mobile-nav-button { display: grid; order: -1; }.connection, #lang-btn { display: none; }.profile-button { max-width: 132px; }.profile-button b { max-width: 74px; }
  .sidebar { top: var(--header-h); right: auto; bottom: 0; left: 0; width: min(86vw, 300px); min-width: min(86vw, 300px); height: auto; padding: 16px 10px 12px; border-top: 0; border-right: 1px solid var(--sidebar-line); transform: translateX(-105%); visibility: hidden; transition: transform .2s ease, visibility .2s ease; box-shadow: 12px 0 32px rgba(16, 31, 51, .16); }
  body.nav-open .sidebar { transform: translateX(0); visibility: visible; }.sidebar nav { display: grid; width: auto; }.sidebar nav p { display: block; }.sidebar nav button { display: grid; justify-content: stretch; height: 42px; }.sidebar nav button span { display: block; }.side-foot { display: flex; }.sidebar-scrim { position: fixed; z-index: 6; inset: var(--header-h) 0 0; border: 0; background: rgba(18, 30, 48, .34); }.nav-open .sidebar-scrim { display: block; }
  .content { margin-left: 0; padding: calc(var(--header-h) + 18px) 14px 30px; }.content > * { max-width: none; }.metrics, .exchange-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.layout-two { grid-template-columns: 1fr; }.page-head { display: block; }.page-head > .button-row { margin-top: 13px; }.page-head > .button-row button { flex: 1; }.metric { min-height: 102px; padding: 14px; }.metric strong { font-size: 18px; }.panel { padding: 14px; }.panel-header { align-items: flex-start; }.period-tabs { flex-shrink: 0; }.table-wrap { overflow-x: auto; }.table-wrap table { min-width: 680px; }.strategy-grid { grid-template-columns: 1fr; }.new-strategy, .account-form { grid-template-columns: 1fr; }.new-strategy .wide, .account-form .wide { grid-column: 1; }.advanced-grid { grid-template-columns: 1fr; }.account-card { display: grid; grid-template-columns: 1fr; gap: 12px; }.account-identity, .account-actions, .test-result { grid-column: 1; }.account-actions { min-width: 0; justify-content: flex-start; flex-wrap: wrap; }.account-stat { padding-top: 8px; border-top: 1px solid var(--line); }.setting-row { align-items: flex-start; flex-direction: column; }.setting-row .button-row { width: 100%; }.setting-row .button-row input { min-width: 0; }.auth-shell { grid-template-columns: 1fr; }.auth-intro { min-height: 250px; padding: 84px 25px 30px; }.auth-intro h1 { font-size: 34px; }.auth-status { display: none; }.auth-main { place-items: start center; padding: 34px 22px 60px; }.public-topbar { left: 0; height: 58px; padding: 0 18px; }.public-topbar .brand { flex: 0 0 auto; white-space: nowrap; }.public-topbar .button-row { flex: 1; justify-content: flex-end; flex-wrap: nowrap; }.public-topbar .button-row button { min-width: 0; padding-inline: 11px; }
}

@media (max-width: 420px) {
  .profile-button { max-width: 105px; padding: 0 7px; }.profile-button b { max-width: 54px; }.metrics, .exchange-summary { grid-template-columns: 1fr; }.metric { min-height: 94px; }.page-head h1 { font-size: 20px; }.chart { height: 230px; }.calendar { grid-template-columns: repeat(4, 1fr); }.tier-toolbar { align-items: flex-start; flex-direction: column; }.tier-toolbar button { width: 100%; }.button-row { width: 100%; }.button-row button { flex: 1; }
}

@media (max-width: 760px) {
  .profit-panel-header { display: block; }.profit-header-actions { justify-content: space-between; margin-top: 12px; }.profit-view { padding-inline: 14px; }.profit-filter-bar { align-items: stretch; flex-wrap: wrap; }.profit-filter-bar label { flex: 1 1 140px; min-width: 0; }.profit-filter-bar > button { flex: 1 1 100px; }.profit-quick-ranges { flex: 1 1 100%; margin-left: 0; }.profit-quick-ranges button { flex: 1; }.profit-chart { height: 250px; }.profit-calendar-summary { justify-content: flex-start; flex-wrap: wrap; }.profit-calendar-day { min-height: 76px; padding: 7px; }.profit-calendar-day > strong { margin-top: 7px; font-size: 10px; }.profit-calendar-day > small { margin-top: 6px; font-size: 8px; }
}

@media (max-width: 420px) {
  .profit-view-switch button { min-width: 48px; }.profit-month-toolbar { justify-content: center; }.profit-calendar-day { min-height: 68px; padding: 6px 5px; }.profit-calendar-day > strong { font-size: 9px; }.profit-calendar-day > small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
