:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-deep: #050c17;
  --surface: #0b1727;
  --surface-2: #0f1d2e;
  --surface-3: #132338;
  --line: rgba(148, 170, 201, 0.13);
  --line-strong: rgba(148, 170, 201, 0.22);
  --text: #f4f7fb;
  --text-soft: #c4cfde;
  --muted: #74839a;
  --amber: #ffad3d;
  --amber-2: #ffd079;
  --navy: #08204a;
  --cyan: #37d1c2;
  --green: #35d39a;
  --red: #ff6f7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --sidebar: 248px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 73% -10%, rgba(25, 84, 126, 0.2), transparent 35%),
    linear-gradient(145deg, #07111f 0%, #050d18 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.ambient-one {
  top: -250px;
  left: 24%;
  width: 520px;
  height: 520px;
  background: rgba(255, 173, 61, 0.07);
}

.ambient-two {
  right: -260px;
  bottom: -260px;
  width: 560px;
  height: 560px;
  background: rgba(38, 128, 148, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 208, 121, 0.4);
  border-radius: 13px;
  background: #f7f7f6;
  box-shadow: 0 8px 24px rgba(255, 173, 61, 0.15);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  letter-spacing: 0.12em;
  font-size: 19px;
  font-weight: 760;
}

.brand-copy small {
  color: var(--muted);
  letter-spacing: 0.17em;
  font-size: 8px;
  font-weight: 700;
}

.login-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(520px, 1.18fr) minmax(430px, 0.82fr);
}

.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  padding: 48px clamp(54px, 6vw, 110px) 42px;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(5, 17, 35, 0.15), rgba(5, 17, 35, 0.75)),
    radial-gradient(circle at 66% 39%, rgba(255, 173, 61, 0.13), transparent 27%),
    linear-gradient(135deg, #0d284b 0%, #07182d 48%, #07111f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.login-story::before,
.login-story::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.login-story::before {
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.login-story::after {
  top: 15%;
  right: -140px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 193, 98, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 193, 98, 0.025),
    0 0 0 150px rgba(255, 193, 98, 0.02);
}

.brand-large,
.story-content,
.story-footer {
  position: relative;
  z-index: 1;
}

.brand-large .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.brand-large .brand-copy strong {
  font-size: 23px;
}

.story-content {
  width: min(700px, 100%);
  margin: auto 0;
  padding: 70px 0 82px;
}

.eyebrow,
.page-eyebrow,
.panel-kicker,
.login-kicker {
  margin: 0;
  color: var(--amber-2);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.2em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--amber);
}

.story-content h1 {
  margin: 24px 0 22px;
  max-width: 720px;
  font-size: clamp(42px, 4.5vw, 68px);
  font-weight: 650;
  line-height: 1.17;
  letter-spacing: -0.045em;
}

.story-content h1 em {
  color: var(--amber-2);
  font-style: normal;
}

.story-lead {
  max-width: 570px;
  margin: 0;
  color: #a9b9cc;
  font-size: 15px;
  line-height: 1.9;
}

