:root {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: rgba(17, 26, 43, 0.94);
  --panel-2: #0f1726;
  --line: #243247;
  --text: #e5eef9;
  --muted: #8ea0b9;
  --accent: #2dd4bf;
  --accent-2: #f59e0b;
  --good: #22c55e;
  --bad: #ef4444;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #12213a 0%, #0b1220 52%, #080d16 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 24px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(8, 13, 22, 0.92) 0%, rgba(13, 19, 33, 0.94) 100%);
}
.main { padding: 24px; }
.brand h1, .topbar h2, .card h3 { margin: 0; line-height: 1.1; }
.brand { padding-bottom: 18px; border-bottom: 1px solid rgba(148,163,184,.12); }
.brand h1 { font-size: 30px; margin: 8px 0; }
.brand p { margin: 0; color: var(--muted); line-height: 1.6; }
.eyebrow, .section-title, .muted, .badge { color: var(--muted); }
.eyebrow, .section-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
}
.card, .search {
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 18px; }
.sidebar .card { margin-top: 18px; }
.topbar {
  display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px;
}
.topbar h2 { font-size: 32px; margin-top: 8px; }
.search { min-width: 280px; padding: 16px; }
label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%; color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(45, 212, 191, 0.75); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}
.row, .row-2, .stack, .templates, .actions, .status-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row { display: grid; grid-template-columns: 1fr auto; }
.search { position: relative; }
.search-row { grid-template-columns: minmax(0, 1fr) auto; }
.suggestions {
  position: absolute; left: 16px; right: 16px; top: calc(100% - 8px); z-index: 20;
  display: none; max-height: 280px; overflow: auto; padding: 8px;
  background: #0b1322; border: 1px solid rgba(148, 163, 184, 0.24); border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.38);
}
.suggestions.open { display: grid; gap: 6px; }
.suggestion {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 6px; background: transparent; color: var(--text); text-align: left;
}
.suggestion span { display: grid; gap: 2px; }
.suggestion:hover { background: rgba(45, 212, 191, 0.1); transform: none; }
.suggestion small { color: var(--muted); }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 10px; align-items: stretch; }
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric {
  padding: 18px; background: linear-gradient(180deg, rgba(16,25,42,.96), rgba(10,17,30,.96));
  border: 1px solid rgba(148, 163, 184, 0.16); border-radius: var(--radius); box-shadow: var(--shadow);
}
.metric .label { color: var(--muted); font-size: 13px; }
.metric .value { margin: 10px 0 8px; font-size: 28px; font-weight: 700; }
.metric .sub { color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1.25fr 0.95fr; gap: 18px; }
.bottom { margin-top: 18px; grid-template-columns: 1fr 1fr; }
.observer-strip { margin: 18px 0; }
.observation-list { display: grid; gap: 10px; }
.observation-run { padding: 12px 14px; border-radius: 8px; background: rgba(10,17,30,.8); border: 1px solid rgba(148,163,184,.12); }
.observation-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.observation-head small { color: var(--muted); }
.observation-items { display: grid; gap: 6px; }
.observation-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid rgba(148,163,184,.1); border-radius: 6px; background: rgba(15,23,42,.65); color: var(--text); text-align: left; }
.observation-item:hover { background: rgba(45,212,191,.1); transform: none; }
.observation-item span { display: grid; gap: 2px; }
.observation-item small { color: var(--muted); }
.observation-item b { color: #7ff1e3; }
.verification-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(148,163,184,.12); }
.subscription-status { min-height: 20px; margin-top: 8px; }
.subscription-status.good { color: var(--good); }
.subscription-status.bad { color: var(--bad); }
.stop-subscription { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(148,163,184,.12); }
canvas {
  width: 100%; height: auto; display: block; background: linear-gradient(180deg, rgba(8,13,22,.96), rgba(9,16,27,.86));
  border-radius: 8px; border: 1px solid rgba(148, 163, 184, 0.12);
}
.segmented, .templates { flex-wrap: wrap; }
.pill, .ghost {
  border-radius: 999px; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.pill, .ghost, #loadSymbolBtn, #analyzeBtn {
  padding: 10px 14px; border: 1px solid var(--line); background: transparent; color: var(--text);
}
.pill.active { background: rgba(45, 212, 191, 0.14); border-color: rgba(45, 212, 191, 0.44); color: #7ff1e3; }
button:hover { transform: translateY(-1px); }
#loadSymbolBtn, #analyzeBtn { background: linear-gradient(135deg, var(--accent), #14b8a6); color: #07131a; font-weight: 700; }
.badge {
  padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(10, 17, 30, 0.85); font-size: 12px; white-space: nowrap;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12);
}
.dot.ready { background: var(--good); box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12); }
.mini, .item, .analysis-box, .roadmap div {
  padding: 12px 14px; border-radius: 8px; background: rgba(10, 17, 30, 0.8); border: 1px solid rgba(148,163,184,.12);
}
.item { width: 100%; display: flex; justify-content: space-between; align-items: center; color: var(--text); text-align: left; }
.item.active { border-color: rgba(45,212,191,.5); background: rgba(45,212,191,.09); }
.history-item { display: grid; gap: 6px; }
.history-item .line { display: flex; justify-content: space-between; gap: 10px; }
.history-item p { margin: 0; color: var(--muted); line-height: 1.45; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.mini strong, .item strong, .analysis h4 { display: block; margin-bottom: 6px; }
.mini small, .item small { display: block; margin-top: 4px; color: var(--muted); }
.muted-list .item { color: var(--muted); }
.form { display: grid; gap: 12px; }
.form[hidden] { display: none; }
textarea { min-height: 120px; resize: vertical; }
.analysis { margin-top: 16px; display: grid; gap: 12px; }
.analysis-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analysis-metric { padding: 14px; border-radius: 8px; background: rgba(10,17,30,.8); border: 1px solid rgba(148,163,184,.12); }
.analysis-metric span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.analysis-metric strong { font-size: 18px; }
.roadmap { display: grid; gap: 10px; }
.roadmap div { display: flex; align-items: center; gap: 10px; }
.roadmap span {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(245, 158, 11, 0.18); color: #fbbf24; font-weight: 700; flex: 0 0 auto;
}
@media (max-width: 1180px) {
  .layout, .grid-2, .bottom { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid rgba(148,163,184,.14); }
  .topbar { align-items: start; flex-direction: column; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .main, .sidebar { padding: 16px; }
  .stats, .row-2, .analysis-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .topbar h2 { font-size: 26px; }
  .brand h1 { font-size: 24px; }
}
