:root {
  --maroon-950: #1a050c;
  --maroon-900: #2b0713;
  --maroon-800: #4d0b22;
  --maroon-700: #6d1434;
  --gold-700: #a16207;
  --gold-500: #d5a642;
  --gold-200: #f2dfb0;
  --cream: #fff9ec;
  --surface: #ffffff;
  --ink: #1c120d;
  --muted: #6c625b;
  --border: #e2d7c5;
  --danger: #b42318;
  --success: #196c3a;
  --shadow: 0 22px 70px rgba(35, 7, 17, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: "Fira Sans", Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  background:
    radial-gradient(circle at 10% 0%, rgba(213, 166, 66, 0.18), transparent 32rem),
    linear-gradient(180deg, rgba(77, 11, 34, 0.07), transparent 42rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

button,
a,
select {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

.skip-link {
  background: var(--gold-500);
  color: var(--maroon-950);
  font-weight: 700;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  background: rgba(26, 5, 12, 0.92);
  border-bottom: 1px solid rgba(242, 223, 176, 0.22);
  color: #fff;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 76px;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 0.75rem;
  letter-spacing: 0.02em;
  min-height: 48px;
  text-decoration: none;
}

.brand img {
  aspect-ratio: 1;
  border: 1px solid rgba(242, 223, 176, 0.35);
  border-radius: 50%;
  height: 46px;
  object-fit: cover;
  width: 46px;
}

.main-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  min-width: 0;
}

.main-nav a,
.main-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  display: inline-flex;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.main-nav a:hover,
.main-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.main-nav .nav-button,
.nav-button,
.language-toggle {
  background: var(--gold-500);
  color: var(--maroon-950);
  font-weight: 800;
}

.language-toggle {
  border: 0;
}

.hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(26, 5, 12, 0.94), rgba(26, 5, 12, 0.78), rgba(26, 5, 12, 0.45)),
    url("assets/nashama-hero.jpg") center / cover;
  color: #fff;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.58fr);
  min-height: calc(100dvh - 76px);
  padding: clamp(2.5rem, 8vw, 6.5rem) clamp(1rem, 5vw, 5rem);
}

.hero__content {
  max-width: 760px;
}

.eyebrow {
  color: var(--gold-500);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 6.6rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  max-width: 900px;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.hero__lead {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  max-width: 650px;
}

.event-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.event-strip span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(242, 223, 176, 0.24);
  border-radius: var(--radius);
  color: #fff7e7;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.hero-event-box {
  background: rgba(255, 249, 236, 0.1);
  border: 1px solid rgba(242, 223, 176, 0.38);
  border-radius: var(--radius);
  color: #fff;
  display: grid;
  gap: 0.2rem;
  margin: 0 0 1.15rem;
  max-width: 380px;
  padding: 1rem;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.hero-event-box:hover {
  background: rgba(255, 249, 236, 0.16);
  transform: translateY(-2px);
}

.hero-event-box span,
.hero-event-box small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.hero-event-box strong {
  color: var(--gold-200);
  font-size: 1.25rem;
}

.hero__actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.button--primary {
  background: linear-gradient(135deg, var(--gold-500), #f0ce80);
  box-shadow: 0 14px 34px rgba(161, 98, 7, 0.24);
  color: var(--maroon-950);
}

.button--ghost {
  border-color: rgba(242, 223, 176, 0.45);
  color: #fff;
}

.button--full {
  width: 100%;
}

.phone-input {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(135px, 0.4fr) minmax(0, 1fr);
}

.button--danger {
  background: #fff0ee;
  border-color: #ffd5d0;
  color: var(--danger);
}

.hero-pass {
  justify-self: center;
  max-width: 360px;
}

.hero-pass img {
  border: 1px solid rgba(242, 223, 176, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.partners {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
  padding: 1rem;
}

.partners span {
  color: var(--muted);
  font-weight: 700;
}

.partners img {
  max-height: 54px;
  object-fit: contain;
}

.section {
  margin: 0 auto;
  max-width: 1220px;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem);
}

.section-heading {
  max-width: 760px;
}

.section-heading p,
.section--split p,
.registration-copy p,
.admin-hero p {
  color: var(--muted);
  font-size: 1.05rem;
}

.category-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin-top: 2rem;
}

.category-card {
  animation: cardRise 520ms ease both;
  animation-delay: calc(var(--stagger, 0) * 70ms);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 239, 0.96)),
    url("assets/match-night.jpg") center / cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(35, 7, 17, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 296px;
  overflow: hidden;
  padding: 1.2rem;
  position: relative;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.category-card::after {
  background: linear-gradient(135deg, transparent 0 56%, rgba(213, 166, 66, 0.2) 56% 62%, transparent 62%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.category-card:hover {
  border-color: rgba(213, 166, 66, 0.72);
  box-shadow: 0 24px 58px rgba(35, 7, 17, 0.18);
  transform: translateY(-5px);
}

.category-card.featured {
  background:
    linear-gradient(160deg, rgba(43, 7, 19, 0.96), rgba(109, 20, 52, 0.93)),
    url("assets/match-night.jpg") center / cover;
  border-color: rgba(242, 223, 176, 0.45);
  color: #fff;
}

.category-card.featured p,
.category-card.featured .category-meta {
  color: rgba(255, 255, 255, 0.82);
}

.category-meta {
  color: var(--muted);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.category-card h3,
.category-card button,
.category-price,
.category-card__top {
  position: relative;
  z-index: 1;
}

.category-card__top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.category-badge,
.category-zone {
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.5rem 0.62rem;
}

.category-badge {
  background: var(--gold-500);
  color: var(--maroon-950);
}

.category-zone {
  background: rgba(77, 11, 34, 0.08);
  color: var(--maroon-800);
}

.category-card.featured .category-zone {
  background: rgba(255, 255, 255, 0.12);
  color: #fff4db;
}

.category-price {
  align-items: flex-end;
  display: flex;
  gap: 0.3rem;
  margin-top: auto;
}

.category-price strong {
  font-size: 2.65rem;
  line-height: 1;
}

.category-price span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.1;
}

.category-card.featured .category-price span {
  color: rgba(255, 255, 255, 0.78);
}

.category-card button {
  margin-top: 1rem;
}

.events-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  margin-top: 2rem;
}

.event-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(35, 7, 17, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.event-card img {
  aspect-ratio: 1.55;
  object-fit: cover;
  width: 100%;
}

.event-card__body {
  display: grid;
  gap: 0.75rem;
  grid-template-rows: auto auto 1fr auto auto;
  height: 100%;
  padding: 1rem;
}

.event-card__top,
.event-card__bottom,
.game-line {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
}

.event-card__top span,
.game-line {
  color: var(--muted);
  font-weight: 800;
}

.game-line {
  background: #fff7e7;
  border: 1px solid var(--gold-200);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.event-ticket-price {
  display: grid;
  gap: 0.1rem;
}

.event-ticket-price span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-ticket-price strong {
  color: var(--maroon-800);
  font-size: 1.25rem;
}

.map-section {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.map-section iframe {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 360px;
  width: 100%;
}

.category-card .button {
  background: linear-gradient(135deg, var(--maroon-800), var(--maroon-700));
  border-color: rgba(213, 166, 66, 0.5);
  box-shadow: 0 12px 26px rgba(77, 11, 34, 0.18);
  color: #fff;
}

.category-card .button:hover {
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-800));
  box-shadow: 0 16px 34px rgba(77, 11, 34, 0.24);
}

.category-card.featured .button {
  background: linear-gradient(135deg, var(--gold-500), #f3d78b);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 14px 30px rgba(213, 166, 66, 0.22);
  color: var(--maroon-950);
}

.category-card.featured .button:hover {
  background: linear-gradient(135deg, #e8bd56, #ffe2a0);
  color: var(--maroon-950);
}

.section--split,
.registration-section {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
}

.feature-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.feature-list span {
  background: rgba(77, 11, 34, 0.06);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius);
  font-weight: 700;
  padding: 0.85rem 1rem;
}

.image-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-grid img {
  aspect-ratio: 1.25;
  border-radius: var(--radius);
  object-fit: cover;
  width: 100%;
}

.image-grid img:first-child {
  grid-column: 1 / -1;
}

.registration-copy img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
}

.registration-form,
.admin-panel,
.stats-grid article {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(35, 7, 17, 0.1);
}

.registration-form {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.form-row {
  margin-bottom: 1rem;
}

.ticket-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 1rem;
  padding: 1rem;
}

.ticket-picker legend {
  color: var(--ink);
  font-weight: 800;
  padding: 0 0.35rem;
}

.ticket-picker__list {
  display: grid;
  gap: 1rem;
}

.ticket-add {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) 110px auto;
}

.single-ticket-label {
  background: #fff7e7;
  border: 1px solid var(--gold-200);
  border-radius: var(--radius);
  display: grid;
  gap: 0.15rem;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
}

.single-ticket-label span,
.single-ticket-label strong {
  color: var(--maroon-800);
  font-weight: 900;
}

.ticket-add .button {
  min-height: 48px;
}

.ticket-row {
  align-items: center;
  background: #fffaf1;
  border: 1px solid var(--gold-200);
  border-radius: var(--radius);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 86px auto;
  padding: 0.75rem;
}

.ticket-row strong,
.ticket-row span {
  display: block;
}

.ticket-row span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.ticket-selected {
  display: grid;
  gap: 0.65rem;
}

.ticket-selected > strong {
  color: var(--maroon-800);
}

.ticket-selected__list {
  display: grid;
  gap: 0.55rem;
}

.ticket-row input {
  font-weight: 800;
  min-height: 44px;
  text-align: center;
}

.ticket-row button {
  background: #fff;
  border: 1px solid #e2cfa7;
  border-radius: var(--radius);
  color: var(--danger);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
}

.ticket-empty {
  background: #fffaf1;
  border: 1px dashed #d8bf86;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
  margin: 0;
  padding: 0.8rem;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.form-row--two {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  color: var(--ink);
  display: block;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cabda8;
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 48px;
  padding: 0.8rem 0.9rem;
  width: 100%;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.field-error {
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.3rem 0 0;
  min-height: 1.2rem;
}

.price-panel,
.success-panel {
  border-radius: var(--radius);
  margin: 1rem 0;
  padding: 1rem;
}

.price-panel {
  align-items: center;
  background: #fff7e7;
  border: 1px solid var(--gold-200);
  display: flex;
  justify-content: space-between;
}

.price-panel strong {
  color: var(--maroon-800);
  font-size: 1.35rem;
}

.success-panel {
  background: #edf8f0;
  border: 1px solid #bfe7ca;
  color: #154a2b;
  font-weight: 700;
}

.form-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.85rem 0 0;
}

.site-footer {
  align-items: center;
  background: var(--maroon-950);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
}

.site-footer a {
  color: var(--gold-200);
  font-weight: 800;
}

.admin-page {
  background: #f8fafc;
}

.admin-page::before {
  background: linear-gradient(180deg, rgba(77, 11, 34, 0.04), transparent 24rem);
}

.admin-shell {
  display: grid;
  gap: 1rem;
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(1rem, 4vw, 2rem);
}

.admin-shell,
.admin-panel,
.panel-header,
.admin-summary,
.admin-event-row,
.admin-mobile-card,
.scan-record,
.scanner-dialog,
.app-sheet {
  min-width: 0;
}

.admin-hero {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(35, 7, 17, 0.06);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  order: 1;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.admin-hero h1 {
  color: var(--maroon-900);
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 0.5rem;
}

.admin-hero img {
  display: none;
}

.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 0;
  order: 2;
}

.stats-grid article {
  padding: 1rem;
}

.stats-grid span {
  color: var(--muted);
  display: block;
  font-weight: 700;
}

.stats-grid strong {
  color: var(--maroon-800);
  display: block;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1;
  margin-top: 0.4rem;
}

.admin-panel {
  padding: clamp(1rem, 3vw, 1.4rem);
}

.admin-panel + .admin-panel {
  margin-top: 0;
}

.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  order: 3;
}

.admin-quick-actions a,
.admin-summary > span:last-child {
  align-items: center;
  background: #fff7e7;
  border: 1px solid var(--gold-200);
  border-radius: 999px;
  color: var(--maroon-800);
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
}

.registrations-admin-panel {
  order: 4;
}

.events-admin-panel {
  order: 5;
}

.tickets-admin-panel {
  order: 6;
}

.content-admin-panel {
  order: 7;
}

.scan-records-panel {
  order: 8;
}

.admin-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  list-style: none;
  min-height: 64px;
}

.admin-summary > span:first-child,
.panel-header > div,
.admin-event-row > div,
.admin-card-head > div {
  min-width: 0;
}

.admin-summary::-webkit-details-marker {
  display: none;
}

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

.admin-summary strong {
  color: var(--maroon-900);
  font-size: 1.15rem;
}

.admin-summary small {
  color: var(--muted);
  font-weight: 700;
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
}

details.admin-panel[open] .admin-summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.panel-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 0;
}

.filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(160px, 0.32fr));
  margin-bottom: 1rem;
}