.story-stats {
  display: grid;
  margin-top: 52px;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.story-stats article {
  display: flex;
  min-width: 0;
  padding: 22px 22px 22px 0;
  flex-direction: column;
  gap: 7px;
}

.story-stats article + article {
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.story-stats span,
.story-stats small {
  color: var(--muted);
  font-size: 10px;
}

.story-stats span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.story-stats strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.story-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #647690;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(53, 211, 154, 0.8);
}

.footer-separator {
  width: 1px;
  height: 11px;
  margin: 0 3px;
  background: rgba(255, 255, 255, 0.13);
}

.login-panel {
  display: flex;
  min-height: 100vh;
  padding: 48px clamp(38px, 6vw, 100px);
  align-items: center;
  justify-content: center;
  background: rgba(5, 12, 23, 0.58);
}

.mobile-brand {
  display: none;
}

.login-card {
  width: min(390px, 100%);
}

.login-heading {
  margin-bottom: 37px;
}

.login-heading h2 {
  margin: 12px 0 7px;
  font-size: 31px;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field > span:first-child {
  display: block;
  margin: 0 0 8px 2px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
  display: flex;
  height: 54px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(14, 29, 47, 0.7);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap:focus-within {
  border-color: rgba(255, 173, 61, 0.62);
  background: rgba(17, 34, 54, 0.92);
  box-shadow: 0 0 0 4px rgba(255, 173, 61, 0.08);
}

.input-wrap > svg {
  width: 18px;
  margin-left: 17px;
  color: #75849a;
}

.input-wrap input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 15px;
  outline: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.input-wrap input::placeholder {
  color: #53637a;
}

.icon-button {
  display: grid;
  padding: 0;
  cursor: pointer;
  place-items: center;
  outline: 0;
  border: 0;
  background: transparent;
}

.field-action {
  width: 50px;
  height: 100%;
  flex: 0 0 50px;
  color: #708198;
}

.field-action svg {
  width: 18px;
}

.field-action .eye-closed,
.field-action.is-visible .eye-open {
  display: none;
}

.field-action.is-visible .eye-closed {
  display: block;
}

.login-error {
  min-height: 18px;
  margin: -6px 2px 10px;
  color: #ff8d97;
  font-size: 11px;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 650;
  transition: transform 0.18s, border-color 0.18s, background 0.18s, opacity 0.18s;
}

.primary-button {
  width: 100%;
  height: 54px;
  gap: 12px;
  border: 1px solid #ffc05c;
  background: linear-gradient(135deg, #ffba4d, #ff9e29);
  box-shadow: 0 13px 35px rgba(255, 161, 41, 0.18);
  color: #172030;
  font-size: 13px;
}

.primary-button svg {
  width: 18px;
  transition: transform 0.18s;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #ffc55f, #ffaa35);
}

.primary-button:hover svg {
  transform: translateX(3px);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.security-note {
  display: flex;
  margin-top: 24px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #5f7087;
  font-size: 10px;
}

.security-note svg {
  width: 15px;
  color: var(--green);
}

.app-view {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar);
  padding: 27px 18px 22px;
  flex-direction: column;
  background: rgba(5, 13, 24, 0.96);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.sidebar-brand {
  padding: 0 8px 27px;
  border-bottom: 1px solid var(--line);
}

.sidebar .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.main-nav {
  display: flex;
  padding-top: 27px;
  flex-direction: column;
  gap: 7px;
}

.nav-caption {
  margin: 0 11px 7px;
  color: #4f5e72;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  height: 46px;
  padding: 0 13px;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #78889e;
  font-size: 12px;
  text-align: left;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.nav-item::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: -19px;
  width: 3px;
  border-radius: 3px;
  background: var(--amber);
  content: "";
  opacity: 0;
  transition: opacity 0.18s;
}

.nav-item svg {
  width: 18px;
  flex: 0 0 18px;
}

.nav-item b {
  min-width: 19px;
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #8e9cb0;
  font-size: 9px;
  text-align: center;
}

.nav-item:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
}

.nav-item.is-active {
  border-color: rgba(255, 173, 61, 0.1);
  background: linear-gradient(90deg, rgba(255, 173, 61, 0.13), rgba(255, 173, 61, 0.035));
  color: #f2c474;
}

.nav-item.is-active::before {
  opacity: 1;
}

.nav-item.is-active b {
  background: rgba(255, 173, 61, 0.15);
  color: var(--amber-2);
}

.sidebar-bottom {
  margin-top: auto;
}

.environment-card {
  display: grid;
  margin-bottom: 10px;
  padding: 13px 12px;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(53, 211, 154, 0.13);
  border-radius: 12px;
  background: rgba(53, 211, 154, 0.045);
}

.environment-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: rgba(53, 211, 154, 0.1);
  color: var(--green);
}

.environment-icon svg {
  width: 16px;
}

.environment-card > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.environment-card small {
  color: var(--muted);
  font-size: 8px;
}

.environment-card strong {
  font-size: 10px;
  font-weight: 650;
}

.environment-card > i {
  color: var(--green);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.logout-button {
  display: flex;
  width: 100%;
  height: 42px;
  padding: 0 13px;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #65758a;
  font-size: 11px;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.logout-button svg {
  width: 17px;
}

.sidebar-scrim {
  display: none;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 84px;
  padding: 0 clamp(25px, 3.6vw, 54px);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.86);
  backdrop-filter: blur(22px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-eyebrow {
  margin-bottom: 5px;
  color: #53647a;
  font-size: 8px;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 660;
  letter-spacing: -0.02em;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
}

.menu-button svg {
  width: 19px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-pill {
  display: grid;
  min-width: 212px;
  height: 48px;
  padding: 0 13px;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(12, 27, 44, 0.65);
}

.asset-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 173, 61, 0.18);
  border-radius: 9px;
  background: rgba(255, 173, 61, 0.09);
  color: var(--amber-2);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.market-pill > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.market-pill small,
.bot-state small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.05em;
}

.market-pill strong {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.market-pill em {
  color: var(--green);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.market-pill em.is-negative,
.chart-summary span.is-negative {
  color: var(--red);
}

.refresh-button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(12, 27, 44, 0.65);
  color: #7c8ba0;
}

.refresh-button:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.refresh-button svg {
  width: 18px;
}

.refresh-button.is-loading svg {
  animation: spin 0.8s linear infinite;
}

.bot-state {
  display: grid;
  min-width: 105px;
  height: 48px;
  padding: 0 13px;
  grid-template-columns: 8px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 8px;
  border: 1px solid rgba(53, 211, 154, 0.14);
  border-radius: 13px;
  background: rgba(53, 211, 154, 0.05);
}

.bot-state > span {
  width: 7px;
  height: 7px;
  grid-row: 1 / 3;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(53, 211, 154, 0.7);
}

.bot-state small {
  align-self: end;
}

.bot-state strong {
  align-self: start;
  font-size: 10px;
}

.bot-state.is-stopped {
  border-color: rgba(255, 111, 125, 0.16);
  background: rgba(255, 111, 125, 0.05);
}

.bot-state.is-stopped > span {
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 111, 125, 0.6);
}

.content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 27px clamp(25px, 3.6vw, 54px) 54px;
}

.page {
  display: none;
  animation: page-in 0.32s ease both;
}

.page.is-visible {
  display: block;
}

.welcome-row,
.page-intro {
  display: flex;
  min-height: 51px;
  margin-bottom: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.welcome-row p {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 620;
}

.welcome-row small,
.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.run-controls {
  display: flex;
  gap: 8px;
}

.secondary-button,
.danger-button {
  min-height: 38px;
  padding: 0 14px;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 31, 49, 0.72);
  color: var(--text-soft);
  font-size: 10px;
}

.secondary-button:hover {
  border-color: rgba(255, 173, 61, 0.35);
  background: rgba(255, 173, 61, 0.07);
  color: var(--amber-2);
}

.secondary-button svg {
  width: 14px;
}

.success-action {
  border-color: rgba(53, 211, 154, 0.16);
}

.control-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.danger-action:hover {
  border-color: rgba(255, 111, 125, 0.32);
  background: rgba(255, 111, 125, 0.06);
  color: #ff9ca5;
}

.metrics-grid {
  display: grid;
  margin-bottom: 17px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(14, 29, 47, 0.9), rgba(9, 21, 36, 0.89));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.11);
}

.metric-card {
  position: relative;
  min-height: 137px;
  overflow: hidden;
  padding: 20px 20px 17px;
  border-radius: 16px;
}

.metric-card::after {
  position: absolute;
  right: -50px;
  bottom: -85px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  content: "";
}

.metric-card.featured {
  border-color: rgba(255, 173, 61, 0.19);
  background: linear-gradient(145deg, rgba(32, 40, 48, 0.95), rgba(18, 30, 43, 0.94));
}

.metric-card.featured::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent 65%);
  content: "";
}

.metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7d8ca1;
  font-size: 10px;
}

.metric-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.add-balance-button {
  height: 25px;
  padding: 0 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 173, 61, 0.18);
  border-radius: 7px;
  background: rgba(255, 173, 61, 0.07);
  color: var(--amber-2);
  font-size: 8px;
  font-weight: 650;
  transition: border-color 0.18s, background 0.18s;
}

.add-balance-button:hover {
  border-color: rgba(255, 173, 61, 0.42);
  background: rgba(255, 173, 61, 0.12);
}

.add-balance-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.metric-card.is-stale {
  border-color: rgba(255, 111, 125, 0.22);
}

.metric-card.is-stale::before {
  background: linear-gradient(90deg, var(--red), transparent 65%);
}

.metric-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #75869c;
}

.featured .metric-icon {
  background: rgba(255, 173, 61, 0.09);
  color: var(--amber-2);
}

.metric-icon svg {
  width: 15px;
}

.metric-card > strong {
  display: block;
  margin: 11px 0 10px;
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 680;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.metric-card > strong small {
  color: #536277;
  font-size: 13px;
}

.metric-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #68788e;
  font-size: 9px;
}

.metric-foot em {
  color: #536277;
  font-style: normal;
}

.value-positive {
  color: var(--green) !important;
}

