:root {
  --bg: #03060d;
  --panel: #080d18;
  --line: rgba(79, 140, 255, .18);
  --text: #f7faff;
  --muted: #9da9c4;
  --blue: #4f8cff;
  --cyan: #22d3ee;
  --violet: #8a4dff;
  --red: #ff6d7a;
  --yellow: #ffd166;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 86% 0%, rgba(79, 140, 255, .24), transparent 30%),
    radial-gradient(circle at 8% 8%, rgba(138, 77, 255, .18), transparent 28%),
    #03060d;
  display: grid;
  grid-template-columns: 286px 1fr;
}
button, a { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 11px; padding: 11px 14px; background: #111b33; color: var(--text); font-weight: 800; }
a { color: #abc5ff; text-decoration: none; }
.sidebar {
  min-height: 100vh;
  background: rgba(3,6,13,.86);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  backdrop-filter: blur(18px);
}
.sidebar img { width: 210px; max-width: 100%; border-radius: 14px; margin-bottom: 18px; }
.sidebar button, .sidebar a { text-align: left; background: transparent; border-radius: 14px; padding: 13px 14px; }
.sidebar button.active, .sidebar button:hover { background: linear-gradient(135deg, rgba(79,140,255,.24), rgba(138,77,255,.18)); }
.danger-nav { color: #ffd6db !important; background: rgba(255,109,122,.12) !important; }
main { padding: 28px; max-width: 1680px; width: 100%; }
header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
h1 { margin: 4px 0 0; font-size: clamp(34px, 5vw, 58px); }
h2 { margin: 0 0 16px; }
p, span { color: var(--muted); }
#statusText { color: #8fb5ff; font-weight: 900; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.primary { background: linear-gradient(135deg, var(--blue), var(--violet)); }
.danger { background: #b83a47; }
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 12px 16px;
  color: #dfffee;
  background: rgba(50, 240, 165, .13);
  border: 1px solid rgba(50, 240, 165, .28);
  font-weight: 900;
}
.status-badge.danger-badge {
  color: #ffe9ed;
  background: rgba(255, 109, 138, .14);
  border-color: rgba(255, 109, 138, .34);
}
.notice, .panel, .metrics article, .bot-hero { border: 1px solid var(--line); background: rgba(8,13,24,.9); border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.notice { padding: 14px 16px; color: var(--yellow); margin-bottom: 18px; }
.bot-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  margin-bottom: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 0%, rgba(25, 212, 255, .18), transparent 28%),
    linear-gradient(135deg, rgba(8,13,24,.96), rgba(13,20,40,.88));
}
.bot-hero h2 { margin: 10px 0 8px; font-size: clamp(26px, 3vw, 42px); }
.bot-hero p { max-width: 760px; margin: 0; }
.pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(79,140,255,.12);
  color: #aecaef;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}
.bot-hero-card {
  min-width: 240px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(3, 6, 13, .55);
  border: 1px solid rgba(143, 181, 255, .22);
}
.bot-hero-card span, .bot-hero-card small { color: var(--muted); }
.bot-hero-card strong { font-size: 24px; }
.view { display: none; }
.view.active { display: block; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metrics article { padding: 18px; }
.metrics span { display: block; margin-bottom: 9px; font-size: 13px; }
.metrics strong { font-size: 22px; }
.account-board {
  position: relative;
  overflow: hidden;
  padding: 22px;
  margin-bottom: 18px;
  border-radius: 24px;
  border: 1px solid rgba(79, 140, 255, .34);
  background:
    radial-gradient(circle at 86% 6%, rgba(25, 212, 255, .2), transparent 30%),
    radial-gradient(circle at 8% 12%, rgba(138, 77, 255, .18), transparent 28%),
    linear-gradient(135deg, rgba(8, 13, 24, .98), rgba(10, 21, 44, .94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.account-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(79, 140, 255, .16), transparent 22%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 100% 56px;
}
.account-board > * { position: relative; }
.account-board h2 { margin: 4px 0 2px; font-size: clamp(30px, 4vw, 46px); }
.account-board .account-sub { margin: 0 0 18px; color: #b7c8f5; }
.account-topline { color: #8fb5ff; font-weight: 950; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.pnl-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.strategy-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pnl-box, .strategy-mini {
  padding: 16px;
  border-radius: 18px;
  background: rgba(3, 6, 13, .48);
  border: 1px solid rgba(143, 181, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.pnl-box span, .strategy-mini span { display: block; color: #b9c8ea; }
.pnl-box strong { display: block; margin-top: 6px; font-size: 24px; }
.positive { color: #32f0a5 !important; }
.negative { color: #ff6d8a !important; }
.strategy-mini header { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.strategy-mini h3 { font-size: 17px; }
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #eaf2ff;
  background: linear-gradient(135deg, rgba(79, 140, 255, .34), rgba(138, 77, 255, .26));
  border: 1px solid rgba(143, 181, 255, .28);
  font-size: 12px;
  font-weight: 950;
}
.mini-pill.positive { color: #dfffee !important; background: rgba(50, 240, 165, .16); border-color: rgba(50, 240, 165, .32); }
.mini-pill.negative { color: #ffe9ed !important; background: rgba(255, 109, 138, .14); border-color: rgba(255, 109, 138, .32); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mini-stats div { padding: 10px; border-radius: 9px; background: rgba(255,255,255,.075); }
.day-goal {
  position: relative;
  margin-bottom: 18px;
  border-left: 0;
  background:
    linear-gradient(135deg, rgba(8,13,24,.94), rgba(11,18,38,.92)),
    rgba(8,13,24,.9);
}
.day-goal::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 20px 0 0 20px;
  background: linear-gradient(180deg, var(--blue), var(--violet));
}
.day-goal-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.progress-track { height: 12px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin: 14px 0; }
.progress-fill { height: 100%; min-width: 2%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--violet), var(--cyan)); }
.goal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.goal-grid div { padding: 13px; border-radius: 14px; background: rgba(255,255,255,.045); border: 1px solid rgba(143, 181, 255, .12); }
.goal-grid span { display: block; margin-bottom: 7px; }
.grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); gap: 18px; }
.panel { padding: 22px; overflow: auto; }
.badge { display: inline-flex; border-radius: 999px; padding: 7px 10px; background: rgba(255,209,102,.14); color: var(--yellow); font-weight: 950; }
.badge.long { background: rgba(79,140,255,.14); color: #9fc0ff; }
.kv { display: grid; gap: 10px; }
.kv div, .cards div { display: flex; justify-content: space-between; gap: 16px; padding: 13px; border-radius: 13px; background: #050914; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cards div { flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.panel-head p { margin: 6px 0 0; }
.strategy-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; }
.strategy-card {
  display: grid;
  gap: 16px;
  text-align: left;
  padding: 18px;
  border: 1px solid rgba(143, 181, 255, .18);
  border-radius: 18px;
  background: rgba(5, 9, 20, .9);
  color: var(--text);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.strategy-card:hover, .strategy-card.active {
  transform: translateY(-2px);
  border-color: rgba(79, 140, 255, .58);
  background: linear-gradient(145deg, rgba(79,140,255,.16), rgba(138,77,255,.1));
}
.strategy-card strong { font-size: 18px; }
.strategy-card span { line-height: 1.55; }
.strategy-tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.strategy-tags small {
  min-height: 42px;
  display: grid;
  align-items: center;
  padding: 9px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: #dbe6ff;
  font-size: 12px;
}
.recommendation-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(79, 140, 255, .28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(138,77,255,.18), transparent 26%),
    rgba(5, 9, 20, .82);
}
.recommendation-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.recommendation-head h3 { font-size: 24px; }
.recommendation-meta { display: grid; gap: 8px; text-align: right; }
.recommendation-level { font-size: 24px; font-weight: 950; }
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rec-grid div, .reason-box {
  padding: 13px;
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(143,181,255,.11);
}
.reason-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.reason-box strong { display: block; margin-bottom: 10px; }
.reason-box ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.75; }
.systems-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.system-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(143,181,255,.2);
  background:
    linear-gradient(150deg, rgba(79,140,255,.1), transparent 32%),
    rgba(5, 9, 20, .88);
}
.system-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
}
.system-card header { display: flex; justify-content: space-between; gap: 14px; margin: 0 0 14px; }
.system-card h3 { font-size: 20px; }
.system-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.system-stats div { padding: 11px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.system-card p { margin: 8px 0 0; }
.daily-result-list {
  display: grid;
  gap: 11px;
}
.daily-result-row {
  display: grid;
  grid-template-columns: 62px minmax(160px, 1fr) 120px;
  gap: 14px;
  align-items: center;
}
.daily-result-date { color: #b9c8ea; font-weight: 800; }
.daily-result-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(143,181,255,.08);
}
.daily-result-fill {
  height: 100%;
  min-width: 4%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--cyan));
}
.daily-result-fill.loss { background: linear-gradient(90deg, var(--red), #ff9fb0); }
.daily-result-value { text-align: right; font-weight: 950; }
.news-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.news-summary article {
  padding: 15px;
  border-radius: 16px;
  background: rgba(5, 9, 20, .88);
  border: 1px solid rgba(143, 181, 255, .16);
}
.news-summary span, .news-item span, .news-item small { display: block; color: var(--muted); }
.news-summary strong { display: block; margin-top: 6px; font-size: 22px; }
.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.news-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(79, 140, 255, .08), transparent 34%),
    rgba(5, 9, 20, .86);
  border: 1px solid rgba(143, 181, 255, .15);
}
.news-item:hover { border-color: rgba(79, 140, 255, .42); }
.news-item strong { line-height: 1.45; }
.empty-state {
  padding: 18px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(5, 9, 20, .86);
  border: 1px solid rgba(143, 181, 255, .15);
}
canvas { width: 100%; background: #050914; border-radius: 16px; border: 1px solid rgba(255,255,255,.05); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: #9fc0ff; background: #050914; }
.emergency { text-align: center; padding: 54px 20px; }
@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .metrics, .grid, .cards, .strategy-grid, .pnl-strip, .strategy-summary, .goal-grid, .rec-grid, .reason-columns, .systems-grid, .news-summary, .news-feed { grid-template-columns: 1fr; }
  header, .bot-hero { flex-direction: column; }
  .panel-head { flex-direction: column; }
  .recommendation-head, .day-goal-head { flex-direction: column; }
  .recommendation-meta { text-align: left; }
  .daily-result-row { grid-template-columns: 1fr; gap: 6px; }
  .daily-result-value { text-align: left; }
}
