:root {
  --void: #050a1a;
  --navy: #0b1530;
  --blue: #3b6dff;
  --blue-hover: #5580ff;
  --ice: #7dd3ff;
  --mist: #e8eefc;
  --gold: #d4af37;
  --stage-glow: #a855f7;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--void);
  color: var(--mist);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--void);
  background-image: radial-gradient(ellipse 1000px 650px at 12% -8%, rgba(59, 109, 255, 0.24), transparent 62%),
    radial-gradient(ellipse 720px 520px at 92% 6%, rgba(168, 85, 247, 0.10), transparent 58%),
    radial-gradient(ellipse 820px 700px at 50% 112%, rgba(59, 109, 255, 0.14), transparent 62%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

/* ---- Small "singer" loading animation ---- */
.sst-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 0;
}
.sst-loading-figure {
  width: 52px;
  height: 52px;
}
.sst-loading-figure .sst-head {
  animation: sst-bob 1.1s ease-in-out infinite;
  transform-origin: 26px 40px;
}
.sst-loading-figure .sst-wave {
  transform-origin: center;
  animation: sst-wave-pulse 1.1s ease-in-out infinite;
  opacity: 0;
}
.sst-loading-figure .sst-wave-1 { animation-delay: 0s; }
.sst-loading-figure .sst-wave-2 { animation-delay: 0.18s; }
.sst-loading-figure .sst-wave-3 { animation-delay: 0.36s; }
@keyframes sst-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-3deg); }
}
@keyframes sst-wave-pulse {
  0% { opacity: 0; transform: scale(0.85); }
  40% { opacity: 0.85; }
  100% { opacity: 0; transform: scale(1.25); }
}
.sst-loading-text {
  font-size: 13px;
  color: rgba(232, 238, 252, 0.55);
  letter-spacing: 0.3px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #3b6dff55 transparent;
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: #3b6dff55;
  border-radius: 4px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { letter-spacing: -0.03em; }

/* ---------- Surfaces ----------
   Three depths, each meaning something specific: `glass` is a resting
   surface (cards, panels); `glass-raised` is an elevated/focused surface
   (the ticket that's currently loaded, a modal); `glass-inset` is a
   recessed readout (stat values, info blocks) - lit from inside rather
   than floating above the page. */
.glass {
  background-color: rgba(255, 255, 255, 0.045);
  background-image: linear-gradient(
    100deg,
    transparent calc(var(--scroll-shine, -40%) - 18%),
    rgba(255, 255, 255, 0.09) var(--scroll-shine, -40%),
    transparent calc(var(--scroll-shine, -40%) + 18%)
  );
  background-repeat: no-repeat;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.07), 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.glass-raised {
  background-color: rgba(255, 255, 255, 0.065);
  background-image: linear-gradient(
    100deg,
    transparent calc(var(--scroll-shine, -40%) - 18%),
    rgba(255, 255, 255, 0.09) var(--scroll-shine, -40%),
    transparent calc(var(--scroll-shine, -40%) + 18%)
  );
  background-repeat: no-repeat;
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.09), 0 20px 56px -16px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(59, 109, 255, 0.06);
}

.glass-inset {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.4);
}

.glass-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mist);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
}
.glass-input::placeholder {
  color: rgba(232, 238, 252, 0.35);
}
.glass-input:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: transform 0.15s var(--ease-out), background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(59, 109, 255, 0.55);
}
.btn-primary:hover {
  background: var(--blue-hover);
  box-shadow: 0 10px 28px -8px rgba(59, 109, 255, 0.7);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--mist);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--mist);
}
.btn-outline:hover {
  border-color: rgba(59, 109, 255, 0.6);
  background: rgba(59, 109, 255, 0.1);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* ---------- Layout ---------- */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 24px;
}

/* ---------- Icons ---------- */
.icon {
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}

/* ---------- Pills ---------- */
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.pill-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.pill-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.pill-gray {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(232, 238, 252, 0.6);
}

/* ---------- Forms ---------- */
.field {
  display: block;
  margin-bottom: 16px;
}
.field .field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(232, 238, 252, 0.85);
}

/* ---------- Tables ---------- */
.table-wrap {
  border-radius: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}
thead {
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}
thead th {
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(125, 211, 255, 0.85);
  font-weight: 600;
}
tbody tr {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.15s ease;
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}
tbody td {
  padding: 12px 16px;
  color: rgba(232, 238, 252, 0.8);
  vertical-align: middle;
}
tbody td.strong {
  color: white;
  font-weight: 500;
}

/* ---------- Utility ---------- */
.text-muted {
  color: rgba(232, 238, 252, 0.55);
}
.text-faint {
  color: rgba(232, 238, 252, 0.4);
}
.text-white {
  color: white;
}
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }

/* ---------- Admin shell ---------- */
.admin-shell {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 224px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border-top: none;
  border-bottom: none;
  border-left: none;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
}
.admin-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}
.admin-brand span {
  font-size: 14px;
  font-weight: 600;
  color: white;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: rgba(232, 238, 252, 0.75);
}
.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.admin-logout {
  margin-top: auto;
  padding: 16px 12px;
}
.admin-logout button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(232, 238, 252, 0.75);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}
.admin-logout button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.admin-main {
  flex: 1;
  padding: 32px;
  min-width: 0;
  overflow-x: auto;
}
.admin-main h1 {
  font-size: 20px;
  font-weight: 700;
  color: white;
}
.admin-main .sub {
  font-size: 13px;
  color: rgba(232, 238, 252, 0.55);
  margin-top: 4px;
}

/* Below 720px: stack the sidebar above the content instead of side by
   side, so nothing gets clipped on a phone screen. The sidebar becomes
   a horizontal, scrollable nav bar. */
@media (max-width: 720px) {
  .admin-shell {
    flex-direction: column;
    min-height: 0;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
  }
  .admin-brand {
    padding: 8px 12px 8px 4px;
    flex-shrink: 0;
  }
  .admin-nav {
    flex-direction: row;
    padding: 0;
    flex-shrink: 0;
  }
  .admin-nav a {
    white-space: nowrap;
  }
  .admin-logout {
    margin-top: 0;
    margin-left: auto;
    padding: 8px 4px 8px 12px;
    flex-shrink: 0;
  }
  .admin-logout button {
    width: auto;
    white-space: nowrap;
  }
  .admin-main {
    padding: 20px 16px;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  border-radius: 16px;
  padding: 16px;
  min-width: 0;
}
.stat-card .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(232, 238, 252, 0.4);
}
.stat-card .value {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-top: 4px;
  word-break: break-word;
}
.admin-section-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 32px 0 12px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.search-input-wrap {
  position: relative;
}
.search-input-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(232, 238, 252, 0.4);
  pointer-events: none;
}
.search-input-wrap input {
  padding-left: 34px;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  border-radius: 16px;
  padding: 16px;
}
.inline-form label {
  font-size: 12px;
}
.inline-form label span {
  display: block;
  margin-bottom: 4px;
  color: rgba(232, 238, 252, 0.4);
}
.inline-form input,
.inline-form select {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