.value-negative {
  color: var(--red) !important;
}

.value-neutral {
  color: #8191a7;
}

.dashboard-grid {
  display: grid;
  margin-bottom: 17px;
  grid-template-columns: minmax(0, 1.72fr) minmax(280px, 0.72fr);
  gap: 13px;
}

.panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.panel-header {
  display: flex;
  min-height: 68px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.panel-kicker {
  display: block;
  margin-bottom: 5px;
  color: #55677e;
  font-size: 7px;
}

.panel-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.panel-header h2 small {
  margin-left: 6px;
  color: #536277;
  font-size: 8px;
  font-weight: 500;
}

.timeframe-switch,
.filter-bar {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 12, 22, 0.32);
}

.timeframe-switch button,
.filter-button {
  height: 27px;
  min-width: 37px;
  padding: 0 8px;
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #66768b;
  font-size: 8px;
}

.timeframe-switch button.is-active,
.filter-button.is-active {
  background: rgba(255, 173, 61, 0.12);
  color: var(--amber-2);
}

.chart-panel {
  min-height: 390px;
}

.chart-summary {
  display: flex;
  padding: 17px 20px 0;
  align-items: baseline;
  gap: 10px;
}

.chart-summary strong {
  font-size: 23px;
  font-weight: 670;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.chart-summary span {
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.chart-summary small {
  margin-left: auto;
  color: #53647a;
  font-size: 8px;
}

.price-chart {
  position: relative;
  height: 236px;
  margin: 4px 10px 0;
  overflow: hidden;
}

.price-chart::before {
  position: absolute;
  inset: 16px 10px 18px;
  content: "";
  background-image: linear-gradient(rgba(148, 170, 201, 0.065) 1px, transparent 1px);
  background-size: 100% 25%;
}

.price-chart svg {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-area {
  fill: url(#chartGradient);
  stroke: none;
}

.chart-line {
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 8px rgba(255, 173, 61, 0.26));
}

.chart-dot {
  fill: var(--amber-2);
  stroke: rgba(255, 173, 61, 0.22);
  stroke-width: 8;
}

.chart-axis-label {
  fill: #526176;
  stroke: none;
  font-size: 8px;
}

.chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.chart-loading span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  animation: bounce 0.9s infinite alternate;
}

.chart-loading span:nth-child(2) {
  animation-delay: 0.18s;
}

.chart-loading span:nth-child(3) {
  animation-delay: 0.36s;
}

.chart-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #68788d;
  font-size: 10px;
}

.chart-footer {
  display: flex;
  margin: 0 20px;
  padding-top: 7px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #627187;
  font-size: 8px;
}

.chart-footer span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
}

.position-panel {
  min-height: 390px;
}

.soft-badge,
.mode-badge {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: #728298;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.empty-position {
  display: flex;
  min-height: 256px;
  padding: 27px 20px 17px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.radar {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  margin-bottom: 17px;
  place-items: center;
  border: 1px solid rgba(255, 173, 61, 0.13);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 173, 61, 0.09), transparent 68%);
}

