:root {
  color-scheme: dark;
  --bg: #071018;
  --bg-soft: #0b151e;
  --surface: #101c26;
  --surface-2: #142330;
  --surface-3: #192b39;
  --line: #243847;
  --line-soft: rgba(136, 164, 184, .13);
  --text: #edf5fa;
  --muted: #8ea4b4;
  --muted-2: #607888;
  --green: #37d692;
  --green-soft: rgba(55, 214, 146, .11);
  --red: #ff647c;
  --red-soft: rgba(255, 100, 124, .11);
  --amber: #f1bd58;
  --amber-soft: rgba(241, 189, 88, .12);
  --blue: #5aa9ff;
  --blue-soft: rgba(90, 169, 255, .12);
  --cyan: #48c7d9;
  --shadow: 0 14px 40px rgba(0, 0, 0, .28);
  --sidebar: 224px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--text); background: var(--bg); font-size: 13px; }
button, input, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.icon, svg { width: 17px; height: 17px; stroke-width: 1.9; }
svg.lucide { flex: 0 0 auto; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  background: radial-gradient(circle at 50% 20%, #12283a 0, var(--bg) 42%);
}
.boot-screen strong { color: var(--text); font-size: 15px; letter-spacing: 0; }
.boot-screen span { font-size: 11px; }
.boot-mark, .brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #285067;
  border-radius: 7px;
  color: #d7f9eb;
  background: linear-gradient(145deg, #14765c, #0a3e3e);
  box-shadow: 0 8px 22px rgba(20, 133, 102, .22);
}
.boot-mark svg, .brand-mark svg { width: 23px; height: 23px; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(400px, 1.1fr) minmax(390px, .9fr); background: var(--bg); }
.login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 42px 52px;
  background:
    linear-gradient(110deg, rgba(7, 16, 24, .2), rgba(7, 16, 24, .82)),
    radial-gradient(circle at 22% 22%, rgba(36, 169, 126, .34), transparent 29%),
    radial-gradient(circle at 80% 72%, rgba(50, 126, 200, .22), transparent 30%),
    linear-gradient(145deg, #0e2029, #071018 58%);
}
.login-art::before {
  content: "";
  position: absolute;
  inset: 20% -8% -18% 8%;
  opacity: .22;
  background-image:
    linear-gradient(115deg, transparent 48%, #50d3a0 49%, #50d3a0 50.5%, transparent 51.5%),
    linear-gradient(115deg, transparent 36%, #4c95d6 37%, #4c95d6 38.5%, transparent 39.5%);
  transform: skewY(-8deg);
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 14px; }
.login-brand span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.art-copy { position: relative; z-index: 1; max-width: 570px; }
.eyebrow { color: #61d9b1; font-size: 10px; font-weight: 700; letter-spacing: 0; }
.art-copy h1 { margin: 13px 0 16px; font-size: clamp(36px, 4.5vw, 66px); line-height: 1.08; letter-spacing: 0; }
.art-copy p { max-width: 530px; margin: 0; color: #a4b7c4; font-size: 14px; line-height: 1.8; }
.art-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--line); }
.art-metrics div { padding: 16px 17px; background: rgba(10, 22, 31, .94); }
.art-metrics span, .art-metrics strong { display: block; }
.art-metrics span { color: var(--muted); font-size: 9px; }
.art-metrics strong { margin-top: 5px; font-size: 12px; }
.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 30px; background: #09131b; }
.login-card { width: min(390px, 100%); }
.login-head { margin-bottom: 25px; }
.login-head h2 { margin: 16px 0 8px; font-size: 25px; letter-spacing: 0; }
.login-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.login-submit { width: 100%; min-height: 45px; margin-top: 19px; }
.login-foot { display: flex; gap: 8px; margin-top: 16px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.login-foot svg { width: 15px; height: 15px; color: var(--green); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 18px 13px 14px;
  background: #09141d;
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 6px 14px; }
.brand-mark { width: 34px; height: 34px; border-radius: 7px; }
.brand-mark svg { width: 19px; height: 19px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 12px; }
.brand span { margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.nav { display: grid; gap: 3px; margin-top: 7px; }
.nav-label { display: block; margin: 16px 10px 7px; color: var(--muted-2); font-size: 9px; font-weight: 700; }
.nav-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #a6bac8;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav-item.active { color: #dbfff1; background: #123a35; border-color: #1b574c; }
.nav-item .badge { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); background: #192b38; font-size: 9px; }
.nav-item.active .badge { color: #c5f7e6; background: rgba(52, 207, 151, .18); }
.alert-badge { color: #ffd3da !important; background: rgba(255, 100, 124, .18) !important; }
.sidebar-foot { margin-top: auto; padding: 13px 6px 0; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.server-state { display: flex; align-items: center; gap: 8px; min-width: 0; }
.server-state > i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(55, 214, 146, .08); }
.server-state strong, .server-state span { display: block; }
.server-state strong { font-size: 10px; }
.server-state span { margin-top: 2px; color: var(--muted-2); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  background: rgba(8, 18, 26, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title h1 { margin: 0; font-size: 17px; letter-spacing: 0; }
.topbar-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.live-chip { display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 10px; border: 1px solid #1e4c42; border-radius: 6px; color: #bdf3de; background: rgba(55, 214, 146, .07); font-size: 9px; }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(55, 214, 146, .08); }
.live-chip.offline { color: #ffced5; border-color: #5b2b37; background: var(--red-soft); }
.live-chip.offline i { background: var(--red); }
.user-chip { display: flex; align-items: center; gap: 9px; margin-left: 5px; padding-left: 13px; border-left: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: #d9fdf0; background: #165649; font-size: 10px; font-weight: 700; }
.user-chip strong, .user-chip span:not(.avatar) { display: block; }
.user-chip strong { font-size: 10px; }
.user-chip > div span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.mobile-menu { display: none !important; }

.content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 18px 22px 34px; }
.view { display: none; animation: view-in .18s ease; }
.view.active { display: block; }
@keyframes view-in { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.page-head { margin: 3px 0 16px; }

.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #cbd9e3;
  background: #14232e;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover { border-color: #365268; background: #182a36; }
.button.primary { color: #e4fff4; border-color: #237b61; background: #17684f; }
.button.primary:hover { background: #1b7b5e; }
.button.warn { color: #ffe9bb; border-color: #6a5422; background: #4b3a17; }
.button.warn:hover { background: #5a461d; }
.button.danger { color: #ffe3e7; border-color: #773344; background: #64263a; }
.button.danger:hover { background: #752c42; }
.button.ghost { color: #afc0cc; background: transparent; }
.button.compact { min-height: 31px; padding: 0 10px; font-size: 10px; }
.button.full { width: 100%; }
.button:disabled { opacity: .42; cursor: not-allowed; }
.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #a9bdc9;
  background: #111e28;
  cursor: pointer;
}
.icon-button:hover { color: var(--text); border-color: #395168; background: #172733; }
.icon-button.ghost { border-color: transparent; background: transparent; }

.market-strip {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(105px, .65fr));
  align-items: stretch;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(90deg, #11232c, #0e1c27 42%, #111d28);
}
.market-symbol { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.market-symbol > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 6px; color: #09251d; background: linear-gradient(145deg, #7de1b8, #32b982); font-size: 10px; font-weight: 800; }
.market-symbol strong, .market-symbol small { display: block; }
.market-symbol strong { font-size: 14px; }
.market-symbol small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.market-cell { display: flex; flex-direction: column; justify-content: center; padding: 12px 15px; border-left: 1px solid var(--line-soft); }
.market-cell span { color: var(--muted); font-size: 9px; }
.market-cell strong { margin-top: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { min-width: 0; min-height: 102px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(180deg, #101e29, #0d1922); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.kpi-head svg { width: 15px; height: 15px; color: var(--muted-2); }
.kpi > strong { display: block; margin-top: 14px; overflow: hidden; font-size: 20px; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi > small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.neutral { color: var(--muted) !important; }

.news-guard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #544b2b;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(241, 189, 88, .08), rgba(241, 189, 88, .025));
}
.news-guard.safe { border-color: #25584a; background: linear-gradient(90deg, rgba(55, 214, 146, .08), rgba(55, 214, 146, .02)); }
.news-guard.off { border-color: var(--line); background: #101d27; }
.guard-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: var(--amber); background: var(--amber-soft); }
.news-guard.safe .guard-icon { color: var(--green); background: var(--green-soft); }
.guard-main { min-width: 0; }
.guard-main strong { display: block; font-size: 11px; }
.guard-main p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.guard-rules { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.guard-rules span { padding: 5px 8px; border: 1px solid #5b512d; border-radius: 5px; color: #ffe5b3; background: rgba(241, 189, 88, .06); font-size: 8px; white-space: nowrap; }
.guard-rules span.danger { color: #ffd0d8; border-color: #60303d; background: var(--red-soft); }

.section { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #0d1923; }
.section-head { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.section-head h2 { margin: 0; font-size: 13px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.section-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.section-tools { display: flex; gap: 7px; }
.section-head > svg { color: var(--muted-2); }

.account-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.account-card { min-width: 0; display: flex; flex-direction: column; padding: 14px; border-right: 1px solid var(--line-soft); background: #0e1b25; }
.account-card:last-child { border-right: 0; }
.account-card.offline { opacity: .68; background: #101820; }
.account-card.stopped { background: linear-gradient(180deg, rgba(255, 100, 124, .04), transparent 40%), #0e1b25; }
.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.account-head strong { display: block; }
.account-head > div, .vps-head > div { min-width: 0; }
.account-head strong, .vps-head strong { line-height: 1.3; overflow-wrap: anywhere; }
.account-head strong { font-size: 11px; }
.account-head strong { display: -webkit-box; min-height: 2.6em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.account-subline { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 4px; }
.account-subline .account-server { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-subline .account-login { flex: 0 0 auto; color: #c3d2dc; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.account-instance { display: block; margin-top: 3px; color: var(--muted-2); font-size: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 7px; border: 1px solid #28594b; border-radius: 5px; color: #bcf0dc; background: rgba(55, 214, 146, .07); font-size: 8px; white-space: nowrap; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.status-pill.offline { color: #ffcdd5; border-color: #61303c; background: var(--red-soft); }
.status-pill.offline i { background: var(--red); }
.status-pill.paused { color: #ffe5ad; border-color: #655125; background: var(--amber-soft); }
.status-pill.paused i { background: var(--amber); }
.ea-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; margin-top: 11px; padding: 0 9px; border: 1px solid #245c4d; border-radius: 6px; color: #c7f6e3; background: rgba(55, 214, 146, .07); }
.ea-row.stopped { color: #ffe2a8; border-color: #625125; background: var(--amber-soft); }
.ea-row div { min-width: 0; display: flex; align-items: center; gap: 6px; }
.ea-row strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ea-row time { color: var(--muted); font-size: 7px; white-space: nowrap; }
.ea-row svg { width: 14px; height: 14px; }
.account-equity { margin-top: 14px; }
.account-equity > span { color: var(--muted); font-size: 8px; }
.account-equity .currency-equivalent { display: block; min-height: 12px; margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.account-equity > strong { display: block; margin-top: 4px; font-size: 19px; font-variant-numeric: tabular-nums; }
.equity-change-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.equity-change { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.equity-change.today-change { justify-content: flex-end; }
.equity-change-label { color: var(--muted-2); font-size: 8px; }
.equity-change b { font-size: 10px; font-weight: 700; }
.equity-change svg { width: 12px; height: 12px; }
.account-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.account-metrics span, .account-metrics strong { display: block; }
.account-metrics span { color: var(--muted); font-size: 8px; }
.account-metrics strong { margin-top: 3px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.account-actions .button { min-width: 0; padding: 0 7px; font-size: 9px; }
.account-actions .button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 10px; color: var(--muted-2); font-size: 9px; font-weight: 600; }
.account-foot .latency-warning { color: var(--amber); }
.account-admin-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.account-admin-row .button { min-width: 0; padding: 0 6px; font-size: 8px; }

.vps-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vps-card { min-width: 0; padding: 13px; border-right: 1px solid var(--line-soft); background: #0b1720; }
.vps-card:last-child { border-right: 0; }
.vps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; margin-bottom: 11px; }
.vps-head strong, .vps-head span { display: block; }
.vps-head strong { font-size: 10px; }
.vps-head span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.vps-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric span, .metric strong, .metric small { display: block; }
.metric span { color: var(--muted); font-size: 8px; }
.metric strong { margin-top: 3px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.metric small { margin-top: 2px; color: var(--muted-2); font-size: 7px; white-space: nowrap; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 9px 12px; color: var(--muted); background: #101d27; border-bottom: 1px solid var(--line-soft); font-size: 8px; font-weight: 600; text-align: left; }
td { padding: 11px 12px; color: #cbd8e1; border-bottom: 1px solid var(--line-soft); font-size: 9px; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .016); }
.ticket { color: #89a2b4; font-family: Consolas, monospace; }
.side { display: inline-flex; min-width: 42px; justify-content: center; padding: 3px 6px; border-radius: 4px; font-size: 8px; font-weight: 700; }
.side.buy { color: #b8f5d9; background: var(--green-soft); }
.side.sell { color: #ffcbd3; background: var(--red-soft); }
.mini-button { min-height: 25px; padding: 0 8px; border: 1px solid #713242; border-radius: 5px; color: #ffd1d8; background: #512236; font-size: 8px; cursor: pointer; }
.empty { padding: 34px 18px; color: var(--muted); text-align: center; font-size: 10px; }

.position-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.position-account { overflow: hidden; }
.position-account .section-head { min-height: 65px; }
.position-table td { padding-top: 9px; padding-bottom: 9px; }
.position-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-bottom: 1px solid var(--line-soft); background: var(--line-soft); }
.position-summary > div { padding: 11px 12px; background: #0e1b25; }
.position-summary span, .position-summary strong { display: block; }
.position-summary span { color: var(--muted); font-size: 8px; }
.position-summary strong { margin-top: 4px; font-size: 12px; }

.alert-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.alert-list { display: grid; margin-bottom: 0; }
.alert-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); }
.alert-item:last-child { border-bottom: 0; }
.alert-item.ack { opacity: .58; }
.alert-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: var(--amber); background: var(--amber-soft); }
.alert-item.critical .alert-icon { color: var(--red); background: var(--red-soft); }
.alert-item.info .alert-icon { color: var(--blue); background: var(--blue-soft); }
.alert-item strong { display: block; font-size: 10px; }
.alert-item p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.alert-item time { color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.alert-actions { display: flex; gap: 6px; margin-top: 7px; }
.alert-actions button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 8px; cursor: pointer; }
.push-card { position: sticky; top: 83px; }
.push-visual { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 126px; background: radial-gradient(circle at 50% 40%, rgba(55, 214, 146, .14), transparent 58%); }
.push-visual > svg { width: 46px; height: 76px; color: #bbf5df; stroke-width: 1.2; }
.push-lines { display: grid; gap: 7px; width: 105px; }
.push-lines i { display: block; height: 7px; border-radius: 4px; background: #284556; }
.push-lines i:nth-child(2) { width: 78%; background: #21614e; }
.push-lines i:nth-child(3) { width: 55%; background: #6b5425; }
.push-checks { display: grid; gap: 8px; padding: 0 14px 14px; }
.push-checks div { display: flex; align-items: center; gap: 8px; color: #bdcbd5; font-size: 9px; }
.push-checks svg { width: 13px; height: 13px; color: var(--green); }
.push-card > .button { width: calc(100% - 28px); margin: 0 14px 14px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-section:last-child { grid-column: 1 / -1; }
.settings-fields, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 14px; }
.settings-fields .full, .form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { color: #aabcc8; font-size: 9px; }
.field input, .field select {
  width: 100%;
  min-height: 39px;
  padding: 0 11px;
  border: 1px solid #2a3f4e;
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: #08131b;
}
.field input:focus, .field select:focus { border-color: #3c7f6d; box-shadow: 0 0 0 3px rgba(55, 214, 146, .06); }
.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 6px; background: #0a161f; }
.switch-field span strong, .switch-field span small { display: block; }
.switch-field span strong { font-size: 9px; }
.switch-field span small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.switch-field i { position: relative; width: 38px; height: 21px; flex: 0 0 auto; border-radius: 11px; background: #263a48; cursor: pointer; }
.switch-field i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #8297a5; transition: .16s ease; }
.switch-field input:checked + i { background: #155c48; }
.switch-field input:checked + i::after { left: 20px; background: #b8f7df; }
.settings-save { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }
.form-error { padding: 10px 11px; border: 1px solid #66303d; border-radius: 6px; color: #ffd2d9; background: var(--red-soft); font-size: 9px; }
.inline-create { margin-top: 14px; }
.scope-options { display: flex; flex-wrap: wrap; gap: 7px; }
.scope-option { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: #b8c8d3; background: #0b1720; font-size: 9px; cursor: pointer; }
.scope-option:has(input:checked) { color: #d8ffef; border-color: #27725c; background: rgba(55, 214, 146, .1); }
.scope-option input { accent-color: var(--green); }

.timeline { padding: 5px 14px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item > i { width: 8px; height: 8px; margin-top: 4px; border: 2px solid #285d50; border-radius: 50%; background: #0d1923; }
.timeline-item strong { display: block; font-size: 10px; }
.timeline-item p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.timeline-item time { color: var(--muted-2); font-size: 8px; white-space: nowrap; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(2, 7, 11, .76); backdrop-filter: blur(5px); }
.modal { width: min(450px, 100%); padding: 21px; border: 1px solid #3a4c5a; border-radius: 7px; background: #101d27; box-shadow: var(--shadow); }
.modal-wide { width: min(720px, 100%); max-height: min(92vh, 760px); overflow-y: auto; }
.modal-form-grid { margin-top: 16px; padding: 0; }
.account-settings-actions { flex-wrap: wrap; }
.modal-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; color: var(--amber); background: var(--amber-soft); }
.modal-icon.danger { color: var(--red); background: var(--red-soft); }
.modal h2 { margin: 15px 0 7px; font-size: 17px; }
.modal > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.confirm-list { display: grid; gap: 6px; margin-top: 14px; }
.confirm-list div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: 5px; background: #0a151e; font-size: 9px; }
.confirm-list span:first-child { color: var(--muted); }
.confirm-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #d0dbe3; font-size: 9px; cursor: pointer; }
.confirm-check input { accent-color: var(--red); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast-stack { position: fixed; z-index: 130; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid #315365; border-radius: 6px; color: #dce8ef; background: #12232e; box-shadow: var(--shadow); font-size: 10px; line-height: 1.5; }
.toast.success { border-color: #28614f; }
.toast.error { border-color: #713441; }
.toast svg { width: 15px; height: 15px; margin-top: 1px; color: var(--green); }
.toast.error svg { color: var(--red); }

@media (min-width: 1500px) {
  .account-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-card:nth-child(3) { border-right: 0; }
  .account-card:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
  .vps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vps-card:nth-child(3) { border-right: 0; }
  .vps-card:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 1020px) {
  :root { --sidebar: 210px; }
  .login-view { grid-template-columns: 1fr; }
  .login-art { min-height: 44vh; padding: 30px; }
  .login-panel { min-height: 56vh; }
  .position-layout, .settings-grid { grid-template-columns: 1fr; }
  .settings-section:last-child { grid-column: auto; }
  .alert-layout { grid-template-columns: 1fr; }
  .push-card { position: static; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-101%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .main { display: block; }
  .mobile-menu { display: grid !important; }
  .content { padding: 13px 12px 28px; }
  .topbar { min-height: 60px; padding: 0 12px; }
  .topbar-title p { display: none; }
  .live-chip span, .user-chip > div { display: none; }
  .user-chip { padding-left: 7px; }
  .market-strip { grid-template-columns: 1.4fr 1fr 1fr; }
  .market-cell:nth-child(4), .market-cell:nth-child(5) { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-guard { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .guard-rules { grid-column: 1 / -1; justify-content: flex-start; }
  .account-grid, .vps-grid { grid-template-columns: 1fr; }
  .account-card, .vps-card { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .account-card:last-child, .vps-card:last-child { border-bottom: 0; }
  .account-actions { grid-template-columns: 1fr 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-actions { width: 100%; justify-content: stretch; }
  .section-actions .button { flex: 1; }
  .settings-fields, .form-grid { grid-template-columns: 1fr; }
  .settings-fields .full, .form-grid .full { grid-column: auto; }
  .login-art { min-height: 38vh; padding: 25px 22px; }
  .art-copy h1 { font-size: 33px; }
  .art-copy p { font-size: 11px; }
  .art-metrics { display: none; }
  .login-panel { min-height: 62vh; padding: 23px 18px; }
}
@media (max-width: 520px) {
  .topbar-actions > .live-chip { display: none; }
  .market-strip { grid-template-columns: 1fr 1fr; }
  .market-symbol { grid-column: 1 / -1; border-bottom: 1px solid var(--line-soft); }
  .market-cell { border-left: 0; }
  .kpi { min-height: 94px; padding: 12px; }
  .kpi > strong { font-size: 17px; }
  .position-summary { grid-template-columns: 1fr 1fr; }
  .alert-item { grid-template-columns: 26px minmax(0, 1fr); }
  .alert-item > time { grid-column: 2; }
  .section-actions { display: grid; grid-template-columns: 1fr; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
