:root {
  color: #e9f4ed;
  background: #07100c;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #2ae18b;
  --green-dark: #0fa866;
  --paper: #111d17;
  --paper-2: #17251e;
  --line: rgba(222, 246, 230, 0.1);
  --muted: #8fa197;
  --danger: #ff6868;
}

.admin-league-card {
  display: grid;
  gap: 18px;
}

.admin-league-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.admin-league-summary h2,
.admin-league-summary p {
  margin: 0;
}

.admin-league-summary p {
  margin-top: 7px;
  color: var(--muted);
}

.admin-league-counts {
  min-width: 150px;
  text-align: right;
}

.admin-league-counts strong,
.admin-league-counts span {
  display: block;
}

.admin-league-counts strong {
  color: var(--green);
  font-size: 32px;
}

.admin-league-counts span,
.admin-league-result-note {
  color: var(--muted);
  font-size: 12px;
}

.admin-league-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(6, auto);
  gap: 9px;
}

.admin-league-toolbar input,
.admin-league-toolbar button {
  min-height: 40px;
}

.admin-league-toolbar button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  background: transparent;
  color: #c7d4cc;
  cursor: pointer;
}

.admin-league-toolbar .primary-button {
  width: auto;
  border: 0;
  background: var(--green);
  color: #04120b;
}

.admin-league-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-league-row {
  display: grid;
  grid-template-columns: auto 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.admin-league-row:hover {
  border-color: rgba(68, 211, 126, 0.48);
}

.admin-league-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.admin-league-logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(68, 211, 126, 0.12);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.admin-league-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-league-name {
  min-width: 0;
}

.admin-league-name strong,
.admin-league-name small {
  display: block;
}

.admin-league-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-league-name small,
.admin-league-matches {
  color: var(--muted);
  font-size: 11px;
}

.warning-banner {
  border: 1px solid rgba(241, 180, 76, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(241, 180, 76, 0.08);
  color: #f1c36f;
  font-size: 12px;
}

.admin-feature-card {
  max-width: 760px;
  display: grid;
  gap: 18px;
}

.admin-feature-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.admin-feature-heading h2,
.admin-feature-heading p {
  margin: 0;
}

.admin-feature-heading p {
  margin-top: 7px;
  color: var(--muted);
}

.admin-feature-status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-feature-status.enabled {
  border-color: rgba(42, 225, 139, 0.35);
  background: rgba(42, 225, 139, 0.1);
  color: var(--green);
}

.admin-feature-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.admin-feature-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-feature-switch {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #314039;
  transition: background 160ms ease;
}

.admin-feature-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dbe8df;
  content: "";
  transition: transform 160ms ease;
}

.admin-feature-toggle input:checked + .admin-feature-switch {
  background: var(--green);
}

.admin-feature-toggle input:checked + .admin-feature-switch::after {
  transform: translateX(22px);
  background: #04120b;
}

.admin-feature-toggle strong,
.admin-feature-toggle small {
  display: block;
}

.admin-feature-toggle small,
.admin-feature-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-feature-save {
  width: fit-content;
  min-width: 160px;
}

@media (max-width: 820px) {
  .admin-league-summary {
    display: block;
  }

  .admin-league-counts {
    margin-top: 12px;
    text-align: left;
  }

  .admin-league-toolbar,
  .admin-league-list {
    grid-template-columns: 1fr;
  }

  .admin-league-toolbar .primary-button {
    grid-row: 2;
  }

  .admin-league-list {
    max-height: none;
  }

  .admin-feature-heading {
    display: block;
  }

  .admin-feature-status {
    display: inline-block;
    margin-top: 12px;
  }

  .admin-feature-save {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 65% -10%, rgba(42, 225, 139, 0.11), transparent 35%),
    #07100c;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  background: rgba(7, 16, 12, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.topbar-stats,
.workspace,
.view-heading,
.match-card-header,
.teams-row,
.selection-market,
.bet-card header,
.bet-card footer,
.bet-leg,
.match-actions,
.heading-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: #04120b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.5px;
  box-shadow: 0 0 30px rgba(42, 225, 139, 0.18);
}

.brand div {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-size: 17px;
}

.brand span:last-child,
.topbar-stats span,
.match-time,
.market-period,
.selection-match,
.empty-slip span,
.bet-card header span,
.bet-leg span,
.bet-card footer span,
.view-heading p {
  color: var(--muted);
  font-size: 12px;
}

.topbar-stats {
  gap: 40px;
}

.topbar-user,
.user-menu,
.admin-user-main,
.admin-user-stats,
.admin-user-actions {
  display: flex;
  align-items: center;
}

.topbar-user {
  gap: 22px;
}

.user-menu {
  flex-direction: column;
  align-items: flex-end;
}

.user-menu strong {
  font-size: 13px;
}

.user-menu span {
  color: var(--muted);
  font-size: 10px;
}

.logout-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.logout-button:hover {
  color: #fff;
}

.topbar-stats > div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.topbar-stats strong {
  margin-top: 3px;
  font-size: 15px;
}

.topbar-stats > div:first-child strong {
  margin-top: 0;
}

.profit {
  color: var(--green);
}

.loss,
.error-text {
  color: var(--danger);
}

.workspace {
  align-items: stretch;
  min-height: calc(100vh - 76px);
}

.sidebar {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  width: 210px;
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 24px 14px;
}

.sidebar button {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  background: transparent;
  color: #aab9b0;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.sidebar button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}

.sidebar button.active {
  background: var(--paper-2);
  color: #fff;
}

.nav-index {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding: 14px;
}

.sidebar-foot span,
.eyebrow {
  color: #63766b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 1.8px;
}

.sidebar-foot strong {
  font-size: 12px;
}

.sidebar-foot small {
  color: var(--muted);
}

.online,
.ok-text {
  color: var(--green);
}

.offline {
  color: var(--danger);
}

.main-content {
  width: calc(100% - 210px);
  padding: 28px;
}

.password-warning,
.success-banner {
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 190, 80, 0.2);
  border-radius: 11px;
  padding: 11px 14px;
  background: rgba(255, 190, 80, 0.07);
  color: #f3c87a;
  font-size: 12px;
}

.success-banner {
  border-color: rgba(42, 225, 139, 0.2);
  background: rgba(42, 225, 139, 0.07);
  color: var(--green);
}

.matches-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  max-width: 1540px;
  margin: 0 auto;
}