.radar::before,
.radar::after,
.radar > i {
  position: absolute;
  border: 1px solid rgba(255, 173, 61, 0.09);
  border-radius: 50%;
  content: "";
}

.radar::before {
  width: 68px;
  height: 68px;
}

.radar::after {
  width: 39px;
  height: 39px;
}

.radar > i:first-child {
  width: 5px;
  height: 5px;
  transform: translate(31px, -11px);
  border: 0;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: radar-pulse 2s infinite;
}

.radar > i:nth-child(2) {
  width: 1px;
  height: 45px;
  transform-origin: bottom center;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to top, rgba(255, 173, 61, 0.4), transparent);
  animation: radar-spin 4s linear infinite;
}

.radar span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 173, 61, 0.1);
  color: var(--amber-2);
}

.radar span svg {
  width: 17px;
}

.empty-position strong {
  font-size: 12px;
}

.empty-position p {
  margin: 7px 0 0;
  color: #607087;
  font-size: 9px;
}

.active-position {
  min-height: 256px;
  padding: 24px 20px 17px;
}

.position-pair {
  display: grid;
  padding-bottom: 20px;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.position-pair .asset-icon {
  width: 38px;
  height: 38px;
}

.position-pair > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.position-pair small {
  color: var(--green);
  font-size: 8px;
}

.position-pair strong {
  margin-top: 3px;
  font-size: 12px;
}

.position-pair em {
  color: var(--green);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
}

.active-position dl {
  display: grid;
  margin: 19px 0 0;
  grid-template-columns: 1fr 1fr;
  gap: 17px 12px;
}

.active-position dl div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.active-position dt,
.config-list dt,
.heartbeat-meta dt {
  color: #63738a;
  font-size: 8px;
}

.active-position dd,
.config-list dd,
.heartbeat-meta dd {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.risk-strip {
  display: flex;
  height: 44px;
  margin: 0 16px 15px;
  padding: 0 11px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(53, 211, 154, 0.1);
  border-radius: 10px;
  background: rgba(53, 211, 154, 0.035);
  font-size: 8px;
}

.risk-strip span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8b9aaa;
}

.risk-strip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.risk-strip small {
  color: #526277;
  font-size: 7px;
}

.recent-panel {
  min-height: 245px;
}

.text-button {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: #73839a;
  font-size: 9px;
}

.text-button:hover {
  color: var(--amber-2);
}

.table-wrap {
  position: relative;
  min-height: 172px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

th {
  height: 38px;
  color: #53647b;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: left;
}

th:first-child,
td:first-child {
  padding-left: 20px;
}

th:last-child,
td:last-child {
  padding-right: 20px;
}

td {
  height: 48px;
  border-top: 1px solid var(--line);
  color: #a6b2c3;
  font-variant-numeric: tabular-nums;
}

.trade-pair {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 650;
}

.trade-pair i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 173, 61, 0.08);
  color: var(--amber-2);
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: normal;
}

.trade-side,
.trade-status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(53, 211, 154, 0.07);
  color: var(--green);
  font-size: 7px;
  font-weight: 700;
}

.trade-side.short {
  background: rgba(255, 111, 125, 0.07);
  color: var(--red);
}

.trade-status.closed {
  background: rgba(129, 145, 167, 0.08);
  color: #8593a6;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-stack small {
  color: #596980;
  font-size: 7px;
}

.empty-table {
  position: absolute;
  inset: 39px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #66768c;
}

.empty-table > span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
}

.empty-table svg {
  width: 18px;
}

.empty-table strong {
  color: #8290a2;
  font-size: 10px;
  font-weight: 600;
}

.empty-table small {
  margin-top: 4px;
  color: #4f6076;
  font-size: 8px;
}

.page-intro > div:first-child p {
  margin-bottom: 4px;
}

.page-intro h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 670;
  letter-spacing: -0.025em;
}

.filter-button {
  min-width: 58px;
}

.history-summary {
  display: grid;
  margin-bottom: 15px;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.history-summary article {
  display: flex;
  min-height: 78px;
  padding: 16px 18px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 27, 44, 0.7);
}

