:root {
  color-scheme: dark;
  --bg: #12110e;
  --panel: #1d1d18;
  --panel-2: #26271f;
  --ink: #f7f4e8;
  --muted: #aaa590;
  --line: rgba(247, 244, 232, 0.13);
  --gold: #f2c14e;
  --green: #32c77a;
  --red: #f05d5e;
  --violet: #8a6df1;
  --black: #080806;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

/* Extra polish: motion, depth, live betting states */
:root {
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --bg: #15140f;
  --panel: #24241d;
  --panel-2: #303126;
  --line: rgba(247, 244, 232, 0.18);
  --muted: #c3bda8;
}

.sidebar {
  background: rgba(21, 20, 15, 0.9);
}

.card,
.modal {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 38%),
    var(--panel);
}

.hero-strip {
  background:
    linear-gradient(120deg, rgba(242, 193, 78, 0.2), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--panel);
}

.event-card h3,
.coupon-card h3,
.group-card h3,
.section-title h2,
.hero-strip h2 {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38);
}

.muted,
.empty,
.meta {
  color: var(--muted);
}

body {
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

body::before {
  top: -18vw;
  right: -12vw;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.2), transparent 62%);
  animation: driftGlow 14s ease-in-out infinite alternate;
}

body::after {
  left: -18vw;
  bottom: -20vw;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(50, 199, 122, 0.13), transparent 64%);
  animation: driftGlow 18s ease-in-out infinite alternate-reverse;
}

.app-shell {
  animation: shellIn 420ms var(--ease) both;
}

button {
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    box-shadow 180ms var(--ease),
    filter 180ms var(--ease);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.brand-mark {
  box-shadow: 0 0 0 6px rgba(242, 193, 78, 0.08), 0 14px 28px rgba(242, 193, 78, 0.12);
  animation: markPulse 3.6s ease-in-out infinite;
}

.nav button.active,
.chip.active,
.mobile-nav button.active {
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.13), 0 10px 26px rgba(242, 193, 78, 0.06);
}

.balance {
  animation: balanceIn 360ms var(--ease) both;
}

.hero-strip {
  position: relative;
  overflow: hidden;
}

.hero-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 36%, rgba(255, 255, 255, 0.08) 48%, transparent 60%);
  transform: translateX(-120%);
  animation: sheen 6.4s ease-in-out infinite;
}

.hero-strip > * {
  position: relative;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.metric-pill,
.deadline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.metric-pill strong {
  color: var(--ink);
}

.deadline.soon {
  border-color: rgba(240, 93, 94, 0.58);
  background: rgba(240, 93, 94, 0.12);
  color: #ffb4b4;
  animation: softPulse 1.2s ease-in-out infinite;
}

.deadline.closed {
  color: #ffb4b4;
  border-color: rgba(240, 93, 94, 0.4);
}

.ticket-visual {
  position: relative;
  overflow: hidden;
}

.ticket-visual::before,
.ticket-visual::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 8px;
}

.ticket-visual::before {
  border: 1px solid rgba(242, 193, 78, 0.22);
}

.ticket-visual::after {
  width: 44%;
  background: linear-gradient(90deg, transparent, rgba(242, 193, 78, 0.23), transparent);
  transform: translateX(-150%);
  animation: ticketScan 3.4s linear infinite;
}

.card {
  position: relative;
  overflow: hidden;
  animation: cardIn 360ms var(--ease) both;
  transition:
    transform 190ms var(--ease),
    border-color 190ms var(--ease),
    box-shadow 190ms var(--ease),
    background 190ms var(--ease);
}

.card:hover {
  border-color: rgba(242, 193, 78, 0.24);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px);
}

.event-card::before,
.coupon-card::before,
.group-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--gold), rgba(50, 199, 122, 0.92));
  opacity: 0.8;
}

.event-card.soon::before {
  background: linear-gradient(var(--red), var(--gold));
  animation: urgentBar 850ms ease-in-out infinite alternate;
}

.event-card.next-up {
  border-color: rgba(242, 193, 78, 0.38);
  box-shadow: 0 24px 68px rgba(242, 193, 78, 0.08), var(--shadow);
}

.deadline.next {
  border-color: rgba(50, 199, 122, 0.48);
  background: rgba(50, 199, 122, 0.12);
  color: var(--green);
}

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

.odd::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(242, 193, 78, 0.2), transparent 34%);
  opacity: 0;
  transition: opacity 180ms var(--ease);
}

.odd:hover:not(:disabled) {
  border-color: rgba(242, 193, 78, 0.55);
  background: #303124;
  box-shadow: 0 12px 30px rgba(242, 193, 78, 0.08);
}

.odd:hover:not(:disabled)::after,
.odd.selected::after {
  opacity: 1;
}

.odd.selected {
  border-color: rgba(242, 193, 78, 0.85);
  background: rgba(242, 193, 78, 0.13);
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.15), 0 10px 30px rgba(242, 193, 78, 0.11);
}

.odd span,
.odd strong {
  position: relative;
  z-index: 1;
}