.view-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.view-heading h1 {
  margin: 5px 0 0;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -1.5px;
}

.view-heading p {
  margin: 7px 0 0;
}

.heading-actions {
  gap: 10px;
}

.scope-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.scope-switch button,
.refresh-button,
.secondary-button {
  border: 0;
  border-radius: 9px;
  padding: 10px 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.scope-switch button.active {
  background: var(--paper-2);
  color: #fff;
}

.refresh-button,
.secondary-button {
  border: 1px solid var(--line);
  color: #dce8e0;
}

.match-list,
.bets-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.matches-column {
  min-width: 0;
}

.compact-table-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(
    145deg,
    rgba(23, 37, 30, 0.9),
    rgba(14, 25, 19, 0.94)
  );
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.14);
}

.compact-table-scroll {
  overflow-x: auto;
}

.compact-match-table {
  min-width: 1080px;
}

.compact-table-header,
.compact-match-row {
  display: grid;
  grid-template-columns: minmax(255px, 1.65fr) repeat(6, minmax(116px, 1fr));
}

.compact-table-header {
  min-height: 42px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 11px;
}

.compact-table-header > * {
  min-width: 0;
  padding: 0 10px;
}

.compact-table-header strong {
  color: #e9f3ed;
  font-size: 12px;
}

.compact-table-header span {
  border-left: 1px solid var(--line);
  text-align: center;
}

.compact-match-row {
  min-height: 132px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 28, 20, 0.7);
}

.compact-match-row:nth-child(even) {
  background: rgba(17, 32, 24, 0.82);
}

.compact-match-row:last-child {
  border-bottom: 0;
}

.compact-match-info {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
}

.compact-time {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding: 8px 5px;
  text-align: center;
}

.compact-time span,
.compact-time small {
  color: var(--muted);
  font-size: 10px;
}

.compact-time strong {
  color: #dce8e0;
  font-size: 12px;
}

.compact-favorite {
  border: 0;
  padding: 0;
  background: transparent;
  color: #5f7468;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.compact-favorite.active,
.compact-favorite:hover {
  color: var(--green);
}

.compact-teams {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(31px, 1fr));
  gap: 5px;
  padding: 8px 9px;
  text-align: left;
}

.compact-team-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  padding: 0 5px;
}

.compact-team-line .team-logo {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  border-radius: 3px;
}

.compact-team-line strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-draw-line {
  justify-content: space-between;
  padding-left: 32px;
}

.compact-draw-line span {
  color: #6f8378;
  font-size: 9px;
}

.compact-teams:hover .compact-team-line {
  background: rgba(42, 225, 139, 0.045);
}

.compact-market-cell {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(31px, 1fr));
  gap: 5px;
  border-left: 1px solid var(--line);
  padding: 8px 6px;
}

.compact-odd-button,
.compact-odd-placeholder {
  min-width: 0;
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #9daea4;
  font-size: 10px;
}

.compact-odd-button {
  cursor: pointer;
  transition: 140ms ease;
}

.compact-odd-button:hover:not(:disabled) {
  background: rgba(42, 225, 139, 0.09);
}

.compact-odd-button.selected {
  border-color: var(--green);
  background: rgba(42, 225, 139, 0.16);
}

.compact-odd-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.compact-odd-button strong {
  flex: 0 0 auto;
  color: #fff;
  font-size: 11px;
}

.compact-odd-button.moneyline-only {
  justify-content: center;
}

.compact-odd-placeholder {
  justify-content: center;
  background: rgba(255, 255, 255, 0.018);
  color: #52645a;
}

.match-pagination {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.12);
}

.match-pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #b9c7bf;
  cursor: pointer;
  font-weight: 700;
}

.match-pagination button:hover:not(:disabled) {
  border-color: var(--line);
  color: #fff;
}

.match-pagination button.active {
  background: var(--green);
  color: #04120b;
}

.match-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.pagination-ellipsis,
.pagination-total {
  color: var(--muted);
  font-size: 11px;
}

.pagination-ellipsis {
  padding: 0 4px;
}

.pagination-total {
  margin-left: 10px;
}

.match-card,
.bet-slip,
.bet-card,
.settings-card,
.loading-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(23, 37, 30, 0.9), rgba(14, 25, 19, 0.94));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.14);
}

.match-card {
  overflow: hidden;
}

.match-card-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
}

