:root {
  --bg: #05060b;
  --surface: #0d0e17;
  --surface-2: #151626;
  --line: rgba(130, 82, 255, 0.34);
  --text: #f6f7f0;
  --muted: #8d90a6;
  --mint: #b8ff2c;
  --amber: #f6dc61;
  --coral: #ff5f86;
  --lilac: #7b4dff;
  --cyan: #68d8f4;
  --danger: #ff4f72;
  --radius: 6px;
  --shadow: 0 24px 70px rgba(35, 16, 90, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(5, 6, 11, 0.78) 46%, rgba(35, 24, 72, 0.3) 74%, rgba(184, 255, 44, 0.16) 100%),
    url("https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=1800&q=80")
      center top / cover fixed,
    var(--bg);
  background-blend-mode: normal, soft-light, normal;
  color: var(--text);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial,
    sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(16, 17, 20, 0.9);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #101114;
  font-weight: 900;
  background: linear-gradient(135deg, var(--mint), var(--amber));
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.mobile-menu-toggle,
.mobile-nav-backdrop {
  display: none;
}

.brand h1,
.topbar h2,
.panel h3,
.hero-copy h3 {
  margin: 0;
  line-height: 1.15;
}

.brand h1 {
  font-size: 19px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost-btn,
.primary-btn,
.secondary-btn,
.danger-btn,
.icon-btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.nav-item {
  justify-content: flex-start;
  width: 100%;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--line);
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--mint);
}

.nav-item svg,
.primary-btn svg,
.secondary-btn svg,
.danger-btn svg,
.ghost-btn svg,
.icon-btn svg,
.search-box svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sync-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sync-card strong,
.sync-card span {
  display: block;
}

.sync-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar h2 {
  font-size: 26px;
}

.top-actions,
.inline-controls,
.hero-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-btn {
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
}

.file-action input {
  display: none;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn {
  padding: 0 14px;
  white-space: nowrap;
}

.primary-btn {
  background: var(--mint);
  color: #101114;
  font-weight: 800;
}

.secondary-btn {
  background: rgba(104, 216, 244, 0.13);
  border-color: rgba(104, 216, 244, 0.24);
}

.danger-btn {
  background: rgba(255, 100, 117, 0.12);
  border-color: rgba(255, 100, 117, 0.3);
}

.ghost-btn {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.hero-band {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 210px;
}

.hero-copy {
  padding: 28px;
  align-self: center;
}

.hero-copy h3 {
  max-width: 740px;
  font-size: 35px;
  margin-bottom: 18px;
}

.hero-pills span,
.status-chip,
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.venue-photo {
  min-height: 210px;
  background:
    linear-gradient(90deg, var(--surface), rgba(23, 25, 31, 0.28)),
    url("https://images.unsplash.com/photo-1461896836934-ffe607ba8211?auto=format&fit=crop&w=900&q=80")
      center / cover;
}

.metric-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

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

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

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 25, 31, 0.92);
}

.metric {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent, var(--mint));
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: 30px;
  line-height: 1;
}

.accent-mint {
  --accent: var(--mint);
}

.accent-amber {
  --accent: var(--amber);
}

.accent-coral {
  --accent: var(--coral);
}

.accent-lilac {
  --accent: var(--lilac);
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head.split {
  align-items: flex-end;
}

.panel h3 {
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.stack-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

textarea {
  min-height: 116px;
  padding: 12px;
  resize: vertical;
}

select option {
  color: #111;
  background: #f6f7f0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(88, 214, 174, 0.15);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}

.switch-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--mint);
}

.event-timeline,
.compact-list,
.vendor-grid,
.event-board,
.system-bars {
  display: grid;
  gap: 10px;
}

.prizes-layout {
  grid-template-columns: 2fr 1fr;
}

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

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

.event-item,
.list-row,
.vendor-item,
.prize-item,
.bar-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.event-item {
  border-left: 3px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  min-height: 120px;
}

.event-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.event-item:nth-child(1) { background: rgba(184, 255, 44, 0.12); border-color: rgba(184, 255, 44, 0.28); border-left-color: var(--mint); }
.event-item:nth-child(1):hover { background: rgba(184, 255, 44, 0.18); border-color: rgba(184, 255, 44, 0.42); box-shadow: 0 8px 30px rgba(184, 255, 44, 0.15); }

.event-item:nth-child(2) { background: rgba(104, 216, 244, 0.12); border-color: rgba(104, 216, 244, 0.28); border-left-color: var(--cyan); }
.event-item:nth-child(2):hover { background: rgba(104, 216, 244, 0.18); border-color: rgba(104, 216, 244, 0.42); box-shadow: 0 8px 30px rgba(104, 216, 244, 0.15); }

.event-item:nth-child(3) { background: rgba(123, 77, 255, 0.12); border-color: rgba(123, 77, 255, 0.28); border-left-color: var(--lilac); }
.event-item:nth-child(3):hover { background: rgba(123, 77, 255, 0.18); border-color: rgba(123, 77, 255, 0.42); box-shadow: 0 8px 30px rgba(123, 77, 255, 0.15); }

.event-item:nth-child(4) { background: rgba(255, 95, 134, 0.12); border-color: rgba(255, 95, 134, 0.28); border-left-color: var(--coral); }
.event-item:nth-child(4):hover { background: rgba(255, 95, 134, 0.18); border-color: rgba(255, 95, 134, 0.42); box-shadow: 0 8px 30px rgba(255, 95, 134, 0.15); }

.event-item:nth-child(5) { background: rgba(246, 220, 97, 0.12); border-color: rgba(246, 220, 97, 0.28); border-left-color: var(--amber); }
.event-item:nth-child(5):hover { background: rgba(246, 220, 97, 0.18); border-color: rgba(246, 220, 97, 0.42); box-shadow: 0 8px 30px rgba(246, 220, 97, 0.15); }

.event-item:nth-child(6) { background: rgba(184, 255, 44, 0.10); border-color: rgba(184, 255, 44, 0.22); border-left-color: var(--mint); }
.event-item:nth-child(6):hover { background: rgba(184, 255, 44, 0.15); border-color: rgba(184, 255, 44, 0.35); box-shadow: 0 8px 30px rgba(184, 255, 44, 0.12); }

.event-item:nth-child(7) { background: rgba(246, 220, 97, 0.10); border-color: rgba(246, 220, 97, 0.22); border-left-color: var(--amber); }
.event-item:nth-child(7):hover { background: rgba(246, 220, 97, 0.15); border-color: rgba(246, 220, 97, 0.35); box-shadow: 0 8px 30px rgba(246, 220, 97, 0.12); }

.event-item:nth-child(8) { background: rgba(104, 216, 244, 0.10); border-color: rgba(104, 216, 244, 0.22); border-left-color: var(--cyan); }
.event-item:nth-child(8):hover { background: rgba(104, 216, 244, 0.15); border-color: rgba(104, 216, 244, 0.35); box-shadow: 0 8px 30px rgba(104, 216, 244, 0.12); }

.event-item:nth-child(9) { background: rgba(255, 95, 134, 0.12); border-color: rgba(255, 95, 134, 0.28); border-left-color: var(--coral); }
.event-item:nth-child(9):hover { background: rgba(255, 95, 134, 0.18); border-color: rgba(255, 95, 134, 0.42); box-shadow: 0 8px 30px rgba(255, 95, 134, 0.15); }

.prize-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
}

