:root {
  color-scheme: light;
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-2: #f0f4f7;
  --ink: #17201d;
  --muted: #62706b;
  --line: #dbe3df;
  --green: #16745f;
  --green-dark: #0d5c4a;
  --blue: #2458a6;
  --amber: #b86613;
  --red: #b3261e;
  --shadow: 0 12px 30px rgba(27, 40, 35, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

.season {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.top-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-badge.is-logged-in {
  border-color: rgba(22, 116, 95, 0.26);
  background: rgba(22, 116, 95, 0.09);
  color: var(--green-dark);
}

.field {
  display: grid;
  gap: 6px;
}

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

.field.compact {
  min-width: 220px;
}

.field.tiny {
  min-width: 116px;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

select:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 116, 95, 0.14);
}

.primary,
.secondary,
.icon-button,
.tab,
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.primary {
  background: var(--green);
  color: #ffffff;
  font-weight: 750;
  padding: 0 14px;
}

.primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
  font-weight: 750;
  padding: 0 14px;
}

.secondary:hover {
  border-color: var(--green);
  color: var(--green);
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  padding: 0;
}

.icon-button:hover,
.tab:hover,
.mini-btn:hover {
  border-color: var(--green);
}

.icon-button.small {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

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

svg {
  width: 18px;
  height: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sneaker-tape {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 32, 29, 0.38);
}

.modal {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(23, 32, 29, 0.24);
  padding: 18px;
}

.modal .panel-head {
  align-items: start;
}

.modal h2 {
  margin-bottom: 8px;
}

.live-bar {
  display: grid;
  grid-template-columns: minmax(230px, 0.76fr) minmax(280px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.live-clock {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.live-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.live-dot.is-live {
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(22, 116, 95, 0.12);
}

.clock-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.live-clock strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.pill.live {
  color: var(--green);
  background: rgba(22, 116, 95, 0.12);
}

.live-moves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.move-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
}

.move-chip em {
  color: currentColor;
  font-size: 12px;
  font-style: normal;
  opacity: 0.78;
}

.move-chip.muted {
  color: var(--muted);
  font-weight: 700;
}

.tape-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 10px;
}

.tape-card img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}

.tape-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.card-topline,
.price-line,
.panel-head,
.admin-action,
.admin-action-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tag-row {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.price-line b {
  font-size: 17px;
}

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

.phase,
.status,
.pill,
.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.source-badge.platform {
  color: var(--blue);
  background: rgba(36, 88, 166, 0.10);
}

.source-badge.participant {
  color: var(--amber);
  background: rgba(184, 102, 19, 0.12);
}

.phase.ipo {
  color: var(--blue);
  background: rgba(36, 88, 166, 0.12);
}

.phase.market,
.status.filled {
  color: var(--green);
  background: rgba(22, 116, 95, 0.12);
}

.phase.delisted {
  color: var(--red);
  background: rgba(179, 38, 30, 0.12);
}

.status.pending {
  color: var(--amber);
  background: rgba(184, 102, 19, 0.12);
}

.status.open {
  color: var(--blue);
  background: rgba(36, 88, 166, 0.12);
}

.status.cancelled,
.status.rejected {
  color: var(--muted);
  background: var(--surface-2);
}

.status.allocated {
  color: var(--blue);
  background: rgba(36, 88, 166, 0.12);
}

.status.forced {
  color: var(--red);
  background: rgba(179, 38, 30, 0.12);
}

.pill {
  background: var(--surface-2);
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.metric-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.positive strong,
.positive {
  color: var(--green);
}

.negative strong,
.negative {
  color: var(--red);
}

.warning strong,
.warning {
  color: var(--amber);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.tab {
  min-width: 112px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
  padding: 0 14px;
  font-weight: 760;
}

.tab.is-active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.notice {
  display: none;
  margin-bottom: 12px;
  border: 1px solid rgba(36, 88, 166, 0.24);
  border-radius: var(--radius);
  background: rgba(36, 88, 166, 0.08);
  color: var(--blue);
  padding: 10px 12px;
  font-weight: 700;
}

.notice.is-visible {
  display: block;
}

.view-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
}

.hidden {
  display: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.span-2 {
  grid-column: 1 / -1;
}

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

.panel-head.compact {
  margin: 0 0 8px;
}

.panel-head h3 {
  margin: 0;
  font-size: 15px;
}

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

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.full-row {
  grid-column: 1 / -1;
}

.span-2.field {
  grid-column: span 2;
}

.risk-box {
  min-height: 48px;
  margin-top: 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.position-open-count {
  display: inline-flex;
  margin-top: 5px;
  color: var(--blue);
  font-weight: 760;
}

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

.empty.block {
  margin: 0;
  padding: 14px;
  text-align: left;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.open-order-stack {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.open-order-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.open-order-line .mini-btn {
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

.open-order-line b {
  color: var(--ink);
  font-weight: 760;
}

.order-note-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-note-cell > span {
  min-width: 0;
}

.mini-btn {
  min-height: 32px;
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 750;
}

.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

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

.market-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.market-card img {
  width: 160px;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  background: var(--surface-2);
}

.market-body {
  padding: 14px;
}

.market-body p {
  margin-bottom: 12px;
  color: var(--muted);
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.market-stats span {
  display: grid;
  gap: 4px;
  min-height: 54px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  padding: 8px;
  font-size: 12px;
}

.market-stats b {
  color: var(--ink);
  font-size: 15px;
}

.listing-list {
  display: grid;
  gap: 10px;
}

.listing-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
}

.listing-card img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #ffffff;
}

.listing-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.listing-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.listing-metrics span {
  display: grid;
  gap: 3px;
  min-height: 48px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  padding: 7px;
  font-size: 12px;
}

.listing-metrics b {
  color: var(--ink);
  font-size: 14px;
}

.review-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
}

.review-card img {
  width: 132px;
  height: 132px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #ffffff;
}

.review-card-body {
  min-width: 0;
}

.review-card-body p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sparkline {
  display: block;
  gap: 5px;
  height: 142px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sparkline.empty {
  display: flex;
}

.sparkline span {
  width: 100%;
  min-width: 8px;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
}

.sparkline.empty {
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

.sparkline.empty span {
  width: auto;
  min-width: 0;
  background: transparent;
}

.kline-chart {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.kline-wrap {
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr) 18px;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.kline-range-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.kline-range-controls button {
  height: 20px;
  min-height: 20px;
  border-radius: 5px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.kline-range-controls button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.kline-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.kline-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.kline-times span {
  width: auto;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kline-times span:nth-child(2) {
  text-align: center;
}

.kline-times span:last-child {
  text-align: right;
}

.kline-chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}

.kline-chart line.positive,
.kline-chart rect.positive {
  stroke: var(--green);
  fill: var(--green);
}

.kline-chart line.negative,
.kline-chart rect.negative {
  stroke: var(--red);
  fill: var(--red);
}

.kline-chart line.positive,
.kline-chart line.negative {
  stroke-width: 1.4;
}

.heat {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.heat > span {
  display: block;
  height: 8px;
  max-width: 100%;
  border-radius: 999px;
  background: var(--green);
}

.heat::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  z-index: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

.heat > span {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
}

.heat-label {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.heat-label b {
  color: var(--ink);
  font-size: 12px;
}

.news-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.news-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}

.news-card.positive {
  border-left-color: var(--green);
}

.news-card.negative {
  border-left-color: var(--red);
}

.news-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.news-card-head div {
  display: grid;
  gap: 4px;
}

.news-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.news-card-head span,
.news-card small {
  color: var(--muted);
  font-size: 12px;
}

.news-card p {
  margin: 0;
  color: var(--ink);
}

.market-book {
  display: grid;
  gap: 8px;
  min-height: 238px;
}

.book-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.book-quote,
.book-spread {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
}

.book-quote span,
.book-spread span,
.book-quote small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-quote b,
.book-spread b {
  display: block;
  margin: 3px 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.book-quote.bid {
  border-color: rgba(22, 116, 95, 0.28);
}

.book-quote.bid b {
  color: var(--green);
}

.book-quote.ask {
  border-color: rgba(179, 38, 30, 0.24);
  text-align: right;
}

.book-quote.ask b {
  color: var(--red);
}

.book-spread {
  display: grid;
  align-content: center;
  text-align: center;
}

.book-spread b {
  color: var(--ink);
  font-size: 15px;
}

.book-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.book-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.book-head span:last-child {
  text-align: right;
}

.book-side {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 8px;
}

.book-side.empty-side {
  opacity: 0.38;
}

.book-side b {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  line-height: 1.1;
}

.book-side span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-side.sell {
  border-color: rgba(179, 38, 30, 0.22);
  text-align: right;
}

.book-side.sell b {
  color: var(--red);
}

.book-side.buy {
  border-color: rgba(22, 116, 95, 0.24);
}

.book-side.buy b {
  color: var(--green);
}

.book-side.system {
  background: #f8fbfa;
}

.book-level {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.book-level span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.book-level strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-side.buy .book-level strong {
  color: var(--green);
}

.book-side.sell .book-level {
  flex-direction: row-reverse;
}

.book-side.sell .book-level strong {
  color: var(--red);
}

.holder-list {
  display: grid;
  gap: 8px;
  min-height: 182px;
}

.holder-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(116px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 8px;
}

.holder-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--green);
  font-weight: 800;
}

.holder-row strong,
.holder-row b,
.holder-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holder-row span {
  color: var(--muted);
  font-size: 11px;
}

.holder-row div:last-child {
  text-align: right;
}

.admin-stack {
  display: grid;
  gap: 10px;
}

.admin-account-list {
  display: grid;
  gap: 12px;
}

.admin-account-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}

.admin-account-form {
  display: grid;
  gap: 12px;
}

.admin-account-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
}

.admin-account-head div:first-child {
  display: grid;
  gap: 4px;
}

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

.admin-account-metrics,
.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-account-metrics span {
  display: grid;
  gap: 4px;
  min-height: 54px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  padding: 8px;
  font-size: 12px;
}

.admin-account-metrics b {
  color: var(--ink);
  font-size: 15px;
}

.admin-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.admin-position-table {
  border-radius: var(--radius);
  background: #ffffff;
}

.admin-trade-log {
  max-height: 360px;
  overflow: auto;
}

.admin-log-section + .admin-log-section {
  margin-top: 16px;
}

.admin-trade-log strong {
  display: block;
  margin-bottom: 3px;
}

.admin-sneaker-list {
  display: grid;
  gap: 12px;
}

.admin-sneaker-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}

.admin-sneaker-card > img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #ffffff;
}

.admin-sneaker-form {
  display: grid;
  gap: 12px;
}

.admin-sneaker-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: start;
}

.admin-sneaker-head div:first-child {
  display: grid;
  gap: 4px;
}

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

.admin-sneaker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.admin-action {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.admin-action div:first-child {
  display: grid;
  gap: 4px;
}

.admin-action span,
.event-list time {
  color: var(--muted);
  font-size: 12px;
}

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

.rule-list div {
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
}

.rule-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rule-list dd {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 800;
}

.event-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-list li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

@media (max-width: 1180px) {
  .sneaker-tape,
  .live-bar,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-account-head,
  .admin-edit-grid,
  .admin-sneaker-card,
  .admin-sneaker-head,
  .listing-card,
  .review-card,
  .admin-sneaker-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 12px;
  }

  .topbar,
  .top-actions,
  .tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  h1 {
    font-size: 22px;
  }

  .field.compact {
    min-width: 0;
  }

  .sneaker-tape,
  .live-bar,
  .metric-grid,
  .view-grid,
  .market-grid,
  .admin-account-metrics,
  .admin-sneaker-grid,
  .form-grid,
  .form-grid.four {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-2.field {
    grid-column: auto;
  }

  .tape-card {
    grid-template-columns: 76px minmax(0, 1fr) 36px;
  }

  .tape-card img {
    width: 76px;
    height: 76px;
  }

  .market-card {
    grid-template-columns: 1fr;
  }

  .market-card img {
    width: 100%;
    min-height: 180px;
    max-height: 240px;
  }

  .book-topline {
    grid-template-columns: 1fr;
  }

  .book-quote.ask {
    text-align: left;
  }

  .listing-card img {
    width: 100%;
    height: 180px;
  }

  .review-card img {
    width: 100%;
    height: 190px;
  }

  .event-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