.match-card-header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.league-name {
  font-size: 12px;
  font-weight: 700;
}

.match-actions {
  gap: 8px;
}

.status-badge,
.favorite-button,
.bet-status {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge {
  background: rgba(255, 255, 255, 0.05);
  color: #b9c8bf;
}

.status-live {
  background: rgba(42, 225, 139, 0.13);
  color: var(--green);
}

.favorite-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.favorite-button.active {
  border-color: rgba(42, 225, 139, 0.3);
  color: var(--green);
}

.teams-row {
  justify-content: center;
  gap: 28px;
  padding: 22px 16px 14px;
}

.match-detail-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 140ms ease;
}

.match-detail-trigger:hover {
  background: rgba(42, 225, 139, 0.045);
}

.match-detail-trigger:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.team {
  width: min(220px, 35%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.away-team {
  flex-direction: row-reverse;
  text-align: right;
}

.team-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: contain;
  background: #f1f5f2;
}

.team-logo-fallback {
  display: grid;
  place-items: center;
  color: #0b1c12;
  font-weight: 800;
}

.versus {
  width: 66px;
  color: #698076;
  text-align: center;
}

.versus strong {
  font-size: 18px;
}

.versus span {
  color: #698076;
}

.markets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.market-group {
  min-width: 0;
  padding: 13px;
  background: #111d17;
}

.market-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

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

.market-moneyline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.odd-button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: 140ms ease;
}

.odd-button:hover:not(:disabled) {
  background: rgba(42, 225, 139, 0.09);
}

.odd-button.selected {
  border-color: var(--green);
  background: rgba(42, 225, 139, 0.16);
}

.odd-button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.odd-button.locked:disabled {
  border-color: rgba(255, 180, 85, 0.12);
  opacity: 0.58;
}

.odd-button.locked strong {
  color: #d9a45f;
  font-size: 10px;
}

.odd-button.view-only:disabled {
  opacity: 0.78;
}

.odd-name {
  overflow: hidden;
  color: #a9b8af;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odd-button strong {
  color: #fff;
  font-size: 12px;
}

.detail-layout {
  align-items: start;
}

.detail-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.back-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 13px;
  background: transparent;
  color: #dce8e0;
  cursor: pointer;
}

.detail-hero {
  overflow: hidden;
  border: 1px solid rgba(42, 225, 139, 0.18);
  border-radius: 18px;
  padding: 18px 24px 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(42, 225, 139, 0.18), transparent 42%),
    linear-gradient(135deg, #10291d, #0e1b15);
}

.detail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta strong {
  color: #dce8e0;
}

.detail-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  max-width: 680px;
  margin: 24px auto 18px;
}

.detail-team {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
  font-size: 18px;
}

.detail-team.away {
  flex-direction: row-reverse;
}

.detail-team .team-logo {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}

.detail-score {
  color: var(--green);
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.market-tabs {
  position: sticky;
  top: 88px;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: 14px 0 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px;
  background: rgba(7, 16, 12, 0.93);
  backdrop-filter: blur(14px);
}

.market-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #adbbb2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.market-tabs button.active {
  background: var(--green);
  color: #04120b;
}

.market-support-note {
  margin-bottom: 10px;
  border-left: 2px solid var(--green);
  padding: 9px 12px;
  background: rgba(42, 225, 139, 0.055);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.detail-market-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-market-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.detail-market-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.detail-market-group h3 {
  margin: 0;
  font-size: 13px;
}

.detail-market-group header div span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.settlement-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 10px;
}

.settlement-badge.supported {
  background: rgba(42, 225, 139, 0.1);
  color: var(--green);
}

.detail-market-lines {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.detail-market-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
  background: #111d17;
}

.detail-options-1 {
  grid-template-columns: minmax(0, 1fr);
}

.detail-options-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.correct-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 8px;
  background: #111d17;
}

.correct-score-column {
  min-width: 0;
}

.correct-score-heading {
  display: block;
  padding: 2px 10px 7px;
  color: var(--muted);
  font-size: 10px;
}

.correct-score-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.correct-score-options .detail-odd {
  width: 100%;
}

.correct-score-other {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 8px;
  background: #111d17;
}

.detail-odd {
  min-height: 42px;
  padding: 10px 12px;
}

.bet-slip {
  position: sticky;
  top: 104px;
  height: fit-content;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.selection-count {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: #04120b;
  font-weight: 800;
}

.simulation-notice {
  margin: 16px 0;
  border-left: 2px solid var(--green);
  padding: 9px 11px;
  background: rgba(42, 225, 139, 0.06);
  color: #9cb2a5;
  font-size: 11px;
  line-height: 1.6;
}

.selection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-slip {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.selection-item {
  position: relative;
  border-radius: 11px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.remove-selection {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #788b80;
  cursor: pointer;
  font-size: 18px;
}

.selection-match {
  display: block;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-market {
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
}

.selection-market strong {
  color: var(--green);
}

.stake-box {
  margin-top: 16px;
}

.stake-box label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.stake-box input,
.settings-card input,
.settings-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
}

.field-label,
.admin-create-grid label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 11px;
}

.settings-action {
  margin-top: 14px;
}

.stake-box input:focus,
.settings-card input:focus,
.settings-card textarea:focus {
  border-color: rgba(42, 225, 139, 0.55);
}

.quick-stakes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 7px;
}

.quick-stakes button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.bet-summary {
  margin: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.bet-summary > div {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  font-size: 12px;
}

.bet-summary span {
  color: var(--muted);
}

.place-bet-button,
.primary-button,
.danger-button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: var(--green);
  color: #04120b;
  cursor: pointer;
  font-weight: 800;
}

.place-bet-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.form-message,
.settings-message {
  margin: 10px 0 0;
  color: #b7c8bd;
  font-size: 11px;
  text-align: center;
}

.content-view {
  max-width: 1180px;
  margin: 0 auto;
}

.settlement-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(42, 225, 139, 0.16);
  border-radius: 12px;
  padding: 11px 14px;
  background: rgba(42, 225, 139, 0.055);
  font-size: 11px;
}

