:root {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  font-family: Arial, sans-serif;
  background: #10131a;
  color: #f5f7fb;
  line-height: 1.45;
}
a { color: #8ac6ff; }
main {
  padding: 12px;
  max-width: 100%;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
ul {
  padding-left: 18px;
  margin: 0;
}
code {
  background: #0f1622;
  padding: 2px 6px;
  border-radius: 6px;
  word-break: break-word;
}
.topbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  background: #171c26;
  border-bottom: 1px solid #2a3344;
}
.topbar-copy {
  min-width: 0;
}
.topbar-copy p {
  margin-bottom: 0;
  color: #cad3e2;
}
.top-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.top-actions form,
.top-actions .button-link,
.top-actions button {
  width: 100%;
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.card {
  background: #171c26;
  border: 1px solid #2a3344;
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
  overflow: hidden;
}
.narrow {
  max-width: 460px;
  margin: 12px auto;
}
label {
  display: block;
  margin: 10px 0;
  font-size: 0.95rem;
}
input, select, button, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #39445a;
  background: #0f1622;
  color: #f5f7fb;
  font-size: 16px;
}
button, .button-link {
  background: #4a8cff;
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  text-align: center;
  min-height: 46px;
}
.button-link {
  padding: 12px 14px;
}
.match, .user-row {
  border-top: 1px solid #2a3344;
  padding: 14px 0;
}
.match:first-of-type, .user-row:first-of-type { border-top: none; }
.inline-form { margin-bottom: 10px; }
.error { color: #ff8f8f; }
.success { color: #9ee6a5; }
.muted { color: #cad3e2; }
.bet-form, .stack-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bet-list li {
  margin-bottom: 12px;
}
.match-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
@media (min-width: 720px) {
  main {
    padding: 16px;
  }
  .topbar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
  }
  .top-actions {
    display: flex;
    flex-wrap: wrap;
    width: auto;
  }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
  }
  .card {
    padding: 16px;
  }
}
.table-wrap {
  overflow-x: auto;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.users-table th,
.users-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #2a3344;
  text-align: left;
  vertical-align: top;
}
.users-table th {
  color: #cad3e2;
  font-weight: 700;
}
.table-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.table-form input {
  margin-top: 0;
}
.table-form button {
  width: auto;
  min-width: 88px;
}
@media (max-width: 700px) {
  .users-table {
    min-width: 620px;
  }
  .table-form {
    min-width: 220px;
  }
}
.funds-form {
  align-items: stretch;
}
.toggle-group {
  display: inline-flex;
  border: 1px solid #39445a;
  border-radius: 10px;
  overflow: hidden;
  min-width: 92px;
}
.toggle-pill {
  position: relative;
  flex: 1;
}
.toggle-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}
.toggle-pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  background: #0f1622;
  color: #f5f7fb;
  font-weight: 700;
}
.toggle-pill input:checked + span {
  background: #4a8cff;
}
.mobile-user-list {
  display: grid;
  gap: 12px;
}
.mobile-user-card {
  border: 1px solid #2a3344;
  border-radius: 12px;
  padding: 14px;
  background: #121722;
}
.mobile-user-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.mobile-balance {
  font-weight: 700;
  font-size: 1.1rem;
}
.mobile-funds-form label {
  margin-bottom: 4px;
}
.mobile-funds-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
}
@media (max-width: 480px) {
  .mobile-funds-row {
    grid-template-columns: 1fr;
  }
}
.mobile-funds-row-wide {
  grid-template-columns: 88px minmax(0, 1fr);
}
.sign-toggle {
  font-size: 2rem;
  font-weight: 700;
  min-height: 56px;
}
.sign-toggle.subtract {
  background: #ff7a7a;
}
.amount-input-large {
  min-height: 56px;
  font-size: 1.15rem;
  padding: 14px 16px;
}
@media (max-width: 480px) {
  .mobile-funds-row-wide {
    grid-template-columns: 80px minmax(0, 1fr);
  }
}
@media (min-width: 900px) {
  body {
    font-size: 15px;
  }
  main {
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  h1 {
    font-size: 1.9rem;
  }
  h2 {
    font-size: 1.2rem;
  }
  h3 {
    font-size: 1rem;
  }
  .topbar {
    padding: 14px 20px;
  }
  .card {
    padding: 14px;
  }
  input, select, button, textarea {
    padding: 10px 12px;
    min-height: 42px;
    font-size: 15px;
  }
  .button-link {
    padding: 10px 12px;
  }
  .match, .user-row {
    padding: 10px 0;
  }
  .mobile-user-card {
    padding: 12px;
  }
  .amount-input-large {
    min-height: 44px;
    font-size: 1rem;
    padding: 10px 12px;
  }
  .sign-toggle {
    min-height: 44px;
    font-size: 1.35rem;
  }
  .mobile-funds-row-wide {
    grid-template-columns: 64px minmax(0, 180px);
    justify-content: start;
  }
  .mobile-user-list {
    gap: 10px;
  }
}
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-link:hover {
  border-color: #4a8cff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.stat-topbar {
  background: linear-gradient(180deg, #171c26 0%, #121722 100%);
}
.stats-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.stat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #182030 0%, #111722 100%);
  border: 1px solid #263249;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.stat-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.stat-card h2 {
  margin-bottom: 4px;
}
.mini-pill {
  background: #273758;
  color: #dce7ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  white-space: nowrap;
}
.dial-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.multi-dial-row {
  justify-content: space-between;
}
.dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dial-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 8px solid #4a8cff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1622;
  font-weight: 700;
}
.dial-ring.small {
  width: 62px;
  height: 62px;
  border-width: 6px;
}
.mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.mini-stats-grid div {
  background: #0f1622;
  border: 1px solid #273758;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-stats-grid strong {
  font-size: 1.05rem;
}
.mini-stats-grid span {
  color: #cad3e2;
  font-size: 0.9rem;
}
@media (max-width: 700px) {
  .stats-card-grid {
    grid-template-columns: 1fr;
  }
  .stat-card {
    padding: 16px;
  }
}
.dashboard-body {
  background: #16021f;
  color: #f7ecff;
}
.dashboard-topbar {
  background: linear-gradient(180deg, #2b0136 0%, #1d0227 100%);
  border-bottom: 1px solid #4d185d;
}
.brand-block p {
  color: #dbc7e5;
}
.dashboard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.dashboard-nav a {
  color: #f7ecff;
  text-decoration: none;
  opacity: 0.9;
}
.dashboard-nav a:hover {
  opacity: 1;
}
.dashboard-nav form {
  margin: 0;
}
.dashboard-nav button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  background: #5e2c8a;
}
.dashboard-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 28px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.summary-card,
.welcome-card {
  background: #2a1033;
  border: 1px solid #4a2257;
  border-radius: 12px;
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.summary-card h2,
.welcome-card h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}
.summary-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 6px;
}
.summary-card p {
  color: #d8c2e2;
  margin-bottom: 10px;
}
.list-card strong {
  display: inline;
  font-size: inherit;
}
.welcome-card {
  margin-top: 18px;
}
@media (max-width: 700px) {
  .dashboard-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .dashboard-nav form,
  .dashboard-nav button {
    width: 100%;
  }
}
.auth-shell {
  max-width: 560px;
}
.auth-card {
  margin: 40px auto 0;
}
.two-wide-grid {
  grid-template-columns: minmax(320px, 420px) 1fr;
}
@media (max-width: 900px) {
  .two-wide-grid {
    grid-template-columns: 1fr;
  }
}
.brand-block {
  min-width: 0;
}
