:root {
  --navy-950: #040915;
  --navy-900: #081229;
  --navy-850: #0b1733;
  --navy-800: #10214a;
  --navy-700: #1a2d5e;
  --line: rgba(217, 178, 95, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --gold: #d9b25f;
  --gold-light: #f5e1a4;
  --gold-deep: #a57a2c;
  --gold-gradient: linear-gradient(180deg, #fbeab8 0%, #e2bd6a 45%, #b0863a 100%);
  --text: #eef1f8;
  --muted: #9ba6c3;
  --faint: #6b7697;
  --danger: #ff9a8f;
  --danger-bg: rgba(255, 110, 95, 0.1);
  --success: #8fdcae;
  --success-bg: rgba(90, 200, 140, 0.12);
  --pending: #f1cf7c;
  --pending-bg: rgba(241, 207, 124, 0.12);
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--navy-950);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(226, 189, 106, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(40, 70, 150, 0.45), transparent 75%),
    linear-gradient(180deg, var(--navy-900) 0, var(--navy-950) 900px);
  background-repeat: no-repeat;
}

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

a {
  color: var(--gold-light);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.wrap-narrow {
  max-width: 640px;
}

main {
  flex: 1;
}

/* ---------- header / footer ---------- */

.site-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(4, 9, 21, 0.55);
  backdrop-filter: blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  height: 46px;
  width: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  line-height: 1.35;
}

.brand-name small {
  display: block;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
}

.site-footer {
  margin-top: 64px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.footer-tagline {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.footer-meta {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.powered-by a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
}

.powered-by img {
  height: 12px;
  width: auto;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.display {
  margin: 0 auto 14px;
  max-width: 720px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 5vw, 42px);
  line-height: 1.2;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rule {
  width: 84px;
  height: 1px;
  margin: 18px auto;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.event-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 20px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 18, 41, 0.6);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
}

.event-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 14px 3px 0;
  border-radius: 50%;
  background: var(--gold);
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.highlights li {
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 45, 94, 0.45), rgba(8, 18, 41, 0.45));
}

.highlights strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.highlights span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ---------- cards ---------- */

.card {
  position: relative;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 33, 74, 0.82), rgba(8, 18, 41, 0.9));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(245, 225, 164, 0.08);
}

.card-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.card-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- form ---------- */

.field {
  margin-bottom: 16px;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 7px;
  padding: 0;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="search"] {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(4, 9, 21, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 178, 95, 0.2);
}

.field input.invalid {
  border-color: var(--danger);
}

.err {
  display: none;
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 12.5px;
}

.err.show {
  display: block;
}

.hint {
  margin: 6px 2px 0;
  color: var(--faint);
  font-size: 12px;
}

.alert {
  display: none;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.alert.show {
  display: block;
}

.alert-error {
  border: 1px solid rgba(255, 154, 143, 0.35);
  background: var(--danger-bg);
  color: var(--danger);
}

.alert-info {
  border: 1px solid var(--line);
  background: rgba(217, 178, 95, 0.08);
  color: var(--gold-light);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fine {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  width: 100%;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--gold-gradient);
  color: #1b1405;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(165, 122, 44, 0.3);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold-light);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(217, 178, 95, 0.08);
}

.btn-sm {
  width: auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 11px;
  letter-spacing: 1.2px;
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(255, 154, 143, 0.4);
  color: var(--danger);
  box-shadow: none;
}

.btn-danger:hover {
  background: var(--danger-bg);
}

/* ---------- done / loading ---------- */

.done {
  text-align: center;
}

.done-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 28px;
  box-shadow: 0 0 30px rgba(217, 178, 95, 0.25);
}

.done p {
  margin: 0 auto 12px;
  max-width: 440px;
  color: var(--muted);
}

.done .btn {
  margin-top: 16px;
}

