:root {
  --bg: #101112;
  --surface: #191b1f;
  --surface-2: #22252a;
  --line: #30343b;
  --text: #f2f4f7;
  --muted: #a6adb8;
  --soft: #727b88;
  --green: #32d583;
  --red: #ff6b6b;
  --amber: #fdbb52;
  --cyan: #5cc8ff;
  --ink: #111418;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(92, 200, 255, 0.08), rgba(16, 17, 18, 0) 240px),
    radial-gradient(circle at 75% 0%, rgba(50, 213, 131, 0.08), rgba(16, 17, 18, 0) 260px),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
  padding: 22px clamp(18px, 4vw, 42px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

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

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, #29313a, #17191d);
  border-radius: 8px;
  color: var(--cyan);
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  font-weight: 760;
}

.identity p,
.panel-heading p,
.risk-note,
.last-updated {
  color: var(--muted);
}

.market-pulse {
  display: grid;
  gap: 3px;
  min-width: min(360px, 44vw);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(25, 27, 31, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.market-pulse strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.market-pulse small {
  color: var(--muted);
}

.pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(253, 187, 82, 0.12);
}

.pulse-dot.live {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(50, 213, 131, 0.12);
}

.pulse-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.12);
}

.workspace {
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 34px) 32px;
}

.control-band,
.watchlist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.control-band {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 0;
  background: rgba(16, 17, 18, 0.92);
  backdrop-filter: blur(14px);
}

.symbol-form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
  flex: 1 1 420px;
}

.symbol-field {
  position: relative;
  flex: 1 1 340px;
  min-width: 220px;
}

label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

input,
select {
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(25, 27, 31, 0.88);
  color: var(--text);
  border-radius: 7px;
  outline: none;
}

input {
  width: min(340px, 100%);
  padding: 0 13px;
}

.symbol-field input {
  width: 100%;
}