.prize-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.prize-item.sold-out {
  opacity: 0.45;
  filter: grayscale(0.7);
}

.prize-item.sold-out:hover {
  transform: none;
  box-shadow: none;
}

.prize-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.prize-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prize-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prize-info strong {
  font-size: 14px;
}

.prize-info small {
  color: var(--muted);
  font-size: 12px;
}

.prize-info .tag {
  align-self: flex-start;
  margin-top: 2px;
}

.product-thumb {
  width: 78px;
  height: 78px;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.selected-prize-preview {
  margin: 14px 0;
  border: 1px solid rgba(88, 214, 174, 0.26);
  border-radius: var(--radius);
  background: rgba(88, 214, 174, 0.08);
  padding: 12px;
}

.prize-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.redeem-list-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.redeem-list-row .product-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.event-item {
  display: grid;
  gap: 10px;
}

.event-item header,
.list-row,
.vendor-item header,
.prize-item header,
.bar-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.event-item strong,
.list-row strong,
.vendor-item strong,
.prize-item strong {
  display: block;
}

.muted,
.event-item small,
.list-row small,
.vendor-item small,
.prize-item small {
  color: var(--muted);
}

.tag.team {
  border-color: rgba(88, 214, 174, 0.36);
  background: rgba(88, 214, 174, 0.12);
}

.tag.personal {
  border-color: rgba(243, 181, 71, 0.36);
  background: rgba(243, 181, 71, 0.12);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--amber));
}

.mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mini-actions button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.035);
}

td {
  color: var(--text);
}

tr:last-child td {
  border-bottom: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
}

.search-box input {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #f6f7f0;
  color: #101114;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 20;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.empty {
  color: var(--muted);
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* X-ARENA inspired event skin */
.sidebar {
  background: rgba(5, 6, 11, 0.92);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.34);
}

.brand-mark {
  color: #05060b;
  background: linear-gradient(135deg, var(--mint) 0 46%, #ffffff 46% 100%);
  transform: skew(-9deg);
}

.brand h1,
.topbar h2,
.panel h3,
.hero-copy h3 {
  font-weight: 900;
  letter-spacing: 0;
}

.nav-item {
  text-transform: uppercase;
  border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(184, 255, 44, 0.14), rgba(123, 77, 255, 0.12));
  border-color: rgba(184, 255, 44, 0.42);
  border-left-color: var(--mint);
  box-shadow: inset 0 0 28px rgba(123, 77, 255, 0.12);
}

.topbar {
  border: 1px solid rgba(123, 77, 255, 0.22);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: rgba(5, 6, 11, 0.62);
}

.hero-band {
  position: relative;
  min-height: 320px;
  border-color: rgba(123, 77, 255, 0.5);
  background:
    linear-gradient(104deg, rgba(5, 6, 11, 0.96) 0 46%, rgba(5, 6, 11, 0.22) 46% 100%),
    url("https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1500&q=85")
      center / cover;
  box-shadow: 0 0 0 1px rgba(184, 255, 44, 0.08), var(--shadow);
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, transparent 52%, rgba(184, 255, 44, 0.28) 53%, transparent 58%),
    linear-gradient(118deg, transparent 67%, rgba(123, 77, 255, 0.52) 68%, transparent 76%);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h3 {
  font-size: 48px;
  max-width: 820px;
  text-shadow: 0 0 28px rgba(123, 77, 255, 0.42);
}

.venue-photo {
  opacity: 0;
}

.panel,
.metric,
.event-item,
.list-row,
.vendor-item,
.prize-item,
.bar-row {
  background: rgba(12, 13, 24, 0.86);
  border-color: rgba(123, 77, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(184, 255, 44, 0.035);
}

.panel {
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), transparent 18%, var(--lilac));
  opacity: 0.72;
}

.primary-btn {
  background: linear-gradient(135deg, var(--mint), #dfff59);
  color: #05060b;
  box-shadow: 0 12px 24px rgba(184, 255, 44, 0.18);
}

.secondary-btn {
  background: rgba(123, 77, 255, 0.2);
  border-color: rgba(123, 77, 255, 0.55);
}

.ghost-btn,
.icon-btn {
  background: rgba(19, 20, 34, 0.9);
  border-color: rgba(123, 77, 255, 0.42);
}

input,
select,
textarea {
  background: rgba(8, 9, 17, 0.88);
  border-color: rgba(123, 77, 255, 0.36);
}

.next-match-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.25fr) auto;
  grid-template-areas: "copy reminder countdown";
  gap: 10px 16px;
  align-items: center;
  border: 1px solid rgba(184, 255, 44, 0.28);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(2, 2, 5, 0.94) 0%, rgba(6, 7, 15, 0.78) 42%, rgba(22, 18, 42, 0.62) 100%),
    linear-gradient(315deg, rgba(184, 255, 44, 0.22) 0%, transparent 42%),
    linear-gradient(135deg, rgba(123, 77, 255, 0.22) 0%, transparent 52%);
}

.next-match-copy {
  grid-area: copy;
}

.next-match-banner strong {
  display: inline-block;
  margin: 0 8px;
  font-size: 22px;
}

.next-match-reminder {
  grid-area: reminder;
  position: relative;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 34px;
  max-width: min(760px, 100%);
  overflow: hidden;
  border: 1px solid rgba(193, 255, 47, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(4, 5, 10, 0.18), rgba(193, 255, 47, 0.08), rgba(4, 5, 10, 0.18));
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.next-match-reminder span {
  display: inline-block;
  min-width: max-content;
  padding: 0 22px;
  color: #f7f8ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(193, 255, 47, 0.22);
  animation: reminderSweep 12s linear infinite;
}

@keyframes reminderSweep {
  0% { opacity: 0; transform: translateX(-120%); }
  12% { opacity: 0.35; }
  45% { opacity: 1; }
  55% { opacity: 1; }
  88% { opacity: 0.35; }
  100% { opacity: 0; transform: translateX(120%); }
}

.countdown {
  color: var(--mint);
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.schedule-controls,
.event-signup,
.loan-split {
  display: grid;
  gap: 10px;
}

.schedule-controls {
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
}

.schedule-controls label,
.schedule-controls input {
  min-width: 0;
}

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

.event-signup input,
.event-signup select,
.event-signup button,
.schedule-controls button {
  min-height: 38px;
  border-radius: var(--radius);
}

.event-signup button,
.schedule-controls button {
  border: 1px solid rgba(184, 255, 44, 0.32);
  background: rgba(184, 255, 44, 0.12);
  color: var(--text);
}

.mini-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-roster span {
  border: 1px solid rgba(123, 77, 255, 0.38);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
}

.loan-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.mini-metric {
  border: 1px solid rgba(123, 77, 255, 0.34);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(5, 6, 11, 0.45);
}

.mini-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mini-metric strong {
  display: block;
  margin-top: 5px;
  color: var(--mint);
  font-size: 22px;
}

.settlement-box {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(184, 255, 44, 0.22);
  border-radius: var(--radius);
  background: rgba(184, 255, 44, 0.06);
}

.compact-head {
  margin-bottom: 12px;
}

.rate-control {
  grid-auto-flow: column;
  grid-auto-columns: auto;
  align-items: center;
}

.rate-control input {
  width: 76px;
}

.loan-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.product-thumb {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.prize-item header {
  align-items: center;
}

.tag {
  border-color: rgba(184, 255, 44, 0.28);
}

@media (max-width: 1120px) {
  .metric-grid,
  .event-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid.two,
  .hero-band {
    grid-template-columns: 1fr;
  }

  .venue-photo {
    min-height: 150px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .nav-item {
    justify-content: center;
    padding: 0 8px;
  }

  .nav-item span {
  font-size: 13px;
}

/* ---- Searchable Select ---- */

.search-select-wrap {
  position: relative;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(123, 77, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(8, 9, 17, 0.95);
  z-index: 100;
}

.search-dropdown.show {
  display: block;
}

.search-option {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  transition: background 0.15s;
}

.search-option:hover {
  background: rgba(123, 77, 255, 0.2);
}

.search-option.muted {
  color: var(--muted);
  cursor: default;
}

/* ---- Reg Overview ---- */

.reg-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(123, 77, 255, 0.2);
  border-radius: var(--radius);
}

.reg-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
}

.reg-table th,
.reg-table td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(123, 77, 255, 0.15);
  font-size: 13px;
}

.reg-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: rgba(12, 13, 24, 0.5);
}

.reg-table td:first-child {
  text-align: left;
}

.reg-table td .tag {
  min-width: 24px;
  text-align: center;
}

.reg-count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(184, 255, 44, 0.44);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(184, 255, 44, 0.12), rgba(104, 216, 244, 0.06)),
    rgba(8, 9, 17, 0.88);
  color: #f6ffd9;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.reg-count-pill:hover {
  border-color: var(--mint);
  box-shadow: 0 0 18px rgba(184, 255, 44, 0.18);
  transform: translateY(-1px);
}