.content-editor-grid,
.event-editor-grid,
.ticket-editor-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-editor-grid textarea,
.event-editor-grid textarea,
.ticket-editor-grid textarea {
  min-height: 86px;
}

.span-2 {
  grid-column: span 2;
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  margin: 0;
}

.checkbox-row input {
  min-height: auto;
  width: auto;
}

.admin-save-state {
  color: var(--maroon-800);
  font-weight: 800;
  margin: 0.8rem 0 0;
}

.admin-events-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.admin-event-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  padding: 0.7rem;
}

.admin-event-row img {
  aspect-ratio: 1.35;
  border-radius: var(--radius);
  object-fit: cover;
  width: 96px;
}

.admin-event-row span,
.admin-event-row strong {
  display: block;
}

.admin-event-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-event-row button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
}

.table-wrap {
  overflow-x: auto;
  position: relative;
}

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

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

th {
  background: #fff7e7;
  color: var(--maroon-900);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td {
  background: #fff;
}

.guest-cell strong,
.confirmation {
  display: block;
}

.guest-cell span,
.cell-muted {
  color: var(--muted);
  display: block;
  font-size: 0.92rem;
}

.status-select {
  min-width: 145px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.row-actions--stack {
  align-items: stretch;
  flex-direction: column;
  min-width: 150px;
}

.row-actions button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--danger);
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 0.45rem 0.65rem;
}

