:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --line: #24324a;
  --text: #eef3ff;
  --muted: #8da2c6;
  --accent: #45c4ff;
  --good: #2fd07f;
  --bad: #ff7272;
  --warn: #ffca58;
  --soft: #88b7ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #09101c 0%, #0f1728 100%);
  color: var(--text);
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}
.hero, .panel, .card, .status {
  background: rgba(18, 26, 43, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.hero, .panel { padding: 22px; margin-bottom: 18px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}
.eyebrow.small { font-size: 11px; margin-bottom: 6px; }
h1 { margin: 0 0 8px; font-size: 32px; }
h2 { margin: 0; font-size: 24px; }
h3 { margin: 0; }
.muted { margin: 0; color: var(--muted); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-chip {
  padding: 10px 14px;
  background: #0c1423;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.4; }
label { font-weight: 700; }
input[type="file"], input[type="number"] {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #0c1423;
  border: 1px solid var(--line);
  color: var(--text);
}
.field-inline { margin-top: 14px; }
.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
.toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--muted);
}
button {
  margin-top: 18px;
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #05111c;
  font-weight: 800;
  cursor: pointer;
}
button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.action-row.compact button {
  margin-top: 0;
}
.status {
  padding: 14px 18px;
  margin-bottom: 18px;
}
.hidden { display: none; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.card { padding: 18px; }
.card h3 { margin: 0 0 12px; font-size: 22px; }
.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi {
  background: #0c1423;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.kpi span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.buy { color: var(--good); }
.sell { color: var(--bad); }
.neutral { color: var(--warn); }
.note {
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}
.stack { display: flex; flex-direction: column; }
.card-wide { grid-column: 1 / -1; }
.consensus-banner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.consensus-banner > div, .provider-card, .settings-card, .ia-card {
  background: #0c1423;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.consensus-banner span, .provider-head span, .provider-kpis span, .ia-mini-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.provider-head, .ia-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.provider-kpis, .ia-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.provider-kpis div, .ia-mini-grid div {
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  padding: 8px;
}
.provider-role {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 13px;
}
.provider-role-live {
  background: rgba(47,208,127,0.08);
  color: #b9ffd8;
}
.provider-card-muted {
  opacity: 0.92;
}
.provider-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.provider-pill {
  background: #0c1423;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.provider-pill strong { display: block; margin-bottom: 4px; }
.provider-pill small { display: block; color: var(--muted); line-height: 1.35; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.provider-toggles {
  margin-top: 4px;
  margin-bottom: 12px;
}
.import-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.import-box strong {
  display: block;
  margin-bottom: 8px;
  word-break: break-all;
}
.import-box small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}
.ai-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.ia-card-main {
  grid-column: span 2;
  background: linear-gradient(180deg, rgba(11,24,41,0.98) 0%, rgba(12,20,35,0.98) 100%);
}
.ia-card-live {
  border-color: rgba(69,196,255,0.4);
  box-shadow: inset 0 0 0 1px rgba(69,196,255,0.12);
}
.badge-live { color: var(--good); }
.badge-disabled, .badge-shadow { color: var(--warn); }
.badge-error { color: var(--bad); }
.verbose-panel { margin-top: 18px; }
.verbose-head { margin-bottom: 14px; }
.verbose-box {
  background: #08101c;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 420px;
  overflow: auto;
}
.verbose-line {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.verbose-line:last-child { border-bottom: 0; }
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
  .ia-card-main { grid-column: span 1; }
}
@media (max-width: 640px) {
  .wrap { padding: 14px; }
  h1 { font-size: 26px; }
  .consensus-banner { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; }
  .action-row button { width: 100%; }
  .panel-chip { width: 100%; border-radius: 12px; }
}
.proof-grid-panel {
  padding-top: 18px;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.proof-card {
  background: #0c1423;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.proof-list {
  display: grid;
  gap: 12px;
}
.proof-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.proof-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.proof-item small,
.manifest-file small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}
.proof-files {
  display: grid;
  gap: 10px;
}
.manifest-file {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
@media (max-width: 900px) {
  .settings-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }
}