.history-summary span {
  color: #6e7e94;
  font-size: 9px;
}

.history-summary strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.history-panel {
  min-height: 420px;
}

.history-panel .table-wrap {
  min-height: 420px;
}

.table-pagination {
  display: flex;
  min-height: 54px;
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #63738a;
  font-size: 8px;
}

.table-pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-pagination button {
  display: grid;
  width: 29px;
  height: 29px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: #8b99ab;
}

.table-pagination button:hover:not(:disabled) {
  border-color: rgba(255, 173, 61, 0.28);
  color: var(--amber-2);
}

.table-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.table-pagination strong {
  min-width: 45px;
  color: #8998aa;
  font-size: 8px;
  font-weight: 600;
  text-align: center;
}

.history-panel .empty-table {
  inset: 38px 0 0;
}

.empty-table.large > span {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.empty-table.large strong {
  margin-top: 3px;
  font-size: 12px;
}

.empty-table.large small {
  margin-top: 7px;
  font-size: 9px;
}

.mode-badge {
  border-color: rgba(255, 173, 61, 0.17);
  background: rgba(255, 173, 61, 0.06);
  color: var(--amber-2);
  letter-spacing: 0.12em;
}

.strategy-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.strategy-hero {
  position: relative;
  display: grid;
  min-height: 185px;
  padding: 25px;
  grid-column: 1 / -1;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 23px;
  border-color: rgba(255, 173, 61, 0.15);
  background:
    radial-gradient(circle at 10% 40%, rgba(255, 173, 61, 0.12), transparent 22%),
    linear-gradient(145deg, rgba(22, 36, 51, 0.96), rgba(8, 20, 34, 0.94));
}

.strategy-symbol {
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 1px solid rgba(255, 208, 121, 0.35);
  border-radius: 23px;
  background: #f8f8f6;
  box-shadow: 0 12px 34px rgba(255, 173, 61, 0.12);
}

.strategy-symbol img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
}

.strategy-hero h2 {
  margin: 8px 0 7px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.strategy-hero p {
  margin: 0;
  color: #718198;
  font-size: 10px;
}

.running-badge {
  display: flex;
  padding: 8px 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(53, 211, 154, 0.14);
  border-radius: 9px;
  background: rgba(53, 211, 154, 0.05);
  color: var(--green);
  font-size: 8px;
  font-weight: 650;
}

.running-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(53, 211, 154, 0.6);
}

.running-badge.is-stopped {
  border-color: rgba(255, 111, 125, 0.14);
  background: rgba(255, 111, 125, 0.05);
  color: var(--red);
}

.running-badge.is-stopped i {
  background: var(--red);
}

.config-panel,
.guard-panel {
  min-height: 350px;
}

.config-list {
  margin: 0;
}

.config-list div {
  display: flex;
  min-height: 46px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.config-list div:last-child {
  border-bottom: 0;
}

.config-list dd {
  color: var(--text-soft);
}

.shield-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: rgba(53, 211, 154, 0.08);
  color: var(--green);
}

.shield-icon svg {
  width: 16px;
}

.guard-list {
  padding: 7px 20px;
}

.guard-list > div {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.guard-list > div:last-child {
  border-bottom: 0;
}

.guard-list span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.guard-list i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(53, 211, 154, 0.5);
}

.guard-list strong {
  color: #9dabbc;
  font-size: 9px;
  font-weight: 550;
}

.guard-list em {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(53, 211, 154, 0.06);
  color: var(--green);
  font-size: 7px;
  font-style: normal;
}

.system-grid {
  display: grid;
  margin-bottom: 15px;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.system-card {
  position: relative;
  display: grid;
  min-height: 125px;
  padding: 20px;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
}

.system-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(53, 211, 154, 0.07);
  color: var(--green);
}

.system-icon svg {
  width: 20px;
}

.system-card > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.system-card small {
  color: #66768c;
  font-size: 8px;
}

.system-card strong {
  font-size: 12px;
}

.system-card em {
  overflow: hidden;
  color: #526278;
  font-size: 7px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(53, 211, 154, 0.7);
}

