/* M8 HUB design tokens — "Midnight Aurora" (WEB1 design 4).
   Shared by every page of the app (shop now, Admin Web later): colours,
   gradients, radii, fonts, light and dark. Nothing page-specific here. */

:root {
  color-scheme: dark;
  --bg: #07060f;
  --bg-2: #0d0b1c;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --panel-solid: #12101f;
  --border: rgba(255, 255, 255, 0.085);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #f5f3ff;
  --muted: #aba6c8;
  --faint: #716c92;
  --violet: #8b5cff;
  --pink: #ff4fa3;
  --cyan: #38e1ff;
  --orange: #ff9a5a;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --gold: #f5c76b;
  --brand: linear-gradient(115deg, #7c4dff, #c04bff 38%, #ff4fa3 70%, #ff9a5a);
  --brand-soft: linear-gradient(115deg, rgba(124, 77, 255, 0.22), rgba(255, 79, 163, 0.16));
  --wallet: linear-gradient(140deg, #2a1268 0%, #4b1fa8 46%, #7c2d9e 100%);
  --glow: 0 10px 30px -10px rgba(139, 92, 255, 0.75);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.8);
  --blur: blur(14px) saturate(140%);
  --scrim: rgba(4, 3, 10, 0.62);
  --dot: rgba(255, 255, 255, 0.07);
  --aurora-1: rgba(124, 77, 255, 0.32);
  --aurora-2: rgba(255, 79, 163, 0.22);
  --aurora-3: rgba(56, 225, 255, 0.16);
  --r-card: 24px;
  --r-card-lg: 26px;
  --r-card-sm: 22px;
  --r-btn: 14px;
  --r-btn-lg: 16px;
  --r-chip: 9px;
  --r-pill: 999px;
  --gutter: 16px;
  --topbar-h: 64px;
  --sidebar-w: 262px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Myanmar",
    "Myanmar Text", Padauk, "Noto Sans Thai", "Noto Sans JP", "Hiragino Sans",
    sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f4fb;
  --bg-2: #ecebf6;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-2: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --border: rgba(19, 16, 31, 0.08);
  --border-2: rgba(19, 16, 31, 0.14);
  --text: #13101f;
  --muted: #5e5a78;
  --faint: #8a86a3;
  --ok: #059669;
  --warn: #b45309;
  --bad: #dc2626;
  --gold: #b7862a;
  --glow: 0 10px 26px -12px rgba(124, 77, 255, 0.55);
  --shadow: 0 16px 40px -26px rgba(40, 30, 90, 0.35);
  --scrim: rgba(20, 16, 40, 0.38);
  --dot: rgba(19, 16, 31, 0.06);
  --aurora-1: rgba(124, 77, 255, 0.16);
  --aurora-2: rgba(255, 79, 163, 0.12);
  --aurora-3: rgba(56, 225, 255, 0.12);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:lang(my) body,
html[lang="my"] body {
  line-height: 1.75;
}

/* Fixed aurora: three soft radial lights and a dot grid fading down. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 8% -6%, var(--aurora-1), transparent 70%),
    radial-gradient(52vw 46vh at 96% 2%, var(--aurora-2), transparent 70%),
    radial-gradient(70vw 50vh at 50% 108%, var(--aurora-3), transparent 70%),
    var(--bg);
}

.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

img,
svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.grad-text {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

@keyframes m8-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes m8-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

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

@keyframes m8-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

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