.ws-page {
  display: grid;
  gap: 17px;
}

.ws-page-head,
.ws-section-head,
.ws-ticket-head,
.ws-record-top,
.ws-record-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.ws-page-head {
  align-items: flex-end;
  margin: 2px 0 4px;
}

.ws-page-head h1 {
  font: 650 22px/1.15 Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.02em;
}

.ws-page-head p,
.ws-empty-state p {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 6px;
}

.ws-page-head p { font-size: .92rem; }

.ws-page h2,
.ws-ticket h2 {
  font: 650 16px/1.25 Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.02em;
}

.ws-action-row,
.ws-switches {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ws-switch,
.ws-quiet,
.ws-import-link {
  min-height: 32px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--mut);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 550;
}

.ws-switch:hover,
.ws-switch.is-active {
  background: var(--acc-dim);
  border-color: rgba(59,130,246,.45);
  color: var(--acc-hi);
}

.ws-quiet,
.ws-import-link {
  color: var(--accent);
  border-color: transparent;
  padding-inline: 4px;
  background: transparent;
}

.ws-quiet:hover,
.ws-import-link:hover {
  text-decoration: underline;
}

.ws-ticket { padding: 15px; }

.ws-ticket-head {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.ws-ticket-head p,
.ws-ticket-empty p,
.ws-ticket-note {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
  margin-top: 5px;
}

.ws-ticket-empty {
  display: grid;
  justify-items: center;
  padding: 22px 14px 18px;
  background: radial-gradient(500px 180px at 50% 0, rgba(59,130,246,.10), transparent 70%), rgba(255,255,255,.015);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  margin-top: 14px;
  text-align: center;
}

.ws-ticket-placeholder {
  border-radius: 6px;
  width: 33px;
  height: 39px;
  padding: 7px;
  display: grid;
  justify-items: start;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--surface));
  background: var(--accent-soft);
  margin-bottom: 8px;
}

.ws-ticket-placeholder i {
  width: 15px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.ws-ticket-placeholder i:last-child { width: 10px; }
.ws-ticket-empty strong { font-size: .875rem; }
.ws-ticket-empty p { margin-top: 3px; }
.ws-import-link { display: block; margin-top: 6px; }

.ws-ticket-legs {
  list-style: none;
  padding: 0;
  margin: 11px 0;
  display: grid;
  gap: 6px;
}

.ws-ticket-legs li {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--inset);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.ws-ticket-legs small,
.ws-stat small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: .78rem;
}

.ws-ticket-price {
  font-size: 15px;
  color: var(--acc-hi);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.ws-leg-remove {
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  min-height: 27px;
  font-size: 1.15rem;
  line-height: 1;
}

.ws-leg-remove:hover { background: var(--accent-soft); color: var(--text); }

.ws-ticket-stake,
.ws-ticket-math > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ws-ticket-stake label,
.ws-ticket-math dt { color: var(--muted); font-size: .85rem; }

.ws-ticket-stake > div {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 104px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: .875rem;
}

.ws-ticket-stake input {
  width: 100%;
  min-height: 36px;
  padding: 5px 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-weight: 750;
}

.ws-ticket-stake input::-webkit-inner-spin-button { appearance: none; }
.ws-ticket-math { margin: 12px 0 0; display: grid; gap: 8px; }
.ws-ticket-math dd { margin: 0; font-size: .875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ws-ticket-math .ws-ticket-payout { padding-top: 8px; border-top: 1px solid var(--line); }
.ws-ticket-payout dd { font-size: 1.06rem; color: var(--accent); }
.ws-ticket .ws-ticket-save { width: 100%; margin-top: 12px; }
.ws-ticket-note { font-size: .78rem; }
.ws-ticket-confirmed { margin-top: 9px; color: var(--positive); font-size: .85rem; font-weight: 750; }

.ws-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.ws-stat { padding: 13px 14px; border-radius: 12px; background: linear-gradient(180deg, #17263b, #132033); }
.ws-stat h2 { color: var(--mut); font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.ws-stat > strong { display: block; font: 650 22px/1.15 Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; margin-top: 3px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ws-positive { color: var(--positive); }
.ws-negative,
.ws-error { color: var(--negative); }
.ws-error { margin: 0; font-size: .875rem; }
.ws-ticket .ws-error { margin-top: 6px; }
.ws-record-panel,
.ws-form-panel { padding: 16px; min-width: 0; }
.ws-record-panel .ws-switch { min-height: 32px; }
.ws-record-list { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.015); }
.ws-record { padding: 12px; }
.ws-record + .ws-record { border-top: 1px solid var(--line); }
.ws-record-top > div { display: grid; gap: 4px; }
.ws-record-top > div span, .ws-record p { color: var(--muted); font-size: .83rem; }
.ws-record-top strong,
.ws-record ul,
.ws-record p { overflow-wrap: anywhere; }
.ws-record ul { list-style: none; padding: 0; margin: 7px 0 3px; display: grid; gap: 4px; font-size: .86rem; }
.ws-record li span { color: var(--muted); }
.ws-record p { margin-top: 7px; }
.ws-record-bottom { margin-top: 7px; color: var(--muted); font-size: .85rem; }
.ws-record-bottom strong { padding-left: 4px; color: var(--text); }
.ws-record-bottom strong.ws-negative { color: var(--negative); }
.ws-record-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ws-record-actions select { max-width: 102px; }

.ws-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(255,255,255,.03);
  color: var(--mut);
  border: 1px solid var(--line2);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ws-status.ws-won { color: var(--positive); background: var(--positive-soft); }
.ws-status.ws-lost { color: var(--negative); background: var(--negative-soft); }
.ws-status.ws-open { color: var(--warning); background: var(--warning-soft); }
.ws-empty-state { padding: 30px 10px; text-align: center; }
.ws-empty-state h3 { font: 750 1rem/1.4 Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; }
.ws-empty-state p { font-size: .875rem; }

.ws-form-panel form { display: grid; gap: 12px; margin-top: 14px; }
.ws-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ws-form-panel label { display: grid; gap: 5px; font-size: .875rem; font-weight: 750; }
.ws-form-panel label small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.ws-form-panel input,
.ws-form-panel textarea,
.ws-form-panel select,
.ws-record select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line2);
  color: var(--txt);
  background-color: var(--inset);
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
}

.ws-form-panel textarea { resize: vertical; }
.ws-form-panel select,
.ws-record select {
  appearance: none;
  padding-right: 42px;
}

@media (max-width: 780px) {
  .ws-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .ws-form-grid { grid-template-columns: minmax(0, 1fr); }
  .ws-record-actions { width: 100%; }
  .ws-stat { padding: 11px; }
}
