* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #e4e4e7;
}
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #27272a;
  background: #111;
}
.top h1 {
  margin: 0;
  font-size: 1.15rem;
}
.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.top-actions input {
  background: #18181b;
  border: 1px solid #3f3f46;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 200px;
}
button {
  background: #27272a;
  border: 1px solid #52525b;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
button:hover {
  background: #3f3f46;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid #27272a;
}
.tabs button {
  background: transparent;
  border: none;
  color: #a1a1aa;
}
.tabs button.active {
  background: #fff;
  color: #000;
  font-weight: 700;
}
.content {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.card {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 14px 16px;
}
.card .label {
  color: #a1a1aa;
  font-size: 12px;
}
.card .value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 4px;
}
.card .sub {
  color: #71717a;
  font-size: 11px;
  margin-top: 6px;
}
.note {
  color: #fbbf24;
  font-size: 13px;
  margin-bottom: 16px;
}
.sync-panel {
  margin-bottom: 20px;
}
.sync-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.sync-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sync-note {
  margin: 0 0 12px;
  font-size: 12px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-ok {
  background: #14532d;
  color: #86efac;
}
.badge-warn {
  background: #713f12;
  color: #fde68a;
}
.badge-err {
  background: #7f1d1d;
  color: #fecaca;
}
.badge-muted {
  background: #27272a;
  color: #a1a1aa;
}
.sync-keys {
  margin-top: 12px;
}
.sync-probe-result {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.sync-diagnostics {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.55;
}
.sync-test-actions {
  margin-top: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #27272a;
}
th {
  color: #a1a1aa;
  font-weight: 600;
}
tr:hover td {
  background: #141416;
}
.pos {
  color: #34d399;
}
.neg {
  color: #f87171;
}
.muted {
  color: #71717a;
}
.section-title {
  font-size: 1rem;
  margin: 24px 0 10px;
}
.match-teams {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}
.match-teams-inline {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.match-teams-hero {
  margin-bottom: 16px;
}
.match-teams-plain {
  font-size: 13px;
}
.match-vs {
  color: #71717a;
  font-size: 12px;
  padding: 0 2px;
  flex-shrink: 0;
}
.match-link {
  display: inline-block;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.match-link:hover .team-zh {
  color: #93c5fd;
}
.team-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.team-flag-img {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.team-crest {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}
.team-names {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}
.team-zh {
  font-weight: 700;
  color: #fafafa;
}
.team-en {
  color: #a1a1aa;
  font-size: 12px;
}
.match-cell-id {
  min-width: 220px;
}
.odds-source-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}
.odds-badge-book {
  background: #14532d;
  color: #86efac;
  border: 1px solid #166534;
}
.odds-badge-opening {
  background: #1e3a5f;
  color: #93c5fd;
  border: 1px solid #1d4ed8;
}
.odds-badge-est {
  background: #3f3f46;
  color: #d4d4d8;
  border: 1px solid #52525b;
}
.odds-badge-none {
  background: #451a1a;
  color: #fca5a5;
  border: 1px solid #7f1d1d;
}
.kickoff-dual {
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}
.kickoff-cn {
  color: #e4e4e7;
}
.kickoff-us {
  color: #a1a1aa;
}
.stake-split {
  font-size: 12px;
  line-height: 1.45;
  color: #d4d4d8;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.filters-wrap {
  align-items: center;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #d4d4d8;
}
.filters input,
.filters select {
  background: #18181b;
  border: 1px solid #3f3f46;
  color: #fff;
  padding: 7px 10px;
  border-radius: 8px;
}
.dashboard-match-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.dashboard-match-title {
  margin: 0;
}
.dashboard-match-filters {
  margin-bottom: 0;
}
.dashboard-match-summary {
  margin: 0 0 12px;
  font-size: 13px;
}
.dashboard-match-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.dashboard-match-pagination .btn-sm[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}
.link {
  color: #60a5fa;
  cursor: pointer;
  text-decoration: underline;
}
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #7f1d1d;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  max-width: 360px;
}
.toast.hidden {
  display: none;
}
.loading {
  color: #71717a;
  padding: 40px 0;
  text-align: center;
}
.hidden {
  display: none !important;
}
.login-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
.login-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}
.login-desc {
  color: #71717a;
  font-size: 13px;
  margin-bottom: 20px;
}
.login-card input {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #3f3f46;
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.login-card button {
  width: 100%;
  background: #fff;
  color: #000;
  font-weight: 700;
  padding: 12px;
  border: none;
  border-radius: 10px;
}
.login-error {
  color: #f87171;
  font-size: 13px;
  margin-top: 12px;
}
.badge {
  font-size: 12px;
  color: #a1a1aa;
  padding: 6px 10px;
  border: 1px solid #3f3f46;
  border-radius: 999px;
}
.panel {
  background: #141416;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.danger-panel {
  border-color: #7f1d1d;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #a1a1aa;
}
.form-grid input[type='number'],
.form-grid input:not([type='radio']),
.form-grid textarea {
  background: #0a0a0a;
  border: 1px solid #3f3f46;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: inherit;
  resize: vertical;
}
.form-field-wide {
  grid-column: 1 / -1;
}
.announcement-status {
  margin: 0 0 12px;
  font-size: 13px;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
}
.btn-primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
}
.btn-danger {
  background: #991b1b !important;
  border-color: #991b1b !important;
}
.btn-sm {
  padding: 4px 10px !important;
  font-size: 12px;
}
.toast.ok {
  background: #14532d;
}