.settlement-note strong {
  color: var(--green);
}

.settlement-note span {
  color: var(--muted);
  text-align: right;
}

.bet-list-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.bet-list-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.bet-list-toolbar select {
  min-width: 138px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #e8fff2;
  outline: none;
}

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

.bet-status-filters button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  cursor: pointer;
}

.bet-status-filters button strong {
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #c8d5cd;
  font-size: 10px;
}

.bet-status-filters button.active {
  border-color: rgba(42, 225, 139, 0.4);
  background: rgba(42, 225, 139, 0.075);
  color: var(--green);
}

.bet-status-filters button.active strong {
  background: rgba(42, 225, 139, 0.15);
  color: var(--green);
}

.loading-card,
.empty-state {
  padding: 70px 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: #eaf5ed;
}

.empty-state p {
  margin: 0;
  font-size: 13px;
}

.error-banner {
  margin-bottom: 14px;
  border: 1px solid rgba(255, 104, 104, 0.22);
  border-radius: 11px;
  padding: 12px;
  background: rgba(255, 104, 104, 0.07);
  color: #ff9b9b;
  font-size: 12px;
}

.bet-card {
  overflow: hidden;
}

.bet-card header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 17px;
}

.bet-card header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bet-status {
  background: rgba(255, 255, 255, 0.05);
  color: #b7c8bd;
}

.bet-status-won {
  background: rgba(42, 225, 139, 0.12);
  color: var(--green);
}

.bet-status-lost {
  background: rgba(255, 104, 104, 0.1);
  color: #ff8f8f;
}

.bet-status-cancelled {
  background: rgba(244, 186, 88, 0.1);
  color: #f4ba58;
}

.bet-legs {
  padding: 5px 17px;
}

.bet-leg {
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 0;
}

.bet-leg:last-child {
  border-bottom: 0;
}

.bet-leg > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bet-leg > div:last-child {
  align-items: flex-end;
}

.leg-score {
  color: var(--green) !important;
  font-weight: 700;
}

.bet-card footer {
  justify-content: flex-end;
  gap: 42px;
  border-top: 1px solid var(--line);
  padding: 13px 17px;
  background: rgba(0, 0, 0, 0.1);
}

.bet-card footer > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

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

.settings-card {
  padding: 21px;
}

.settings-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.settings-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.settings-card textarea {
  min-height: 150px;
  margin: 9px 0 10px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.account-points-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 85% 10%, rgba(42, 225, 139, 0.2), transparent 36%),
    linear-gradient(145deg, #10291f, #0b1c15);
}

.account-points-card::after {
  content: "PTS";
  position: absolute;
  right: 18px;
  bottom: -16px;
  color: rgba(42, 225, 139, 0.07);
  font-size: 86px;
  font-weight: 900;
}

.account-points-card > span {
  color: #91a79b;
  font-size: 12px;
}

.account-points-card > strong {
  margin-top: 8px;
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -2px;
}

.account-points-card > small {
  margin-top: 8px;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.account-points-card > div {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  border-top: 1px solid rgba(216, 244, 226, 0.12);
  padding-top: 14px;
  font-size: 12px;
}

.account-points-card > div > span {
  color: var(--muted);
}

.status-list {
  margin: 16px 0;
}

.status-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 12px;
}

.status-list dt {
  color: var(--muted);
}

.status-list dd {
  margin: 0;
  text-align: right;
}

.small-note {
  margin-bottom: 0 !important;
  font-size: 10px !important;
}

.danger-card {
  grid-column: 1 / -1;
}

.danger-card input {
  max-width: 300px;
  margin: 8px 0 10px;
}

.danger-button {
  width: auto;
  margin-left: 8px;
  padding-inline: 20px;
  background: #51282a;
  color: #ffb0b0;
}

.boot-screen,
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-screen {
  color: var(--muted);
}

.login-shell {
  background:
    radial-gradient(circle at 50% 15%, rgba(42, 225, 139, 0.16), transparent 35%),
    #07100c;
}

.login-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px;
  background: linear-gradient(145deg, rgba(23, 37, 30, 0.96), rgba(10, 21, 15, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.login-brand {
  margin-bottom: 24px;
}

.login-card h1 {
  margin: 8px 0 6px;
  font-size: 28px;
}

.login-card p,
.login-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
}

.login-card input:focus {
  border-color: rgba(42, 225, 139, 0.55);
}

.login-button {
  margin: 18px 0 13px;
}

.auth-switch-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-weight: 700;
}

.auth-switch-button:hover {
  border-color: rgba(42, 225, 139, 0.55);
  background: rgba(42, 225, 139, 0.06);
}

