:root {
  --ds-page: #090b0e;
  --ds-surface: #11151a;
  --ds-surface-raised: #151a21;
  --ds-line: #272d35;
  --ds-line-strong: #343b45;
  --ds-text: #f3f4f6;
  --ds-muted: #929aa5;
  --ds-accent: #3b82f6;
  --ds-accent-hover: #4d8ff7;
}

html { background: var(--ds-page); }

body {
  background: var(--ds-page) !important;
  color: var(--ds-text);
}

.ds-page {
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 34%, rgba(55, 91, 141, 0.1), transparent 28rem),
    var(--ds-page) !important;
}

.ds-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  left: -15rem;
  top: 14%;
  width: 43rem;
  height: 31rem;
  border: 1px solid rgba(111, 151, 207, 0.1);
  border-radius: 2rem;
  background:
    linear-gradient(126deg, transparent 0 42%, rgba(111, 157, 222, 0.08) 43%, transparent 45%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(107, 143, 193, 0.035) 32px);
  box-shadow: 5rem 4rem 0 -1px rgba(12, 17, 24, 0.16), 5rem 4rem 0 0 rgba(103, 143, 199, 0.07);
  transform: rotate(-8deg);
  pointer-events: none;
}

.ds-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  right: -17rem;
  bottom: -18rem;
  width: 42rem;
  height: 42rem;
  border: 1px solid rgba(105, 150, 215, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44, 79, 126, 0.09), transparent 62%);
  pointer-events: none;
}

.ds-page > .absolute.inset-0:first-of-type,
.ds-page > .pointer-events-none.absolute.inset-0 {
  display: none !important;
}

/* Remove the old neon backdrop while preserving meaningful status effects. */
body > .pointer-events-none.fixed.inset-0 > [class*="blur-3xl"],
body > .fixed.inset-0.pointer-events-none > [class*="blur-3xl"],
body > [class*="pointer-events-none"] > [class*="rounded-full"][class*="blur-3xl"] {
  display: none !important;
}

main [class*="bg-slate-900/50"],
main [class*="bg-slate-900/60"],
main [class*="bg-slate-900/70"],
main [class*="bg-slate-900/80"],
main [class*="bg-slate-900/95"] {
  background: var(--ds-surface) !important;
  backdrop-filter: none !important;
}

.ds-page [class*="bg-slate-900/50"],
.ds-page [class*="bg-slate-900/60"],
.ds-page [class*="bg-slate-900/70"],
.ds-page [class*="bg-slate-900/80"],
.ds-page [class*="bg-slate-900/95"] {
  background: rgba(17, 21, 26, 0.96) !important;
  backdrop-filter: blur(8px) !important;
}

.ds-page [class*="border-white/10"],
.ds-page [class*="border-white/20"] { border-color: var(--ds-line) !important; }

.ds-page [class*="shadow-sky"],
.ds-page [class*="shadow-cyan"],
.ds-page [class*="shadow-blue"] { box-shadow: none !important; }

main [class*="border-white/10"],
main [class*="border-white/20"] {
  border-color: var(--ds-line) !important;
}

main [class*="shadow-sky"],
main [class*="shadow-cyan"],
main [class*="shadow-blue"] {
  box-shadow: none !important;
}

/* Primary actions use one deliberate brand color instead of gradients. */
main [class~="bg-gradient-to-r"][class~="from-sky-600"][class~="to-cyan-600"],
main [class~="bg-gradient-to-br"][class~="from-sky-500"][class~="to-cyan-500"],
main [class~="bg-gradient-to-r"][class~="from-cyan-600"][class~="to-sky-600"],
main [class~="bg-gradient-to-r"][class~="from-cyan-600"][class~="to-blue-600"] {
  background-color: var(--ds-accent) !important;
  background-image: none !important;
}

.ds-page [class~="bg-gradient-to-r"][class~="from-sky-600"][class~="to-cyan-600"],
.ds-page [class~="bg-gradient-to-br"][class~="from-sky-500"][class~="to-cyan-500"] {
  background-color: var(--ds-accent) !important;
  background-image: none !important;
}