.symbol-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(92, 200, 255, 0.28);
  border-radius: 7px;
  background: rgba(18, 20, 24, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.symbol-suggestion {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.symbol-suggestion:hover,
.symbol-suggestion:focus {
  background: rgba(92, 200, 255, 0.1);
}

.symbol-suggestion strong {
  padding: 0 8px;
  font-size: 14px;
}

.symbol-suggestion span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--soft);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.symbol-suggestion.direct span {
  color: #9dffc9;
}

select {
  padding: 0 34px 0 12px;
}

input:focus,
select:focus {
  border-color: rgba(92, 200, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(92, 200, 255, 0.12);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 92px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button.primary {
  border-color: rgba(50, 213, 131, 0.5);
  background: var(--green);
  color: #07130d;
  font-weight: 720;
}

.button.ghost:hover,
.button.primary:hover {
  filter: brightness(1.07);
}

.watchlist-row {
  justify-content: space-between;
  padding: 5px 0 18px;
  min-height: 54px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  background: rgba(34, 37, 42, 0.76);
  border-radius: 999px;
  color: var(--text);
  font-weight: 680;
}

.chip button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.ai-surge-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(92, 200, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 200, 255, 0.09), rgba(50, 213, 131, 0.045)),
    rgba(25, 27, 31, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.ai-surge-head,
.ai-surge-tools,
.ai-surge-card-head,
.ai-surge-price-row,
.ai-surge-actions,
.ai-surge-column-head {
  display: flex;
  align-items: center;
}

.ai-surge-head,
.ai-surge-card-head,
.ai-surge-column-head {
  justify-content: space-between;
  gap: 12px;
}

.ai-surge-head h2 {
  margin-top: 3px;
  font-size: 22px;
}

.ai-surge-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.ai-surge-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ai-surge-tools select {
  min-width: 128px;
}

.ai-surge-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.ai-surge-summary {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 13px;
  border: 1px solid rgba(92, 200, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 17, 18, 0.42);
}

.ai-surge-summary.error {
  border-color: rgba(255, 107, 107, 0.26);
  background: rgba(255, 107, 107, 0.06);
}

.ai-surge-summary strong {
  line-height: 1.42;
}

.ai-surge-summary span,
.ai-surge-summary small {
  color: var(--muted);
  line-height: 1.36;
}

.ai-surge-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ai-surge-column-head {
  min-height: 34px;
  padding: 0 2px;
}

.ai-surge-column-head h3 {
  font-size: 16px;
}

.ai-surge-column-head span {
  color: var(--soft);
  font-size: 12px;
}

.ai-surge-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left-width: 3px;
  border-radius: 8px;
  background: rgba(16, 17, 18, 0.42);
}

.ai-surge-card.pump {
  border-left-color: var(--green);
}

.ai-surge-card.dump {
  border-left-color: var(--red);
}

.ai-surge-symbol {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.ai-surge-symbol strong {
  font-size: 22px;
  line-height: 1.05;
}

.ai-surge-symbol span,
.ai-surge-card p,
.ai-surge-risk,
.ai-surge-metrics span {
  color: var(--muted);
}

.ai-surge-card-head em {
  min-width: 58px;
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(92, 200, 255, 0.1);
  color: var(--cyan);
  font-style: normal;
  font-weight: 760;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ai-surge-price-row {
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.ai-surge-price-row strong {
  font-size: 21px;
}

.ai-surge-price-row small {
  color: var(--soft);
}

.ai-surge-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.ai-surge-metrics div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.ai-surge-metrics strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ai-surge-card p,
.ai-surge-risk {
  line-height: 1.4;
}

.ai-surge-actions {
  justify-content: flex-start;
  gap: 6px;
}

.ai-surge-empty {
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.extreme-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(253, 187, 82, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(253, 187, 82, 0.08), rgba(92, 200, 255, 0.05)),
    rgba(25, 27, 31, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.extreme-head,
.extreme-tools,
.extreme-hit-head,
.extreme-actions,
.extreme-list-head,
.extreme-group-head {
  display: flex;
  align-items: center;
}

.extreme-head,
.extreme-hit-head,
.extreme-list-head,
.extreme-group-head {
  justify-content: space-between;
  gap: 12px;
}

.extreme-head h2 {
  margin-top: 3px;
  font-size: 22px;
}

.extreme-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.extreme-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.extreme-tools select {
  min-width: 138px;
}

.extreme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.extreme-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(16, 17, 18, 0.38);
}

.extreme-group-head h3 {
  font-size: 18px;
}

.extreme-group-head span,
.extreme-list-head span {
  color: var(--soft);
  font-size: 12px;
}

.extreme-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.extreme-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.extreme-list-head {
  min-height: 26px;
}

.extreme-list-head h4 {
  margin: 0;
  font-size: 14px;
}

.extreme-hit {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.extreme-hit.high {
  border-left-color: var(--green);
}

.extreme-hit.low {
  border-left-color: var(--red);
}

.extreme-symbol {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.extreme-symbol strong {
  font-size: 18px;
  line-height: 1;
}

.extreme-symbol span,
.extreme-price-row span,
.extreme-distance span {
  color: var(--soft);
  font-size: 12px;
}

.extreme-hit-head em {
  flex: 0 0 auto;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.extreme-price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.extreme-price-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.extreme-price-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.extreme-distance {
  display: grid;
  gap: 3px;
}

.extreme-distance strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.extreme-actions {
  justify-content: flex-start;
  gap: 6px;
}

.extreme-empty {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.bot-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(50, 213, 131, 0.18);
  border-radius: 8px;
  background: rgba(25, 27, 31, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.bot-panel[hidden] {
  display: none !important;
}

.bot-head,
.bot-layout,
.bot-form-actions,
.bot-item-main,
.bot-actions {
  display: flex;
  align-items: center;
}

.bot-head {
  justify-content: space-between;
  gap: 14px;
}

.bot-head h2 {
  margin-top: 3px;
  font-size: 22px;
}

.bot-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.bot-token {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.bot-token input {
  width: 210px;
}

.bot-layout {
  align-items: stretch;
  gap: 14px;
}

.bot-form,
.bot-list-wrap {
  min-width: 0;
}

.bot-form {
  flex: 1 1 720px;
}

.bot-list-wrap {
  display: grid;
  grid-template-rows: minmax(160px, auto) auto minmax(150px, 240px);
  gap: 12px;
  flex: 0 1 520px;
}

.bot-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.bot-form-grid label {
  display: grid;
  gap: 6px;
}

.bot-form-grid input,
.bot-form-grid select {
  width: 100%;
}

.bot-form-grid .checkbox-label {
  align-items: center;
  grid-template-columns: 1fr auto;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(253, 187, 82, 0.24);
  border-radius: 7px;
  background: rgba(253, 187, 82, 0.06);
}

.bot-form-grid .checkbox-label input {
  width: 18px;
  height: 18px;
}

.bot-form-actions {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.bot-save-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-size: 13px;
}

.bot-save-status.success {
  color: #9dffc9;
}

.bot-save-status.error {
  color: #ffb4b4;
}

.bot-save-status.pending {
  color: #ffd28a;
}

.bot-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
}

.bot-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
}

.bot-item {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(16, 17, 18, 0.42);
}

.bot-item[data-bot-card-edit] {
  cursor: pointer;
}

.bot-item[data-bot-card-edit]:hover {
  border-color: rgba(92, 200, 255, 0.28);
}

.bot-item.selected {
  border-color: rgba(92, 200, 255, 0.38);
}

.bot-item-main {
  justify-content: space-between;
  gap: 10px;
}

.bot-name {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
}

.bot-name strong,
.bot-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-name span,
.bot-item-stats {
  color: var(--muted);
  font-size: 12px;
}

.bot-status {
  min-width: 64px;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 12px;
  text-align: center;
}

.bot-status.running {
  color: #9dffc9;
  background: rgba(50, 213, 131, 0.12);
}

.bot-status.stopped {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.bot-item-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
}

.bot-item-stats span {
  overflow: hidden;
  padding: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-item-stats .warning-text {
  color: #ffd28a;
  background: rgba(253, 187, 82, 0.12);
}

.bot-actions {
  justify-content: flex-start;
  gap: 6px;
  cursor: default;
}

.mini-button.danger {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.1);
  color: #ffb4b4;
}

.bot-log {
  min-height: 160px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: #d7dde6;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bot-stats-panel {
  display: grid;
  gap: 10px;
  min-height: 120px;
  padding: 11px;
  border: 1px solid rgba(92, 200, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.bot-stats-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.bot-stats-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
}

.bot-stats-summary span {
  color: var(--soft);
  font-size: 12px;
}

.bot-stats-summary strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bot-trade-table-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
}

.bot-trade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.bot-trade-table th,
.bot-trade-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
  white-space: nowrap;
}

.bot-trade-table th {
  position: sticky;
  top: 0;
  background: #1a1d22;
  color: var(--soft);
}

.bot-trade-table th:first-child,
.bot-trade-table td:first-child {
  text-align: left;
}

.bot-trade-table td:first-child {
  display: grid;
  gap: 2px;
}

.bot-trade-table td:first-child span {
  color: var(--soft);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(50, 213, 131, 0.35);
  border-radius: 6px;
  background: rgba(50, 213, 131, 0.12);
  color: #9dffc9;
  font-size: 12px;
  text-decoration: none;
}

.mini-button.ghost {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.empty-cell {
  color: var(--muted);
  text-align: center !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  align-items: start;
}

.market-column {
  display: grid;
  gap: 14px;
}

.recommendation-panel {
  min-height: 0;
}

.recommend-empty,
.recommend-main {
  border: 1px solid rgba(92, 200, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 200, 255, 0.12), rgba(50, 213, 131, 0.06)),
    rgba(25, 27, 31, 0.88);
  box-shadow: var(--shadow);
}

.recommend-empty {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.recommend-main {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 230px) minmax(470px, 1.25fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.recommend-main.watch {
  border-color: rgba(253, 187, 82, 0.28);
  background:
    linear-gradient(135deg, rgba(253, 187, 82, 0.1), rgba(92, 200, 255, 0.07)),
    rgba(25, 27, 31, 0.88);
}

.eyebrow,
.recommend-empty span,
.recommend-price span,
.recommend-stats span {
  color: var(--soft);
  font-size: 12px;
}

.recommend-main h2 {
  margin-top: 3px;
  font-size: 24px;
}

.recommend-main h2 small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.recommend-main p,
.recommend-empty p {
  color: var(--muted);
  line-height: 1.42;
}

.recommend-price {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(50, 213, 131, 0.24);
  border-radius: 7px;
  background: rgba(50, 213, 131, 0.08);
}

.recommend-price strong {
  color: #9dffc9;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.recommend-price small {
  color: var(--muted);
}

.recommend-stats {
  display: grid;
  grid-template-columns: minmax(84px, 0.85fr) minmax(92px, 0.95fr) minmax(104px, 1fr) minmax(150px, 1.35fr);
  gap: 8px;
}

.recommend-stats div {
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.recommend-stats strong {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-variant-numeric: tabular-nums;
  line-height: 1.18;
}

.recommend-stat-news strong {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.recommend-stat-news .stars {
  flex: 0 0 auto;
  white-space: nowrap;
}

.alerts-panel {
  display: none;
  border: 1px solid rgba(253, 187, 82, 0.35);
  border-radius: 8px;
  background: rgba(253, 187, 82, 0.08);
}

.alerts-panel.active {
  display: block;
}

.alerts-header,
.alert-row {
  display: grid;
  grid-template-columns: 96px 120px minmax(0, 1fr) 78px;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
}

.alerts-header {
  border-bottom: 1px solid rgba(253, 187, 82, 0.2);
  color: #ffd89a;
  font-size: 13px;
  font-weight: 700;
}

.alert-row + .alert-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.alert-row small {
  color: var(--muted);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(330px, 1fr));
  gap: 14px;
}

.market-card,
.news-panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(25, 27, 31, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.market-card {
  display: grid;
  gap: 14px;
  min-height: 368px;
  padding: 16px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.market-card:hover,
.market-card:focus-visible {
  border-color: rgba(92, 200, 255, 0.38);
  background: rgba(28, 31, 36, 0.92);
  outline: none;
  transform: translateY(-1px);
}

.card-head,
.price-line,
.signal-row,
.exchange-strip,
.metric-grid {
  display: flex;
  align-items: center;
}

.card-head {
  justify-content: space-between;
  gap: 12px;
}

.coin-title {
  display: grid;
  gap: 2px;
}

.coin-title h2 {
  font-size: 24px;
  line-height: 1;
}

.coin-title span {
  color: var(--muted);
  font-size: 13px;
}

.remove-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
}

.remove-button svg {
  width: 16px;
  height: 16px;
}

.price-line {
  justify-content: space-between;
  gap: 12px;
}

.price {
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 780;
  line-height: 1;
}

.change {
  min-width: 86px;
  padding: 7px 9px;
  border-radius: 7px;
  text-align: center;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.positive {
  color: var(--green);
  background: rgba(50, 213, 131, 0.1);
}

.negative {
  color: var(--red);
  background: rgba(255, 107, 107, 0.1);
}

.neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.sparkline {
  width: 100%;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.signal-row {
  justify-content: space-between;
  gap: 12px;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.signal-pill.buy,
.signal-pill.bullish {
  background: rgba(50, 213, 131, 0.16);
  color: #8effc2;
}

.signal-pill.sell,
.signal-pill.bearish {
  background: rgba(255, 107, 107, 0.15);
  color: #ffb4b4;
}

.signal-pill.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #d0d5dd;
}

.confidence {
  display: grid;
  gap: 5px;
  min-width: 132px;
  color: var(--muted);
  font-size: 12px;
}

.confidence-bar {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.confidence-bar > div {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.news-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.news-index span {
  color: var(--soft);
  font-size: 12px;
}

.news-index strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.stars {
  color: var(--amber);
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}

.stars.bullish {
  color: var(--green);
}

.stars.bearish {
  color: var(--red);
}

.exchange-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.exchange {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.exchange span {
  color: var(--soft);
  font-size: 12px;
}

.exchange strong {
  font-variant-numeric: tabular-nums;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
}

.metric span {
  color: var(--soft);
  font-size: 12px;
}

.metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.plan-card {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 9px;
  border: 1px solid rgba(92, 200, 255, 0.2);
  border-radius: 7px;
  background: rgba(92, 200, 255, 0.07);
}

.plan-card.defense {
  border-color: rgba(255, 107, 107, 0.2);
  background: rgba(255, 107, 107, 0.07);
}

.plan-card span,
.timing-box span {
  color: var(--soft);
  font-size: 12px;
}

.plan-card strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timing-box {
  display: grid;
  gap: 8px;
}

.timing-box > div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.timing-box strong {
  color: #d7dde6;
  font-size: 13px;
  line-height: 1.42;
}

.reason-list {
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 0;
  color: var(--muted);
  list-style: none;
}

.reason-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.35;
}

.reason-list li::before {
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--cyan);
  content: "";
}

.news-panel {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 98px);
  overflow: auto;
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading h2 {
  font-size: 22px;
}

.sentiment-meter {
  position: relative;
  width: 72px;
  height: 38px;
  overflow: hidden;
  border-radius: 72px 72px 0 0;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

.sentiment-meter::after {
  position: absolute;
  inset: 9px 9px 0;
  border-radius: 72px 72px 0 0;
  background: var(--surface);
  content: "";
}

#sentimentNeedle {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 34px;
  background: var(--text);
  transform: rotate(0deg);
  transform-origin: bottom center;
}

.focus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-impact-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(92, 200, 255, 0.18);
  border-radius: 8px;
  background: rgba(92, 200, 255, 0.055);
}

.calendar-impact-head,
.calendar-event,
.calendar-symbol-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-impact-head div {
  display: grid;
  gap: 2px;
}

.calendar-impact-head span,
.calendar-impact-head small,
.calendar-event span,
.calendar-event small,
.calendar-symbol-row span {
  color: var(--soft);
  font-size: 12px;
}

.calendar-impact-head strong {
  font-size: 15px;
}

.calendar-impact-head .calendar-star-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.45;
}

.calendar-star-summary i {
  align-self: center;
  color: var(--soft);
  font-style: normal;
}

.calendar-star-count,
.calendar-star-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  border-radius: 4px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.calendar-star-count {
  min-height: 19px;
  padding: 3px 5px;
  font-size: 10px;
}

.calendar-star-badge {
  min-height: 21px;
  padding: 4px 6px;
  font-size: 11px;
}

.calendar-star-icons {
  display: inline-flex;
  align-items: center;
  letter-spacing: 0;
  line-height: 1;
}

.calendar-star-icons .calendar-stars-filled {
  color: var(--amber);
}

.calendar-star-icons .calendar-stars-empty {
  color: var(--amber);
  opacity: 0.4;
}

.calendar-star-total {
  margin-left: 5px;
  padding-left: 5px;
  border-left: 1px solid currentColor;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.calendar-star-count.star-3,
.calendar-star-badge.star-3 {
  border-color: rgba(92, 200, 255, 0.42);
  background: rgba(92, 200, 255, 0.11);
  color: var(--cyan);
}

.calendar-star-count.star-4,
.calendar-star-badge.star-4 {
  border-color: rgba(255, 183, 77, 0.48);
  background: rgba(255, 183, 77, 0.12);
  color: var(--amber);
}

.calendar-star-count.star-5,
.calendar-star-badge.star-5 {
  border-color: rgba(255, 95, 103, 0.5);
  background: rgba(255, 95, 103, 0.12);
  color: var(--red);
}

.calendar-events,
.calendar-released {
  display: grid;
  gap: 7px;
}

.calendar-released {
  padding-top: 2px;
}

.calendar-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 760;
}

.calendar-section-label.result {
  color: var(--cyan);
}

.calendar-section-label.result::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(92, 200, 255, 0.12);
  content: "";
}

.calendar-day-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 8px 9px;
  border-top: 2px solid rgba(253, 187, 82, 0.55);
  border-bottom: 1px solid rgba(253, 187, 82, 0.2);
  background: rgba(253, 187, 82, 0.07);
}

.calendar-day-divider:first-child {
  margin-top: 0;
}

.calendar-day-divider span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.calendar-day-divider b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.calendar-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.calendar-event.positive {
  border-left-color: var(--green);
}

.calendar-event.negative {
  border-left-color: var(--red);
}

.calendar-event.neutral {
  border-left-color: var(--amber);
}

.calendar-event div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.calendar-event strong {
  line-height: 1.32;
}

.calendar-event-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.calendar-event-meta i {
  color: var(--soft);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.calendar-event em {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}

.calendar-event small {
  grid-column: 1 / -1;
  width: 100%;
}

.calendar-result-banner {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.calendar-result-banner.positive {
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(52, 211, 153, 0.08);
}

.calendar-result-banner.negative {
  border-color: rgba(255, 95, 103, 0.42);
  background: rgba(255, 95, 103, 0.08);
}

.calendar-result-banner.neutral {
  border-color: rgba(255, 183, 77, 0.4);
  background: rgba(255, 183, 77, 0.07);
}

.calendar-result-head {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
}

.calendar-result-head strong {
  color: var(--text);
  font-size: 13px;
}

.calendar-result-head b {
  color: var(--cyan);
  font-size: 11px;
}

.calendar-result-head i {
  margin-left: auto;
  color: var(--soft);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.calendar-result-banner > small {
  color: var(--text);
  font-weight: 700;
}

.calendar-result-banner .calendar-asset-impact {
  background: rgba(8, 13, 17, 0.3);
}

.calendar-scenarios {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  width: 100%;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.calendar-scenarios b {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-scenarios span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.calendar-scenario {
  display: grid;
  gap: 5px;
}

.calendar-asset-impacts {
  display: grid;
  gap: 4px;
}

.calendar-asset-impact {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 1px 7px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
}

.calendar-asset-impact strong {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 12px;
}

.calendar-asset-impact b {
  font-size: 11px;
}

.calendar-asset-impact span {
  grid-column: 2;
}

.calendar-asset-impact.positive b {
  color: var(--green);
}

.calendar-asset-impact.negative b {
  color: var(--red);
}

.calendar-asset-impact.neutral b {
  color: var(--amber);
}

.calendar-impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calendar-impact-grid section {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.calendar-impact-grid h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.calendar-symbol-row {
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.calendar-symbol-row button {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.calendar-symbol-row em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.calendar-empty {
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.macro-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid rgba(253, 187, 82, 0.24);
  border-radius: 7px;
  background: rgba(253, 187, 82, 0.075);
}

.macro-summary span {
  color: var(--soft);
  font-size: 12px;
}

.macro-summary strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.focus-chip {
  padding: 7px 10px;
  border: 1px solid rgba(92, 200, 255, 0.22);
  border-radius: 999px;
  background: rgba(92, 200, 255, 0.08);
  color: #bfeeff;
  font-size: 13px;
  font-weight: 700;
}

button.focus-chip {
  min-height: 32px;
}

.focus-chip:hover,
.focus-chip.active {
  border-color: rgba(50, 213, 131, 0.45);
  background: rgba(50, 213, 131, 0.16);
  color: #9dffc9;
}

.focus-chip.clear {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.inline-link {
  display: inline;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  padding: 0;
  font-weight: 700;
}

.news-list {
  display: grid;
  gap: 10px;
}

.news-list.compact {
  max-height: 280px;
  overflow: auto;
}

.news-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-decoration: none;
}

.news-item:hover {
  border-color: rgba(92, 200, 255, 0.35);
}

.news-item strong {
  line-height: 1.35;
}

.news-item small {
  color: var(--muted);
}

.news-badge {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.news-badge.positive {
  color: #8effc2;
}

.news-badge.negative {
  color: #ffb4b4;
}

.risk-note {
  padding: 12px 22px 26px;
  text-align: center;
  font-size: 13px;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.detail-sheet {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: min(760px, 100%);
  height: 100%;
  overflow: auto;
  padding: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 20, 23, 0.98);
  box-shadow: -22px 0 48px rgba(0, 0, 0, 0.32);
}

.detail-head,
.detail-price-row,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.detail-head {
  margin-bottom: 14px;
}

.detail-head h2 {
  margin-top: 4px;
  font-size: 28px;
}

.detail-price-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.detail-price-row > strong {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}

.detail-chart {
  width: 100%;
  height: 210px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.detail-stats,
.detail-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.detail-stats div,
.detail-plan div,
.accuracy-box {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.detail-stats span,
.detail-plan span,
.section-title span,
.accuracy-box p {
  color: var(--muted);
  font-size: 12px;
}

.detail-stats strong,
.detail-plan strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.detail-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.section-title h3 {
  font-size: 18px;
}

.accuracy-box > strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.accuracy-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.accuracy-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.empty-text {
  color: var(--muted);
  font-size: 13px;
}

.quant-summary {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 10px;
}

.quant-summary > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid rgba(50, 213, 131, 0.22);
  border-radius: 7px;
  background: rgba(50, 213, 131, 0.08);
}

.quant-summary span,
.data-source {
  color: var(--soft);
  font-size: 12px;
}

.quant-summary strong {
  color: #9dffc9;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.quant-summary small {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.quant-summary p {
  align-self: stretch;
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: #d7dde6;
  line-height: 1.42;
}

.ai-forecast-box {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(92, 200, 255, 0.18);
  border-radius: 8px;
  background: rgba(92, 200, 255, 0.055);
}

.ai-forecast-box.long {
  border-color: rgba(50, 213, 131, 0.24);
  background: rgba(50, 213, 131, 0.065);
}

.ai-forecast-box.short {
  border-color: rgba(255, 107, 107, 0.24);
  background: rgba(255, 107, 107, 0.06);
}

.ai-forecast-box.error,
.ai-forecast-box.missing_key,
.ai-forecast-box.missing_model,
.ai-forecast-box.disabled {
  border-color: rgba(253, 187, 82, 0.22);
  background: rgba(253, 187, 82, 0.055);
}

.ai-forecast-box.pending {
  color: var(--muted);
}

.ai-forecast-main,
.ai-horizons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-horizons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-forecast-main > div,
.ai-horizons > div {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.ai-forecast-main span,
.ai-horizons span,
.ai-forecast-main small,
.ai-horizons small {
  color: var(--soft);
  font-size: 12px;
}

.ai-forecast-main strong,
.ai-horizons strong {
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.ai-forecast-box p {
  margin: 0;
  color: #d7dde6;
  line-height: 1.45;
}

.ai-list {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
}

.ai-list.risk {
  color: #ffd28a;
}

.factor-list {
  display: grid;
  gap: 8px;
}

.factor-row {
  display: grid;
  grid-template-columns: minmax(116px, 1fr) minmax(120px, 180px) 48px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.factor-row > div:first-child {
  display: grid;
  gap: 3px;
}

.factor-row span {
  color: var(--muted);
  font-size: 12px;
}

.factor-row em {
  color: var(--text);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.factor-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.factor-meter > div {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.data-source {
  display: block;
  line-height: 1.35;
}

.skeleton {
  min-height: 368px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent),
    rgba(25, 27, 31, 0.86);
  background-size: 220px 100%, 100% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: -220px 0, 0 0;
  }
  to {
    background-position: calc(100% + 220px) 0, 0 0;
  }
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .ai-surge-grid,
  .extreme-grid {
    grid-template-columns: 1fr;
  }

  .bot-layout {
    flex-direction: column;
  }

  .bot-list-wrap {
    flex-basis: auto;
  }

  .recommend-main {
    grid-template-columns: 1fr 220px;
  }

  .recommend-stats {
    grid-column: 1 / -1;
  }

  .news-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 820px) {
  .control-band {
    position: static;
    top: auto;
    z-index: auto;
    gap: 10px;
    padding: 10px 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .topbar,
  .watchlist-row {
    align-items: stretch;
    flex-direction: column;
  }

  .control-band {
    align-items: stretch;
    flex-direction: column;
  }

  .market-pulse,
  .symbol-form,
  .symbol-field,
  .control-group,
  .button,
  input,
  select {
    width: 100%;
    min-width: 0;
  }

  .symbol-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .control-group {
    display: grid;
    grid-template-columns: 48px 1fr;
  }

  .ai-surge-head,
  .extreme-head,
  .bot-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-surge-tools,
  .extreme-tools {
    justify-content: flex-start;
  }

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

  .bot-token {
    margin-left: 0;
  }

  .bot-token,
  .bot-form-actions,
  .bot-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bot-token input {
    width: 100%;
  }

  .bot-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .recommend-main {
    grid-template-columns: 1fr;
  }

  .recommend-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alerts-header,
  .alert-row {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .alerts-header span:nth-child(3),
  .alerts-header span:nth-child(4),
  .alert-row span:nth-child(3),
  .alert-row span:nth-child(4) {
    display: none;
  }

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

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

  .detail-stats,
  .detail-plan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quant-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .workspace {
    padding: 10px 10px 24px;
  }

  .topbar {
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .identity {
    align-items: flex-start;
    gap: 10px;
  }

  .mark {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  h1 {
    font-size: 24px;
  }

  .identity p {
    line-height: 1.35;
  }

  .market-pulse {
    gap: 2px;
    padding: 10px 12px;
    box-shadow: none;
  }

  .market-pulse strong {
    font-size: 16px;
  }

  .control-band {
    gap: 8px;
  }

  .symbol-form,
  .control-group {
    gap: 6px;
  }

  .control-group {
    grid-template-columns: 44px 1fr;
  }

  .watchlist-row {
    gap: 8px;
    padding-bottom: 8px;
  }

  .market-card {
    padding: 13px;
  }

  .price-line,
  .signal-row,
  .exchange-strip {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .price {
    font-size: 28px;
  }

  .detail-sheet {
    padding: 14px 12px;
  }

  .detail-head,
  .detail-price-row,
  .section-title {
    align-items: flex-start;
  }

  .bot-form-grid,
  .bot-item-stats,
  .bot-stats-summary {
    grid-template-columns: 1fr;
  }

  .detail-stats,
  .detail-plan,
  .recommend-stats,
  .calendar-impact-grid,
  .ai-surge-metrics,
  .extreme-price-row {
    grid-template-columns: 1fr;
  }

  .detail-chart {
    height: 180px;
  }

  .factor-row {
    grid-template-columns: 1fr;
  }

  .factor-row em {
    text-align: left;
  }
}
