:root {
  /* Design tokens (shared brand primitives) */
  --noc-primary: #D32F2F;
  --noc-primary-rgb: 211, 47, 47;
  --noc-primary-active: #B71C1C;
  --noc-primary-active-rgb: 183, 28, 28;
  --noc-secondary: #181C32;
  --noc-dark: #121212;

  --noc-surface: #FFFFFF;
  --noc-bg: #F5F8FA;
  --noc-ink: #181C32;

  --noc-font-sans: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  --noc-radius-xxs: 2px;
  --noc-radius-xs: 6px;
  --noc-radius-sm: 10px;
  --noc-radius-md: 14px;
  --noc-radius-lg: 16px;

  --noc-shadow-card: 0 18px 45px rgba(24, 28, 50, 0.06);
  --noc-shadow-float: 0 22px 55px rgba(0, 0, 0, 0.28);

  --noc-space-1: 4px;
  --noc-space-2: 8px;
  --noc-space-3: 12px;
  --noc-space-4: 16px;
  --noc-space-5: 24px;

  /* Backwards-compatible aliases */
  --neuro-primary: var(--noc-primary);
  --neuro-primary-active: var(--noc-primary-active);
  --neuro-secondary: var(--noc-secondary);
  --neuro-dark: var(--noc-dark);
  --neuro-bg: var(--noc-bg);
  --neuro-text: var(--noc-ink);
}

html,
body {
  font-family: var(--noc-font-sans);
}

/* Subtle "neural pathways" background pattern */
.neuro-bg {
  background-color: var(--neuro-bg);
  background-image:
    linear-gradient(90deg, rgba(24, 28, 50, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(24, 28, 50, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgba(211, 47, 47, 0.06) 0, transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(24, 28, 50, 0.05) 0, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(211, 47, 47, 0.04) 0, transparent 45%);
  background-size: 46px 46px, 46px 46px, auto, auto, auto;
}

.neuro-glass-nav {
  background: rgba(24, 28, 50, 0.55);
  border-bottom: 1px solid rgba(245, 248, 250, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.neuro-btn {
  border-radius: var(--noc-radius-xxs);
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.neuro-btn:focus-visible,
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(var(--noc-primary-rgb), 0.35);
  outline-offset: 2px;
}

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

.neuro-btn-primary {
  background: var(--neuro-primary);
  color: #fff;
  box-shadow: 0 10px 25px rgba(211, 47, 47, 0.18);
}

.neuro-btn-primary:hover {
  background: var(--neuro-primary-active);
}

.neuro-btn-ghost {
  background: rgba(245, 248, 250, 0.08);
  border: 1px solid rgba(245, 248, 250, 0.18);
  color: #fff;
}

.neuro-btn-ghost:hover {
  background: rgba(245, 248, 250, 0.12);
}

.neuro-btn-outline {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(228, 230, 239, 1);
  color: var(--noc-ink);
  box-shadow: 0 10px 24px rgba(24, 28, 50, 0.08);
}

.neuro-btn-outline:hover {
  background: rgba(255, 255, 255, 0.9);
}

.neuro-card {
  border-radius: var(--noc-radius-md);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(228, 230, 239, 0.8);
  box-shadow: var(--noc-shadow-card);
}

.neuro-accent-top {
  position: relative;
  overflow: hidden;
}

.neuro-accent-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--neuro-primary);
}

.neuro-price {
  color: var(--neuro-primary);
}

.neuro-icon {
  color: var(--neuro-primary);
}

/* SweetAlert2 (confirmation buttons should look like buttons) */
.swal2-popup {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  border-radius: 16px !important;
}

.swal2-actions {
  gap: 10px;
}

.swal2-styled {
  border-radius: 10px !important;
  padding: 10px 16px !important;
  font-weight: 600 !important;
  box-shadow: 0 10px 24px rgba(24, 28, 50, 0.12) !important;
}

.swal2-styled:focus {
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.22) !important;
}

.swal2-styled.swal2-confirm {
  background: #D32F2F !important;
}

.swal2-styled.swal2-confirm:hover {
  background: #B71C1C !important;
}

.swal2-styled.swal2-cancel {
  background: rgba(228, 230, 239, 0.9) !important;
  color: #181C32 !important;
}

.swal2-styled.swal2-cancel:hover {
  background: rgba(228, 230, 239, 1) !important;
}

/* Accessible helpers */
.noc-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Fullscreen app loader */
.noc-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 280ms ease, visibility 0s linear 280ms;
  pointer-events: all;
}

.noc-loader--fadeout {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.noc-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(211, 47, 47, 0.95);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  text-align: center;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform 180ms ease, opacity 180ms ease;
}

.noc-offline-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.noc-loader__inner {
  display: grid;
  place-items: center;
}

.noc-loader__logo {
  width: 128px;
  height: 128px;
  max-width: 60vw;
  max-height: 60vw;
  will-change: transform, opacity;
  transform-origin: center;
  animation: nocLogoPulse 1.35s ease-in-out infinite;
}

@keyframes nocLogoPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.88;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
  100% {
    transform: scale(0.96);
    opacity: 0.88;
  }
}

@media (prefers-reduced-motion: reduce) {
  .noc-loader__logo {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
