/* Trading Dashboard // DJZS: djzs.ai terminal style. No rounded corners anywhere. */

:root {
  --canvas: #0a0a0a;
  --panel: #0d0d0d;
  --rule: #1c1c1c;
  --text: #e6e6e6;
  --muted: #8a8a8a;
  --pass: #3dff88;
  --wait: #ffb000;
  --fail: #ff4d4d;
  --link: #3dff88;
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.55;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

a { color: var(--link); }

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

/* ---------- header / footer ---------- */

header.site { border-bottom: 1px solid var(--rule); padding: 28px 0 20px; }
footer.site { border-top: 1px solid var(--rule); padding: 20px 0 32px; margin-top: 8px; }

.kicker { color: var(--pass); font-size: 12px; letter-spacing: 2px; margin: 0 0 8px; }
h1 { font-size: 26px; margin: 0 0 8px; letter-spacing: 1px; }
.lede { color: var(--muted); margin: 0 0 16px; }

.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.controls .muted { font-size: 12px; }

/* ---------- panels ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 18px;
  margin: 20px 0;
}

h2 {
  font-size: 15px;
  letter-spacing: 2px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

h3 { font-size: 13px; letter-spacing: 1px; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

.label { display: block; font-size: 11px; letter-spacing: 2px; color: var(--muted); margin-bottom: 6px; }

/* ---------- chips ---------- */

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 0;
  white-space: nowrap;
}
.chip.pass { color: var(--pass); }
.chip.wait { color: var(--wait); }
.chip.fail { color: var(--fail); }
.chip.open { color: var(--muted); }

/* ---------- buttons / inputs ---------- */

button, select, input {
  font-family: inherit;
  font-size: 13px;
  border-radius: 0;
}

button {
  background: var(--panel);
  color: var(--pass);
  border: 1px solid var(--pass);
  padding: 9px 16px;
  cursor: pointer;
  letter-spacing: 1px;
  font-weight: 700;
}
button:hover { background: #12261a; }
button:disabled { color: var(--muted); border-color: var(--rule); cursor: wait; }

input, select {
  background: var(--canvas);
  color: var(--text);
  border: 1px solid var(--rule);
  padding: 8px 10px;
  width: 100%;
}
input:focus, select:focus { outline: 1px solid var(--pass); border-color: var(--pass); }

/* ---------- live section ---------- */

.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.live-price .big { display: block; font-size: 30px; font-weight: 700; line-height: 1.2; }
.live-price .muted { display: block; font-size: 12px; margin-top: 4px; }
.live-price .chip { margin-top: 10px; }

.funding ul { list-style: none; margin: 0; padding: 0; }
.funding li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--rule);
}
.funding li:last-child { border-bottom: 0; }
.funding .avg { margin-top: 10px; font-size: 12px; }
.funding b.neg { color: var(--fail); }
.funding b.pos { color: var(--pass); }

/* ---------- scan tabs ---------- */

.tabs { display: flex; gap: 0; margin-bottom: 16px; }
.tab {
  background: var(--canvas);
  color: var(--muted);
  border: 1px solid var(--rule);
  border-right: 0;
  padding: 8px 18px;
}
.tab:last-child { border-right: 1px solid var(--rule); }
.tab.active { background: var(--panel); color: var(--pass); border-color: var(--pass); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

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

dl.facts { margin: 0 0 8px; }
dl.facts > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
dl.facts dt { color: var(--muted); font-size: 12px; }
dl.facts dd { margin: 0; }

ul.plain { list-style: none; margin: 0 0 10px; padding: 0; }
ul.plain li { padding: 4px 0 4px 14px; position: relative; }
ul.plain li::before { content: ">"; position: absolute; left: 0; color: var(--pass); }

/* ---------- S01 checklist ---------- */

.s01 { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 4px; }
.s01 label { display: block; padding: 6px 0; cursor: pointer; }
.s01 input { width: auto; accent-color: var(--pass); }

/* ---------- trade log ---------- */

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; min-width: 640px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 400; letter-spacing: 1px; font-size: 11px; white-space: nowrap; }
td { white-space: nowrap; }
td.origin { white-space: normal; min-width: 170px; font-size: 11px; color: var(--muted); }
.rowbtn {
  background: none;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  margin-right: 4px;
}
.rowbtn:hover { border-color: var(--pass); color: var(--pass); background: none; }
.rowbtn.danger:hover { border-color: var(--fail); color: var(--fail); }

/* ---------- form ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.form-grid label { display: block; font-size: 12px; color: var(--muted); }
.form-grid label.wide { grid-column: span 2; }
.form-grid input, .form-grid select { margin-top: 5px; }

.rr { font-size: 13px; }
.rr b { color: var(--pass); }
.error { color: var(--fail); border: 1px solid var(--fail); padding: 10px 12px; font-size: 12px; }

/* ---------- report card ---------- */

.runs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.run { border: 1px solid var(--rule); padding: 14px; }
.run h3 { margin-top: 0; }
.run .score { font-size: 13px; }
.next { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 14px; }

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  body { font-size: 13px; }
  h1 { font-size: 22px; }
  .live-grid { grid-template-columns: 1fr; }
  .live-price .big { font-size: 26px; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid label.wide { grid-column: span 2; }
  .runs { grid-template-columns: 1fr; }
  dl.facts > div { grid-template-columns: 104px 1fr; }
}