.heartbeat-panel {
  min-height: 330px;
}

.heartbeat-visual {
  position: relative;
  display: flex;
  height: 150px;
  padding: 0 25px;
  align-items: center;
  background-image: linear-gradient(rgba(148, 170, 201, 0.05) 1px, transparent 1px);
  background-size: 100% 33.33%;
}

.heartbeat-visual svg {
  width: 100%;
  height: 80px;
}

.heartbeat-visual path {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgba(53, 211, 154, 0.3));
}

.pulse-point {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(53, 211, 154, 0.5);
  animation: pulse 1.8s infinite;
}

.heartbeat-meta {
  display: grid;
  margin: 0;
  padding: 19px 22px;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line);
}

.heartbeat-meta div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast-region {
  position: fixed;
  z-index: 100;
  top: 18px;
  right: 18px;
  display: flex;
  width: min(360px, calc(100vw - 36px));
  flex-direction: column;
  gap: 9px;
}

.toast {
  display: grid;
  min-height: 55px;
  padding: 12px 14px;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(12, 27, 44, 0.96);
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease both;
  backdrop-filter: blur(18px);
}

.toast-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(53, 211, 154, 0.09);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.toast.error .toast-icon {
  background: rgba(255, 111, 125, 0.09);
  color: var(--red);
}

.toast strong,
.toast small {
  display: block;
}

.toast strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.toast small {
  color: #718198;
  font-size: 8px;
}

