:root {
  color-scheme: dark;
  --bg: #070b10;
  --bg-2: #0b1318;
  --ink: #eefbf7;
  --muted: #9db2ad;
  --line: rgba(130, 255, 213, 0.18);
  --line-strong: rgba(130, 255, 213, 0.34);
  --panel: rgba(8, 18, 22, 0.78);
  --panel-solid: #0d191f;
  --green: #36f0aa;
  --green-dark: #10a975;
  --cyan: #53d8ff;
  --violet: #b38cff;
  --pink: #ff6fcf;
  --amber: #ffcb5c;
  --red: #ff7b72;
  --mint: rgba(54, 240, 170, 0.16);
  --amber-soft: rgba(255, 203, 92, 0.16);
  --red-soft: rgba(255, 123, 114, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(83, 216, 255, 0.12), transparent 28%),
    linear-gradient(235deg, rgba(255, 111, 207, 0.10), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  background:
    linear-gradient(rgba(83, 216, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 240, 170, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 82%);
  pointer-events: none;
  position: fixed;
  z-index: -2;
}

body::after {
  background: linear-gradient(90deg, transparent, rgba(54, 240, 170, 0.16), rgba(83, 216, 255, 0.18), transparent);
  content: "";
  height: 1px;
  left: -20%;
  pointer-events: none;
  position: fixed;
  top: 16%;
  width: 140%;
  z-index: -1;
}

.orbital-stage {
  height: 100vh;
  filter: brightness(1.24) saturate(1.18);
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.68;
  pointer-events: none;
  position: fixed;
  width: 100vw;
  z-index: 0;
}

.cursor-planet {
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.72), transparent 0 12%),
    radial-gradient(circle, rgba(130, 255, 213, 0.72) 0 10%, rgba(83, 216, 255, 0.34) 30%, rgba(54, 240, 170, 0.16) 52%, transparent 74%);
  border: 1px solid rgba(130, 255, 213, 0.22);
  border-radius: 999px;
  box-shadow: 0 0 28px rgba(83, 216, 255, 0.18), 0 0 60px rgba(54, 240, 170, 0.10);
  height: 76px;
  left: 0;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transform: translate3d(50vw, 50vh, 0) translate(-50%, -50%);
  transition: opacity 140ms ease;
  width: 76px;
  z-index: 0;
}

.cursor-planet::before,
.cursor-planet::after {
  border: 1px solid rgba(83, 216, 255, 0.34);
  border-radius: 50%;
  content: "";
  inset: -18px -34px;
  position: absolute;
  transform: rotate(-18deg);
}

.cursor-planet::after {
  animation: cursorPlanetOrbit 3.8s linear infinite;
  border-color: rgba(54, 240, 170, 0.28);
  inset: -9px -24px;
  transform: rotate(28deg);
}

.cursor-planet.is-visible {
  opacity: 0.82;
}

body[data-page="login"] .orbital-stage,
body[data-page="register"] .orbital-stage,
body[data-page="home"] .orbital-stage,
body[data-page="supabase"] .orbital-stage {
  opacity: 0.56;
}

body[data-page="home"] .orbital-stage {
  mask-image:
    radial-gradient(circle at 22% 55%, black 0 34%, transparent 54%),
    linear-gradient(90deg, black 0 38%, transparent 72%);
}

body[data-page="login"] .orbital-stage,
body[data-page="register"] .orbital-stage,
body[data-page="supabase"] .orbital-stage {
  mask-image: linear-gradient(90deg, black 0 42%, transparent 68%);
}

.featured-perk,
.form-card,
.info-card,
.perk-card,
.status-panel,
.table-wrap,
.record-card {
  backdrop-filter: blur(12px) saturate(1.04);
}