.auth-switch-button + small,
.login-button + small {
  display: block;
  margin-top: 13px;
  text-align: center;
}

.admin-create-card {
  margin-bottom: 14px;
}

.admin-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-create-grid label {
  margin-top: 4px;
}

.admin-create-grid input {
  margin-top: 6px;
}

.admin-create-button {
  width: auto;
  margin-top: 14px;
  padding-inline: 24px;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  background: var(--paper);
}

.admin-user-main {
  gap: 12px;
}

.admin-user-main > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-user-main span,
.admin-user-stats span {
  color: var(--muted);
  font-size: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 12px;
  background: rgba(42, 225, 139, 0.13);
  color: var(--green);
  font-weight: 900;
}

.admin-user-stats {
  justify-content: space-between;
  gap: 16px;
}

.admin-user-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-user-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-user-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: transparent;
  color: #c7d4cc;
  cursor: pointer;
  font-size: 10px;
}

.account-status {
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(255, 104, 104, 0.09);
  color: #ff9696;
  font-size: 10px;
}

.account-status.active {
  background: rgba(42, 225, 139, 0.1);
  color: var(--green);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-tabs button,
.admin-status-filters button,
.admin-bet-toolbar > button,
.admin-bet-actions button,
.manual-settlement-actions button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  background: transparent;
  color: #c7d4cc;
  cursor: pointer;
}

.admin-tabs button {
  border-color: transparent;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 14px;
}

.admin-tabs button.active,
.admin-status-filters button.active {
  border-color: rgba(42, 225, 139, 0.35);
  background: rgba(42, 225, 139, 0.08);
  color: var(--green);
}

.admin-tabs button.active {
  border-bottom-color: var(--green);
}

.admin-bet-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-status-filters {
  display: flex;
  gap: 6px;
  margin-right: auto;
}

.admin-bet-toolbar select,
.manual-leg-row select,
.manual-settlement-note {
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  padding: 9px 11px;
  background: #0c1912;
  color: #eaf5ed;
}

.admin-bet-toolbar .bulk-delete-button,
.admin-bet-actions .delete-admin-bet {
  border-color: rgba(255, 104, 104, 0.28);
  color: #ff9696;
}

.admin-bet-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.admin-delete-note {
  margin-bottom: 12px;
  border-left: 2px solid #f4ba58;
  padding: 9px 12px;
  background: rgba(244, 186, 88, 0.055);
  color: #c7b991;
  font-size: 11px;
  line-height: 1.6;
}

.admin-bet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-bet-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.admin-bet-card.selected {
  border-color: rgba(42, 225, 139, 0.42);
}

.admin-bet-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  padding: 13px 15px;
}

.admin-bet-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.admin-bet-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-bet-title span,
.admin-bet-leg small,
.manual-settlement-panel span,
.manual-leg-row small {
  color: var(--muted);
  font-size: 10px;
}

.admin-bet-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.manual-badge {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(244, 186, 88, 0.1);
  color: #f4ba58;
  font-size: 9px;
}

.manual-badge.settled {
  background: rgba(42, 225, 139, 0.1);
  color: var(--green);
}

.admin-bet-legs {
  padding: 4px 15px;
}

.admin-bet-leg {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 0;
}

.admin-bet-leg:last-child {
  border-bottom: 0;
}

.admin-bet-leg > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-bet-leg > span:last-child {
  align-items: flex-end;
}

.manual-text {
  color: #f4ba58 !important;
}

.admin-bet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 11px 15px;
  background: rgba(0, 0, 0, 0.1);
}

.admin-bet-footer > div:first-child,
.admin-bet-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-bet-footer > div:first-child {
  color: var(--muted);
  font-size: 10px;
}

.admin-bet-actions button,
.manual-settlement-actions button {
  padding: 7px 10px;
  font-size: 10px;
}

.manual-settlement-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid rgba(244, 186, 88, 0.18);
  padding: 14px 15px;
  background: rgba(244, 186, 88, 0.035);
}

.manual-settlement-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.manual-leg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(0, 0, 0, 0.08);
}

.manual-leg-row > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.manual-leg-row select {
  min-width: 120px;
}

.manual-settlement-note {
  width: 100%;
}

.manual-settlement-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.manual-settlement-actions .primary-button {
  width: auto;
  color: #04120b;
}

.mobile-matches-content,
.mobile-bottom-nav,
.mobile-slip-layer,
.mobile-admin-entry {
  display: none;
}