.confirm-dialog {
  width: min(400px, calc(100vw - 30px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background: #0c1a2b;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.55);
  color: var(--text);
}

.balance-dialog {
  width: min(450px, calc(100vw - 30px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0c1a2b;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.55);
  color: var(--text);
}

.balance-dialog::backdrop {
  background: rgba(2, 7, 13, 0.78);
  backdrop-filter: blur(6px);
}

.balance-dialog > form {
  padding: 25px;
}

.balance-dialog-head {
  display: grid;
  grid-template-columns: 46px 1fr 34px;
  align-items: center;
  gap: 13px;
}

.balance-dialog-head h2 {
  margin: 5px 0 0;
  font-size: 17px;
}

.balance-icon {
  background: rgba(255, 173, 61, 0.09);
  color: var(--amber-2);
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #697990;
}

.dialog-close svg {
  width: 16px;
}

.balance-dialog-copy {
  margin: 18px 0;
  color: #77879d;
  font-size: 10px;
  line-height: 1.7;
}

.current-wallet {
  display: flex;
  min-height: 55px;
  margin-bottom: 18px;
  padding: 0 15px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 173, 61, 0.12);
  border-radius: 12px;
  background: rgba(255, 173, 61, 0.045);
}

.current-wallet span {
  color: #79899f;
  font-size: 9px;
}

.current-wallet strong {
  color: var(--amber-2);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.balance-field {
  margin-bottom: 10px;
}

.balance-field .input-wrap > b {
  margin-left: 17px;
  color: var(--green);
  font-size: 18px;
  font-weight: 400;
}

.balance-field .input-wrap > em {
  margin-right: 15px;
  color: #607087;
  font-size: 9px;
  font-style: normal;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.quick-amounts button {
  height: 33px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: #7c8ca1;
  font-size: 9px;
}

.quick-amounts button:hover {
  border-color: rgba(255, 173, 61, 0.25);
  color: var(--amber-2);
}

.balance-dialog .login-error {
  margin: 10px 2px 2px;
}

.balance-dialog-actions {
  display: grid;
  margin-top: 10px;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 9px;
}

.balance-dialog-actions .secondary-button,
.balance-dialog-actions .primary-button {
  width: 100%;
  height: 43px;
}

.confirm-dialog::backdrop {
  background: rgba(2, 7, 13, 0.78);
  backdrop-filter: blur(6px);
}

.confirm-dialog form {
  display: flex;
  padding: 28px;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.dialog-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 111, 125, 0.09);
  color: var(--red);
}

.dialog-icon svg {
  width: 21px;
}

.confirm-dialog h2 {
  margin: 17px 0 8px;
  font-size: 18px;
}

.confirm-dialog p {
  margin: 0;
  color: #79899f;
  font-size: 10px;
  line-height: 1.7;
}

.confirm-dialog form > div {
  display: grid;
  width: 100%;
  margin-top: 22px;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.danger-button {
  border-color: rgba(255, 111, 125, 0.32);
  background: rgba(255, 111, 125, 0.12);
  color: #ff9ca5;
}

.noscript {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #ffad3d;
  color: #111827;
  font-size: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  to { transform: translateY(-8px); opacity: 0.45; }
}

@keyframes radar-spin {
  from { transform: rotate(0deg) translateY(-22px); }
  to { transform: rotate(360deg) translateY(-22px); }
}

@keyframes radar-pulse {
  50% { opacity: 0.3; }
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 16px rgba(53, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 211, 154, 0); }
}

@keyframes page-in {
  from { transform: translateY(5px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toast-in {
  from { transform: translateX(18px); opacity: 0; }
}

@media (max-width: 1180px) {
  .login-view {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .login-story {
    padding-right: 55px;
    padding-left: 55px;
  }

  .story-stats article {
    padding-right: 13px;
  }

  .story-stats article + article {
    padding-left: 13px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .heartbeat-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .login-view {
    display: block;
  }

  .login-story {
    display: none;
  }

  .login-panel {
    position: relative;
    min-height: 100vh;
    padding: 35px 24px;
    flex-direction: column;
    background:
      radial-gradient(circle at 50% 5%, rgba(255, 173, 61, 0.11), transparent 26%),
      linear-gradient(145deg, #0a203b, #07111f 55%);
  }

  .mobile-brand {
    display: flex;
    width: min(390px, 100%);
    margin: 0 auto 60px;
  }

  .sidebar {
    transform: translateX(-101%);
    transition: transform 0.25s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    pointer-events: none;
    background: rgba(3, 8, 15, 0.66);
    opacity: 0;
    transition: opacity 0.25s;
  }

  .sidebar-scrim.is-visible {
    pointer-events: auto;
    opacity: 1;
  }

  .workspace {
    margin-left: 0;
  }

  .menu-button {
    display: grid;
  }

  .topbar {
    padding: 0 20px;
  }

  .content {
    padding: 24px 20px 42px;
  }

  .market-pill {
    min-width: 180px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .topbar {
    height: 72px;
  }

  .topbar h1 {
    font-size: 15px;
  }

  .page-eyebrow,
  .bot-state,
  .refresh-button {
    display: none;
  }

  .market-pill {
    min-width: 145px;
    height: 43px;
    padding: 0 9px;
    grid-template-columns: 27px 1fr;
  }

  .market-pill .asset-icon {
    width: 27px;
    height: 27px;
  }

  .market-pill em {
    display: none;
  }

  .welcome-row,
  .page-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .run-controls {
    width: 100%;
  }

  .run-controls button {
    flex: 1;
  }

  .metrics-grid,
  .history-summary,
  .strategy-layout {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card {
    min-height: 127px;
    padding: 17px;
  }

  .metric-card > strong {
    font-size: 21px;
  }

  .chart-header {
    min-height: 100px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .timeframe-switch {
    width: 100%;
  }

  .timeframe-switch button {
    flex: 1;
  }

  .chart-summary small {
    display: none;
  }

  .strategy-hero {
    min-height: 230px;
    grid-template-columns: 66px 1fr;
  }

  .strategy-symbol {
    width: 66px;
    height: 66px;
    border-radius: 18px;
  }

  .strategy-hero h2 {
    font-size: 16px;
  }

  .running-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .config-panel,
  .guard-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .login-panel {
    justify-content: flex-start;
  }

  .mobile-brand {
    margin-bottom: 50px;
  }

  .login-heading h2 {
    font-size: 28px;
  }

  .content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar-left {
    gap: 10px;
  }

  .metrics-grid,
  .history-summary {
    grid-template-columns: 1fr;
  }

  .market-pill {
    min-width: 132px;
  }

  .panel-header {
    padding: 0 16px;
  }

  .heartbeat-meta {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
