:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #151b23;
  --panel-2: #101820;
  --line: #263241;
  --text: #ecf2f8;
  --muted: #8d9aae;
  --green: #24c982;
  --red: #ff5c6c;
  --amber: #f6b44b;
  --cyan: #54c8f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
}

#mozbar-toolbar,
.mozbar-toolbar {
  max-width: 100vw;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #192333;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  border-color: #3c5068;
  background: #203047;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #0f151d;
  padding: 18px;
  overflow-y: auto;
}

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

.brand strong,
.brand span {
  display: block;
}

.brand span,
.status-copy,
.section-head span,
.note,
.risk-box span {
  color: var(--muted);
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1c94c;
  color: #141414;
  font-weight: 800;
}

.panel,
.module,
.scanner {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.panel {
  padding: 14px;
  margin-bottom: 14px;
}

.compact {
  background: var(--panel-2);
}

.is-hidden {
  display: none;
}

.panel-title,
.section-head,
.topbar,
.toolbar,
.market-strip,
.stats {
  display: flex;
  align-items: center;
}

.panel-title,
.section-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title span,
.section-head h2 {
  font-size: 14px;
  margin: 0;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  color: #001b10;
  background: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.badge.muted {
  background: #394555;
  color: var(--text);
}

.badge.red {
  background: var(--red);
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
}

.icon-button svg,
.toolbar svg {
  width: 18px;
  height: 18px;
}

textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  background: #0c121a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  width: 100%;
  min-height: 36px;
  color: var(--text);
  background: #0c121a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.workspace {
  min-width: 0;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.toolbar {
  gap: 8px;
}

.toolbar button {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.market-strip {
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.ticker {
  flex: 0 0 160px;
  border: 1px solid var(--line);
  background: #101a24;
  border-radius: 8px;
  padding: 10px;
}

.ticker.active {
  border-color: var(--cyan);
}

.ticker strong,
.ticker span {
  display: block;
}

.ticker span {
  color: var(--muted);
  margin-top: 4px;
}

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

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

.amber {
  color: var(--amber);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 0.58fr);
  gap: 14px;
  min-height: 440px;
}

.chart-region {
  border: 1px solid var(--line);
  background: #080d13;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

#chart {
  width: 100%;
}

#chart {
  height: 438px;
}

.scanner {
  padding: 14px;
  min-width: 0;
}

.table-wrap {
  overflow: auto;
  max-height: 386px;
}

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

th,
td {
  padding: 10px 7px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

tr {
  cursor: pointer;
}

tr:hover {
  background: #1b2634;
}

.signal {
  font-weight: 800;
}

.scanner-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  position: relative;
  padding-left: 14px;
  color: var(--green);
  font-weight: 700;
}

.live-dot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(36, 201, 130, 0.65);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(36, 201, 130, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(36, 201, 130, 0);
  }
}

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

.module {
  padding: 14px;
  min-width: 0;
}

.stats {
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.stats div {
  flex: 1 1 140px;
  min-width: 0;
  border: 1px solid var(--line);
  background: #101820;
  border-radius: 8px;
  padding: 10px;
}

.stats span,
.stats strong {
  display: block;
}

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

.stats strong {
  margin-top: 4px;
  font-size: 18px;
}

.note,
.explain {
  min-height: 170px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.explain {
  min-height: 0;
  margin: 0 0 12px;
  color: var(--muted);
}

.backtest-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.paper-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.paper-controls button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.paper-controls svg {
  width: 17px;
  height: 17px;
}

.paper-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.paper-stats {
  margin-bottom: 12px;
}

.paper-wrap {
  max-height: 160px;
  margin-top: 12px;
}

.live-history-head {
  margin-top: 16px;
}

.live-history-wrap {
  max-height: 220px;
}

.compact-head {
  margin-top: 8px;
  margin-bottom: 8px;
}

.compact-head h2 {
  font-size: 0.9rem;
}

.micro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.micro-table-wrap {
  max-height: 230px;
  margin-top: 8px;
}

.alert-wrap {
  max-height: 150px;
  margin-top: 12px;
}

.alert-module {
  border-color: #41566f;
}

.hunter-module {
  border-color: #3f604d;
}

.live-module {
  border-color: #744747;
  grid-column: 1 / -1;
}

.news-module {
  border-color: #566d8a;
  grid-column: 1 / -1;
}

.predictor-module {
  border-color: #5c5873;
  grid-column: 1 / -1;
}

.predictor-module .paper-controls {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.prediction-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
}

.prediction-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  padding: 12px;
  cursor: pointer;
}

.prediction-card:hover {
  border-color: #3c5068;
  background: #121d28;
}

.prediction-card-head,
.prediction-price-row,
.prediction-meta,
.prediction-context {
  display: flex;
  gap: 10px;
}

.prediction-card-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.prediction-card-head strong,
.prediction-card-head span,
.prediction-price-row span,
.prediction-price-row strong {
  display: block;
}

.prediction-card-head span,
.prediction-price-row span,
.prediction-meta,
.prediction-context,
.prediction-card p {
  color: var(--muted);
  font-size: 12px;
}

.prediction-pill {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 800;
  font-size: 12px;
}

.prediction-price-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prediction-price-row div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  min-width: 0;
}

.prediction-price-row strong {
  margin-top: 4px;
  font-size: 16px;
}

.prediction-progress {
  height: 8px;
  margin: 12px 0;
  border-radius: 999px;
  background: #0b1118;
  overflow: hidden;
}

.prediction-progress-bar {
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--cyan);
}

.prediction-meta,
.prediction-context {
  flex-wrap: wrap;
  justify-content: space-between;
}

.prediction-meta strong,
.prediction-context span {
  color: var(--text);
}

.prediction-card p {
  margin: 10px 0 0;
  min-height: 34px;
  line-height: 1.45;
}

.prediction-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.prediction-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.prediction-filters input,
.prediction-filters select {
  min-height: 34px;
}

.prediction-wrap {
  max-height: 420px;
  margin-top: 12px;
  width: 100%;
}

.prediction-wrap table {
  min-width: 1320px;
}

.prediction-wrap th,
.prediction-wrap td {
  text-align: left;
}

.hunter-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.filter {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #111922;
  color: var(--muted);
}

.filter.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(84, 200, 244, 0.12);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.mini-stats span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  background: #101820;
}

.mini-stats strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

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

.orange {
  color: #ffb454;
}

.blue {
  color: #54c8f4;
}

.check-label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: var(--text);
}

.check-label input {
  width: 16px;
  min-height: 16px;
}

.optimizer-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.optimizer-summary div {
  border: 1px solid var(--line);
  background: #101820;
  border-radius: 8px;
  padding: 10px;
}

.optimizer-summary span,
.optimizer-summary strong {
  display: block;
}

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

.trades-wrap {
  max-height: 180px;
  margin-top: 12px;
}

.risk-box {
  display: grid;
  gap: 6px;
  border: 1px solid #4a3b21;
  background: #1d1710;
  border-radius: 8px;
  padding: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #111a26;
  color: var(--text);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-grid,
  .lower-grid,
  .micro-grid {
    grid-template-columns: 1fr;
  }

  .predictor-module .paper-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1400px) and (min-width: 1101px) {
  .lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .workspace,
  .sidebar {
    padding: 12px;
  }

  .topbar,
  .toolbar,
  .stats {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar button {
    justify-content: center;
  }

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

  .predictor-module .paper-controls,
  .micro-grid,
  .prediction-cards,
  .prediction-price-row,
  .prediction-filters {
    grid-template-columns: 1fr;
  }
}

/* deploy-version: c7e2894-panel-wrap */