.featured-perk {
  background:
    linear-gradient(145deg, rgba(54, 240, 170, 0.17), rgba(7, 11, 16, 0.88) 48%, rgba(83, 216, 255, 0.12)),
    rgba(8, 18, 22, 0.94);
  transform: perspective(1000px) rotateX(var(--card-tilt-x, 0deg)) rotateY(var(--card-tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.signal-dock {
  backdrop-filter: blur(10px);
  background: rgba(7, 11, 16, 0.58);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 0 34px rgba(54, 240, 170, 0.12);
  color: var(--muted);
  display: flex;
  gap: 8px;
  left: 50%;
  padding: 7px;
  pointer-events: auto;
  position: fixed;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 4;
}

.signal-dock.is-ready {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.signal-dock button {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  color: var(--green);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  padding: 8px 10px;
}

.signal-dock button:hover {
  background: rgba(83, 216, 255, 0.13);
  border-color: rgba(83, 216, 255, 0.38);
  color: var(--cyan);
}

.mini-game {
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 1;
}

.mini-character {
  --mini-x: 88%;
  --mini-y: 62%;
  align-items: center;
  animation: miniFloat 4.2s ease-in-out infinite;
  background:
    radial-gradient(circle at 50% 46%, rgba(54, 240, 170, 0.22), rgba(83, 216, 255, 0.08) 48%, transparent 72%),
    rgba(7, 11, 16, 0.34);
  border: 1px solid rgba(130, 255, 213, 0.24);
  border-radius: 24px;
  box-shadow: 0 0 34px rgba(83, 216, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: flex;
  height: clamp(52px, 6vw, 78px);
  justify-content: center;
  left: var(--mini-x);
  opacity: 0;
  padding: 7px;
  pointer-events: none;
  position: fixed;
  top: var(--mini-y);
  transform: translate(-50%, -50%) scale(0.72) rotate(-8deg);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
  width: clamp(52px, 6vw, 78px);
}

.mini-character.is-visible {
  opacity: 0.78;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1) rotate(-3deg);
}

.mini-character.is-visible:hover {
  border-color: rgba(83, 216, 255, 0.58);
  opacity: 0.96;
}

.mini-character.is-found {
  border-color: rgba(255, 203, 92, 0.7);
  box-shadow: 0 0 36px rgba(255, 203, 92, 0.22), 0 0 60px rgba(54, 240, 170, 0.16);
  transform: translate(-50%, -50%) scale(1.12) rotate(6deg);
}

.mini-character img {
  border-radius: 17px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.mini-pop {
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 950;
  left: 50%;
  opacity: 0;
  position: absolute;
  text-shadow: 0 0 12px rgba(255, 203, 92, 0.9);
  top: -12px;
  transform: translate(-50%, 8px);
}

.mini-character.is-found .mini-pop {
  animation: miniPop 540ms ease forwards;
}

.mini-score {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(7, 11, 16, 0.56);
  border: 1px solid rgba(130, 255, 213, 0.18);
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 0 28px rgba(54, 240, 170, 0.08);
  color: rgba(201, 255, 240, 0.74);
  display: flex;
  font-size: 0.68rem;
  font-weight: 900;
  gap: 9px;
  letter-spacing: 0.08em;
  padding: 8px 11px;
  position: fixed;
  right: 22px;
  text-transform: uppercase;
  z-index: 4;
}

.mini-score strong {
  color: var(--green);
  font-size: 0.76rem;
}

.mini-game.is-account-linked .mini-score {
  border-color: rgba(83, 216, 255, 0.30);
}

.mini-game.is-account-linked .mini-score span::after {
  color: rgba(83, 216, 255, 0.78);
  content: " linked";
}

.mini-game:not(.has-score) .mini-score {
  opacity: 0.66;
}

.topbar,
.hero,
.auth-layout,
.page-shell,
.toast {
  position: relative;
  z-index: 1;
}

body[data-page="dashboard"]:not(.gate-open) .page-shell,
body[data-page="supabase"]:not(.gate-open) .page-shell,
body[data-page="admin"]:not(.gate-open) .page-shell,
body[data-page="audit"]:not(.gate-open) .page-shell {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.hero-copy,
.auth-copy,
.page-heading,
.perk-card,
.info-card,
.form-card,
.status-panel,
.table-wrap {
  opacity: 0;
  transform: translateY(18px);
}

.is-loaded .hero-copy,
.is-loaded .auth-copy,
.is-loaded .page-heading,
.is-loaded .perk-card,
.is-loaded .info-card,
.is-loaded .form-card,
.is-loaded .status-panel,
.is-loaded .table-wrap {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms ease, transform 650ms ease;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(7, 11, 16, 0.72);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 48px rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 clamp(18px, 6vw, 72px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 1.08rem;
  font-weight: 900;
  gap: 11px;
  text-decoration: none;
}

.brand::before {
  display: none;
}

.brand-mark {
  align-items: center;
  animation: mascotBob 3.4s ease-in-out infinite;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.30), transparent 30%),
    linear-gradient(135deg, rgba(54, 240, 170, 0.22), rgba(83, 216, 255, 0.15));
  border: 1px solid rgba(83, 216, 255, 0.32);
  border-radius: 13px;
  box-shadow: 0 0 28px rgba(54, 240, 170, 0.28), 0 0 46px rgba(255, 111, 207, 0.08);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 40px;
}

.brand-mark::after {
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  content: "";
  inset: -30% -70%;
  position: absolute;
  transform: translateX(-60%) rotate(18deg);
  animation: mascotSheen 3.2s ease-in-out infinite;
}

.brand-mark img {
  border-radius: 10px;
  height: 100%;
  object-fit: cover;
  transform: scale(1.28);
  width: 100%;
}

.has-sparkclaw-frames .brand-mark img {
  transform: scale(1.42);
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.link-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 760;
  padding: 9px 13px;
  text-decoration: none;
}

.nav a:hover,
.link-button:hover {
  background: rgba(54, 240, 170, 0.08);
  border-color: var(--line-strong);
  color: var(--green);
  box-shadow: 0 0 24px rgba(54, 240, 170, 0.11);
}

body[data-page="home"]:not(.home-session-ready) .home-auth-sensitive {
  opacity: 0;
  pointer-events: none;
}

.hero,
.auth-layout,
.page-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(38px, 7vw, 86px) 24px;
}

.hero,
.auth-layout {
  align-items: center;
  display: grid;
  gap: clamp(30px, 5vw, 60px);
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.hero-copy,
.auth-copy,
.page-heading {
  position: relative;
}

.hero-copy h1,
.auth-copy h1,
.page-heading h1 {
  background: linear-gradient(135deg, #f4fffb, #c9fff0 38%, #89e7ff 68%, #ffd4f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 4.8rem;
  font-weight: 930;
  line-height: 0.94;
  margin: 0 0 22px;
  max-width: 900px;
}

.auth-copy h1,
.page-heading h1 {
  font-size: 3.35rem;
}

.hero-copy h1::after,
.page-heading h1::after {
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--pink), transparent);
  border-radius: 999px;
  content: "";
  display: block;
  height: 4px;
  margin-top: 22px;
  max-width: 270px;
}

p {
  color: var(--muted);
  line-height: 1.68;
}

.hero-copy p:not(.eyebrow),
.auth-copy p:not(.eyebrow),
.page-heading p:not(.eyebrow) {
  font-size: 1.05rem;
  max-width: 660px;
}

.eyebrow {
  align-items: center;
  background: rgba(54, 240, 170, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  padding: 7px 11px;
  text-transform: uppercase;
}

.eyebrow::before {
  animation: statusBlink 1.8s ease-in-out infinite;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(54, 240, 170, 0.9);
  content: "";
  height: 7px;
  width: 7px;
}

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

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 860;
  justify-content: center;
  min-height: 47px;
  overflow: hidden;
  padding: 0 19px;
  position: relative;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  content: "";
  height: 100%;
  left: -80%;
  position: absolute;
  top: 0;
  transform: skewX(-18deg);
  transition: left 360ms ease;
  width: 56%;
}

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

.button:hover::after {
  left: 130%;
}

.button.primary {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 0 1px rgba(54, 240, 170, 0.24), 0 16px 34px rgba(54, 240, 170, 0.22);
  color: #04100d;
}

.button.primary:hover {
  box-shadow: 0 0 0 1px rgba(83, 216, 255, 0.44), 0 18px 44px rgba(83, 216, 255, 0.28);
}

.button.primary.is-glass-cta {
  backdrop-filter: blur(10px) saturate(1.2);
  background: linear-gradient(135deg, rgba(54, 240, 170, 0.62), rgba(83, 216, 255, 0.48));
  border-color: rgba(196, 255, 239, 0.34);
  box-shadow: 0 0 0 1px rgba(83, 216, 255, 0.18), 0 14px 36px rgba(54, 240, 170, 0.16);
}

.button.primary.is-glass-cta:hover {
  background: linear-gradient(135deg, rgba(54, 240, 170, 0.72), rgba(83, 216, 255, 0.58));
  box-shadow: 0 0 0 1px rgba(83, 216, 255, 0.28), 0 18px 44px rgba(83, 216, 255, 0.20);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button.secondary:hover {
  background: rgba(83, 216, 255, 0.10);
  box-shadow: var(--shadow-soft);
}

.status-panel,
.form-card,
.perk-card,
.info-card,
.table-wrap,
.record-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  position: relative;
}

.magnetic-surface {
  transform-style: preserve-3d;
}

.magnetic-surface:not(.button) {
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button.magnetic-surface {
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.button.magnetic-surface:hover {
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-2px);
}

.status-panel::before,
.form-card::before,
.perk-card::before,
.info-card::before,
.table-wrap::before,
.record-card::before {
  background: linear-gradient(90deg, transparent, rgba(54, 240, 170, 0.78), rgba(83, 216, 255, 0.72), transparent);
  content: "";
  height: 1px;
  left: 18px;
  opacity: 0.7;
  position: absolute;
  right: 18px;
  top: 0;
}

.status-panel {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.status-panel.admin-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 30px;
}

.status-panel.compact {
  align-self: stretch;
}

.featured-perk {
  align-self: center;
  background:
    linear-gradient(145deg, rgba(54, 240, 170, 0.20), rgba(83, 216, 255, 0.10) 44%, rgba(255, 111, 207, 0.10)),
    rgba(8, 18, 22, 0.82);
  border-color: rgba(83, 216, 255, 0.38);
  box-shadow: 0 28px 110px rgba(0, 0, 0, 0.44), 0 0 70px rgba(83, 216, 255, 0.10);
  isolation: isolate;
  min-height: 420px;
  overflow: hidden;
}

.featured-perk.is-card-active {
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 111, 207, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(54, 240, 170, 0.20), rgba(83, 216, 255, 0.10) 44%, rgba(255, 111, 207, 0.10)),
    rgba(8, 18, 22, 0.82);
}

.featured-perk > * {
  position: relative;
  z-index: 1;
}

.featured-perk::after {
  animation: holoCard 4.8s ease-in-out infinite;
  background:
    linear-gradient(135deg, rgba(54, 240, 170, 0.20), rgba(83, 216, 255, 0.12)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 9px);
  border: 1px solid rgba(83, 216, 255, 0.28);
  border-radius: 16px;
  bottom: 24px;
  box-shadow: 0 0 36px rgba(83, 216, 255, 0.16);
  color: rgba(238, 251, 247, 0.72);
  content: "SUPABASE";
  display: grid;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  place-items: center;
  position: absolute;
  right: 24px;
  height: 112px;
  width: 176px;
}

.featured-perk h2 {
  background: linear-gradient(90deg, #fff, #bfffea, #9be9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.55rem;
}

.status-panel > div {
  border-bottom: 1px solid var(--line);
  padding: 28px;
}

.status-panel.admin-stats > div {
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.status-panel.admin-stats > div:last-child {
  border-right: 0;
}

.status-panel > div:last-child {
  border-bottom: 0;
}

.status-number {
  background: linear-gradient(135deg, var(--green), var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
}

.status-label {
  color: var(--muted);
  display: block;
  font-weight: 680;
  margin-top: 8px;
}

.form-card {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045)),
    rgba(8, 18, 22, 0.96);
}

.form-card.wide {
  align-self: start;
}

label {
  color: var(--ink);
  display: grid;
  font-weight: 780;
  gap: 8px;
}

input,
textarea {
  background: rgba(1, 8, 10, 0.52);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  min-height: 47px;
  padding: 12px 13px;
  resize: vertical;
  transition: none;
}

input:focus,
textarea:focus {
  background: rgba(1, 8, 10, 0.82);
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(83, 216, 255, 0.12), 0 0 28px rgba(54, 240, 170, 0.10);
  outline: 0;
}

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

.form-status {
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  padding: 12px 13px;
}

.form-status[data-tone="success"] {
  background: var(--mint);
  border-color: rgba(54, 240, 170, 0.34);
  color: var(--green);
}

.form-status[data-tone="error"] {
  background: var(--red-soft);
  border-color: rgba(255, 123, 114, 0.32);
  color: var(--red);
}

.page-heading {
  margin-bottom: 34px;
}

.page-heading.row {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

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

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

.lower-grid {
  margin-top: 22px;
}

.perk-card,
.info-card,
.record-card {
  padding: clamp(22px, 3vw, 30px);
}

.perk-card {
  display: grid;
  gap: 24px;
}

.perk-card:hover,
.info-card:hover,
.record-card:hover {
  border-color: rgba(83, 216, 255, 0.42);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42), 0 0 34px rgba(83, 216, 255, 0.08);
}

.perk-card h2,
.info-card h2,
.admin-columns h2,
.email-section h2 {
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.workflow {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 0;
  padding-left: 20px;
}

.workflow li::marker {
  color: var(--green);
  font-weight: 900;
}

.admin-columns {
  display: grid;
  gap: 24px;
}

.email-section {
  margin-top: 36px;
}

.stack {
  display: grid;
  gap: 14px;
}

.record-card {
  box-shadow: var(--shadow-soft);
}

.record-card header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.record-card h3 {
  color: var(--ink);
  line-height: 1.22;
  margin: 0;
}

.record-card p {
  margin: 8px 0 0;
}

.badge {
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.pending,
.badge.queued {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.verified,
.badge.approved,
.badge.forwarded,
.badge.sent {
  background: var(--mint);
  color: var(--green);
}

.badge.rejected,
.badge.failed {
  background: var(--red-soft);
  color: var(--red);
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

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

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

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

th {
  background: rgba(54, 240, 170, 0.08);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr:hover td {
  background: rgba(83, 216, 255, 0.055);
}

.empty-state {
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  padding: 18px;
}

.toast {
  background: rgba(2, 8, 10, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  bottom: 20px;
  box-shadow: 0 0 34px rgba(54, 240, 170, 0.16), var(--shadow);
  color: var(--ink);
  left: 50%;
  max-width: min(92vw, 540px);
  padding: 14px 18px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 5;
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 44px 44px, 44px 44px;
  }
}

@keyframes scanline {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }

  45%,
  55% {
    opacity: 1;
  }

  60% {
    transform: translateY(54vh);
  }
}

@keyframes chipPulse {
  0%,
  100% {
    filter: saturate(1);
    transform: rotate(0deg);
  }

  50% {
    filter: saturate(1.45);
    transform: rotate(6deg);
  }
}

@keyframes mascotBob {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-3px) rotate(4deg);
  }
}

@keyframes mascotSheen {
  0%,
  56% {
    transform: translateX(-70%) rotate(18deg);
  }

  78%,
  100% {
    transform: translateX(92%) rotate(18deg);
  }
}

@keyframes statusBlink {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

@keyframes holoCard {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes miniFloat {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -8px;
  }
}

@keyframes miniPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.9);
  }

  45% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(1.12);
  }
}

@keyframes cursorPlanetOrbit {
  from {
    rotate: 0deg;
  }

  to {
    rotate: 360deg;
  }
}

@media (max-width: 900px) {
  .hero-copy h1 {
    font-size: 3.5rem;
  }

  .auth-copy h1,
  .page-heading h1 {
    font-size: 2.65rem;
  }
}

@media (max-width: 760px) {
  .hero,
  .auth-layout,
  .grid.two,
  .admin-columns,
  .status-panel.admin-stats {
    grid-template-columns: 1fr;
  }

  .hero,
  .auth-layout,
  .page-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

  .auth-copy h1,
  .page-heading h1 {
    font-size: 2.25rem;
  }

  .status-panel.admin-stats > div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .featured-perk {
    margin-bottom: calc(176px + env(safe-area-inset-bottom));
    min-height: 340px;
  }

  body[data-page="home"] .hero {
    padding-bottom: calc(260px + env(safe-area-inset-bottom));
  }

  .orbital-stage {
    opacity: 0.42;
    transform: translateY(-8vh) scale(0.86);
  }

  body[data-page="home"] .orbital-stage {
    mask-image:
      radial-gradient(ellipse at 50% 34%, transparent 0 28%, black 46% 74%, transparent 90%),
      linear-gradient(to bottom, black 0 74%, transparent 94%);
  }

  .featured-perk::after {
    bottom: 18px;
    height: 86px;
    right: 18px;
    width: 140px;
  }

  .mini-score {
    bottom: calc(86px + env(safe-area-inset-bottom));
    left: 14px;
    right: auto;
    width: fit-content;
  }

  .signal-dock {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .nav {
    width: 100%;
  }

  .nav a,
  .link-button {
    padding-left: 0;
  }

  .page-heading.row {
    align-items: start;
    flex-direction: column;
  }
}

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