:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070a10;
  color: #e8edf5;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(76,115,255,.16), transparent 30rem),
    radial-gradient(circle at 90% 30%, rgba(31,199,167,.09), transparent 28rem),
    #070a10;
}
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 28px; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.eyebrow, .label {
  color: #7f8da5;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 700;
  margin: 0 0 8px;
}
h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5.5rem); letter-spacing: -.06em; line-height: .9; }
.settings-title { font-size: clamp(2rem, 5vw, 4rem); }
.subtitle { color: #a9b4c6; font-size: 1.1rem; margin: 14px 0 0; }
.status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a9b4c6;
  border: 1px solid #1d2633;
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(12,17,25,.72);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #24d39a; box-shadow: 0 0 14px rgba(36,211,154,.75); }
.hero {
  margin: 44px 0 24px;
  padding: 28px;
  border: 1px solid #202938;
  background: rgba(13,18,27,.78);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 28px;
}
.hero h2 { margin: 0 0 10px; font-size: 1.55rem; }
.hero p:not(.label) { color: #9aa6b9; line-height: 1.65; max-width: 720px; }
.live-lock { border-left: 1px solid #222d3d; padding-left: 28px; display: flex; flex-direction: column; justify-content: center; }
.live-lock strong { color: #ffbc66; font-size: 1.6rem; }
.live-lock span { color: #8793a7; margin-top: 7px; line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
article { min-height: 190px; padding: 22px; border-radius: 18px; border: 1px solid #1c2532; background: rgba(11,16,24,.74); }
article span { color: #66758e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
article h3 { margin: 28px 0 10px; font-size: 1.05rem; }
article p { margin: 0; color: #8996a9; line-height: 1.55; font-size: .9rem; }
footer { color: #5f6c81; font-size: .82rem; padding: 30px 2px 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 11px;
  padding: 0 15px;
  border: 1px solid #2b3749;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: #101722; color: #bec9d9; }
.button.primary { background: #315bff; border-color: #315bff; color: white; }
.button.danger-button { background: transparent; border-color: #63333c; color: #ff9ea8; }

.settings-shell { max-width: 900px; }
.settings-card {
  margin-top: 36px;
  padding: 28px;
  border: 1px solid #202938;
  border-radius: 20px;
  background: rgba(13,18,27,.82);
}
.settings-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #202938;
}
.settings-status p { color: #94a1b5; line-height: 1.5; margin: 7px 0; }
.ok { color: #42d3a5; }
.warn { color: #ffbc66; }
form { display: grid; gap: 18px; }
label {
  display: grid;
  gap: 8px;
  color: #c7d0dd;
  font-size: .9rem;
  font-weight: 700;
}
input, select {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid #2a3546;
  background: #0b111a;
  color: #e7edf6;
  padding: 0 13px;
  font: inherit;
  outline: none;
}
input:focus, select:focus { border-color: #4a72ff; box-shadow: 0 0 0 3px rgba(74,114,255,.15); }
.form-actions { display: flex; justify-content: flex-start; }
.danger-zone { margin-top: 28px; padding-top: 24px; border-top: 1px solid #35242a; }
.notice {
  margin-top: 24px;
  padding: 13px 15px;
  border: 1px solid #293548;
  border-radius: 12px;
  background: #0d1520;
  color: #b7c2d1;
}
.notice.success { border-color: #225848; color: #8fe7c7; }
.notice.danger { border-color: #65333b; color: #ff9da8; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .live-lock { border-left: 0; border-top: 1px solid #222d3d; padding: 22px 0 0; }
}
@media (max-width: 650px) {
  .settings-status { grid-template-columns: 1fr; }
  .top-actions { width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1180px); padding-top: 24px; }
  .topbar { flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
}

.active-card { border-color: #2f4363; background: rgba(16,24,38,.9); }
.card-link {
  display: inline-block;
  margin-top: 18px;
  color: #8fa9ff;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
.card-link:hover { color: #bdcaff; }

.market-toolbar {
  margin: 38px 0 18px;
  padding: 22px;
  border: 1px solid #202938;
  border-radius: 18px;
  background: rgba(13,18,27,.82);
}
.market-form {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr .8fr .7fr auto;
  gap: 14px;
  align-items: end;
}
.market-submit { display: flex; align-items: end; }
.market-submit .button { min-height: 46px; }
.market-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.market-metric { min-height: 138px; }
.market-metric h3 {
  margin: 18px 0 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}
.table-card {
  border: 1px solid #202938;
  border-radius: 18px;
  background: rgba(13,18,27,.82);
  overflow: hidden;
}
.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid #202938;
}
.table-title h2 { margin: 0; font-size: 1.2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td {
  padding: 13px 16px;
  border-bottom: 1px solid #18212d;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
}
th:first-child, td:first-child { text-align: left; }
th {
  color: #77869b;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .68rem;
}
td { color: #c4cfdd; }
.empty-cell { text-align: center !important; color: #728096; padding: 28px; }
.error-status { border-color: #63333c; color: #ff9ea8; }
.error-status .dot { background: #ff6677; box-shadow: 0 0 14px rgba(255,102,119,.55); }

@media (max-width: 900px) {
  .market-form { grid-template-columns: repeat(2, 1fr); }
  .market-submit { grid-column: span 2; }
  .market-summary { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .market-form { grid-template-columns: 1fr; }
  .market-submit { grid-column: auto; }
}