/* Heading marks read like interface labels, not glowing AI badges. */
.ds-page [class~="blur-xl"][class~="from-sky-600"][class~="to-cyan-600"],
.ds-page [class~="blur-2xl"][class~="from-sky-600"][class~="to-cyan-600"] {
  display: none !important;
}

.ds-page [class~="w-20"][class~="h-20"][class~="from-sky-500"][class~="to-cyan-500"] {
  border: 1px solid var(--ds-line-strong) !important;
  background: var(--ds-surface-raised) !important;
}

.ds-page .text-center > .relative.inline-block > [class~="relative"][class~="from-sky-500"][class~="to-cyan-500"] {
  border: 1px solid var(--ds-line-strong) !important;
  background: var(--ds-surface-raised) !important;
}

.ds-page [class~="rounded-full"][class~="from-sky-500"][class~="to-cyan-500"] {
  border: 1px solid rgba(117, 167, 255, 0.35) !important;
  background: rgba(59, 130, 246, 0.12) !important;
  color: #9bbcff !important;
}

.ds-page [class*="bg-clip-text"][class*="text-transparent"] {
  background: none !important;
  color: var(--ds-text) !important;
  -webkit-text-fill-color: currentColor !important;
}

.ds-page [class*="rounded-3xl"] { border-radius: 1rem !important; }

.ds-page input:not([type="checkbox"]):not([type="radio"]),
.ds-page textarea,
.ds-page select {
  border-color: var(--ds-line-strong) !important;
  border-radius: 0.625rem !important;
  background: #0d1116 !important;
  box-shadow: none !important;
}

.ds-page input:focus,
.ds-page textarea:focus,
.ds-page select:focus {
  border-color: var(--ds-accent) !important;
  outline: 2px solid rgba(59, 130, 246, 0.18) !important;
  outline-offset: 1px;
}

.ds-page .text-slate-400 { color: var(--ds-muted) !important; }
.ds-page .text-cyan-400,
.ds-page .text-cyan-300,
.ds-page .text-sky-400,
.ds-page .text-sky-300 { color: #75a7ff !important; }

.ds-page nav:not(.dashboard-global-nav),
.ds-page > .pointer-events-none.fixed.inset-x-0.top-0 {
  border-color: var(--ds-line) !important;
  background: rgba(9, 11, 14, 0.95) !important;
}

.ds-page nav:not(.dashboard-global-nav) button,
.ds-page > .pointer-events-none.fixed.inset-x-0.top-0 button {
  border-radius: 0.625rem !important;
  border-color: var(--ds-line-strong) !important;
  background: var(--ds-surface) !important;
  box-shadow: none !important;
}

.ds-auth-page {
  display: block !important;
  padding: 7rem 1rem 3rem !important;
}

.ds-auth-page > [class*="max-w-"] {
  margin-right: auto;
  margin-left: auto;
}

.ds-page .overflow-x-auto {
  scrollbar-width: none;
}

.ds-page .overflow-x-auto::-webkit-scrollbar {
  display: none;
}

/* Verification archive */
.history-page .history-shell,
.history-page .history-guest {
  background: transparent !important;
}

.history-page .history-topbar {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ds-line) !important;
  background: rgba(9, 11, 14, 0.94) !important;
  padding: 0 2rem;
  backdrop-filter: blur(12px);
}

.history-page .history-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ds-text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.history-page .history-nav-label,
.history-page .history-eyebrow {
  color: #71809a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.history-page .history-guest-main {
  display: grid;
  min-height: calc(100vh - 4rem);
  place-items: center;
  padding: 4rem 1rem;
}