.primary {
  box-shadow: 0 14px 28px rgba(242, 193, 78, 0.12);
}

.primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 18px 36px rgba(242, 193, 78, 0.18);
}

.slip-leg,
.member-row,
.leader-row,
.comment-row {
  animation: itemIn 240ms var(--ease) both;
}

.slip-leg:hover,
.member-row:hover,
.leader-row:hover {
  border-color: rgba(242, 193, 78, 0.28);
  background: rgba(255, 255, 255, 0.065);
}

.status.live {
  position: relative;
  padding-left: 16px;
}

.status.live::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(50, 199, 122, 0.5);
  animation: liveDot 1.4s ease-out infinite;
}

.modal-backdrop {
  animation: fadeIn 180ms ease both;
}

.modal {
  animation: modalIn 240ms var(--ease) both;
}

.toast {
  animation: toastIn 220ms var(--ease) both;
}

@keyframes shellIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes itemIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheen {
  0%,
  56% {
    transform: translateX(-120%);
  }
  76%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes ticketScan {
  to {
    transform: translateX(260%);
  }
}

@keyframes driftGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-4vw, 3vw, 0) scale(1.1);
  }
}

@keyframes markPulse {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(242, 193, 78, 0.08), 0 14px 28px rgba(242, 193, 78, 0.12);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(242, 193, 78, 0.03), 0 18px 34px rgba(242, 193, 78, 0.18);
  }
}

@keyframes liveDot {
  to {
    box-shadow: 0 0 0 9px rgba(50, 199, 122, 0);
  }
}

@keyframes urgentBar {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@keyframes softPulse {
  50% {
    transform: scale(1.02);
  }
}

@keyframes balanceIn {
  from {
    filter: brightness(1.3);
  }
  to {
    filter: brightness(1);
  }
}

@keyframes pillIn {
  from {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(242, 193, 78, 0.08), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(50, 199, 122, 0.1), transparent 28%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-color: var(--line);
  background: rgba(18, 17, 14, 0.82);
  backdrop-filter: blur(18px);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: #151006;
  font-weight: 950;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.brand span,
.muted,
.empty,
.meta {
  color: var(--muted);
}

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

.nav button,
.chip,
.ghost,
.icon-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  font-weight: 800;
}

.nav button.active,
.chip.active {
  border-color: rgba(242, 193, 78, 0.65);
  background: rgba(242, 193, 78, 0.15);
  color: var(--gold);
}

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

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.mobile-brand {
  display: none;
}

.group-select {
  min-width: 210px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 10px;
}

.balance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(242, 193, 78, 0.16), transparent),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-strip h2,
.section-title h2 {
  margin: 0;
  font-size: 22px;
}

.ticket-visual {
  min-height: 96px;
  border: 1px dashed rgba(242, 193, 78, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(242, 193, 78, 0.22) 46% 54%, transparent 54%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 9px, transparent 9px 18px),
    #171712;
}

.section-title,
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  justify-content: space-between;
  margin: 18px 0 10px;
}

.badge {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 14px;
}

.event-card h3,
.coupon-card h3,
.group-card h3 {
  margin: 0;
  font-size: 17px;
}

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

.market.multi {
  grid-template-columns: 1fr;
}

.pricing-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.pricing-line strong {
  color: var(--gold);
}

.odd {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  min-height: 52px;
  border: 1px solid rgba(242, 193, 78, 0.18);
  background: var(--panel-2);
  color: var(--ink);
  padding: 8px 10px;
}

.odd > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}

.odd strong,
.gold {
  color: var(--gold);
}

.odd-price {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  text-align: right;
}

.odd small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: normal;
}

.odd.hot {
  border-color: rgba(50, 199, 122, 0.58);
}

.odd.hot small {
  color: var(--green);
}

.odd.risk {
  border-color: rgba(255, 91, 91, 0.52);
}

.odd.risk small {
  color: var(--red);
}

.odd.boost {
  border-color: rgba(242, 193, 78, 0.58);
}

.odd.boost small {
  color: var(--gold);
}

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

.primary {
  background: var(--gold);
  color: #171006;
  font-weight: 950;
}

.success {
  background: var(--green);
  color: #03130b;
  font-weight: 950;
}

.danger {
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

.ghost,
.chip,
.icon-btn {
  min-height: 36px;
  padding: 0 10px;
}

.icon-btn {
  width: 40px;
  padding: 0;
}

.form {
  display: grid;
  gap: 10px;
}

.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11110f;
  color: var(--ink);
  padding: 9px 10px;
}

.form textarea {
  min-height: 82px;
  resize: vertical;
}

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

.create-options {
  gap: 10px;
}

.option-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.option-head strong {
  color: var(--gold);
  font-size: 13px;
}

.option-tools {
  display: flex;
  gap: 6px;
}

.option-tools .icon-btn {
  width: 32px;
  min-height: 32px;
}

.option-inputs {
  grid-template-columns: minmax(0, 1.5fr) minmax(120px, 0.75fr);
}

