﻿:root {
  --bg-a: #f8f4ed;
  --bg-b: #e9f0f7;
  --ink: #202327;
  --muted: #5a6169;
  --card: #ffffff;
  --line: #d6dce3;
  --accent: #0b6e4f;
  --accent-soft: #d7efe6;
  --warn: #9a3412;
  --warn-soft: #ffe8dc;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #fff7df 0%, transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, #dcecff 0%, transparent 45%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
}
.shell {
  width: min(1200px, 94vw);
  margin: 28px auto 60px;
}
.headline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}
.tab-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #b8dccf;
}
.hidden {
  display: none;
}
h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
}
.brand-logo {
  display: block;
  width: clamp(160px, 24vw, 280px);
  height: auto;
  margin-bottom: 8px;
}
.sub {
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.96rem;
}
.ticker-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 20px rgba(24, 31, 42, 0.05);
}
.k {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 8px;
}
.v {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 20px rgba(24, 31, 42, 0.05);
}
.fetch-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: #fbfdff;
}
.fetch-top {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.fetch-section label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
}
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.fetch-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
button:hover {
  background: #f5f8fb;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.poller-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: #fffef7;
}
.poller-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.poller-title {
  font-weight: 700;
}
.poller-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}
.poller-k {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}
.poller-v {
  display: block;
  font-weight: 700;
}
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.status {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4rem;
  margin-bottom: 8px;
}
.sig-controls {
  display: grid;
  grid-template-columns: 1fr 180px 220px;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}
.sig-controls label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.sig-controls button {
  white-space: nowrap;
}
.sig-table-wrap td,
.sig-table-wrap th {
  white-space: nowrap;
}
.table-wrap {
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
  background: #fff;
}
th, td {
  border-bottom: 1px solid #e8ecf1;
  padding: 8px 7px;
  font-size: 0.8rem;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}
th {
  position: sticky;
  top: 0;
  background: #f5f8fb;
}
tr:hover td {
  background: #fafcfe;
}
.row-buy td {
  background: #f1fbf6;
}
.row-sell td {
  background: #fff2f0;
}
.row-buy:hover td {
  background: #e4f6ed;
}
.row-sell:hover td {
  background: #ffe7e3;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 700;
}
.code-p {
  color: var(--accent);
  background: var(--accent-soft);
}
.code-s {
  color: var(--warn);
  background: var(--warn-soft);
}
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .fetch-top { grid-template-columns: 1fr; }
  .fetch-actions { flex-direction: column; }
  .poller-grid { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr; }
  .sig-controls { grid-template-columns: 1fr; }
  .headline {
    flex-direction: column;
    align-items: flex-start;
  }
}