.history-page .history-guest-card {
  width: min(100%, 40rem);
  border: 1px solid var(--ds-line);
  border-radius: 1rem;
  background: rgba(17, 21, 26, 0.96);
  padding: clamp(2rem, 6vw, 4.5rem);
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.history-page .history-heading-mark {
  display: inline-flex;
  height: 3.5rem;
  width: 3.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ds-line-strong);
  border-radius: 0.8rem;
  background: var(--ds-surface-raised);
  color: #8cb3ff;
}

.history-page .history-guest-card .history-heading-mark {
  margin-bottom: 1.5rem;
}

.history-page .history-guest-title {
  margin-top: 0.8rem;
  color: var(--ds-text);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.history-page .history-guest-copy {
  margin-top: 1.25rem;
  color: var(--ds-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.history-page .history-guest-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.history-page .history-primary-button,
.history-page .history-secondary-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.65rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.history-page .history-primary-button {
  border: 1px solid var(--ds-accent);
  background: var(--ds-accent);
  color: white;
}

.history-page .history-primary-button:hover { background: var(--ds-accent-hover); }

.history-page .history-secondary-button {
  border: 1px solid var(--ds-line-strong);
  background: transparent;
  color: #d8dde5;
}

.history-page .history-secondary-button:hover { background: var(--ds-surface-raised); }

.history-page .history-heading {
  padding-top: 1.5rem;
}

.history-page .history-filter-panel {
  border-radius: 1rem !important;
  background: rgba(17, 21, 26, 0.96) !important;
}

.history-page #historyGrid article > div.absolute {
  display: none;
}

.history-page #historyGrid article > div.relative {
  border-color: var(--ds-line) !important;
  border-radius: 0.9rem !important;
  background: var(--ds-surface) !important;
}

.history-page #historyGrid article:hover > div.relative {
  border-color: var(--ds-line-strong) !important;
}

.history-page .history-detail-panel {
  border-color: var(--ds-line) !important;
  background: #0d1116 !important;
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.34);
}

@media (max-width: 640px) {
  .history-page .history-topbar { padding: 0 1rem; }
  .history-page .history-nav-label { display: none; }
  .history-page .history-guest-main { padding: 2rem 1rem; }
  .history-page .history-guest-card { padding: 2rem 1.25rem; }
  .history-page .history-guest-actions { flex-direction: column; }
  .history-page .history-primary-button,
  .history-page .history-secondary-button { width: 100%; }
  .history-page .history-heading h1 { font-size: 2.35rem; }
}

/* Reporting and safety guide */
.report-page #mainView,
.report-page #submittedView {
  background: transparent !important;
}

.report-page .report-hero {
  padding-top: 1rem;
}

.report-page .report-hero-glow,
.report-page .group > [class~="absolute"][class~="inset-0"][class*="blur-"] {
  display: none !important;
}

.report-page .report-hero-mark {
  border: 1px solid rgba(248, 113, 113, 0.28) !important;
  border-radius: 0.8rem !important;
  background: rgba(127, 29, 29, 0.12) !important;
  color: #fca5a5;
}

.report-page .report-panel {
  border-color: var(--ds-line) !important;
  border-radius: 1rem !important;
  background: rgba(17, 21, 26, 0.96) !important;
  box-shadow: none !important;
}

.report-page .report-panel:hover {
  border-color: var(--ds-line-strong) !important;
}

.report-page .report-guide-card,
.report-page .crime-stat-card,
.report-page .crime-info-card,
.report-page .crime-warning-card {
  border-color: var(--ds-line) !important;
  background: var(--ds-surface-raised) !important;
  box-shadow: none !important;
}