.steps {
  margin: 22px auto 0;
  padding: 0;
  max-width: 400px;
  list-style: none;
  text-align: left;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 8px 0 8px 40px;
  color: var(--muted);
  font-size: 14px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.skeleton-title {
  width: min(520px, 90%);
  height: 38px;
  margin: 0 auto 14px;
}

.skeleton-line {
  width: min(280px, 70%);
  height: 16px;
  margin: 0 auto;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* ---------- admin ---------- */

.admin-main {
  padding: 32px 0 0;
}

.admin-login {
  max-width: 420px;
  margin: 48px auto 0;
}

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-bar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 9, 21, 0.5);
}

.tab {
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
}

.tab[aria-selected="true"] {
  background: var(--gold-gradient);
  color: #1b1405;
}

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

.stat {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(16, 33, 74, 0.5);
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--gold-light);
}

.stat span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar .field {
  flex: 1 1 240px;
  margin: 0;
}

.toolbar .field input {
  height: 42px;
}

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

.chip {
  padding: 7px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(217, 178, 95, 0.1);
}

.select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.select-all input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--gold);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(217, 178, 95, 0.08);
  font-size: 13px;
}

.bulk-bar .count {
  margin-right: auto;
  color: var(--gold-light);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(8, 18, 41, 0.65);
}

table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

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

.list th {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.list tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.list .person b {
  display: block;
  font-weight: 600;
}

.list .person small,
.list .muted {
  color: var(--muted);
  font-size: 12.5px;
}

.list .ref {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12.5px;
  color: var(--gold-light);
  white-space: nowrap;
}

.list input[type="checkbox"]:not([role="switch"]) {
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-pending { background: var(--pending-bg); color: var(--pending); }
.badge-approved, .badge-sent { background: var(--success-bg); color: var(--success); }
.badge-rejected, .badge-failed { background: var(--danger-bg); color: var(--danger); }
.badge-skipped, .badge-queued { background: rgba(255, 255, 255, 0.06); color: var(--muted); }

.delivery {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--navy-800);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .highlights {
    grid-template-columns: 1fr;
  }

  .list thead {
    display: none;
  }

  .list,
  .list tbody,
  .list tr,
  .list td {
    display: block;
    width: 100%;
  }

  .list tr {
    position: relative;
    padding: 12px 14px 12px 46px;
    border-bottom: 1px solid var(--line-soft);
  }

  .list td {
    padding: 3px 0;
    border: 0;
  }

  .list td.select {
    position: absolute;
    left: 14px;
    top: 14px;
    width: auto;
  }

  .list td[data-label]::before {
    content: attr(data-label) " ";
    color: var(--faint);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  .list .row-actions {
    margin-top: 8px;
  }
}

@media (max-width: 560px) {
  .card {
    padding: 24px 18px;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .brand img {
    height: 38px;
  }

  .brand-name {
    display: none;
  }

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

/* ---------- switches ---------- */

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(4, 9, 21, 0.55);
  cursor: pointer;
}

.switch + .switch {
  margin-top: 10px;
}

.switch-text b {
  display: block;
  font-weight: 600;
}

.switch-text small {
  color: var(--muted);
  font-size: 12.5px;
  word-break: break-word;
}

.switch input {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}

.switch input:checked {
  background: var(--gold);
}

.switch input:checked::after {
  transform: translateX(18px);
}

.switch input:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.switch input:disabled {
  opacity: 0.5;
  cursor: progress;
}

.switch-inline {
  display: inline-flex;
  vertical-align: middle;
  padding: 0;
  border: 0;
  background: none;
}

/* ---------- modal ---------- */

.modal {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.modal::backdrop {
  background: rgba(2, 5, 12, 0.72);
  backdrop-filter: blur(3px);
}

.modal form {
  padding: 26px 24px 22px;
}

.modal h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--gold-light);
}

.modal p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.modal .alert {
  margin: 16px 0 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions .btn {
  width: auto;
  min-height: 44px;
}
