/* PWA Liquidity — same dark RH theme as Play */

:root {
  --bg: #070908;
  --panel: #0e120f;
  --elev: #151b16;
  --elev2: #1c241e;
  --line: #273028;
  --text: #eef4ee;
  --muted: #6f7f72;
  --accent: #00c805;
  --accent-dim: #0a3a0c;
  --gold: #e0b44a;
  --warn: #f0b429;
  --danger: #f87171;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

.play-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -15%, oklch(0.32 0.14 145 / 0.45), transparent),
    radial-gradient(ellipse 50% 40% at 100% 90%, oklch(0.22 0.06 145 / 0.25), transparent),
    radial-gradient(ellipse 40% 30% at 0% 80%, oklch(0.2 0.05 90 / 0.15), transparent);
  -webkit-font-smoothing: antialiased;
}

/* shared chrome with Play */
.play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: oklch(0.1 0.02 145 / 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.play-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.play-brand .dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  border-radius: 1px;
}
.brand-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.play-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.play-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.play-nav a:hover { color: var(--text); border-color: var(--line); }
.play-nav a.on {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: oklch(0.22 0.08 145 / 0.45);
  font-weight: 600;
}
.play-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.play-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.play-pill {
  font-family: var(--mono);
  font-size: 0.66rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--elev);
}
.play-pill.live {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.play-connect {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #031403;
  cursor: pointer;
  transition: filter 0.12s, transform 0.1s;
}
.play-connect:hover { filter: brightness(1.08); }
.play-connect:active { transform: translateY(1px); }
.play-connect:disabled { opacity: 0.5; cursor: not-allowed; }
.play-connect:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .play-top { flex-wrap: wrap; }
}

/* page */
.liq-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.35rem 1.15rem 3rem;
}
.liq-hero { margin-bottom: 1.25rem; }
.liq-hero h1 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  margin: 0 0 0.4rem;
  font-weight: 750;
}
.liq-hero .lede {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.5;
  font-size: 0.9rem;
}
.liq-hero .lede a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.liq-hero .lede a:hover { text-decoration: underline; }

.liq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .liq-grid { grid-template-columns: 1fr; }
}
.liq-wide { grid-column: 1 / -1; }

.liq-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
}
.liq-card h2 {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.card-head h2 { margin: 0; }
.board-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.stat-row:last-child { border-bottom: 0; }
.stat-row span { color: var(--muted); }
.stat-row strong {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.8rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}
.field > span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.field input,
.field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: var(--elev);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
}
.field input::placeholder { color: oklch(0.45 0.02 145); }
.field select option { background: var(--elev); color: var(--text); }
.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent-dim);
}

.amount-row { display: flex; gap: 0.4rem; }
.amount-row input { flex: 1; }
.amount-row button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--elev2);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.amount-row button:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.fine {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
  line-height: 1.4;
}

.btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}
.btn-row button { flex: 1; min-width: 5.5rem; }

.liq-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--elev);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.12s, border-color 0.12s, background 0.12s;
}
.liq-btn:hover:not(:disabled) {
  border-color: oklch(0.4 0.06 145);
  filter: brightness(1.06);
}
.liq-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.liq-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.liq-btn.primary {
  background: var(--accent);
  color: #031403;
  border-color: transparent;
  box-shadow: 0 6px 20px oklch(0.4 0.15 145 / 0.3);
}
.liq-btn.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}
.liq-btn.block { width: 100%; margin-top: 0.25rem; }

.verify-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--elev);
  color: var(--muted);
}
.verify-chip.ok {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: oklch(0.22 0.08 145 / 0.4);
}
.verify-chip.bad {
  color: var(--danger);
  border-color: oklch(0.45 0.12 25 / 0.5);
  background: oklch(0.25 0.06 25 / 0.35);
}
.verify-chip.wait {
  color: var(--warn);
  border-color: oklch(0.5 0.1 90 / 0.45);
  background: oklch(0.28 0.06 90 / 0.3);
}

.manual-toggle {
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
}
.manual-toggle:hover { color: var(--accent); }
.panel-hidden { display: none !important; }

.chip-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.lot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.lot-table th {
  text-align: left;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.lot-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lot-table .mono {
  font-family: var(--mono);
  font-size: 0.78rem;
}
.lot-table a {
  color: var(--muted);
  text-decoration: none;
}
.lot-table a:hover { color: var(--accent); }
.lot-table button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--elev);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
}
.lot-table button:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.status-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--elev);
  color: var(--muted);
  letter-spacing: 0.04em;
}
.status-pill.Active {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: oklch(0.22 0.08 145 / 0.4);
}
.status-pill.Staged {
  color: var(--warn);
  border-color: oklch(0.5 0.1 90 / 0.45);
  background: oklch(0.28 0.06 90 / 0.3);
}
.status-pill.Allocated {
  color: var(--blue, #60a5fa);
  border-color: oklch(0.5 0.1 250 / 0.45);
  background: oklch(0.25 0.06 250 / 0.35);
}
.status-pill.Settled {
  color: var(--muted);
  border-color: var(--line);
}

.log {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  max-height: 8rem;
  overflow: auto;
  white-space: pre-wrap;
  margin-top: 0.85rem;
}

.play-foot {
  text-align: center;
  padding: 0 1rem 2rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.play-foot a {
  color: var(--muted);
  transition: color 0.15s;
}
.play-foot a:hover { color: var(--accent); }