.bet-slip-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1180px) {
  .matches-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .bet-slip {
    position: static;
    max-height: none;
  }

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

  .admin-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-user-actions {
    justify-content: flex-start;
  }

  .admin-bet-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .admin-status-filters {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .topbar {
    height: auto;
    min-height: 68px;
    padding: 12px 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .topbar-stats {
    gap: 10px;
  }

  .topbar-user {
    gap: 8px;
  }

  .user-menu {
    display: flex;
    max-width: 112px;
  }

  .user-menu strong,
  .user-menu span {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: 100%;
    height: 64px;
    flex-direction: row;
    border-top: 1px solid var(--line);
    border-right: 0;
    padding: 7px;
    background: #0b1711;
  }

  .sidebar button {
    flex: 1;
    justify-content: center;
    padding: 8px;
  }

  .nav-index,
  .sidebar-foot {
    display: none;
  }

  .main-content {
    width: 100%;
    padding: 20px 12px 82px;
  }

  .view-heading,
  .heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .scope-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .compact-table-shell {
    border-radius: 13px;
  }

  .compact-match-table {
    min-width: 1040px;
  }

  .match-pagination {
    flex-wrap: wrap;
  }

  .pagination-total {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .bet-status-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bet-list-toolbar,
  .bet-list-toolbar label,
  .bet-list-toolbar select {
    width: 100%;
  }

  .bet-list-toolbar label {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-status-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-bet-toolbar select,
  .admin-bet-toolbar > button {
    flex: 1;
  }

  .admin-bet-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-bet-badges {
    grid-column: 2;
    justify-content: flex-start;
  }

  .admin-bet-footer,
  .manual-leg-row,
  .manual-settlement-panel > div:first-child {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-bet-footer > div:first-child,
  .admin-bet-actions {
    flex-wrap: wrap;
  }

  .teams-row {
    gap: 8px;
  }

  .match-card-header,
  .match-actions {
    align-items: flex-start;
  }

  .match-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .team {
    width: 38%;
    flex-direction: column;
    text-align: center;
  }

  .away-team {
    flex-direction: column;
  }

  .detail-hero {
    padding-inline: 14px;
  }

  .detail-teams {
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    gap: 6px;
  }

  .detail-team,
  .detail-team.away {
    flex-direction: column;
    justify-content: center;
    font-size: 13px;
    text-align: center;
  }

  .detail-score {
    font-size: 20px;
  }

  .market-tabs {
    top: 68px;
  }

  .detail-options-3,
  .detail-options-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .correct-score-grid {
    gap: 5px;
    padding: 6px;
  }

  .correct-score-heading {
    padding-inline: 7px;
  }

  .correct-score-options {
    gap: 5px;
  }

  .correct-score-options .detail-odd {
    min-height: 38px;
    padding: 8px 7px;
  }

  .correct-score-options .odd-name,
  .correct-score-options .odd-button strong {
    font-size: 10px;
  }

  .team strong {
    font-size: 12px;
  }

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

  .settlement-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .settlement-note span {
    text-align: left;
  }

  .danger-card {
    grid-column: auto;
  }

  .danger-button {
    width: 100%;
    margin: 0;
  }

  .admin-create-grid {
    grid-template-columns: 1fr;
  }

  .admin-create-button {
    width: 100%;
  }

  .login-card {
    padding: 26px 20px;
  }

  .bet-card footer {
    justify-content: space-between;
    gap: 10px;
  }
}

@media (max-width: 820px) {
  :root {
    --mobile-card: #10231b;
    --mobile-tile: #192e25;
    --mobile-tile-strong: #20382d;
  }

  html {
    background: #06110d;
  }

  body {
    background:
      radial-gradient(circle at 50% -10%, rgba(42, 225, 139, 0.12), transparent 32%),
      #06110d;
  }

  body:has(.mobile-slip-layer) {
    overflow: hidden;
  }

  .topbar {
    min-height: 62px;
    padding: 9px 12px;
    background: rgba(6, 17, 13, 0.96);
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
  }

  .brand strong {
    overflow: hidden;
    max-width: 128px;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-user {
    margin-left: auto;
  }

  .topbar-stats > div:first-child {
    align-items: flex-end;
  }

  .topbar-stats span {
    font-size: 9px;
  }

  .topbar-stats strong {
    margin-top: 1px;
    font-size: 12px;
  }

  .logout-button {
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    padding: 0;
    color: transparent;
    font-size: 0;
  }

  .logout-button::before {
    content: "退";
    color: #a7bbb0;
    font-size: 12px;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 12px 8px calc(88px + env(safe-area-inset-bottom));
  }

  .password-warning {
    margin-bottom: 8px;
    border-radius: 9px;
    padding: 9px 10px;
  }

  .matches-layout {
    display: block;
  }

  .matches-heading {
    display: none;
  }

  .desktop-matches-content,
  .desktop-bet-slip {
    display: none;
  }

  .mobile-matches-content,
  .mobile-bottom-nav,
  .mobile-admin-entry {
    display: flex;
  }

  .mobile-matches-content,
  .mobile-matches {
    width: 100%;
    min-width: 0;
    flex-direction: column;
  }

  .mobile-filter-chips {
    position: sticky;
    top: 62px;
    z-index: 35;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    margin: -1px -8px 9px;
    padding: 8px;
    background: rgba(6, 17, 13, 0.96);
    backdrop-filter: blur(16px);
    scrollbar-width: none;
  }

  .mobile-filter-chips::-webkit-scrollbar,
  .mobile-quick-tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-filter-chips button {
    min-height: 34px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    background: #102019;
    color: #9eb0a6;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-filter-chips button.active {
    border-color: var(--green);
    background: var(--green);
    color: #03140b;
  }

  .mobile-filter-chips .mobile-refresh {
    width: 34px;
    padding: 0;
    font-size: 18px;
  }

  .mobile-league-block {
    background: transparent;
  }

  .mobile-league-header {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid rgba(216, 244, 226, 0.11);
    border-radius: 13px;
    padding: 8px 10px;
    background: linear-gradient(90deg, rgba(42, 225, 139, 0.1), rgba(255, 255, 255, 0.018));
    color: inherit;
    cursor: pointer;
    text-align: left;
  }

  .mobile-league-header > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-league-header strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-league-header > span {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
  }

  .mobile-league-header > span i {
    display: inline-block;
    font-style: normal;
    transition: transform 160ms ease;
  }

  .mobile-league-header.collapsed > span i {
    transform: rotate(-90deg);
  }

  .mobile-league-trophy {
    width: 27px;
    height: 27px;
    display: grid;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 8px;
    background: var(--green);
    color: #04120b;
    font-size: 9px;
    font-weight: 900;
  }

  .mobile-match-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
  }

  .mobile-match-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(216, 244, 226, 0.11);
    border-radius: 13px;
    padding: 10px;
    background: var(--mobile-card);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  }

  .mobile-match-card:last-child {
    border-bottom: 1px solid rgba(216, 244, 226, 0.11);
  }

  .mobile-favorite,
  .mobile-all-markets {
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .mobile-favorite {
    width: 27px;
    height: 27px;
    padding: 0;
    color: #60756a;
    font-size: 20px;
    line-height: 1;
  }

  .mobile-favorite.active {
    color: var(--green);
  }

  .mobile-match-status {
    overflow: hidden;
    color: var(--green);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-all-markets {
    flex: 0 0 auto;
    padding: 6px 2px;
    color: #99aea3;
    font-size: 9px;
    white-space: nowrap;
  }

  .mobile-card-grid-head,
  .mobile-card-grid {
    display: grid;
    grid-template-columns: 45px minmax(76px, 1.05fr) repeat(3, minmax(55px, 0.88fr));
    gap: 4px;
  }

  .mobile-card-grid-head {
    align-items: center;
    padding: 0 2px 6px;
    color: #7f9388;
    font-size: 10px;
    text-align: center;
  }

  .mobile-card-grid-head .mobile-grid-spacer {
    grid-column: 1 / 3;
  }

  .mobile-kickoff-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-right: 1px solid rgba(216, 244, 226, 0.1);
    color: #71877c;
    font-size: 9px;
    text-align: center;
  }

  .mobile-kickoff-panel > strong {
    color: #f2f8f4;
    font-size: 13px;
  }

  .mobile-team-panel {
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border: 0;
    border-radius: 8px;
    padding: 2px 5px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    cursor: pointer;
    text-align: left;
  }

  .mobile-team-panel > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-team-panel .team-logo {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border-radius: 50%;
  }

  .mobile-team-panel strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-team-panel .mobile-draw-row {
    justify-content: center;
    color: #dce8e1;
  }

  .mobile-market-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mobile-odd-button,
  .mobile-odd-placeholder {
    min-width: 0;
    min-height: 39px;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 4px 3px;
    background: var(--mobile-tile);
    color: #81968b;
    text-align: center;
  }

  .mobile-odd-button {
    cursor: pointer;
  }

  .mobile-odd-button span {
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-odd-button strong {
    color: #f5faf7;
    font-size: 12px;
  }

  .mobile-odd-button.selected {
    border-color: var(--green);
    background: rgba(42, 225, 139, 0.15);
    box-shadow: inset 0 0 0 1px rgba(42, 225, 139, 0.08);
  }

  .mobile-odd-button.locked {
    opacity: 0.45;
  }

  .mobile-odd-placeholder {
    color: #53675d;
    font-size: 10px;
  }

  .mobile-quick-tabs {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding: 9px 0 0;
    scrollbar-width: none;
  }

  .mobile-quick-tabs button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    border: 1px solid rgba(216, 244, 226, 0.09);
    border-radius: 999px;
    padding: 6px 10px;
    background: #162920;
    color: #a0b1a8;
    cursor: pointer;
    font-size: 9px;
  }

  .mobile-quick-tabs button > span {
    color: #61766c;
    font-size: 10px;
    transition: transform 0.18s ease;
  }

  .mobile-quick-tabs button.active {
    border-color: rgba(42, 225, 139, 0.58);
    background: var(--green);
    color: #03140b;
  }

  .mobile-quick-tabs button.active > span {
    color: #03140b;
    transform: rotate(180deg);
  }

  .mobile-quick-tabs .mobile-all-markets {
    border-color: transparent;
    background: transparent;
    color: #92a69b;
  }

  .mobile-quick-loading,
  .mobile-quick-empty {
    margin-top: 8px;
    border: 1px dashed var(--line);
    border-radius: 9px;
    padding: 14px 10px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
  }

  .mobile-quick-empty button {
    border: 0;
    background: transparent;
    color: var(--green);
    cursor: pointer;
  }

  .mobile-quick-panel {
    margin-top: 8px;
    border: 1px solid rgba(42, 225, 139, 0.13);
    border-radius: 10px;
    padding: 8px;
    background: #0b1b14;
  }

  .mobile-quick-panel-structured {
    padding: 8px 6px 7px;
  }

  .mobile-quick-panel-head,
  .mobile-quick-group header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .mobile-quick-panel-head {
    padding: 1px 2px 8px;
  }

  .mobile-quick-panel-head strong {
    font-size: 11px;
  }

  .mobile-quick-panel-head button {
    border: 0;
    background: transparent;
    color: var(--green);
    cursor: pointer;
    font-size: 9px;
  }

  .mobile-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .mobile-expanded-market-head,
  .mobile-expanded-market-grid {
    display: grid;
    grid-template-columns: minmax(98px, 1.2fr) repeat(3, minmax(55px, 0.88fr));
    gap: 4px;
  }

  .mobile-expanded-market-head {
    align-items: center;
    padding: 0 2px 5px;
    color: #748a7f;
    font-size: 9px;
    text-align: center;
  }

  .mobile-expanded-market-head span:first-child {
    text-align: left;
  }

  .mobile-expanded-teams {
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(3, minmax(39px, 1fr));
    gap: 4px;
  }

  .mobile-expanded-teams > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 7px;
    padding: 5px 7px;
    background: rgba(0, 0, 0, 0.1);
  }

  .mobile-expanded-teams strong {
    overflow: hidden;
    color: #dfeae4;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-expanded-teams small {
    flex: 0 0 auto;
    color: #658076;
    font-size: 8px;
  }

  .mobile-score-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mobile-score-column > strong {
    overflow: hidden;
    padding: 0 3px 2px;
    color: #88a095;
    font-size: 9px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-quick-odd {
    min-width: 0;
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 6px 7px;
    background: var(--mobile-tile);
    color: #8da198;
    cursor: pointer;
  }

  .mobile-quick-odd span {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-quick-odd strong {
    flex: 0 0 auto;
    color: #fff;
    font-size: 10px;
  }

  .mobile-quick-odd.selected {
    border-color: var(--green);
    background: rgba(42, 225, 139, 0.14);
  }

  .mobile-quick-groups {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .mobile-quick-group {
    border-top: 1px solid var(--line);
    padding-top: 7px;
  }

  .mobile-quick-group header {
    margin-bottom: 6px;
    color: #9fb2a8;
    font-size: 9px;
  }

  .mobile-quick-group header span {
    color: #657a70;
  }

  .mobile-quick-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .mobile-pagination {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 5px;
    padding: 12px 2px 2px;
  }

  .mobile-pagination button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 5px;
    background: #102019;
    color: #b2c2b9;
    cursor: pointer;
    font-size: 10px;
  }

  .mobile-pagination button:disabled {
    opacity: 0.35;
  }

  .mobile-pagination span {
    color: #7e9287;
    font-size: 9px;
    text-align: center;
  }

  .mobile-empty-state {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px dashed var(--line);
    border-radius: 13px;
    color: var(--muted);
  }

  .mobile-empty-state strong {
    color: #dfeae4;
  }

  .mobile-empty-state span {
    font-size: 10px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    height: calc(66px + env(safe-area-inset-bottom));
    align-items: flex-start;
    justify-content: space-around;
    border-top: 1px solid rgba(216, 244, 226, 0.1);
    padding: 7px 5px env(safe-area-inset-bottom);
    background: rgba(7, 19, 14, 0.98);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav > button {
    min-width: 54px;
    height: 50px;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: #74897e;
    cursor: pointer;
  }

  .mobile-bottom-nav > button > span {
    font-size: 17px;
    line-height: 1;
  }

  .mobile-bottom-nav > button > strong {
    font-size: 9px;
  }

  .mobile-bottom-nav > button.active {
    color: var(--green);
  }

  .mobile-bottom-nav .mobile-basket-button {
    position: relative;
    top: -17px;
    height: 62px;
    gap: 5px;
  }

  .mobile-basket-button > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 5px solid #07130e;
    border-radius: 50%;
    background: #1a3026;
    color: #95aaa0;
    font-weight: 900;
    box-shadow: 0 -5px 18px rgba(0, 0, 0, 0.28);
  }

  .mobile-basket-button.has-items > span {
    background: var(--green);
    color: #03140b;
    box-shadow: 0 0 24px rgba(42, 225, 139, 0.25);
  }

  .mobile-slip-layer {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: block;
  }

  .mobile-slip-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
  }

  .mobile-slip-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(78vh, 720px);
    overflow-y: auto;
    border: 1px solid rgba(216, 244, 226, 0.12);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    background: #0b1a13;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.5);
  }

  .mobile-bet-slip {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    padding: 18px 16px 20px;
    background: transparent;
    box-shadow: none;
  }

  .mobile-slip-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: #a2b5ab;
    cursor: pointer;
    font-size: 20px;
  }

  .mobile-bet-slip .selection-list {
    max-height: 31vh;
    overflow-y: auto;
  }

  .mobile-admin-entry {
    width: 100%;
    justify-content: center;
    margin-top: 9px;
  }

  .detail-layout .desktop-bet-slip {
    display: none;
  }

  .detail-toolbar {
    margin-bottom: 8px;
  }

  .detail-toolbar button {
    padding: 8px 10px;
    font-size: 10px;
  }

  .detail-hero {
    border-radius: 13px;
    padding: 14px 10px 16px;
  }

  .detail-meta {
    gap: 6px;
    font-size: 9px;
  }

  .detail-teams {
    margin: 17px auto 12px;
  }

  .detail-team .team-logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .market-tabs {
    margin-top: 9px;
    border-radius: 11px;
    padding: 6px;
    scrollbar-width: none;
  }

  .market-tabs::-webkit-scrollbar {
    display: none;
  }

  .market-tabs button {
    padding: 7px 11px;
    font-size: 10px;
  }

  .market-support-note {
    display: none;
  }

  .detail-market-group {
    border-radius: 11px;
  }

  .detail-market-group > header {
    padding: 10px;
  }

  .detail-market-line {
    gap: 5px;
    padding: 6px;
  }

  .content-view > .view-heading {
    margin-bottom: 14px;
  }

  .content-view > .view-heading h1 {
    font-size: 25px;
  }
}