.row-actions button:not(.danger-action) {
  color: var(--maroon-800);
}

.mobile-admin-list {
  display: none;
}

.admin-mobile-card {
  animation: cardRise 420ms ease both;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(35, 7, 17, 0.08);
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.admin-card-head {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.admin-card-head strong,
.admin-card-head span,
.admin-card-meta span {
  display: block;
}

.admin-card-head strong {
  color: var(--maroon-900);
  font-size: 1.05rem;
}

.admin-card-head span,
.admin-card-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-card-pills {
  align-items: flex-end;
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  min-width: 86px;
}

.status-pill,
.payment-pill {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.42rem 0.55rem;
  white-space: nowrap;
}

.status-pill {
  background: #fff7e7;
  color: var(--maroon-800);
}

.status-pill--Checkedin,
.payment-pill--paid {
  background: #e9f7ee;
  color: var(--success);
}

.status-pill--Cancelled,
.payment-pill--unpaid {
  background: #fff0ee;
  color: var(--danger);
}

.admin-card-meta {
  background: #fffaf1;
  border: 1px solid var(--gold-200);
  border-radius: var(--radius);
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem;
}

.admin-card-meta span {
  overflow-wrap: anywhere;
}

.admin-card-controls {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card-controls label {
  font-size: 0.82rem;
  margin: 0;
}

.admin-card-actions {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-action {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--maroon-800);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
}

.mobile-action--primary {
  background: var(--maroon-800);
  border-color: var(--maroon-800);
  color: #fff;
}

.mobile-action--danger {
  background: #fff0ee;
  border-color: #ffd5d0;
  color: var(--danger);
}

.scan-records {
  display: grid;
  gap: 0.65rem;
}

.scan-record {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius);
  display: grid;
  gap: 0.2rem;
  grid-template-columns: 120px minmax(180px, 1fr) minmax(120px, 0.8fr) minmax(140px, 0.8fr);
  padding: 0.75rem;
}

.scan-record strong {
  color: var(--maroon-800);
  text-transform: capitalize;
}

.scan-record small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.scan-record--success {
  border-left-color: var(--success);
}

.scan-record--alreadyScanned {
  border-left-color: var(--gold-700);
}

.scan-record--invalid,
.scan-record--error {
  border-left-color: var(--danger);
}

.scanner-modal {
  align-items: center;
  background: rgba(26, 5, 12, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 200;
}

.scanner-modal[hidden] {
  display: none;
}

.app-modal {
  align-items: flex-end;
  background: rgba(26, 5, 12, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 220;
}

.app-modal[hidden] {
  display: none;
}

.app-sheet {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 560px;
  padding: 1rem;
  width: 100%;
}

.app-sheet__handle {
  background: #d7cbbb;
  border-radius: 999px;
  height: 4px;
  margin: 0 auto 1rem;
  width: 46px;
}

.pdf-actions {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdf-actions .button {
  width: 100%;
}

.sheet-note,
.install-steps {
  color: var(--muted);
  font-weight: 700;
}

.sheet-note {
  font-size: 0.92rem;
  margin: 0.85rem 0 0;
}

.install-steps ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.install-steps li + li {
  margin-top: 0.55rem;
}

.scanner-dialog {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 92dvh;
  max-width: 560px;
  overflow: auto;
  padding: 1rem;
  width: 100%;
}

#qrReader {
  background: #16040a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

#qrReader video {
  object-fit: cover;
}

#qrReader__dashboard_section_swaplink,
#qrReader__status_span {
  display: none !important;
}

.scan-result {
  background: #fff7e7;
  border: 1px solid var(--gold-200);
  border-radius: var(--radius);
  font-weight: 800;
  margin-top: 1rem;
  min-height: 48px;
  padding: 0.85rem;
}

.scan-result--success {
  background: #edf8f0;
  border-color: #bfe7ca;
  color: var(--success);
}

.scan-result--alreadyScanned {
  background: #fff7e7;
  border-color: var(--gold-500);
  color: var(--gold-700);
}

.scan-result--invalid,
.scan-result--error {
  background: #fff0ee;
  border-color: #ffd5d0;
  color: var(--danger);
}

.empty-state {
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  padding: 2rem;
  text-align: center;
}

.reveal {
  animation: sectionFade 700ms ease both;
}

[dir="rtl"] body {
  text-align: right;
}

[dir="rtl"] .feature-list span {
  border-left: 0;
  border-right: 4px solid var(--gold-500);
}

[dir="rtl"] th,
[dir="rtl"] td {
  text-align: right;
}

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

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

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

@media (max-width: 980px) {
  .hero,
  .section--split,
  .registration-section,
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-pass {
    justify-self: start;
    max-width: 300px;
  }

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

  .map-section,
  .content-editor-grid,
  .event-editor-grid,
  .ticket-editor-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

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

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    position: static;
  }

  .main-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .main-nav a,
  .main-nav button {
    flex: 1 1 auto;
    justify-content: center;
  }

  h1 {
    font-size: 2.9rem;
  }

  .category-grid,
  .events-grid,
  .stats-grid,
  .form-row--two,
  .image-grid,
  .phone-input,
  .ticket-add,
  .ticket-row,
  .scan-record {
    grid-template-columns: 1fr;
  }

  .price-panel,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .partners {
    justify-content: flex-start;
  }

  .event-card__bottom,
  .game-line {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-event-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .admin-event-row img {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .admin-page {
    background: #f8fafc;
  }

  .admin-page::before {
    background: linear-gradient(180deg, rgba(77, 11, 34, 0.04), transparent 18rem);
  }

  .site-header--admin {
    align-items: center;
    background: var(--maroon-950);
    flex-direction: row;
    flex-wrap: nowrap;
    min-height: 62px;
    padding: calc(0.55rem + env(safe-area-inset-top)) 0.85rem 0.55rem;
    position: sticky;
  }

  .site-header--admin .brand span {
    font-size: 0.95rem;
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header--admin .brand {
    gap: 0.55rem;
    min-height: 42px;
  }

  .site-header--admin .brand img {
    height: 40px;
    width: 40px;
  }

  .site-header--admin .main-nav {
    width: auto;
  }

  .site-header--admin .main-nav a {
    display: none;
  }

  .site-header--admin .main-nav button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.5rem 0.65rem;
  }

  .admin-shell {
    gap: 0.8rem;
    padding: 0.85rem max(0.85rem, env(safe-area-inset-right)) 0.85rem max(0.85rem, env(safe-area-inset-left));
  }

  .admin-hero {
    display: none;
  }

  .admin-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .admin-panel > .panel-header,
  .admin-summary,
  .admin-quick-actions a {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(35, 7, 17, 0.06);
    padding: 0.8rem;
  }

  .admin-summary {
    min-height: 58px;
  }

  .admin-summary > span:last-child {
    min-height: 40px;
    padding: 0.55rem 0.75rem;
  }

  details.admin-panel[open] .admin-summary {
    margin-bottom: 0.75rem;
  }

  .content-editor-grid,
  .event-editor-grid,
  .ticket-editor-grid,
  .admin-events-list,
  .scan-records {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(35, 7, 17, 0.06);
    padding: 0.8rem;
  }

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

  .admin-quick-actions a {
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 0.45rem;
  }

  .admin-panel + .admin-panel {
    margin-top: 1.15rem;
  }

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

  .stats-grid article {
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(35, 7, 17, 0.06);
    padding: 0.75rem;
  }

  .stats-grid span {
    font-size: 0.78rem;
  }

  .stats-grid strong {
    font-size: 1.55rem;
  }

  .filters {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(35, 7, 17, 0.06);
    gap: 0.75rem;
    padding: 0.8rem;
  }

  .panel-header {
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
  }

  .panel-header h2 {
    font-size: 1.45rem;
    line-height: 1.05;
  }

  .panel-header .button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.65rem 0.8rem;
  }

  .table-wrap {
    display: none;
  }

  .mobile-admin-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.85rem;
  }

  .admin-card-head {
    align-items: flex-start;
  }

  .admin-card-controls,
  .admin-card-actions {
    grid-template-columns: 1fr 1fr;
  }

  .admin-mobile-card {
    overflow: hidden;
  }

  .admin-card-head {
    flex-direction: column;
  }

  .admin-card-pills {
    display: flex;
    flex-wrap: wrap;
    justify-items: start;
    min-width: 0;
  }

  .admin-card-meta span {
    overflow-wrap: anywhere;
  }

  .scan-records-panel {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  .scan-record {
    grid-template-columns: 1fr;
  }

  .scanner-modal {
    align-items: stretch;
    background: var(--maroon-950);
    padding: 0;
  }

  .scanner-dialog {
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    max-height: none;
    max-width: none;
    min-height: 100dvh;
    overflow: hidden;
    padding: calc(0.85rem + env(safe-area-inset-top)) max(0.85rem, env(safe-area-inset-right))
      calc(0.85rem + env(safe-area-inset-bottom)) max(0.85rem, env(safe-area-inset-left));
  }

  .scanner-dialog .panel-header {
    flex: 0 0 auto;
  }

  .scanner-dialog .panel-header p:not(.eyebrow) {
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
  }

  #qrReader {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    min-height: min(68dvh, 560px);
    width: 100%;
  }

  #qrReader > div,
  #qrReader video,
  #qrReader canvas {
    max-height: 100% !important;
    max-width: 100% !important;
  }

  #qrReader video {
    border-radius: var(--radius);
    height: 100% !important;
    width: 100% !important;
  }

  .scan-result {
    flex: 0 0 auto;
    margin-top: 0.75rem;
  }

  .app-modal {
    align-items: flex-end;
    background: rgba(26, 5, 12, 0.72);
    padding: 0;
  }

  .app-sheet {
    border-radius: 8px 8px 0 0;
    border-width: 1px 0 0;
    max-height: 88dvh;
    max-width: none;
    overflow: auto;
    padding: 0.9rem max(0.9rem, env(safe-area-inset-right)) calc(0.9rem + env(safe-area-inset-bottom))
      max(0.9rem, env(safe-area-inset-left));
  }

  .pdf-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header--admin {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .site-header--admin .brand span {
    max-width: none;
  }

  .site-header--admin .main-nav {
    justify-content: stretch;
    width: 100%;
  }

  .site-header--admin .main-nav button {
    justify-content: center;
    width: 100%;
  }

  .admin-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-summary > span:last-child {
    justify-content: center;
    width: 100%;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-header .button {
    width: 100%;
  }

  .admin-quick-actions,
  .stats-grid,
  .admin-card-controls,
  .admin-card-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .site-header--admin .main-nav button {
    font-size: 0.82rem;
    padding-inline: 0.5rem;
  }
}