.option-legacy-actions {
  display: none;
}

.info-tip {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  place-items: center;
  border: 1px solid rgba(242, 193, 78, 0.42);
  border-radius: 50%;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
  cursor: help;
}

.tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 24;
  width: min(280px, calc(100vw - 40px));
  border: 1px solid rgba(247, 244, 232, 0.2);
  border-radius: 8px;
  background: rgba(18, 18, 14, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 10px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}

.info-tip:hover .tooltip,
.info-tip:focus .tooltip {
  opacity: 1;
  transform: translateY(0);
}

.slip-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(5, 5, 4, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease);
}

.slip-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.slip-pill {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100vw - 32px));
  min-height: 64px;
  border: 1px solid rgba(247, 244, 232, 0.24);
  border-radius: 999px;
  background: rgba(29, 29, 24, 0.58);
  color: var(--ink);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px) saturate(1.45);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
  padding: 8px 10px;
  transform: translateX(-50%);
  animation: pillIn 220ms var(--ease) both;
}

.slip-pill:hover:not(:disabled) {
  border-color: rgba(242, 193, 78, 0.52);
  background: rgba(42, 42, 34, 0.68);
}

.slip-pill-count {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #171006;
  font-weight: 950;
}

.slip-pill-main {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.slip-pill-main strong,
.slip-pill-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slip-pill-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.slip-pill-cta {
  margin-left: auto;
  border: 1px solid rgba(242, 193, 78, 0.3);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  padding: 8px 11px;
}

.slip {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 22;
  width: min(520px, 50vw);
  height: auto;
  border: 1px solid rgba(247, 244, 232, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(28, 28, 23, 0.62);
  box-shadow: -22px 0 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(30px) saturate(1.45);
  -webkit-backdrop-filter: blur(30px) saturate(1.45);
  padding: 18px;
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 34px));
  transition:
    opacity 240ms var(--ease),
    transform 280ms var(--ease),
    border-color 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.slip.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.slip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.slip h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

.slip-head h2 {
  margin-bottom: 2px;
}

.slip-leg,
.member-row,
.leader-row,
.comment-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.slip-leg {
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  margin-bottom: 8px;
}

.slip-summary {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-2);
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.coupon-card,
.group-card {
  overflow: hidden;
}

.coupon-head,
.group-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.status {
  color: var(--gold);
  font-weight: 900;
}

.status.win {
  color: var(--green);
}

.status.lose {
  color: var(--red);
}

.leaderboard {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.leader-row,
.member-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
}

.rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(242, 193, 78, 0.16);
  color: var(--gold);
  font-weight: 950;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
}

.modal {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
}

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

.modal header h2 {
  margin: 0;
  font-size: 19px;
}

.modal-content {
  padding: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  width: min(440px, calc(100vw - 28px));
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #24231e;
  color: var(--ink);
  text-align: center;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.mobile-nav {
  display: none;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  animation: modalIn 240ms var(--ease) both;
}

.auth-brand {
  margin-bottom: 18px;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.auth-switch button {
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.auth-switch button.active {
  border-color: rgba(242, 193, 78, 0.35);
  background: rgba(242, 193, 78, 0.14);
  color: var(--gold);
}

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

.auth-note,
.auth-error,
.user-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
}

.auth-note {
  margin-top: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.auth-error {
  margin-top: 10px;
  color: #ffb4b4;
  background: rgba(240, 93, 94, 0.12);
  border-color: rgba(240, 93, 94, 0.42);
}

.user-pill {
  color: var(--gold);
  background: rgba(242, 193, 78, 0.12);
  white-space: nowrap;
}

.link-button {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  border-radius: 8px;
  padding: 0 12px;
  text-decoration: none;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  display: grid;
  gap: 4px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.stat-card strong {
  color: var(--gold);
  font-size: 24px;
}

.admin-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.admin-log {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .slip {
    width: min(500px, 56vw);
  }
}

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

  .sidebar {
    display: none;
  }

  .main {
    padding: 12px 12px 112px;
  }

  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
  }

  .group-select {
    flex: 1;
    min-width: 0;
  }

  .balance {
    margin-left: 0;
  }

  .hero-strip,
  .grid.two,
  .split {
    grid-template-columns: 1fr;
  }

  .ticket-visual {
    min-height: 70px;
  }

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

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

  .admin-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .admin-row .actions {
    grid-column: 1 / -1;
  }

  .slip-pill {
    bottom: 78px;
    width: calc(100vw - 24px);
    min-height: 58px;
  }

  .slip-pill-cta {
    display: none;
  }

  .slip {
    top: 12px;
    right: 12px;
    bottom: 88px;
    width: calc(100vw - 24px);
    max-width: none;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(18, 17, 14, 0.92);
    backdrop-filter: blur(18px);
  }

  .mobile-nav button {
    min-width: 0;
    padding: 0 4px;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-nav button.active {
    color: var(--gold);
    background: rgba(242, 193, 78, 0.12);
  }
}