.reg-detail-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.reg-detail-dialog[aria-hidden="true"] {
  display: none !important;
}

.reg-detail-dialog[hidden] {
  display: none !important;
}

.reg-detail-dialog.show {
  display: flex;
}

.reg-detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 80%, rgba(184, 255, 44, 0.08), transparent 34%),
    rgba(3, 4, 9, 0.72);
  backdrop-filter: blur(14px);
}

.reg-detail-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(184, 255, 44, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(26, 22, 50, 0.96), rgba(8, 9, 17, 0.98)),
    rgba(8, 9, 17, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(123, 77, 255, 0.22);
}

.reg-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reg-detail-head h3 {
  margin-top: 4px;
  font-size: 24px;
}

.reg-detail-meta,
.reg-detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reg-detail-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.reg-detail-person {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(123, 77, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.reg-detail-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #05060b;
  font-weight: 900;
}

.reg-detail-person-main strong,
.reg-detail-person-main small {
  display: block;
}

.reg-detail-person-main small {
  margin-top: 3px;
  color: var(--muted);
}

.reg-detail-tags {
  margin-top: 9px;
}

.reg-detail-tags span {
  padding: 4px 9px;
  border: 1px solid rgba(184, 255, 44, 0.24);
  border-radius: 999px;
  color: #efffd1;
  background: rgba(184, 255, 44, 0.08);
  font-size: 12px;
  font-weight: 700;
}

/* ---- Settings ---- */

.settings-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.settings-data-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(123, 77, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(12, 13, 24, 0.5);
}

.setting-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.setting-preview {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---- Checkin ---- */

.checkin-search {
  position: relative;
}

.checkin-card {
  border: 1px solid rgba(184, 255, 44, 0.3);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(184, 255, 44, 0.06);
  text-align: center;
}

.checkin-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.checkin-card small {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.checkin-card.done {
  border-color: rgba(123, 77, 255, 0.3);
  background: rgba(123, 77, 255, 0.06);
}

.checkin-card.warn {
  border-color: rgba(255, 95, 134, 0.3);
  background: rgba(255, 95, 134, 0.06);
}

  .sync-card {
    margin-top: 0;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .panel-head,
  .panel-head.split {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .hero-copy {
    padding: 20px;
  }

  .hero-copy h3 {
    font-size: 26px;
  }

  .metric-grid,
  .event-board,
  .event-main-grid,
  .event-tool-grid,
  .form-grid,
  .schedule-controls,
  .event-signup,
  .loan-summary {
    grid-template-columns: 1fr;
  }

  .next-match-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .countdown {
    font-size: 24px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

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

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

  .panel,
  .metric {
    padding: 14px;
  }

  .top-actions,
  .inline-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .danger-btn,
  .secondary-btn,
  .primary-btn {
    width: 100%;
  }

  .icon-btn {
    width: 100%;
  }

  .redeem-list-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .redeem-list-row .tag {
    grid-column: 2;
    justify-self: start;
  }
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 70vh;
  min-height: 400px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 80%;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg.ai {
  align-self: flex-start;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-msg.ai .chat-avatar {
  background: var(--lilac);
  color: var(--text);
}

.chat-msg.user .chat-avatar {
  background: var(--mint);
  color: #000;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.ai .chat-bubble {
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.chat-msg.user .chat-bubble {
  background: rgba(184, 255, 44, 0.15);
  border: 1px solid rgba(184, 255, 44, 0.3);
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
}

.chat-input-bar input:focus {
  border-color: var(--lilac);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: bounce 1.2s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.employee-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.employee-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  padding: 7px 9px;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.employee-card:hover {
  border-color: var(--lilac);
  background: rgba(123, 77, 255, 0.1);
}

.employee-card.role-player { border-left: 3px solid var(--mint); }
.employee-card.role-referee { border-left: 3px solid var(--coral); }
.employee-card.role-vendor { border-left: 3px solid var(--amber); }
.employee-card.role-host { border-left: 3px solid #ffd700; }
.employee-card.role-mixed { border-left: 3px solid var(--lilac); }

.employee-card strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-card small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-parent {
  position: relative;
}

.nav-arrow {
  margin-left: auto;
  transition: transform 0.25s ease;
  opacity: 0.5;
  font-size: 14px;
  font-style: normal;
}

.nav-arrow::before {
  content: "▾";
}

.nav-parent.active .nav-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-sub {
  display: none;
  padding: 2px 0 6px 14px;
  margin: -4px 0 2px 16px;
  border-left: 1px solid rgba(123, 77, 255, 0.22);
  position: relative;
}

.nav-sub.show {
  display: block !important;
}

.sub-nav-item {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin-bottom: 2px;
  padding: 6px 10px;
  min-height: 30px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.sub-nav-item:hover {
  background: linear-gradient(90deg, rgba(184, 255, 44, 0.08), rgba(123, 77, 255, 0.08));
  color: var(--text);
  border-color: rgba(184, 255, 44, 0.15);
  border-left-color: var(--mint);
}

.sub-nav-item.active {
  background: linear-gradient(90deg, rgba(184, 255, 44, 0.18), rgba(123, 77, 255, 0.2));
  color: var(--mint);
  border-color: rgba(184, 255, 44, 0.35);
  border-left-color: var(--mint);
  box-shadow: inset 0 0 20px rgba(123, 77, 255, 0.12);
  font-weight: 600;
}

/* ---- Event Detail ---- */

.awarded-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.awarded-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid rgba(184, 255, 44, 0.3);
  border-radius: 999px;
  background: rgba(184, 255, 44, 0.1);
  color: var(--text);
}

.awarded-undo {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.awarded-undo:hover {
  opacity: 1;
}

.rank-award-settings {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(123, 77, 255, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(123, 77, 255, 0.12), rgba(184, 255, 44, 0.045)),
    rgba(12, 13, 24, 0.72);
}

.rank-award-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rank-award-settings-head strong,
.rank-award-settings-head small {
  display: block;
}

.rank-award-settings-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rank-award-inputs {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 8px;
}

.rank-award-inputs label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.rank-award-inputs input {
  min-height: 36px;
  padding: 0 10px;
}

.rank-hint {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.event-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 0;
}

.event-tool-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.58fr) minmax(300px, 0.98fr) minmax(420px, 1.34fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.event-tool-grid.is-personal,
.event-tool-grid:has(#randomDrawPanel:not([style*="display: none"])) {
  grid-template-columns:
    minmax(140px, 0.5fr)
    minmax(240px, 0.92fr)
    minmax(180px, 0.62fr)
    minmax(320px, 1.22fr);
}

.event-admin-tools {
  display: contents;
}

.event-tool-card {
  display: flex;
  flex-direction: column;
  height: 276px;
  min-height: 276px;
}

.event-tool-card > .compact-list,
.event-tool-card > #detailRankingControls,
.event-tool-card > .detail-add-player,
.event-tool-card #drawResult {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.event-tool-card .detail-add-player {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.event-tool-card .detail-add-player button {
  grid-column: 1 / -1;
}

.event-tool-card .rank-award-settings {
  margin-bottom: 10px;
  padding: 10px;
}

.event-tool-card .rank-award-inputs {
  grid-template-columns: repeat(5, minmax(54px, 1fr));
}

.referee-slots {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
}

.referee-slot {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(184, 255, 44, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(184, 255, 44, 0.08), rgba(123, 77, 255, 0.1)),
    rgba(8, 9, 17, 0.68);
}

.referee-slot span {
  color: var(--muted);
  font-size: 12px;
}

.referee-slot strong {
  color: var(--text);
  font-size: 16px;
}

.referee-slot small {
  color: var(--muted);
}

.referee-slot.empty-slot {
  border-style: dashed;
  border-color: rgba(123, 77, 255, 0.36);
  background: rgba(8, 9, 17, 0.52);
}

.event-roster-panel,
.event-history-panel {
  min-height: 320px;
}

.event-history-section {
  display: grid;
  gap: 8px;
}

.event-history-section + .event-history-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(123, 77, 255, 0.22);
}

.event-log-row .tag.danger {
  border-color: rgba(255, 95, 134, 0.35);
  color: var(--danger);
}

.compact-history-grid {
  margin-bottom: 10px;
}

.detail-player-section {
  display: grid;
  gap: 8px;
}

.detail-player-section + .detail-player-section {
  margin-top: 14px;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
}

.detail-section-head strong {
  color: var(--text);
  font-size: 14px;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.detail-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(123, 77, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(12, 13, 24, 0.6);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.detail-player-row.played-out {
  border-color: rgba(184, 255, 44, 0.2);
  background:
    linear-gradient(135deg, rgba(184, 255, 44, 0.05), rgba(104, 216, 244, 0.04)),
    rgba(12, 13, 24, 0.54);
}

.detail-player-row:hover {
  border-color: rgba(123, 77, 255, 0.4);
  background: rgba(123, 77, 255, 0.06);
  box-shadow: 0 0 20px rgba(123, 77, 255, 0.08);
}

.detail-player-row strong {
  display: block;
  font-size: 14px;
}

.detail-player-row .muted {
  font-size: 12px;
}

.detail-player-row .rank-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.rank-btns button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(123, 77, 255, 0.3);
  border-radius: var(--radius);
  background: rgba(12, 13, 24, 0.7);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.rank-btns button:hover:not(.used) {
  background: linear-gradient(135deg, var(--mint), #dfff59);
  color: #05060b;
  border-color: var(--mint);
  box-shadow: 0 4px 16px rgba(184, 255, 44, 0.25);
  transform: translateY(-1px);
}

.rank-btns button.used {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(0.5);
}

.rank-btns button.locked,
.rank-btns button.empty-award {
  opacity: 0.46;
  cursor: not-allowed;
  filter: grayscale(0.45);
}

.rank-btns button.won {
  background: linear-gradient(135deg, var(--mint), #dfff59) !important;
  color: #05060b !important;
  border-color: var(--mint) !important;
  box-shadow: 0 4px 16px rgba(184, 255, 44, 0.25);
}

.rank-btns button.notice,
.tiny-action.notice {
  border-color: rgba(104, 216, 244, 0.52);
  background:
    linear-gradient(135deg, rgba(104, 216, 244, 0.2), rgba(123, 77, 255, 0.18)),
    rgba(8, 9, 17, 0.78);
  color: #e8fbff;
}

.rank-btns button.notice:hover,
.tiny-action.notice:hover {
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #05060b;
  border-color: var(--cyan);
}

.detail-player-grid {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
}

.detail-player-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(123, 77, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.detail-player-chip.done {
  border-color: rgba(184, 255, 44, 0.24);
  background: rgba(184, 255, 44, 0.055);
}

.detail-player-chip strong,
.detail-player-chip small {
  display: block;
}

.detail-player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tiny-action {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(123, 77, 255, 0.3);
  border-radius: var(--radius);
  background: rgba(12, 13, 24, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tiny-action:hover:not(:disabled) {
  border-color: rgba(184, 255, 44, 0.42);
  color: var(--text);
  transform: translateY(-1px);
}

.tiny-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.tiny-action.danger {
  border-color: rgba(255, 71, 121, 0.36);
  background: rgba(255, 71, 121, 0.11);
  color: #ffd9e3;
}

.tiny-action.danger:hover:not(:disabled) {
  border-color: rgba(255, 71, 121, 0.62);
  background: rgba(255, 71, 121, 0.18);
  color: #fff4f7;
}

@media (max-width: 760px) {
  .detail-player-row,
  .detail-player-chip {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-player-row .rank-btns,
  .detail-player-actions {
    justify-content: flex-start;
  }

  .rank-award-settings-head {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-award-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .sidebar .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sidebar .nav-item {
    width: 100%;
  }

  .mobile-menu-toggle {
    top: 10px;
    left: 10px;
    width: 42px;
    height: 42px;
  }

  .main {
    padding-top: 64px;
  }
}

/* ---- Global Card & Panel Polish ---- */

.event-item,
.list-row,
.vendor-item,
.bar-row {
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.list-row:hover {
  border-color: rgba(123, 77, 255, 0.5);
  box-shadow: 0 0 16px rgba(123, 77, 255, 0.06);
}

.metric:hover {
  box-shadow:
    0 0 0 1px rgba(184, 255, 44, 0.08),
    var(--shadow);
  transform: translateY(-2px);
}

.metric {
  transition: transform 0.2s, box-shadow 0.2s;
}

.panel {
  transition: box-shadow 0.3s;
}

.panel:hover {
  box-shadow: 0 0 0 1px rgba(123, 77, 255, 0.08), var(--shadow);
}

/* ---- Responsive sub-nav ---- */

@media (max-width: 860px) {
  .nav-sub {
    margin-left: 0;
    padding-left: 10px;
  }
  .sub-nav-item {
    font-size: 12px;
  }
}

/* ---- Random Draw ---- */

.random-draw-controls {
  display: flex;
  gap: 10px;
  align-items: end;
}

.random-draw-controls label {
  flex: 1;
}

.random-draw-controls input {
  max-width: 100px;
}

.random-draw-controls button {
  flex-shrink: 0;
}

.draw-result-card {
  border: 1px solid rgba(184, 255, 44, 0.35);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(184, 255, 44, 0.06);
}

.draw-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.draw-group-card {
  padding: 12px;
  border: 1px solid rgba(104, 216, 244, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(104, 216, 244, 0.09), rgba(123, 77, 255, 0.08)),
    rgba(8, 9, 17, 0.64);
}

.draw-group-card.started {
  border-color: rgba(184, 255, 44, 0.42);
  background:
    linear-gradient(135deg, rgba(184, 255, 44, 0.11), rgba(104, 216, 244, 0.08)),
    rgba(8, 9, 17, 0.7);
}

.draw-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.draw-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tiny-action.start {
  border-color: rgba(184, 255, 44, 0.48);
  background: linear-gradient(135deg, rgba(184, 255, 44, 0.22), rgba(104, 216, 244, 0.12));
  color: #f6ffd9;
}

.tiny-action.start:hover:not(:disabled) {
  border-color: var(--mint);
  box-shadow: 0 0 18px rgba(184, 255, 44, 0.18);
}

.tiny-action.start:disabled {
  color: rgba(246, 255, 217, 0.68);
}

.draw-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.drawn-player {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(184, 255, 44, 0.3);
  border-radius: 999px;
  background: rgba(184, 255, 44, 0.1);
  color: var(--mint);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .draw-groups {
    grid-template-columns: 1fr;
  }

  .draw-group-head {
    align-items: stretch;
    flex-direction: column;
  }

  .draw-group-actions {
    justify-content: stretch;
  }

  .draw-group-actions .tiny-action {
    flex: 1;
  }
}

/* ---- Lock Bar ---- */

.lock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(123, 77, 255, 0.25);
  border-radius: var(--radius);
  background: rgba(12, 13, 24, 0.6);
  flex-wrap: wrap;
}

.lock-icon {
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.lock-inputs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.lock-inputs input {
  width: auto;
  min-width: 160px;
  min-height: 34px;
}

.lock-inputs button {
  min-height: 34px;
  flex-shrink: 0;
}

/* ---- Prize Admin Forms ---- */

.prize-forms-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.prize-form-card {
  border: 1px solid rgba(123, 77, 255, 0.2);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(12, 13, 24, 0.4);
}

/* ---- Silver Stats ---- */

.silver-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.silver-stat {
  border: 1px solid rgba(123, 77, 255, 0.2);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
  background: rgba(12, 13, 24, 0.5);
}

.silver-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.silver-stat strong {
  display: block;
  color: var(--mint);
  font-size: 20px;
}

.silver-stat small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.medalists-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.medalist-tag {
  padding: 6px 12px;
  border: 1px solid rgba(184, 255, 44, 0.3);
  border-radius: 999px;
  background: rgba(184, 255, 44, 0.08);
  color: var(--text);
  font-size: 13px;
}

/* ---- Monitor Tabs ---- */

.monitor-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(123, 77, 255, 0.3);
  margin-bottom: 14px;
}

.monitor-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.monitor-tab:hover {
  color: var(--text);
}

.monitor-tab.active {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

/* ---- Final X-Arena control-room skin ---- */

:root {
  --bg: #05050a;
  --bg-2: #090913;
  --surface: rgba(11, 12, 22, 0.88);
  --surface-2: rgba(22, 18, 41, 0.86);
  --surface-3: rgba(34, 27, 66, 0.58);
  --line: rgba(116, 76, 255, 0.42);
  --line-strong: rgba(186, 255, 36, 0.42);
  --text: #f8f8ff;
  --muted: #9a9aae;
  --mint: #c1ff2f;
  --amber: #ffe16b;
  --coral: #ff5d8d;
  --lilac: #7550ff;
  --violet: #4b22d8;
  --cyan: #59d8ff;
  --danger: #ff4779;
  --radius: 6px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

body {
  background:
    linear-gradient(135deg, rgba(3, 3, 7, 0.96) 0%, rgba(4, 5, 10, 0.9) 34%, rgba(8, 10, 18, 0.74) 68%, rgba(184, 255, 44, 0.16) 100%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.02) 0 22%, transparent 22% 100%),
    url("https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=2200&q=86")
      center top / cover fixed,
    var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Inter, Arial,
    sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(108deg, transparent 0 68%, rgba(116, 76, 255, 0.2) 68% 70%, transparent 70%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 86px
    );
  mix-blend-mode: screen;
  z-index: -1;
}

.app-shell {
  grid-template-columns: 188px minmax(0, 1fr);
}

.sidebar {
  padding: 26px 18px;
  background:
    linear-gradient(180deg, rgba(14, 14, 18, 0.98), rgba(5, 5, 10, 0.94)),
    var(--bg);
  border-right: 1px solid rgba(116, 76, 255, 0.28);
  box-shadow: 18px 0 80px rgba(0, 0, 0, 0.52);
}

.brand {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(116, 76, 255, 0.28);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  color: #05050a;
  background:
    linear-gradient(135deg, var(--mint) 0 46%, #fff 46% 100%);
  box-shadow:
    0 0 0 1px rgba(193, 255, 47, 0.55),
    0 16px 34px rgba(193, 255, 47, 0.2);
  transform: skew(-10deg);
}

.brand-mark,
.brand h1,
.topbar h2,
.hero-copy h3,
.panel h3,
.metric strong,
.countdown {
  font-weight: 900;
}

.brand h1 {
  font-size: 18px;
}

.eyebrow {
  color: #b6adc8;
  font-weight: 800;
}

.nav {
  gap: 7px;
}

.nav-item {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 5px;
  color: #8d8f9e;
  background: transparent;
  text-transform: none;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item svg {
  color: currentColor;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(193, 255, 47, 0.14), rgba(116, 76, 255, 0.14)),
    rgba(255, 255, 255, 0.035);
  border-color: rgba(193, 255, 47, 0.3);
  border-left-color: var(--mint);
  box-shadow:
    inset 0 0 26px rgba(116, 76, 255, 0.16),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

.nav-arrow {
  opacity: 0.7;
}

.nav-arrow::before {
  content: "";
}

.nav-sub {
  margin: -3px 0 3px 19px;
  padding: 4px 0 5px 11px;
  border-left: 1px solid rgba(193, 255, 47, 0.18);
}

.sub-nav-item {
  min-height: 31px;
  color: #85879a;
  text-transform: none;
}

.sub-nav-item.active,
.sub-nav-item:hover {
  color: var(--mint);
  background: rgba(116, 76, 255, 0.15);
  border-color: rgba(193, 255, 47, 0.24);
  border-left-color: var(--mint);
}

.sync-card {
  background:
    linear-gradient(145deg, rgba(116, 76, 255, 0.16), rgba(8, 9, 18, 0.9)),
    rgba(8, 9, 18, 0.88);
  border-color: rgba(116, 76, 255, 0.36);
}

.main {
  padding: 28px;
}

.topbar {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(116, 76, 255, 0.3);
  background:
    linear-gradient(110deg, rgba(8, 8, 14, 0.84), rgba(28, 18, 62, 0.42)),
    rgba(6, 6, 11, 0.8);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

.topbar h2 {
  font-size: 24px;
}

.icon-btn,
.ghost-btn,
.secondary-btn,
.danger-btn,
.primary-btn,
.mini-actions button,
.schedule-controls button,
.monitor-tab {
  border-radius: 5px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--mint), #eeff62);
  color: #05050a;
  border-color: rgba(193, 255, 47, 0.8);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 12px 26px rgba(193, 255, 47, 0.22);
}

.secondary-btn {
  background: linear-gradient(135deg, rgba(116, 76, 255, 0.3), rgba(58, 26, 167, 0.54));
  border-color: rgba(116, 76, 255, 0.64);
}

.ghost-btn,
.icon-btn {
  background: rgba(10, 10, 18, 0.72);
  border-color: rgba(116, 76, 255, 0.42);
  color: #d7d7e8;
}

.danger-btn {
  background: rgba(255, 71, 121, 0.13);
  border-color: rgba(255, 71, 121, 0.38);
  color: #ffd9e3;
}

.view.active {
  gap: 18px;
}

.next-match-banner {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  border-color: rgba(193, 255, 47, 0.44);
  background:
    linear-gradient(100deg, rgba(193, 255, 47, 0.17), rgba(116, 76, 255, 0.24) 48%, rgba(6, 6, 12, 0.85)),
    rgba(10, 10, 18, 0.88);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.next-match-banner::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 36%;
  background: linear-gradient(118deg, transparent 20%, rgba(193, 255, 47, 0.26) 21% 30%, transparent 31%);
  pointer-events: none;
}

.next-match-banner strong {
  font-size: 24px;
}

.countdown {
  color: var(--mint);
  font-size: 30px;
  text-shadow: 0 0 24px rgba(193, 255, 47, 0.28);
}

.hero-band {
  position: relative;
  display: block;
  min-height: 360px;
  border: 1px solid rgba(116, 76, 255, 0.56);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(104deg, rgba(5, 5, 10, 0.96) 0 42%, rgba(5, 5, 10, 0.54) 42% 100%),
    linear-gradient(125deg, transparent 0 62%, rgba(193, 255, 47, 0.3) 62% 66%, transparent 66%),
    url("https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1800&q=86")
      center / cover;
  box-shadow:
    0 0 0 1px rgba(193, 255, 47, 0.1),
    0 34px 90px rgba(0, 0, 0, 0.48);
}

.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg, transparent 0 46%, rgba(116, 76, 255, 0.46) 46% 52%, transparent 52% 100%),
    linear-gradient(130deg, transparent 0 72%, rgba(193, 255, 47, 0.42) 72% 76%, transparent 76% 100%);
  pointer-events: none;
}

.hero-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 6, 12, 0.08) 18%, rgba(5, 6, 12, 0.48) 100%);
  pointer-events: none;
}

.hero-band.hero-fade-in {
  animation: heroFade 0.72s ease both;
}

@keyframes heroFade {
  from { filter: brightness(0.78); }
  to { filter: brightness(1); }
}

.hero-carousel-nav {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(460px, calc(100% - 44px));
  transform: translateX(-50%);
}

.hero-carousel-nav button {
  height: 8px;
  padding: 0;
  border: 1px solid rgba(193, 255, 47, 0.22);
  border-radius: 999px;
  background: rgba(8, 9, 17, 0.74);
  overflow: hidden;
}

.hero-carousel-nav button span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--mint), var(--amber));
  transition: transform 0.25s ease;
}

.hero-carousel-nav button.active {
  border-color: rgba(193, 255, 47, 0.72);
  box-shadow: 0 0 20px rgba(193, 255, 47, 0.16);
}

.hero-carousel-nav button.active span {
  transform: scaleX(1);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 44px 42px 52px;
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: var(--text);
  background: linear-gradient(90deg, var(--violet), var(--lilac));
  border-left: 8px solid var(--mint);
}

.hero-copy h3 {
  margin-top: 18px;
  margin-bottom: 24px;
  font-size: 52px;
  line-height: 1.02;
  text-shadow:
    0 0 34px rgba(116, 76, 255, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.52);
}

.hero-pills span,
.status-chip,
.tag {
  border-color: rgba(193, 255, 47, 0.26);
  background: rgba(9, 10, 18, 0.72);
  color: #f2f2ff;
}

.hero-pills span:first-child,
.tag.active {
  color: #05050a;
  background: var(--mint);
  border-color: var(--mint);
}

.venue-photo {
  display: none;
}

.panel,
.metric,
.event-item,
.list-row,
.vendor-item,
.bar-row,
.monitor-panel,
.prize-form-card,
.setting-row,
.mini-metric,
.silver-stat {
  border: 1px solid rgba(116, 76, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(24, 20, 44, 0.78), rgba(9, 10, 18, 0.84)),
    rgba(9, 10, 18, 0.86);
  box-shadow: 0 0 0 1px rgba(193, 255, 47, 0.035);
}

.panel {
  border-radius: 8px;
  padding: 18px;
}

.panel::before {
  height: 3px;
  background: linear-gradient(90deg, var(--mint), rgba(116, 76, 255, 0.85) 38%, transparent);
}

.panel-head {
  min-width: 0;
}

.panel h3 {
  font-size: 21px;
}

.metric {
  min-height: 128px;
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(116, 76, 255, 0.18), rgba(10, 10, 18, 0.9)),
    rgba(10, 10, 18, 0.88);
}

.metric strong {
  color: #fff;
  font-size: 34px;
}

.metric::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -24px;
  width: 80px;
  height: 140px;
  transform: rotate(24deg);
  background: linear-gradient(180deg, rgba(193, 255, 47, 0.16), transparent);
}

label {
  color: #b5b5c6;
  font-weight: 700;
}

input,
select,
textarea {
  min-height: 44px;
  border-color: rgba(116, 76, 255, 0.42);
  background: rgba(5, 6, 12, 0.92);
  color: var(--text);
}

textarea {
  line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow:
    0 0 0 3px rgba(193, 255, 47, 0.12),
    0 0 26px rgba(116, 76, 255, 0.24);
}

.form-grid {
  gap: 14px;
}

.stack-form {
  border-top-color: rgba(116, 76, 255, 0.26);
}

.search-select-wrap,
.checkin-search {
  position: relative;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(116, 76, 255, 0.5);
  border-radius: 6px;
  background: rgba(7, 8, 15, 0.98);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.48);
  z-index: 100;
}

.search-dropdown.show {
  display: block;
}

.search-option {
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
}

.search-option:hover {
  background: rgba(116, 76, 255, 0.22);
}

.search-option.muted {
  color: var(--muted);
  cursor: default;
}

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

.event-item {
  min-height: 178px;
  padding: 14px;
  border-radius: 7px;
  border-left-width: 4px;
  background:
    linear-gradient(135deg, rgba(1, 2, 7, 0.93) 0%, rgba(5, 6, 13, 0.86) 44%, rgba(37, 29, 65, 0.62) 100%),
    linear-gradient(24deg, rgba(2, 3, 9, 0.78) 0%, rgba(2, 3, 9, 0.54) 56%, rgba(193, 255, 47, 0.14) 100%),
    rgba(9, 10, 18, 0.86);
  background-blend-mode: normal, multiply, normal;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.62);
}

.event-item.has-rule-editor {
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, 0.75fr);
  align-items: stretch;
}

.event-card-main,
.event-rule-editor,
.event-rule-view {
  min-width: 0;
}

.event-card-main {
  display: grid;
  gap: 10px;
}

.event-item header {
  align-items: flex-start;
}

.event-item strong {
  font-size: 18px;
}

.event-item small,
.event-item .muted {
  color: rgba(242, 244, 255, 0.84);
}

.event-item .tag {
  background: rgba(4, 5, 10, 0.72);
  border-color: rgba(193, 255, 47, 0.32);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.event-rule-view,
.detail-rule-full,
.detail-rule-compact {
  border: 1px solid rgba(193, 255, 47, 0.24);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(4, 5, 10, 0.7), rgba(20, 15, 42, 0.58)),
    rgba(4, 5, 10, 0.62);
}

.detail-rule-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 12px;
  margin-bottom: 14px;
}

.event-rule-view {
  margin-top: 2px;
  padding: 10px;
}

.event-rule-view span,
.detail-rule-full span {
  display: block;
  margin-bottom: 6px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.event-rule-view p,
.detail-rule-full p {
  margin: 0;
  color: rgba(246, 248, 255, 0.9);
  font-size: 13px;
  line-height: 1.55;
}

.event-rule-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(193, 255, 47, 0.26);
  border-radius: 6px;
  background: rgba(4, 5, 10, 0.58);
}

.event-rule-editor label,
.detail-rule-compact label {
  gap: 6px;
}

.event-rule-editor textarea,
.detail-rule-compact textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.45;
}

.event-rule-editor button,
.detail-rule-compact button {
  min-height: 36px;
  border: 1px solid rgba(193, 255, 47, 0.32);
  border-radius: 5px;
  background: rgba(193, 255, 47, 0.12);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.detail-rule-full {
  margin-bottom: 14px;
  padding: 14px;
}

.detail-rule-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
}

.detail-add-player {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.detail-add-player label,
.detail-add-player input {
  min-width: 0;
}

.events-lock-bar {
  justify-content: space-between;
}

.events-admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.events-admin-toolbar label {
  min-width: 142px;
}

.events-admin-toolbar input {
  min-height: 38px;
}

.schedule-controls {
  grid-template-columns: minmax(120px, 1.2fr) minmax(86px, 0.85fr) minmax(86px, 0.85fr) minmax(58px, auto);
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(116, 76, 255, 0.22);
  border-radius: 6px;
  background: rgba(5, 6, 12, 0.42);
}

.schedule-controls label {
  gap: 5px;
}

.schedule-controls input,
.schedule-controls button {
  min-height: 38px;
}

.schedule-controls input {
  width: 100%;
}

.schedule-controls button {
  padding: 0 12px;
  white-space: nowrap;
}

.event-timeline .event-item {
  min-height: 112px;
}

.prizes-layout {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
}

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

.prize-item {
  position: relative;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(27, 21, 52, 0.76), rgba(8, 9, 17, 0.95)),
    rgba(8, 9, 17, 0.9);
  overflow: hidden;
}

.prize-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--mint), var(--lilac));
}

.prize-img-wrap {
  aspect-ratio: 16 / 11;
  background: #0a0a12;
  position: relative;
}

.prize-img-wrap img {
  transform: scale(1.01);
  transition: transform 0.3s ease;
}

.prize-item:hover .prize-img-wrap img {
  transform: scale(1.06);
}

.prize-info {
  padding: 12px;
  gap: 7px;
}

.prize-info strong {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.prize-info small {
  color: var(--mint);
  font-weight: 800;
}

.prize-info strong span,
.prize-tier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  white-space: nowrap;
}

.prize-tier-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  color: #06070c;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.tier-diamond .prize-tier-badge,
.tier-diamond .prize-info strong span {
  background: linear-gradient(135deg, #8ee8ff, #f6fbff);
  color: #061019;
}

.tier-gold .prize-tier-badge,
.tier-gold .prize-info strong span {
  background: linear-gradient(135deg, #ffe17a, #fff4b6);
  color: #1b1400;
}

.tier-silver .prize-tier-badge,
.tier-silver .prize-info strong span {
  background: linear-gradient(135deg, #dce5ef, #ffffff);
  color: #121823;
}

.tier-bronze .prize-tier-badge,
.tier-bronze .prize-info strong span {
  background: linear-gradient(135deg, #d98d50, #ffc08a);
  color: #1e0d00;
}

.tier-basic .prize-tier-badge,
.tier-basic .prize-info strong span {
  background: linear-gradient(135deg, var(--mint), #ecff9f);
  color: #071006;
}

.selected-prize-preview {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-color: rgba(193, 255, 47, 0.28);
  background: rgba(193, 255, 47, 0.07);
}

.product-preview-media {
  position: relative;
  width: 82px;
  height: 82px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.product-preview-media .product-thumb {
  width: 100%;
  height: 100%;
}

.product-preview-media .prize-tier-badge {
  top: 6px;
  left: 6px;
  min-height: 19px;
  padding: 0 7px;
  font-size: 10px;
}

.product-thumb {
  width: 82px;
  height: 82px;
  border-color: rgba(193, 255, 47, 0.24);
}

.redeem-list-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.redeem-list-row .product-thumb {
  width: 48px;
  height: 48px;
}

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

.mini-metric {
  min-height: 88px;
  padding: 14px;
}

.mini-metric strong {
  color: var(--mint);
  font-size: 24px;
}

.employee-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.employee-card {
  min-height: 42px;
  padding: 10px 12px;
}

.employee-card strong {
  font-size: 13px;
}

.employee-card small {
  font-size: 11px;
}

.employee-card {
  min-height: 54px;
  border-color: rgba(116, 76, 255, 0.28);
  background: rgba(8, 9, 17, 0.68);
}

.table-wrap {
  border-color: rgba(116, 76, 255, 0.32);
  background: rgba(5, 6, 12, 0.45);
}

th {
  background: rgba(116, 76, 255, 0.16);
  color: #bdbad1;
}

td,
th {
  border-bottom-color: rgba(116, 76, 255, 0.18);
}

.monitor-tabs {
  gap: 8px;
  border-bottom: 0;
}

.monitor-tab {
  border: 1px solid rgba(116, 76, 255, 0.3);
  background: rgba(8, 9, 17, 0.66);
}

.monitor-tab.active {
  color: #05050a;
  background: var(--mint);
  border-color: var(--mint);
}

.setting-row {
  align-items: center;
}

.setting-upload {
  min-width: 0;
}

.setting-preview {
  width: 76px;
  height: 46px;
}

.checkin-card {
  border-color: rgba(193, 255, 47, 0.34);
  background: rgba(193, 255, 47, 0.07);
}

.lock-bar {
  border-color: rgba(116, 76, 255, 0.34);
  background: rgba(8, 9, 17, 0.72);
}

.lock-inputs {
  min-width: 0;
}

.toast {
  background: linear-gradient(135deg, var(--mint), #fff36d);
  color: #05050a;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .metric-grid,
  .event-board,
  .prize-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-tool-grid,
  .event-tool-grid.is-personal,
  .event-tool-grid:has(#randomDrawPanel:not([style*="display: none"])) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prizes-layout,
  .content-grid.two {
    grid-template-columns: 1fr;
  }

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

  .hero-copy h3 {
    font-size: 42px;
  }
}

@media (max-width: 860px) {
  body {
    background-attachment: scroll;
  }

  .app-shell {
    display: block;
  }

  .mobile-menu-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 80;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(193, 255, 47, 0.52);
    border-radius: 5px;
    background:
      linear-gradient(135deg, var(--mint) 0 46%, #fff 46% 100%);
    color: #05050a;
    font-weight: 900;
    box-shadow:
      0 0 0 1px rgba(5, 5, 10, 0.5),
      0 16px 34px rgba(0, 0, 0, 0.42),
      0 0 32px rgba(193, 255, 47, 0.22);
    transform: skew(-10deg);
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 58;
    display: block;
    border: 0;
    background: rgba(2, 3, 8, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 70;
    width: min(82vw, 300px);
    height: 100vh;
    height: 100dvh;
    padding: 74px 16px 18px;
    overflow-y: auto;
    border-right: 1px solid rgba(193, 255, 47, 0.26);
    border-bottom: 0;
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.24s ease;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.52);
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    padding-bottom: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .nav {
    display: grid;
    gap: 7px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-item {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    min-height: 44px;
  }

  .nav-sub {
    display: none;
    margin: -2px 0 6px 19px;
    padding: 4px 0 5px 11px;
  }

  .nav-sub.show {
    display: grid !important;
    gap: 3px;
  }

  .nav-parent.expanded .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
  }

  .sync-card {
    display: block;
    margin-top: 14px;
  }

  .main {
    padding: 70px 14px 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 44px 44px minmax(0, 1fr);
  }

  .hero-band {
    min-height: 300px;
  }

  .hero-copy {
    padding: 28px 20px 42px;
  }

  .hero-copy h3 {
    font-size: 32px;
    line-height: 1.1;
  }

  .reg-detail-dialog {
    padding: 14px;
    align-items: flex-end;
  }

  .reg-detail-card {
    max-height: calc(100vh - 28px);
    padding: 18px;
  }

  .reg-detail-head h3 {
    font-size: 20px;
  }

  .metric-grid,
  .event-board,
  .event-main-grid,
  .event-tool-grid,
  .event-tool-grid.is-personal,
  .event-tool-grid:has(#randomDrawPanel:not([style*="display: none"])),
  .form-grid,
  .schedule-controls,
  .event-signup,
  .loan-summary,
  .silver-stats-grid,
  .employee-card-grid,
  .prize-forms-row {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .panel-head.split {
    align-items: stretch;
    flex-direction: column;
  }

  .next-match-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .next-match-banner strong {
    display: block;
    margin: 6px 0 0;
  }

  .countdown {
    font-size: 26px;
  }

  .lock-inputs,
  .random-draw-controls,
  .detail-add-player,
  .events-admin-toolbar {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .lock-inputs input,
  .random-draw-controls input,
  .events-admin-toolbar input {
    width: 100%;
    max-width: none;
  }

  .detail-add-player,
  .event-tool-card .detail-add-player {
    grid-template-columns: 1fr;
  }

  .event-tool-card .detail-add-player {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-tool-card .rank-award-inputs {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .events-admin-toolbar {
    margin-left: 0;
  }

  .events-admin-toolbar label {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .brand h1 {
    font-size: 16px;
  }

  .brand .eyebrow {
    font-size: 11px;
  }

  .nav-item {
    min-width: 104px;
    padding: 0 9px;
  }

  .nav-item span {
    font-size: 12px;
  }

  .sidebar .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sidebar .nav-item {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
  }

  .panel,
  .metric {
    padding: 14px;
  }

  .hero-copy h3 {
    font-size: 28px;
  }

  .hero-pills {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .selected-prize-preview,
  .redeem-list-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .redeem-list-row .tag {
    grid-column: 2;
    justify-self: start;
  }

  .product-thumb,
  .redeem-list-row .product-thumb {
    width: 58px;
    height: 58px;
  }

  .setting-row,
  .setting-upload {
    align-items: stretch;
    flex-direction: column;
  }

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

.reg-request-card .request-status-line { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.reg-request-card.has-conflict { border-color: rgba(255,95,134,0.34); }
.conflict-note { color: #ffd3dd; font-size: 12px; }
.tag.conflict { border-color: rgba(255,95,134,0.34); background: rgba(255,95,134,0.12); color: #ffd3dd; }
.tag.ok { border-color: rgba(184,255,44,0.34); background: rgba(184,255,44,0.12); color: #f5ffd2; }
.reg-assign-summary { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:10px 0 12px; }
.reg-team-summary { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:10px; margin-bottom:12px; }
.reg-team-card { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:10px 12px; border:1px solid rgba(184,255,44,0.22); border-radius:6px; background: rgba(184,255,44,0.07); }
.reg-team-card.has-conflict { border-color: rgba(255,95,134,0.34); background: rgba(255,95,134,0.08); }
.reg-team-card strong { display:block; font-size:13px; }
.reg-team-card small { display:block; margin-top:3px; color: var(--muted); }
.reg-team-card button { min-height:32px; border:1px solid rgba(184,255,44,0.38); border-radius:5px; background: rgba(184,255,44,0.12); color:#f5ffd2; white-space:nowrap; }
.reg-team-card button:disabled { opacity:0.42; cursor:not-allowed; filter: grayscale(0.6); }

.dialog-open {
  overflow: hidden;
}

.system-dialog {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.system-dialog.show {
  pointer-events: auto;
  opacity: 1;
}

.system-dialog-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 78%, rgba(184, 255, 44, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(2, 3, 7, 0.9), rgba(8, 9, 16, 0.76));
  backdrop-filter: blur(14px);
}

.system-dialog-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(21, 22, 38, 0.96), rgba(8, 9, 18, 0.98)),
    var(--surface);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(184, 255, 44, 0.08) inset;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s ease;
}

.system-dialog.show .system-dialog-card {
  transform: translateY(0) scale(1);
}

.system-dialog-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 95, 134, 0.38);
  border-radius: 8px;
  color: #ffd3dd;
  background:
    linear-gradient(135deg, rgba(255, 95, 134, 0.24), rgba(246, 220, 97, 0.08));
  box-shadow: 0 18px 44px rgba(255, 95, 134, 0.12);
}

.system-dialog-mark svg {
  width: 25px;
  height: 25px;
}

.system-dialog-copy {
  min-width: 0;
  padding-right: 28px;
}

.system-dialog-kicker {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0;
}

.system-dialog-copy h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.system-dialog-copy p:last-child {
  margin: 10px 0 0;
  color: #cfd1e5;
  line-height: 1.65;
}

.system-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.system-dialog-close:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
}

.system-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.system-dialog-actions .secondary-btn,
.system-dialog-actions .danger-btn {
  min-width: 108px;
}

@media (max-width: 760px) {
  .next-match-banner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "reminder"
      "countdown";
  }

  .next-match-reminder {
    justify-self: stretch;
    max-width: 100%;
  }

  .next-match-reminder span {
    animation-duration: 10s;
  }

  .system-dialog {
    align-items: end;
    padding: 14px;
  }

  .system-dialog-card {
    width: 100%;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }

  .system-dialog-mark {
    width: 44px;
    height: 44px;
  }

  .system-dialog-copy h3 {
    font-size: 18px;
  }

  .system-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