.report-page .report-guide-card:hover,
.report-page .crime-stat-card:hover,
.report-page .crime-info-card:hover,
.report-page .crime-warning-card:hover {
  border-color: var(--ds-line-strong) !important;
  background: #171c23 !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

.report-page .report-guide-card [class~="w-10"][class~="h-10"],
.report-page .report-panel [class~="w-12"][class~="h-12"] {
  border: 1px solid var(--ds-line-strong) !important;
  border-radius: 0.65rem !important;
  background: #121820 !important;
}

.report-page .crime-stat-card::after {
  display: none;
}

.report-page .station-action-button {
  min-height: 2.9rem;
  border: 1px solid var(--ds-accent);
  border-radius: 0.65rem;
  background: var(--ds-accent);
  box-shadow: none;
}

.report-page .station-action-button:hover {
  background: var(--ds-accent-hover);
  box-shadow: none;
  transform: none;
}

.report-page .station-outline-button {
  min-height: 2.9rem;
  border-color: var(--ds-line-strong);
  border-radius: 0.65rem;
  background: transparent;
}

.report-page .station-search-input {
  border-color: var(--ds-line-strong) !important;
  border-radius: 0.65rem !important;
  background: #0d1116 !important;
}

.report-page .station-panel {
  border-color: var(--ds-line);
  border-radius: 0.9rem;
  background: #0d1116;
  backdrop-filter: none;
}

.report-page .station-map,
.report-page .station-info-card,
.report-page .station-item {
  border-color: var(--ds-line);
  border-radius: 0.75rem;
  background-color: var(--ds-surface);
}

.report-page .station-map-empty {
  background: #0a0e13;
}

.report-page .station-item:hover,
.report-page .station-item.is-selected {
  border-color: rgba(117, 167, 255, 0.45);
  box-shadow: none;
  transform: none;
}

.report-page .station-rank.is-top {
  background: var(--ds-accent);
}

.report-page .custom-overlay {
  border-color: var(--ds-line-strong);
  border-radius: 0.65rem;
  background: #0d1116;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.report-page .report-submitted > .text-center {
  width: min(100%, 32rem);
  border: 1px solid var(--ds-line);
  border-radius: 1rem;
  background: var(--ds-surface);
  padding: 3rem 2rem;
}

@media (max-width: 640px) {
  .report-page .report-hero { margin-bottom: 2rem; }
  .report-page .report-hero h1 { font-size: 2.25rem; }
  .report-page .report-panel { padding: 1.25rem !important; }
  .report-page .station-search-row { flex-direction: column; max-width: none; }
  .report-page .station-search-input,
  .report-page .station-action-button,
  .report-page .station-outline-button { width: 100%; }
  .report-page .station-map { height: 320px; }
}

@media (max-width: 640px) {
  .ds-page::before { left: -27rem; top: 11%; opacity: 0.7; }
  .ds-page::after { opacity: 0.55; }
}

main button[class~="from-sky-600"]:hover,
main a[class~="from-sky-600"]:hover,
main button[class~="from-cyan-600"]:hover,
main a[class~="from-cyan-600"]:hover {
  background-color: var(--ds-accent-hover) !important;
}

/* Page titles remain solid and editorial. */
main [class*="bg-clip-text"][class*="text-transparent"] {
  background: none !important;
  color: var(--ds-text) !important;
  -webkit-text-fill-color: currentColor !important;
}

main [class*="rounded-3xl"],
main [class*="rounded-[2rem]"] {
  border-radius: 1rem !important;
}

main input:not([type="checkbox"]):not([type="radio"]),
main textarea,
main select {
  border-color: var(--ds-line-strong) !important;
  border-radius: 0.625rem !important;
  background: #0d1116 !important;
  color: var(--ds-text) !important;
  box-shadow: none !important;
}

main input:focus,
main textarea:focus,
main select:focus {
  border-color: var(--ds-accent) !important;
  outline: 2px solid rgba(59, 130, 246, 0.18) !important;
  outline-offset: 1px;
}

main .card-hover-lift {
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease !important;
}

main .card-hover-lift:hover {
  border-color: var(--ds-line-strong) !important;
  box-shadow: none !important;
  transform: translateY(-2px) !important;
}

main [class*="backdrop-blur-xl"] {
  backdrop-filter: blur(8px);
}

main .text-slate-400 { color: var(--ds-muted) !important; }
main .text-cyan-400,
main .text-cyan-300,
main .text-sky-400,
main .text-sky-300 { color: #75a7ff !important; }

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