/* === main.css === */
/* === fonts.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Self-Hosted Google Fonts
   ═══════════════════════════════════════════════════════════════
   Fonts: Manrope (400,500,600,700,800) + Sora (400,500,600,700)
   Format: WOFF2 (modern browsers) + WOFF fallback

   To fully self-host:
   1. Download WOFF2 files from https://gwfh.mranftl.com/fonts
   2. Place them in /public/assets/fonts/
   3. Uncomment the @font-face declarations below
   4. Remove the Google Fonts <link> from all HTML pages

   Until then, this file uses Google Fonts CDN with font-display: swap
   for optimal loading.
   ═══════════════════════════════════════════════════════════════ */

/* ── Manrope ──────────────────────────────────────────────────── */
/* Uncomment when files are downloaded:
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/manrope-regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/manrope-medium.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/manrope-semibold.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/manrope-bold.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-extrabold.woff2") format("woff2");
}
*/

/* ── Sora ─────────────────────────────────────────────────────── */
/* Uncomment when files are downloaded:
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/sora-regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/sora-medium.woff2") format("woff2");
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/sora-semibold.woff2") format("woff2");
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/sora-bold.woff2") format("woff2");
}
*/


/* === base.css === */
/* Guest gating: elements marked [data-guest-hide] are member-only (menu, control
   hub, etc.). Hidden by default so guests never see a flash; revealed only once a
   non-guest role is confirmed on <body data-user-role>. Each target restores its
   own display value (revert would drop the flex layout). */
[data-guest-hide] { display: none !important; }
body[data-user-role="member"] .top-nav[data-guest-hide],
body[data-user-role="tester"] .top-nav[data-guest-hide],
body[data-user-role="support"] .top-nav[data-guest-hide],
body[data-user-role="admin"] .top-nav[data-guest-hide],
body[data-user-role="owner"] .top-nav[data-guest-hide] { display: flex !important; }
body[data-user-role="member"] .ctl-hub[data-guest-hide],
body[data-user-role="tester"] .ctl-hub[data-guest-hide],
body[data-user-role="support"] .ctl-hub[data-guest-hide],
body[data-user-role="admin"] .ctl-hub[data-guest-hide],
body[data-user-role="owner"] .ctl-hub[data-guest-hide] { display: inline-flex !important; }

/* TEMP DEBUG: reveal guest-hidden chrome (menu + controls) when dev open-access
   is on, so gated pages are navigable without a login. Remove with the rest of
   the debug bypass. */
html.dev-open .top-nav[data-guest-hide] { display: flex !important; }
html.dev-open .ctl-hub[data-guest-hide] { display: inline-flex !important; }

:root {
  color-scheme: dark;
  --bg-0: #06080f;
  --bg-1: #0b1222;
  --bg-2: #101b30;
  --bg-3: #14203a;
  --glass-bg: rgba(16, 24, 40, 0.42);
  --glass-bg-strong: rgba(16, 24, 40, 0.65);
  --glass-border: rgba(160, 190, 230, 0.22);
  --glass-shadow: 0 18px 50px rgba(3, 8, 18, 0.5), 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-glow: 0 0 40px rgba(118, 224, 255, 0.2);
  --surface: rgba(12, 20, 36, 0.92);
  --surface-2: rgba(18, 28, 48, 0.88);
  --text: #eef3ff;
  --muted: #a8b9d4;
  --accent: #7bdcff;
  --accent-purple: #7c3aed;
  --blur-sm: 8px;
  --blur-md: 18px;
  --blur-lg: 28px;
  --blur-xl: 40px;
  --glass: var(--glass-bg);
  --glass-strong: var(--glass-bg-strong);
  --glass-soft: rgba(255, 255, 255, 0.04);
  --surface-strong: var(--surface-2);
  --overlay: rgba(8, 14, 26, 0.92);
  --blur-surface: var(--blur-md);
  --border-subtle: color-mix(in srgb, var(--glass-border) 70%, transparent);
  --border-strong: rgba(175, 206, 240, 0.32);
  --border-inner: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(123, 220, 255, 0.35);
  --text-muted: var(--muted);
  --text-soft: #c8d5f2;
  --accent-2: #8de6d6;
  --accent-3: #d9b77a;
  --status-success: #6ee3b2;
  --status-warning: #f2c98f;
  --status-danger: #f09cb0;
  --status-muted: #8b97b2;

  /* Banner carousel component tokens */
  --banner-card-width: 220px;
  --banner-card-width-mobile: 180px;
  --banner-aspect: 16 / 9;

  /* Spin wheel segment colors */
  --wheel-1: #6ee7b7;
  --wheel-2: #3b82f6;
  --wheel-3: #f59e0b;
  --wheel-4: #ef4444;
  --wheel-5: #8b5cf6;
  --wheel-6: #10b981;
  --wheel-7: #f97316;
  --radius-xs: 12px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-1: 0 10px 28px rgba(4, 10, 20, 0.32), 0 1px 2px rgba(4, 8, 14, 0.5);
  --shadow-2: 0 18px 52px rgba(3, 8, 18, 0.45), 0 2px 10px rgba(3, 7, 14, 0.6);
  --shadow-3: 0 30px 80px rgba(2, 6, 16, 0.5), 0 4px 18px rgba(3, 8, 18, 0.45);
  --shadow-glow: var(--glass-glow);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(4, 8, 16, 0.45);

  /* Liquid glass refraction system */
  --liquid-refraction: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    transparent 40%,
    rgba(123, 220, 255, 0.08) 60%,
    rgba(255, 255, 255, 0.12) 80%,
    rgba(255, 255, 255, 0.06) 100%
  );
  --liquid-highlight: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0) 45%
  );
  --liquid-caustic: radial-gradient(
    ellipse at 30% 20%,
    rgba(123, 220, 255, 0.2) 0%,
    transparent 50%
  );

  --sb-size: 10px;
  --sb-track: rgba(16, 24, 40, 0.35);
  --sb-track-border: rgba(160, 190, 230, 0.10);
  --sb-thumb: rgba(123, 220, 255, 0.30);
  --sb-thumb-hover: rgba(123, 220, 255, 0.5);
  --sb-thumb-border: rgba(255, 255, 255, 0.22);
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --success: var(--status-success);
  --bg: var(--bg-0);
  --font-body: var(--font-sans);
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 1000;
  --z-modal: 1050;
  --z-toast: 9000;
  --z-tooltip: 9500;
  --z-captcha: 9200;
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-lg: 16px;
  --gap-xl: 20px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* ── Button system tokens ── */
  --btn-padding-xs: 3px 8px;
  --btn-padding-sm: 4px 10px;
  --btn-padding-base: 10px 17px;
  --btn-padding-lg: 14px 32px;
  --btn-padding-xl: 16px 40px;
  --btn-font-xs: 10px;
  --btn-font-sm: 11px;
  --btn-font-base: 13px;
  --btn-font-lg: 16px;
  --btn-font-xl: 18px;
  --btn-icon-size: 40px;
  --btn-icon-size-sm: 32px;
  --btn-icon-size-lg: 48px;
  --btn-shine-duration: 0.6s;
  --btn-glow-intensity: 0.25;
  --btn-glow-spread: 30px;
  --btn-transition-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --btn-border-shimmer-speed: 3s;

  /* Button status color mixes */
  --btn-success-bg: color-mix(in srgb, var(--status-success) 20%, transparent);
  --btn-success-border: color-mix(in srgb, var(--status-success) 45%, transparent);
  --btn-success-glow: color-mix(in srgb, var(--status-success) 25%, transparent);
  --btn-warning-bg: color-mix(in srgb, var(--status-warning) 20%, transparent);
  --btn-warning-border: color-mix(in srgb, var(--status-warning) 45%, transparent);
  --btn-warning-glow: color-mix(in srgb, var(--status-warning) 25%, transparent);
  --btn-danger-bg: color-mix(in srgb, var(--status-danger) 20%, transparent);
  --btn-danger-border: color-mix(in srgb, var(--status-danger) 45%, transparent);
  --btn-danger-glow: color-mix(in srgb, var(--status-danger) 25%, transparent);

  /* Toggle pill group tokens */
  --toggle-pill-bg: color-mix(in srgb, var(--glass-bg-strong) 60%, transparent);
  --toggle-pill-border: color-mix(in srgb, var(--glass-border) 55%, transparent);
  --toggle-pill-btn-bg: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  --toggle-pill-btn-active-bg: color-mix(in srgb, var(--accent) 15%, transparent);
  --toggle-pill-btn-active-border: color-mix(in srgb, var(--accent) 40%, transparent);

  /* Fluid typography — smooth scaling from mobile to desktop */
  --fs-xs: clamp(0.6875rem, 0.65rem + 0.18vw, 0.75rem);
  --fs-sm: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fs-base: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --fs-3xl: clamp(1.875rem, 1.5rem + 1.85vw, 3rem);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

/* Custom cursor — only on devices with fine pointer + hover (desktop/laptop) */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor.is-cursor-enabled,
  body.has-custom-cursor.is-cursor-enabled *,
  body.has-custom-cursor.is-cursor-enabled *::before,
  body.has-custom-cursor.is-cursor-enabled *::after {
    cursor: none !important;
  }

  /*
    Custom cursor integration
    - Default: hide the native cursor everywhere (cursor: none)
    - Text caret: show only for actual text-entry fields
    - Keep native cursor hidden for controls (checkbox, radio, buttons, etc.)
  */

  body.has-custom-cursor.is-cursor-enabled
    input:is(
      [type="text"],
      [type="email"],
      [type="password"],
      [type="search"],
      [type="url"],
      [type="tel"],
      [type="number"],
      [type="date"],
      [type="time"],
      [type="datetime-local"],
      [type="month"],
      [type="week"]
    ),
  body.has-custom-cursor.is-cursor-enabled textarea,
  body.has-custom-cursor.is-cursor-enabled [contenteditable="true"] {
    cursor: text !important;
  }

  /* Selects keep a NATIVE pointer cursor. The custom DOM cursor can't render
     over the OS-level <option> dropdown, so without this the dropdown shows no
     cursor at all — the native pointer keeps it visible while the menu is open. */
  body.has-custom-cursor.is-cursor-enabled select {
    cursor: pointer !important;
  }

  body.has-custom-cursor.is-cursor-enabled input[type="range"],
  body.has-custom-cursor.is-cursor-enabled
    input:is(
      [type="checkbox"],
      [type="radio"],
      [type="button"],
      [type="submit"],
      [type="reset"],
      [type="file"],
      [type="color"]
    ) {
    cursor: none !important;
  }

  /* Allow range inputs to show native cursor for precise thumb dragging */
  body.has-custom-cursor.is-cursor-enabled input[type="range"],
  body.has-custom-cursor.is-cursor-enabled input[type="range"]::-webkit-slider-thumb,
  body.has-custom-cursor.is-cursor-enabled input[type="range"]::-moz-range-thumb {
    cursor: grab !important;
  }

  body.has-custom-cursor.is-cursor-enabled input[type="range"]:active,
  body.has-custom-cursor.is-cursor-enabled input[type="range"]:active::-webkit-slider-thumb,
  body.has-custom-cursor.is-cursor-enabled input[type="range"]:active::-moz-range-thumb {
    cursor: grabbing !important;
  }
}

body.is-scrollbar-dragging,
body.is-scrollbar-dragging * {
  user-select: none;
}

*::-webkit-scrollbar {
  width: var(--sb-size);
  height: var(--sb-size);
}

/* Frosted glass track: translucent dark glass with a faint inner border + a
   soft top sheen, so the whole gutter reads as a luxury glass channel. */
*::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 40%),
    var(--sb-track);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px var(--sb-track-border),
    inset 0 2px 6px rgba(2, 6, 12, 0.25);
}

/* Glass capsule thumb: glossy vertical gradient with a bright top highlight,
   a subtle accent glow, and a transparent border so it floats inside the track
   (background-clip: padding-box keeps the glass off the edges). */
*::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.35),
      color-mix(in srgb, var(--sb-thumb) 90%, transparent) 28%,
      color-mix(in srgb, var(--sb-thumb) 70%, transparent) 100%);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 0 0 8px rgba(255, 255, 255, 0.12),
    0 2px 10px rgba(2, 6, 12, 0.4),
    0 0 12px color-mix(in srgb, var(--accent, #7bdcff) 22%, transparent);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.5),
      color-mix(in srgb, var(--sb-thumb-hover) 95%, transparent) 26%,
      color-mix(in srgb, var(--sb-thumb-hover) 78%, transparent) 100%);
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 0 10px rgba(255, 255, 255, 0.18),
    0 2px 12px rgba(2, 6, 12, 0.45),
    0 0 18px color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent);
}

*::-webkit-scrollbar-corner { background: transparent; }

/* ── Custom glass WINDOW scrollbar (glass-scrollbar.js) ──────────────────────
   When active, hide the native page scrollbar and render our own frosted-glass
   capsule so it looks identical & luxurious in every browser (incl. Firefox). */
html.has-glass-scrollbar { scrollbar-width: none; }            /* Firefox */
html.has-glass-scrollbar body { -ms-overflow-style: none; }    /* old Edge */
html.has-glass-scrollbar::-webkit-scrollbar,
html.has-glass-scrollbar body::-webkit-scrollbar { width: 0; height: 0; } /* WebKit */

.glass-sb {
  position: fixed;
  top: 8px;
  bottom: 8px;
  right: 5px;
  width: 12px;
  z-index: 2147483600;
  border-radius: 999px;
  /* frosted glass channel */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 38%),
    rgba(16, 24, 40, 0.32);
  border: 1px solid rgba(160, 190, 230, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 2px 8px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.glass-sb.is-active { opacity: 1; pointer-events: auto; }
.glass-sb:hover { opacity: 1; pointer-events: auto; }
.glass-sb.is-hidden { opacity: 0 !important; pointer-events: none !important; }

.glass-sb__thumb {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 0;
  min-height: 40px;
  border-radius: 999px;
  cursor: grab;
  /* glossy glass capsule with bright top highlight + accent glow */
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.42),
      rgba(123, 220, 255, 0.42) 26%,
      rgba(123, 220, 255, 0.28) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 0 10px rgba(255, 255, 255, 0.14),
    0 3px 12px rgba(2, 6, 12, 0.45),
    0 0 14px rgba(123, 220, 255, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.glass-sb__thumb:hover {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.6),
      rgba(123, 220, 255, 0.6) 24%,
      rgba(123, 220, 255, 0.4) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.7),
    inset 0 0 12px rgba(255, 255, 255, 0.2),
    0 3px 14px rgba(2, 6, 12, 0.5),
    0 0 22px rgba(123, 220, 255, 0.5);
}
.glass-sb.is-dragging .glass-sb__thumb { cursor: grabbing; }

:where(
  .panel-body,
  .thread-body,
  .message-list,
  .ticket-list,
  .status-list,
  .dashboard-chat,
  .admin-product-list,
  .admin-user-list,
  .admin-revenue,
  .admin-management-suite .admin-list-stack,
  .admin-list-stack,
  .admin-sub-list,
  .admin-user-results,
  .audit-timeline,
  .infinite-list,
  .admin-user-editor .panel-body,
  .admin-lab-table,
  select[multiple],
  select[size],
  .code-input,
  .rich-surface
) {
  --sb-size: 8px;
  --sb-track: rgba(16, 24, 40, 0.30);
  --sb-track-border: rgba(160, 190, 230, 0.12);
  --sb-thumb: rgba(123, 220, 255, 0.32);
  --sb-thumb-hover: rgba(123, 220, 255, 0.5);
  --sb-thumb-border: rgba(255, 255, 255, 0.20);
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
}

html {
  scroll-behavior: smooth;
  /* "auto" (not "thin") so Firefox renders a fuller, clearly-tinted glass bar —
     "thin" looks almost identical to the default hairline. Chrome/Edge use the
     ::-webkit-scrollbar glass styling above regardless. */
  scrollbar-width: auto;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
  /* Always reserve the scrollbar gutter so toggling overflow (the splash intro
     removing 'splash-scrollable') never changes layout width — removes the
     small downward "jump" when the intro finishes. */
  scrollbar-gutter: stable;
}

body.body-bg {
  background:
    radial-gradient(80% 70% at 8% 6%,   rgba(123, 220, 255, 0.24), transparent 55%),
    radial-gradient(70% 65% at 92% 10%,  rgba(217, 183, 122, 0.18), transparent 50%),
    radial-gradient(60% 55% at 5% 50%,   rgba(56, 189, 195, 0.14), transparent 50%),
    radial-gradient(65% 60% at 82% 45%,  rgba(139, 120, 220, 0.12), transparent 50%),
    radial-gradient(90% 70% at 45% 90%,  rgba(110, 231, 183, 0.14), transparent 55%),
    radial-gradient(50% 45% at 50% 38%,  rgba(123, 220, 255, 0.10), transparent 50%),
    linear-gradient(168deg, var(--bg-0) 0%, var(--bg-1) 40%, #0a1628 65%, var(--bg-0) 100%);
  /* Flex column so the footer's `margin-top: auto` actually pushes it to the
     bottom of the viewport on short pages (e.g. radar) instead of floating
     mid-page. min-height keeps the body at least one screen tall. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Flow children of the flex-column body must span the full width. Without this
   a child that is itself a centered flex row (e.g. .error-shell) collapses to its
   content width in the cross axis, squeezing inner text into hundreds of wrapped
   lines and inflating the page height.
   Only target real layout regions — NOT fixed/absolute helper overlays (custom
   cursor, glass scrollbar, context menu, toasts, modals, friends dock), which are
   out of flow and must keep their own width (the `> *` form wrongly stretched the
   26px cursor to the full body width, producing a giant blurry capsule). */
body.body-bg > main,
body.body-bg > header,
body.body-bg > footer,
body.body-bg > section,
body.body-bg > .page-shell,
body.body-bg > .error-shell { width: 100%; }

.body-bg::before,
.body-bg::after {
  content: "";
  position: fixed;
  inset: -12%;
  pointer-events: none;
  z-index: -2;
}

.body-bg::before {
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12), transparent 42%),
    radial-gradient(circle at 78% 70%, rgba(123, 220, 255, 0.12), transparent 50%),
    radial-gradient(circle at 52% 62%, rgba(217, 183, 122, 0.1), transparent 54%);
  opacity: 0.38;
  filter: blur(20px);
  animation: auroraShift 20s ease-in-out infinite alternate;
}

.body-bg::after {
  background-image: radial-gradient(ellipse at center, rgba(4, 6, 10, 0) 0%, rgba(4, 6, 10, 0.6) 70%);
  opacity: 0.4;
  z-index: -1;
}

/* Scroll-based splash screen dismissal */
body.splash-scrollable {
  overflow-y: auto;
  min-height: 200vh;
}

/* Aurora ambient background animation */
@keyframes auroraShift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.38;
  }
  33% {
    transform: translate(2%, -1%) scale(1.02);
    opacity: 0.42;
  }
  66% {
    transform: translate(-1%, 2%) scale(0.98);
    opacity: 0.35;
  }
  100% {
    transform: translate(1%, -2%) scale(1.01);
    opacity: 0.4;
  }
}

/* Mesh gradient background animation (merged from components.css) */
@keyframes meshShift {
  0%, 100% { opacity: 0.5; transform: scale(1) translate(0, 0); }
  25% { opacity: 0.8; transform: scale(1.02) translate(-1%, 1%); }
  50% { opacity: 0.6; transform: scale(1.04) translate(1%, -1%); }
  75% { opacity: 0.9; transform: scale(1.02) translate(-1%, -1%); }
}

/* ============================================================
   MOBILE & TOUCH DEVICE ADJUSTMENTS
   ============================================================ */

/* Mobile: reduced blur for performance */
@media (max-width: 720px) {
  :root {
    --blur-sm: 4px;
    --blur-md: 10px;
    --blur-lg: 16px;
    --blur-xl: 24px;
  }

  .body-bg::before {
    filter: blur(12px);
  }
}

/* ============================================================
   ACCESSIBILITY: Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .body-bg::before {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   ACCESSIBILITY: High Contrast Mode
   ============================================================ */
@media (prefers-contrast: high) {
  :root {
    --glass-border: rgba(160, 190, 230, 0.5);
    --border-subtle: rgba(160, 190, 230, 0.5);
    --border-strong: rgba(175, 206, 240, 0.6);
    --muted: #b0c4de;
    --text-soft: #dce5f7;
  }
}

/* ============================================================
   TOUCH DEVICES: Performance optimizations
   ============================================================ */
@media (pointer: coarse) {
  .body-bg::before {
    animation: none;
    filter: blur(14px);
  }
}

/* ============================================================
   BASE ELEMENT STYLES
   ============================================================ */
img {
  max-width: 100%;
  display: block;
}

video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Skip Navigation Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg-0);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  outline: none;
}

.skip-link:focus-visible {
  top: 16px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBLE FOCUS INDICATORS (WCAG 2.2 — Focus Visible)
   ═══════════════════════════════════════════════════════════════ */

/* Global focus-visible for all interactive elements */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Enhanced focus for buttons and links */
button:focus-visible,
a:focus-visible,
a.btn:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(123, 220, 255, 0.25);
}

/* Focus for form inputs */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.2);
}

/* The Find overlay's search input is auto-focused on open and is already the
   clear focal point — suppress the global focus outline/ring so it doesn't
   show a harsh cyan rectangle. (The wrap shows a soft cue instead.) */
.find-input:focus,
.find-input:focus-visible {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Focus for custom interactive elements */
[tabindex]:focus-visible,
.steam-thumb:focus-visible,
.topbar-nav-trigger:focus-visible,
.preview-finish-btn:focus-visible,
.icon-toggle-pill__btn[data-notification-bell]:focus-visible,
[data-tooltip]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(123, 220, 255, 0.25);
}

/* Remove default outline for mouse users (keep for keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════
   COLOR CONTRAST FIX (WCAG 2.2 AA — 4.5:1 minimum)
   Old --muted: #9fb1cc on --bg-0: #06080f = 4.35:1 (FAIL)
   New --muted: #a8b9d4 on --bg-0: #06080f = 4.55:1 (PASS)
   ═══════════════════════════════════════════════════════════════ */

/* ============================================================
   Global mobile / touch polish (added)
   ============================================================ */
@media (max-width: 768px) {
  /* Comfortable tap targets — Apple/Google guideline is ~44px. */
  .btn,
  .ctl-trigger,
  .topbar-nav-trigger,
  .footer-links a,
  .nav-mega-section a {
    min-height: 44px;
  }
  .btn { padding-top: 12px; padding-bottom: 12px; }

  /* Footer stacks cleanly and stays centered on small screens. */
  .site-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Prevent iOS Safari from auto-zooming when focusing inputs: any input/select/
   textarea must be >= 16px on small screens. (Desktop styling is unaffected.) */
@media (max-width: 640px) {
  input, select, textarea,
  .field input, .field select, .field textarea,
  .game-search-input, .gift-code-input, .mono-input {
    font-size: 16px !important;
  }
}

/* Safety net: never allow a stray wide element to create a horizontal scrollbar
   on touch/narrow viewports. */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
}

/* === animations.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Liquid Glass & Anti-Gravity Animation System
   ═══════════════════════════════════════════════════════════════ */

/* (Removed unused @keyframes panelGlow — its only consumer, the dead
   .glass-panel::after panelGlow rule, was removed.) */

/* ── Liquid glass refraction shimmer ── */
@keyframes liquidRefraction {
  0%   { background-position: 0% 0%; opacity: 0.4; }
  50%  { background-position: 100% 100%; opacity: 0.6; }
  100% { background-position: 0% 0%; opacity: 0.4; }
}

/* (Removed unused @keyframes causticLight — it animated filter:blur() which
   forces full re-rasterization each frame; never referenced anywhere.) */

/* ── Anti-gravity float (gentle bobbing) ── */
@keyframes antiGravityFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-12px) rotate(0.5deg); }
  50%      { transform: translateY(-6px) rotate(-0.3deg); }
  75%      { transform: translateY(-16px) rotate(0.2deg); }
}

@keyframes antiGravityFloatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(0.8deg); }
}

@keyframes antiGravityFloatAlt {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33%      { transform: translateY(-14px) rotate(-0.6deg) scale(1.01); }
  66%      { transform: translateY(-8px) rotate(0.4deg) scale(0.99); }
}

/* ── Floating particles ── */
@keyframes particleDrift {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translate(var(--drift-x, 40px), var(--drift-y, -80px)) scale(0.3); opacity: 0; }
}

/* ── Glass border pulse ── */
@keyframes glassBorderPulse {
  0%, 100% { border-color: color-mix(in srgb, var(--accent) 20%, var(--glass-border)); }
  50%      { border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border)); }
}

/* ── Holographic shimmer (for premium cards) ── */
@keyframes holoShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Gentle scale breathe ── */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}

/* ── Stagger fade in from below ── */
@keyframes fadeInUp {
  0%   { opacity: 0; transform: translateY(28px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  0%   { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Glow pulse for status indicators ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(123, 220, 255, 0.3); }
  50%      { box-shadow: 0 0 24px rgba(123, 220, 255, 0.5); }
}

/* ── Button glow pulse on hover ─ */
@keyframes btnGlowPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--btn-glow-pulse-color, rgba(123, 220, 255, 0)); }
  50% { box-shadow: 0 0 0 6px var(--btn-glow-pulse-color, rgba(123, 220, 255, 0.15)); }
}

/* ─ Shine sweep across button surface ── */
@keyframes btnShineSweep {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}

/* ── Loading spinner rotation ── */
@keyframes btnSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Border shimmer (gradient moves along border) ─ */
@keyframes btnBorderShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Luxury button caustic ripple ── */
@keyframes btnCausticRipple {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* ── Icon toggle pill active indicator slide ── */
@keyframes toggleIndicatorSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(var(--indicator-offset, 100%)); }
}

/* ── Video background overlay shimmer ── */
@keyframes videoOverlayShimmer {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 0.85; }
}

/* ── Liquid glass surface animation (for .liquid-glass class) ── */
.liquid-glass {
  position: relative;
  overflow: hidden;
}

.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-refraction);
  background-size: 200% 200%;
  animation: liquidRefraction 8s ease-in-out infinite;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

/* ── Anti-gravity floating element classes ── */
.ag-float {
  animation: antiGravityFloat 6s ease-in-out infinite;
}

.ag-float-slow {
  animation: antiGravityFloatSlow 8s ease-in-out infinite;
}

.ag-float-alt {
  animation: antiGravityFloatAlt 7s ease-in-out infinite;
}

.ag-float-delay-1 { animation-delay: -1.5s; }
.ag-float-delay-2 { animation-delay: -3s; }
.ag-float-delay-3 { animation-delay: -4.5s; }

/* ── Stagger animation utility ── */
.stagger-in > * {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.stagger-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.4s; }

/* ── Interactive tilt on hover (CSS-only mild version) ── */
.glass-tilt {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  perspective: 800px;
}

.glass-tilt:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  box-shadow:
    var(--glass-shadow),
    0 0 0 1px var(--border-glow),
    0 0 60px rgba(123, 220, 255, 0.15);
}

/* ── Video background container ── */
.video-bg-container {
  position: relative;
  overflow: hidden;
}

.video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: blur(2px) saturate(1.2) brightness(0.6);
  z-index: 0;
}

.video-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 8, 15, 0.7) 0%, rgba(6, 8, 15, 0.4) 40%, rgba(6, 8, 15, 0.8) 100%),
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(6, 8, 15, 0.5) 80%);
  z-index: 1;
  pointer-events: none;
}

.video-bg-container > *:not(.video-bg):not(.video-bg-overlay) {
  position: relative;
  z-index: 2;
}

/* ── Floating particles container ── */
.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 220, 255, 0.6), transparent);
  animation: particleDrift var(--duration, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ── Holographic card effect ── */
.holo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(123, 220, 255, 0.08) 45%,
    rgba(141, 230, 214, 0.06) 50%,
    rgba(217, 183, 122, 0.08) 55%,
    transparent 60%
  );
  background-size: 250% 100%;
  animation: holoShimmer 6s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
  border-radius: inherit;
  z-index: 2;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .liquid-glass::before,
  .ag-float,
  .ag-float-slow,
  .ag-float-alt,
  .holo-card::after,
  .particle,
  .landing-particle,
  .error-particle {
    animation: none !important;
  }

  .stagger-in > * {
    animation: none !important;
    opacity: 1;
  }

  .glass-tilt:hover {
    transform: translateY(-2px);
  }

  .status-dot--live {
    animation: none !important;
  }

  .btn::before,
  .btn-primary::after,
  .btn-luxury::after,
  .btn-luxury,
  .btn-gradient-border::before,
  .btn.is-loading::after,
  .icon-toggle-pill__btn.is-active::after {
    animation: none !important;
  }

  .btn:hover {
    animation: none !important;
  }
}

/* ── Mobile performance — disable decorative infinite animations ── */
@media (max-width: 820px) {
  .ag-float,
  .ag-float-slow,
  .ag-float-alt {
    animation: none !important;
  }

  .liquid-glass::before {
    animation: none !important;
  }

  .holo-card::after {
    animation: none !important;
    display: none;
  }

  .particle,
  .landing-particle {
    animation: none !important;
    display: none;
  }

  .glass-tilt:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
  }

  .video-bg {
    filter: saturate(1.1) brightness(0.6);
  }
}

/* ── Modal overlays (shared across admin and tickets) ── */
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* === layout.css === */
/* ============================================================
   Error & blocked pages — shared shell used by:
   404, 403, 429, 500, 502, 503, 504, and blocked.html.
   Minimal, centered, same glass + accent treatment as the rest
   of the site. No navbar, no chrome — single focused card.
   ============================================================ */
.error-shell {
  /* Topbar height is ~64px; subtract so the shell fills the remaining viewport
     without overlapping the nav. */
  min-height: calc(100vh - 80px);
  display: flex;
  /* Anchor the card toward the TOP of the available space (not dead-center).
     The error card can be taller than the viewport (icon + code + title +
     message + actions + hint); centering it pushed the headline/message below
     the fold. Top-aligning keeps the error code, title and message "up" where
     they're immediately visible, and lets longer cards scroll naturally. On
     tall viewports a min-height keeps it from hugging the very top edge. */
  align-items: flex-start;
  justify-content: center;
  /* Generous top padding gives the card breathing room under the navbar while
     still sitting in the upper portion of the screen. */
  padding: clamp(24px, 6vh, 72px) 22px 48px;
  position: relative;
  z-index: 1;  /* sits above .landing-particles which is z-index: 0 */
}

.error-shell::before {
  /* Soft accent glow behind the card so it doesn't feel cold. */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 50% 35%,
      color-mix(in srgb, var(--accent) 14%, transparent) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.error-card {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  padding: 38px 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  border-radius: 24px;
  overflow: hidden;
}

.error-card::after {
  /* Subtle top-edge sheen */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--accent) 55%, transparent),
    color-mix(in srgb, #8de6d6 40%, transparent),
    transparent);
  pointer-events: none;
}

.error-code-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 85%, white 15%);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 14%, transparent),
    color-mix(in srgb, #8de6d6 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.4),
    0 0 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.error-card h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.error-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 46ch;
}

.error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.error-hint {
  font-size: 12px;
  margin-top: 4px;
  color: var(--text-muted);
}

.error-hint a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.error-hint a:hover,
.error-hint a:focus-visible {
  color: color-mix(in srgb, var(--accent) 85%, white 15%);
  border-color: var(--accent);
}

/* Blocked page — countdown styling on top of the shared error shell. */
.blocked-countdown {
  width: 100%;
  margin-top: 4px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.blocked-countdown-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.blocked-countdown-time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 90%, white 10%),
    color-mix(in srgb, #8de6d6 70%, transparent));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}

@media (max-width: 540px) {
  .error-card { padding: 28px 22px 24px; }
  .blocked-countdown-time { font-size: 30px; }
}

/* ============================================================
   Error / blocked pages — LUXURY POLISH LAYER
   Pure-CSS additions on top of the existing .error-* skeleton.
   Adds: ghost numeral, animated conic border, badge shimmer,
   refined hierarchy, glass refraction, button sweep, hover lift.
   All effects respect prefers-reduced-motion.
   ============================================================ */

/* Massive ghost numeral floating behind the card. The error code
   comes from the <body data-error-code="404"> attribute that every
   error page already carries. The default is a soft sigil that
   reads simply as cyno depth. */
body[data-error-code]::before {
  content: attr(data-error-code);
  /* absolute (not fixed) so the ghost numeral scrolls WITH the page instead of
     staying pinned — a fixed glow read as a "light shine that moves" whenever
     the page scrolled even slightly. */
  position: absolute;
  z-index: 0;
  top: 42vh;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(220px, 38vw, 520px);
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: transparent;
  background:
    radial-gradient(circle at 50% 40%,
      color-mix(in srgb, var(--accent) 22%, transparent),
      color-mix(in srgb, var(--accent) 4%, transparent) 60%,
      transparent 80%);
  -webkit-background-clip: text;
          background-clip: text;
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
  filter: blur(0.4px);
  animation: errorGhostDrift 22s ease-in-out infinite;
}

/* Friendlier text for the 'blocked' page where the data attribute
   isn't a numeral. */
body[data-error-code="blocked"]::before { content: "⛔"; font-size: clamp(180px, 28vw, 400px); }
body[data-error-code="maintenance"]::before { content: "✺"; }

@keyframes errorGhostDrift {
  0%, 100% { transform: translate(-50%, -50%) scale(1)    rotate(0deg); }
  50%      { transform: translate(-50%, -52%) scale(1.04) rotate(0.6deg); }
}

/* Promote the card above the ghost numeral and give it presence. */
.error-shell { z-index: 2; }
.error-card  { z-index: 3; }

/* Animated conic gradient border. Layered as a ::before behind the
   card (z=-1) so the existing ::after top-sheen still reads on top. */
.error-card {
  /* Even out the original asymmetric padding so the right side
     doesn't read as empty on 560-px width. */
  padding: 36px 36px 30px;
  /* Smooth lift on hover. */
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s ease,
    border-color 0.6s ease;
}

.error-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    color-mix(in srgb, var(--accent) 65%, transparent) 60deg,
    color-mix(in srgb, #8de6d6 60%, transparent) 120deg,
    transparent 200deg,
    color-mix(in srgb, var(--accent) 35%, transparent) 320deg,
    transparent 360deg);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.72;
  animation: errorBorderSpin 14s linear infinite;
  pointer-events: none;
}

@keyframes errorBorderSpin {
  to { transform: rotate(360deg); }
}

.error-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 28px 60px rgba(2, 6, 12, 0.65),
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Refined badge — keeps the existing gradient but adds a sweep
   shimmer and an entrance reveal. */
.error-code-badge {
  position: relative;
  overflow: hidden;
  animation: errorBadgeReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.error-code-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 35%,
    color-mix(in srgb, white 55%, transparent) 50%,
    transparent 65%);
  transform: translateX(-120%);
  animation: errorBadgeSweep 4.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes errorBadgeReveal {
  from { opacity: 0; transform: translateY(-6px); letter-spacing: 0.4em; }
  to   { opacity: 1; transform: translateY(0);    letter-spacing: 0.24em; }
}

@keyframes errorBadgeSweep {
  0%, 70% { transform: translateX(-120%); }
  85%     { transform: translateX(120%); }
  100%    { transform: translateX(120%); }
}

/* Hierarchy fix: the badge ALREADY shows "404", the eyebrow used to
   read the same. Demote the eyebrow visually so the h1 is the clear
   focal point. */
.error-card .eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: color-mix(in srgb, var(--text-muted) 80%, var(--accent));
  margin-top: 2px;
}

.error-card h1 {
  margin-top: 4px;
  letter-spacing: -0.01em;
}

/* Subtle keyline divider between the message and the action row.
   Pure CSS — no extra DOM needed. */
.error-actions {
  position: relative;
  margin-top: 14px;
  padding-top: 18px;
}
.error-actions::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 36%;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 40%, transparent),
    transparent);
}

/* Button shine sweep — applied to .btn-primary inside error-actions
   so the rest of the site is untouched. */
.error-actions .btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.error-actions .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.error-actions .btn-primary:hover::after {
  transform: translateX(120%);
}

/* The .error-hint inherits .metric-label by accident in the existing
   HTML. Metric-label is uppercase tracked elsewhere; here it clashes
   with sentence-case text containing inline links. Override locally. */
.error-hint {
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  font-weight: 400 !important;
}

/* Glass refraction overlay — very subtle, blends two hue washes
   diagonally. Mimics the liquid-glass treatment used on hero panels. */
.error-card {
  --error-refraction: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 8%, transparent) 0%,
    transparent 35%,
    transparent 65%,
    color-mix(in srgb, #8de6d6 8%, transparent) 100%);
  background-image: var(--error-refraction);
  background-blend-mode: screen;
}

/* Grain — 1-px SVG noise, ultra-low opacity, fixed so it doesn't
   parallax with scroll. Adds the cinema-grade matte feel without
   ever pulling focus. */
.error-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Per-code accent tints — same engine, different mood. */
body[data-error-code="403"] { --error-accent: #f59e0b; }
body[data-error-code="404"] { --error-accent: #3b82f6; }
body[data-error-code="429"] { --error-accent: #38bdf8; }
body[data-error-code="500"] { --error-accent: #f87171; }
body[data-error-code="502"] { --error-accent: #f97316; }
body[data-error-code="503"] { --error-accent: #a78bfa; }
body[data-error-code="504"] { --error-accent: #fb7185; }
body[data-error-code="blocked"] { --error-accent: #ef4444; }
body[data-error-code]::before {
  background: radial-gradient(circle at 50% 40%,
    color-mix(in srgb, var(--error-accent, var(--accent)) 24%, transparent),
    color-mix(in srgb, var(--error-accent, var(--accent)) 4%, transparent) 60%,
    transparent 80%);
  -webkit-background-clip: text;
          background-clip: text;
}
body[data-error-code] .error-code-badge {
  /* Recolor the badge frame using the per-code tint. */
  border-color: color-mix(in srgb, var(--error-accent, var(--accent)) 50%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.45),
    0 0 22px color-mix(in srgb, var(--error-accent, var(--accent)) 28%, transparent);
  color: color-mix(in srgb, var(--error-accent, var(--accent)) 85%, white 15%);
}

/* Respect reduced motion — drop animations, keep static gradients. */
@media (prefers-reduced-motion: reduce) {
  body[data-error-code]::before,
  .error-card::before,
  .error-code-badge,
  .error-code-badge::before,
  .error-actions .btn-primary::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Phone polish — keep the depth but lighten the load. */
@media (max-width: 540px) {
  body[data-error-code]::before { opacity: 0.4; filter: blur(0.6px); }
  .error-card::before { animation-duration: 22s; opacity: 0.55; }
  .error-actions::before { right: 20%; }
}


.page-shell {
  max-width: 1260px;
  width: min(calc(100% - 44px), 1260px);
  margin: 0 auto;
  padding: 28px 22px 64px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(calc(100% - 44px), 1260px);
  margin: 0 auto;
  padding: 14px 20px;

  /* glass moved to ::before to reduce backdrop-filter seams */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  border-bottom: 0;
  box-shadow: none;

  background-clip: padding-box;
  overflow: visible;
  isolation: isolate;
}

.topbar.glass-nav {
  border-top: 0;
  --shadow-inset: inset 0 -1px 0 rgba(4, 8, 16, 0.45);
}

body[data-page="status"] .topbar {
  width: min(calc(100% - 44px), 1520px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--glass-bg) 40%, transparent),
    color-mix(in srgb, var(--glass-bg-strong) 25%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.3);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

/* Gradient divider between nav and actions */
.topbar-actions::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  width: 1px;
  height: 60%;
  transform: translateY(-50%);
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--accent) 40%, transparent),
    transparent
  );
  opacity: 0.5;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-md);

  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--glass-bg-strong) 96%, transparent),
    color-mix(in srgb, var(--glass-bg) 84%, transparent)
  );

  backdrop-filter: blur(var(--blur-lg)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(140%);

  border: none;
  box-shadow: 0 14px 36px rgba(2, 8, 18, 0.46);
  background-clip: padding-box;
}

/* Liquid caustic shimmer on the topbar */
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-md);
  background: var(--liquid-highlight);
  opacity: 0.14;
  mix-blend-mode: overlay;
}

/* keep topbar content above glass */
.topbar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text);
  /* The brand wordmark must never wrap (it became "cyno." / "gg" on narrow
     mobile widths because the topbar squeezed it). */
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-dot {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.brand-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.top-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.top-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/*
  Keep hover clean: no glass rectangle.
  Hover should only reveal the underline "pill" animation (see ::after).
  The glass pill background is reserved for the active route.
*/
.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--text);
  background: transparent;
  border-color: transparent;
}

.top-nav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
}

.top-nav a.active {
  color: var(--text);
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

.top-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  bottom: auto;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(123, 220, 255, 0.4);
}

.top-nav a:hover::before,
.top-nav a:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

.top-nav a.active::before {
  opacity: 1;
  transform: scaleX(1);
}

/*
  The custom cursor "magnify" effect adds .text-magnify and uses ::after.
  For top navigation we want ONLY the underline pill, so disable that overlay.
*/
.top-nav a.text-magnify {
  transform: none;
  text-shadow: none;
  filter: none;
}

.top-nav a.text-magnify::after {
  content: none;
  display: none;
}

body.is-nav-open {
  overflow: hidden;
}

.topbar-menu-toggle {
  appearance: none;
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass) 72%, transparent);
  color: var(--text);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.topbar-menu-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 12px 26px rgba(2, 6, 12, 0.45);
  transform: translateY(-1px);
}

.topbar-menu-toggle:active {
  transform: translateY(0);
}

.topbar-menu-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

.topbar-menu-toggle__line {
  position: absolute;
  width: 16px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

.topbar-menu-toggle__line:nth-child(1) {
  transform: translateY(-5px);
}

.topbar-menu-toggle__line:nth-child(2) {
  transform: translateY(0);
}

.topbar-menu-toggle__line:nth-child(3) {
  transform: translateY(5px);
}

.topbar.is-mobile-nav-open .topbar-menu-toggle__line:nth-child(1) {
  transform: rotate(45deg);
}

.topbar.is-mobile-nav-open .topbar-menu-toggle__line:nth-child(2) {
  opacity: 0;
}

.topbar.is-mobile-nav-open .topbar-menu-toggle__line:nth-child(3) {
  transform: rotate(-45deg);
}

.top-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(4, 8, 16, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.top-nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1180px) {
  .page-shell {
    max-width: 1380px;
    width: min(calc(100% - 36px), 1380px);
    padding: 34px 24px 76px;
  }

  .topbar {
    width: min(calc(100% - 36px), 1380px);
    gap: 24px;
    padding: 15px 24px;
  }

  body[data-page="status"] .topbar {
    width: min(calc(100% - 36px), 1520px);
  }

  .brand {
    gap: 3px;
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-tag {
    letter-spacing: 0.16em;
  }

  .top-nav {
    gap: 10px;
  }

  .top-nav a {
    font-size: 12px;
    padding: 9px 13px;
  }

  .topbar-actions {
    gap: 14px;
  }

  body[data-page="landing"] .page-shell {
    max-width: 1260px;
    width: min(calc(100% - 44px), 1260px);
    padding: 28px 22px 64px;
  }

  body[data-page="landing"] .topbar {
    width: min(calc(100% - 44px), 1260px);
    gap: 18px;
    padding: 14px 20px;
  }

  body[data-page="landing"] .brand {
    gap: 2px;
  }

  body[data-page="landing"] .brand-name {
    font-size: 19px;
  }

  body[data-page="landing"] .brand-tag {
    letter-spacing: 0.14em;
  }

  body[data-page="landing"] .top-nav {
    gap: 6px;
  }

  body[data-page="landing"] .top-nav a {
    padding: 8px 11px;
  }
}

@media (max-width: 980px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .topbar-actions {
    order: 2;
    justify-content: flex-end;
  }

  .topbar-menu-toggle {
    display: inline-flex;
    order: 3;
  }

  .top-nav {
    order: 4;
    position: fixed;
    top: calc(84px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    z-index: 21;
    max-height: min(70vh, 560px);
    overflow: auto;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid color-mix(in srgb, var(--glass-border) 78%, transparent);
    background: linear-gradient(155deg, color-mix(in srgb, var(--glass-bg-strong) 92%, transparent), color-mix(in srgb, var(--glass-bg) 86%, transparent));
    box-shadow: 0 24px 60px rgba(2, 8, 18, 0.55), inset 0 0 0 1px var(--border-inner);
    backdrop-filter: blur(var(--blur-lg)) saturate(165%);
    -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(165%);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .topbar.is-mobile-nav-open .top-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .top-nav a {
    width: 100%;
    justify-content: flex-start;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--glass-border) 68%, transparent);
    background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  }

  .top-nav a.active {
    border-radius: 16px;
    border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
    background: color-mix(in srgb, var(--accent) 10%, var(--glass-bg) 90%);
  }

  .top-nav a::before {
    top: auto;
    bottom: 8px;
    left: 14px;
    right: 14px;
    height: 1px;
  }
}

@media (max-width: 640px) {
  .topbar {
    width: calc(100% - 16px);
    top: 8px;
  }

  .brand-tag {
    display: none;
  }

  .top-nav {
    left: 8px;
    right: 8px;
    top: calc(72px + env(safe-area-inset-top, 0px));
    padding: 14px;
  }
}

/* ============================================================
   Landing-hero topbar — mid-size viewport polish.
   Below 1180px the desktop overrides stop, but the default
   topbar metrics can crowd nav links into the brand. Give
   the landing page a snug tablet-friendly layout (700-980px)
   before the mobile drawer kicks in at <=980.
   ============================================================ */
@media (min-width: 700px) and (max-width: 1179px) {
  body[data-page="landing"] .topbar {
    gap: 14px;
    padding: 13px 18px;
  }
  body[data-page="landing"] .brand-name {
    font-size: 18px;
  }
  body[data-page="landing"] .brand-tag {
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  body[data-page="landing"] .top-nav {
    gap: 4px;
  }
  body[data-page="landing"] .top-nav a {
    padding: 7px 10px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }
}

/* Touch devices: bigger tap targets in the topbar.
   Pure-mouse users keep the compact pill nav. */
html.is-touch .top-nav a {
  padding: 10px 14px;
}
html.is-touch .topbar-menu-toggle {
  width: 46px;
  height: 46px;
}
html.is-touch .icon-toggle-pill,
html.is-touch .find-toggle,
html.is-touch .sound-toggle {
  min-height: 44px;  /* iOS Human Interface Guidelines tap target */
  min-width: 44px;
}

/* ============================================================
   Error pages — mobile polish
   Pages: 404 / 403 / 429 / 500 / 502 / 503 / 504 / blocked
   ============================================================ */
@media (max-width: 640px) {
  .error-shell {
    /* Topbar is shorter on phones, sticky offset is smaller. */
    min-height: calc(100vh - 60px);
    padding: 24px 14px;
  }
  .error-card {
    padding: 26px 20px 22px;
    border-radius: 20px;
  }
  .error-code-badge {
    font-size: 12px;
    padding: 5px 12px;
    letter-spacing: 0.18em;
  }
  .error-card h1 {
    font-size: 22px;
  }
  .error-message {
    font-size: 13px;
  }
  .error-actions {
    width: 100%;
  }
  .error-actions .btn {
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
    padding: 11px 12px;
    font-size: 13px;
  }
  .blocked-countdown {
    padding: 14px 14px 12px;
  }
  .blocked-countdown-time {
    font-size: 28px;
  }
}

/* ============================================================
   New topbar navigation — centered ghost glass button
   Minimalist, barely visible until hovered, then expands to full glass mega-menu
   ============================================================ */

.topbar-nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  box-shadow: none;
}

.topbar-nav-trigger:hover,
.topbar-nav-trigger:focus-visible,
.topbar-nav-trigger[aria-expanded="true"] {
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg-strong) 60%, transparent),
    color-mix(in srgb, var(--glass-bg) 40%, transparent)
  );
  color: var(--text);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent),
    0 8px 32px rgba(2, 6, 12, 0.4),
    0 0 40px color-mix(in srgb, var(--accent) 8%, transparent);
}

.topbar-nav-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.topbar-nav-trigger .action-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.topbar-nav-trigger:hover .action-icon,
.topbar-nav-trigger[aria-expanded="true"] .action-icon {
  opacity: 1;
  transform: scale(1.1);
}

.topbar-nav-label {
  display: inline;
  transition: opacity 0.3s ease;
}

/* Center the nav in the topbar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0;
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
}

/* Hide old text links */
.top-nav a:not(.topbar-nav-trigger) {
  display: none;
}

/* Action icons — premium sizing */
.topbar-action-btn .action-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* (Old centered mega-menu overrides removed — now using sidebar layout from navigation.css) */

@media (max-width: 380px) {
  .error-actions .btn {
    flex: 1 1 100%;
  }
}

/* ============================================================
   Build page (per-user MSBuild trigger + progress poll)
   ============================================================ */
.build-shell {
  display: grid;
  gap: 18px;
}

.build-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: clamp(22px, 4vw, 32px);
  text-align: center;
}

.build-hero h1 {
  margin: 0 0 8px;
}

.build-hero-actions {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.build-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.build-meta code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
}

.build-error {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--status-danger) 45%, var(--glass-border));
  background: color-mix(in srgb, var(--status-danger) 10%, transparent);
  color: color-mix(in srgb, var(--status-danger) 60%, white);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}

.build-downloads {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.build-files {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.build-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.build-file:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
              0 14px 28px rgba(2, 6, 12, 0.4);
}

.build-file-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.build-file-hash {
  font-family: var(--font-mono);
  font-size: 11px;
}

.build-history {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.build-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.build-history-row:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.build-history-id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 540px) {
  .build-hero { flex-direction: column; align-items: flex-start; }
  .build-file { flex-direction: column; align-items: flex-start; }
  .build-history-row { flex-wrap: wrap; }
}

/* ============================================================
   Live core-service rows on status.html
   Powered by /web/health, polled every 15 seconds.
   ============================================================ */
#serviceStatusList {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

#serviceStatusList .service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#serviceStatusList .service-card.is-down {
  border-color: color-mix(in srgb, var(--status-danger) 35%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 0 0 1px color-mix(in srgb, var(--status-danger) 14%, transparent),
    0 0 18px color-mix(in srgb, var(--status-danger) 12%, transparent);
}

#serviceStatusList .service-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#serviceStatusList .service-card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

#serviceStatusList .service-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#serviceStatusList .service-latency {
  font-family: var(--font-display, "Sora"), monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 50%, transparent);
  color: var(--text-soft);
}

#serviceStatusList .service-latency.is-down {
  color: color-mix(in srgb, var(--status-danger) 60%, white);
  border-color: color-mix(in srgb, var(--status-danger) 45%, transparent);
  background: color-mix(in srgb, var(--status-danger) 12%, transparent);
}

@media (max-width: 540px) {
  #serviceStatusList .service-card {
    flex-direction: column;
    align-items: flex-start;
  }
  #serviceStatusList .service-card-meta {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================
   Notification bell icon — used inside .icon-toggle-pill
   ============================================================ */

/* The bell glyph — uses the same SVG-mask technique as the
   sound and find icons so it inherits currentColor. */
.bell-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 2.2c-2.3 0-4.1 1.85-4.1 4.13v1.6c0 0.65-0.27 1.27-0.74 1.71L2 11h12l-1.16-1.36c-0.47-0.44-0.74-1.06-0.74-1.71v-1.6C12.1 4.05 10.3 2.2 8 2.2z%22/%3E%3Cpath d=%22M6.5 12.5c0 0.83 0.67 1.5 1.5 1.5s1.5-0.67 1.5-1.5%22/%3E%3C/svg%3E') center / contain no-repeat;
          mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 2.2c-2.3 0-4.1 1.85-4.1 4.13v1.6c0 0.65-0.27 1.27-0.74 1.71L2 11h12l-1.16-1.36c-0.47-0.44-0.74-1.06-0.74-1.71v-1.6C12.1 4.05 10.3 2.2 8 2.2z%22/%3E%3Cpath d=%22M6.5 12.5c0 0.83 0.67 1.5 1.5 1.5s1.5-0.67 1.5-1.5%22/%3E%3C/svg%3E') center / contain no-repeat;
  opacity: 0.95;
}

/* Subtle pulse when the user has unread notifications. */
.icon-toggle-pill__btn[data-notification-bell].has-unread .bell-icon {
  animation: bell-chime 4.5s cubic-bezier(0.36, 0, 0.66, -0.56) infinite;
  transform-origin: 50% 15%;
}

@keyframes bell-chime {
  0%, 85%, 100% { transform: rotate(0); }
  88%           { transform: rotate(-12deg); }
  92%           { transform: rotate(10deg); }
  96%           { transform: rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .icon-toggle-pill__btn[data-notification-bell].has-unread .bell-icon { animation: none; }
}

/* Badge — uses the brand accent, not bright red. */
.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 90%, white 10%),
    color-mix(in srgb, var(--accent) 60%, transparent));
  color: var(--bg, #05070d);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.02em;
  text-align: center;
  border: 1.5px solid color-mix(in srgb, var(--bg, #05070d) 80%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent),
    0 8px 20px rgba(2, 6, 12, 0.55);
  animation: badgePulse 2s ease-in-out infinite;
}

.notification-badge[hidden] { display: none; }

.notification-badge.has-new {
  animation: badgePulse 1s ease-in-out infinite, badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   LUXURY TOPBAR ACTION BUTTONS
   Search, bell, sound, more — glass-morphism, gradient icons,
   hover glow, active indicators, smooth transitions, tooltips.
   ============================================================ */

/* Base luxury action button */
.topbar-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg) 50%, transparent),
    color-mix(in srgb, var(--glass-bg-strong) 55%, transparent)
  );
  color: var(--text-soft);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.35),
    0 0 12px color-mix(in srgb, var(--glass-bg) 20%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition:
    color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  isolation: isolate;
}

/* Subtle inner shimmer */
.topbar-action-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

/* Icon sizing inside action buttons — inline SVGs (search, etc.) */
.topbar-action-btn .action-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Gradient icon for masked icons (bell, sound, find) */
.bell-icon,
.sound-toggle .action-icon,
.find-toggle .action-icon {
  background: linear-gradient(
    135deg,
    var(--text-soft) 0%,
    color-mix(in srgb, var(--accent) 80%, var(--text-soft)) 100%
  );
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  transition: background 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover glow effect */
.topbar-action-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 18%, var(--glass-bg) 55%),
    color-mix(in srgb, var(--accent) 10%, var(--glass-bg-strong) 45%)
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    inset 0 0 0 1px var(--border-inner),
    0 14px 32px rgba(2, 6, 12, 0.5),
    0 0 28px color-mix(in srgb, var(--accent) 20%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 8%, transparent);
  transform: translateY(-2px) scale(1.06);
}

.topbar-action-btn:hover::before {
  opacity: 1;
}

.topbar-action-btn:hover .bell-icon,
.topbar-action-btn:hover .sound-toggle .action-icon,
.topbar-action-btn:hover .find-toggle .action-icon {
  background: linear-gradient(
    135deg,
    var(--text) 0%,
    color-mix(in srgb, var(--accent) 90%, white 10%) 100%
  );
  transform: scale(1.1);
}

/* Active state */
.topbar-action-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Active/selected indicator */
.topbar-action-btn.is-active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 20%, var(--glass-bg) 70%),
    color-mix(in srgb, var(--accent) 12%, var(--glass-bg-strong) 50%)
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 0 0 1px var(--border-inner),
    0 14px 30px rgba(2, 6, 12, 0.5),
    0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

.topbar-action-btn.is-active .bell-icon,
.topbar-action-btn.is-active .sound-toggle .action-icon,
.topbar-action-btn.is-active .find-toggle .action-icon {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in srgb, var(--accent) 80%, white 20%) 100%
  );
  animation: activeIconPulse 2s ease-in-out infinite;
}

@keyframes activeIconPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 40%, transparent)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 60%, transparent)); }
}

/* Focus visible */
.topbar-action-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

/* Ripple effect on click */
.topbar-action-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 40%, transparent) 0%,
    color-mix(in srgb, var(--accent) 15%, transparent) 40%,
    transparent 70%
  );
  transform: scale(0);
  animation: rippleEffect 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  z-index: 0;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Tooltip on hover */
.topbar-action-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.9);
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--glass-bg-strong) 95%, transparent),
    color-mix(in srgb, var(--glass-bg) 90%, transparent)
  );
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 8px 24px rgba(2, 6, 12, 0.5),
    inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  z-index: 100;
}

/* Tooltip arrow */
.topbar-action-btn::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.9);
  width: 8px;
  height: 8px;
  background: color-mix(in srgb, var(--glass-bg-strong) 95%, transparent);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  z-index: 100;
}

.topbar-action-btn:hover::after,
.topbar-action-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.topbar-action-btn:hover::before,
.topbar-action-btn:focus-visible::before {
  opacity: 0.8;
  transform: translateX(-50%) translateY(0) scale(1);
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
      0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent),
      0 8px 20px rgba(2, 6, 12, 0.55);
  }
  50% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent),
      0 4px 18px color-mix(in srgb, var(--accent) 45%, transparent),
      0 8px 24px rgba(2, 6, 12, 0.6);
  }
}

@keyframes badgePop {
  0% { transform: scale(0.5); }
  100% { transform: scale(1); }
}

/* Search bar expand animation */
.topbar-search-expand {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search-input {
  width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  opacity: 0;
  transition:
    width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
  overflow: hidden;
  white-space: nowrap;
}

.topbar-search-expand.is-open .topbar-search-input {
  width: 180px;
  padding: 8px 12px;
  opacity: 1;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--glass-bg) 70%, transparent),
    color-mix(in srgb, var(--glass-bg-strong) 50%, transparent)
  );
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 0 16px color-mix(in srgb, var(--accent) 12%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.topbar-search-input::placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-search-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 0 20px color-mix(in srgb, var(--accent) 18%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .topbar-action-btn,
  .topbar-action-btn .action-icon,
  .topbar-action-btn.is-active .action-icon,
  .notification-badge,
  .topbar-search-expand,
  .topbar-search-input,
  .topbar-action-btn::after,
  .topbar-action-btn::before {
    animation: none !important;
    transition: opacity 0.15s ease !important;
  }
}

/* Touch devices: bigger tap targets */
@media (max-width: 980px) {
  .topbar-action-btn {
    width: 44px;
    height: 44px;
  }
  
  .topbar-actions {
    gap: 6px;
    padding: 6px 8px;
  }
  
  .topbar-action-btn::after,
  .topbar-action-btn::before {
    display: none;
  }
}

.notification-dropdown {
  position: fixed;
  top: 80px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
  max-height: 520px;
  z-index: var(--z-dropdown);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 76%, transparent));
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  box-shadow: var(--shadow-3), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifDropdownIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notifDropdownIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notification-dropdown[hidden] {
  display: none !important;
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
}

.notification-dropdown-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.notification-dropdown-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.notification-item {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.notification-item:hover {
  background: color-mix(in srgb, var(--glass-bg-strong) 60%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  transform: translateX(2px);
}

.notification-item.is-read {
  opacity: 0.6;
}

.notification-item-content {
  display: grid;
  gap: 4px;
}

.notification-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.notification-message {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* Notification dropdown filter buttons */
.notification-dropdown-filters {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.notif-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.notif-filter-btn.active {
  background: var(--accent);
  color: var(--bg-0);
}

/* Notification item icon */
.notification-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
}

/* Toast notification popup */
.notif-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--glass-bg, rgba(10, 12, 20, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  animation: notifToastSlideIn 0.3s ease-out;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.notif-toast-exit {
  animation: notifToastSlideOut 0.3s ease-in forwards;
}

.notif-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notif-toast-content {
  flex: 1;
  min-width: 0;
}

.notif-toast-title {
  font-weight: 600;
  color: var(--text-primary, #fff);
  font-size: 14px;
  margin-bottom: 4px;
}

.notif-toast-message {
  color: var(--text-muted, rgba(255, 255, 255, 0.6));
  font-size: 13px;
  line-height: 1.4;
}

.notif-toast-close {
  background: none;
  border: none;
  color: var(--text-soft, rgba(255, 255, 255, 0.4));
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.notif-toast-close:hover {
  color: var(--text-primary, #fff);
}

@keyframes notifToastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notifToastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .notification-dropdown {
    width: calc(100% - 16px);
    right: 8px;
    top: 72px;
    max-height: 70vh;
  }

  .notif-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}



/* === navigation.css === */
/* ============================================================
   CYNO.GG — Navigation System
   Slide-in sidebar opened from the topbar MENU trigger.
   ============================================================ */

/* ── Sidebar panel — slides in from the right ── */
.nav-mega-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 9999;
  width: 280px;
  max-width: calc(100vw - 48px);
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border-radius: 0;
  border: none;
  border-left: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background:
    linear-gradient(180deg,
      rgba(8, 14, 24, 0.97) 0%,
      rgba(6, 10, 18, 0.98) 100%);
  box-shadow:
    -20px 0 60px rgba(0, 0, 0, 0.5),
    inset 1px 0 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transform: translateX(100%);
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 220, 255, 0.15) transparent;
}
.nav-mega-menu::-webkit-scrollbar { width: 4px; }
.nav-mega-menu::-webkit-scrollbar-track { background: transparent; }
.nav-mega-menu::-webkit-scrollbar-thumb {
  background: rgba(123, 220, 255, 0.15);
  border-radius: 4px;
}

/* Stagger sections when the sidebar opens */
.nav-mega-menu.is-open .nav-mega-section {
  animation: navSectionSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.nav-mega-menu.is-open .nav-mega-section:nth-child(1) { animation-delay: 0.03s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(2) { animation-delay: 0.06s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(3) { animation-delay: 0.09s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(4) { animation-delay: 0.12s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(5) { animation-delay: 0.15s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(6) { animation-delay: 0.18s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(7) { animation-delay: 0.21s; }
@keyframes navSectionSlide {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-mega-menu.is-open .nav-mega-section { animation: none; }
}

.nav-mega-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.nav-mega-menu[hidden] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Top accent line */
.nav-mega-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 60%, transparent),
    color-mix(in srgb, #8de6d6 40%, transparent),
    transparent 80%);
  pointer-events: none;
  z-index: 1;
}

/* Remove the hover-bridge (was for centered dropdown) */
.nav-mega-menu::after { display: none; }

/* ── Mega menu sections ── */
.nav-mega-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
}

/* Thin separator between sections */
.nav-mega-section + .nav-mega-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ensure links visible when open */
.nav-mega-menu.is-open .nav-mega-section a {
  display: flex !important;
}

/* Section titles */
.nav-mega-section .nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--accent) 70%, var(--text-muted));
  margin: 0 0 4px;
  padding: 4px 10px 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* No dot marker — cleaner for sidebar */
.nav-mega-section .nav-section-title::before { display: none; }
/* No trailing hairline */
.nav-mega-section .nav-section-title::after { display: none; }

/* ── Nav links — compact list style ── */
.nav-mega-section a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    padding-left 0.18s ease;
}

/* Left accent bar on hover */
.nav-mega-section a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: height 0.18s ease;
}

/* Right chevron hint */
.nav-mega-section a::after {
  content: "\203A";
  margin-left: auto;
  font-size: 15px;
  line-height: 1;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-mega-section a:hover,
.nav-mega-section a:focus-visible {
  color: var(--text);
  background: rgba(123, 220, 255, 0.06);
  padding-left: 14px;
}
.nav-mega-section a:hover::before,
.nav-mega-section a:focus-visible::before { height: 55%; }
.nav-mega-section a:hover::after,
.nav-mega-section a:focus-visible::after { opacity: 1; transform: translateX(0); }

.nav-mega-section a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Active item */
.nav-mega-section a.active {
  color: var(--accent);
  background: rgba(123, 220, 255, 0.08);
}
.nav-mega-section a.active::before { height: 55%; }

/* ── Backdrop ── */
.nav-mega-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.25s ease;
}

.nav-mega-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Desktop (>=981px) ── */
@media (min-width: 981px) {
  .nav-mega-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .nav-mega-section .nav-section-title {
    grid-column: unset;
  }

  /* Keep the list style */
  .nav-mega-section a {
    flex-direction: row;
    text-align: left;
  }
  .nav-mega-section a::after { content: "\203A"; }

  .nav-mega-section a:hover,
  .nav-mega-section a:focus-visible {
    transform: none;
    box-shadow: none;
  }

  .nav-mega-section a:focus-visible {
    outline: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
    outline-offset: 1px;
  }

  /* Hover no longer opens — sidebar is click-only via JS */
}

/* ── Mobile (<=980px) ── */
@media (max-width: 980px) {
  .nav-mega-menu {
    width: 260px;
  }

  .topbar .top-nav {
    position: static !important;
    display: inline-flex !important;
    width: auto; max-height: none; overflow: visible;
    padding: 0; margin: 0;
    background: none !important; border: none !important;
    box-shadow: none !important; backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important; pointer-events: auto !important;
    transform: none !important;
  }
  .topbar .top-nav > .nav-mega-menu { position: fixed; }
  .topbar-menu-toggle { display: none !important; }
}

@media (max-width: 640px) {
  .nav-mega-menu {
    width: calc(100vw - 32px);
    max-width: 280px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .nav-mega-menu {
    transition: opacity 0.15s ease !important;
    transform: none !important;
  }

  .nav-mega-section a {
    transition: none !important;
  }
}

/* ── Touch devices: bigger tap targets ── */
html.is-touch .nav-mega-section a {
  padding: 10px 10px;
  min-height: 44px;
}

/* ── Integration with topbar ── */
.topbar .top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.topbar .top-nav.is-public-hidden {
  display: none !important;
}

@media (min-width: 981px) {
  .topbar .top-nav {
    flex-wrap: nowrap;
  }
}

.topbar .brand { flex-shrink: 0; }
.topbar .topbar-actions { flex-shrink: 0; }

/* ============================================================
   MOBILE BOTTOM TAB BAR
   ============================================================ */

@media (pointer: coarse) and (max-width: 720px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 95%, transparent), color-mix(in srgb, var(--glass-bg) 90%, transparent));
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-top: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(2, 6, 12, 0.4);
  }

  .mobile-bottom-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 10px;
    min-height: 48px;
    min-width: 56px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--radius-xs);
    transition: color 0.2s ease, background 0.2s ease;
  }

  .mobile-bottom-nav a svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav a:focus-visible {
    color: var(--text);
    background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  }

  .mobile-bottom-nav a.active {
    color: var(--accent);
  }

  .mobile-bottom-nav a.active svg {
    filter: drop-shadow(0 0 6px rgba(123, 220, 255, 0.4));
  }

  .mobile-bottom-nav .nav-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(14px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--status-danger);
    color: #041018;
    font-size: 9px;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
  }

  body {
    padding-bottom: max(64px, calc(56px + env(safe-area-inset-bottom, 0px)));
  }
}

@media (min-width: 721px), (pointer: fine) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

/* === topbar-controls.css === */
/* ============================================================================
   Control Hub — one bento trigger → one unified glass panel.
   Sections: Search · Notifications · Music · Sound.

   Design system (kept strict for a professional, cohesive feel):
     radius   : trigger 14, panel 20, fields/tiles 12, pills 999
     spacing  : 16 panel padding, 16 section rhythm, 10/12 inner gaps
     hairline : 1px rgba(255,255,255,0.07) dividers, crisp not muddy
     accent   : var(--accent) used sparingly for state, not decoration
   ============================================================================ */

.topbar-actions:has(.ctl-hub) {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar-actions:has(.ctl-hub)::before { display: none; }

.ctl-hub {
  position: relative;
  display: inline-flex;
}

.ctl-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans, "Manrope", sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  box-shadow: none;
}

.ctl-trigger:hover,
.ctl-trigger:focus-visible,
.ctl-hub.is-open .ctl-trigger {
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg-strong) 60%, transparent),
    color-mix(in srgb, var(--glass-bg) 40%, transparent)
  );
  color: var(--text);
  backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent),
    0 8px 32px rgba(2, 6, 12, 0.4),
    0 0 40px color-mix(in srgb, var(--accent) 8%, transparent);
}

.ctl-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.ctl-trigger .action-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ctl-trigger:hover .action-icon,
.ctl-hub.is-open .ctl-trigger .action-icon {
  opacity: 1;
  transform: scale(1.1) rotate(45deg);
}

.ctl-trigger-label {
  display: inline;
  transition: opacity 0.3s ease;
}

.ctl-trigger-dot {
  position: absolute;
  top: 2px; right: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent, #7bdcff);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent, #7bdcff) 80%, transparent);
}
.ctl-trigger-dot[hidden] { display: none !important; }

.ctl-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 30%),
    linear-gradient(168deg, rgba(20,30,52,0.92), rgba(11,18,33,0.95) 60%, rgba(8,13,24,0.96));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.16);
  z-index: 400;
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34,1.4,0.5,1), visibility 0s linear 0.22s;
}

.ctl-hub.is-open .ctl-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34,1.4,0.5,1), visibility 0s linear 0s;
}

.ctl-panel-glow {
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.ctl-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted, #a8b9d4);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.ctl-search:focus-within {
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #7bdcff) 10%, transparent);
}
.ctl-search > svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.ctl-search input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text, #eef3ff);
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 13px;
}
.ctl-search input::placeholder { color: color-mix(in srgb, var(--text-muted, #a8b9d4) 80%, transparent); }
.ctl-kbd {
  flex-shrink: 0;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted, #a8b9d4);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
}

.ctl-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.ctl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ctl-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text, #eef3ff);
}
.ctl-section-title svg { width: 15px; height: 15px; opacity: 0.85; }

.ctl-link {
  background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 500;
  color: var(--accent, #7bdcff);
  opacity: 0.85;
  transition: opacity 0.2s ease;
  padding: 0;
}
.ctl-link:hover { opacity: 1; }

.ctl-notif-list {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ctl-empty {
  font-size: 12px;
  color: var(--text-muted, #a8b9d4);
  opacity: 0.6;
  text-align: center;
  padding: 10px 0 4px;
}

.ctl-radio-now {
  display: flex;
  align-items: center;
  gap: 13px;
}

.ctl-vinyl {
  position: relative;
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center,
      #0a0e17 0, #0a0e17 1px,
      #12182a 1px, #12182a 2px);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(0,0,0,0.4);
  overflow: hidden;
}
.ctl-vinyl-sheen {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 45%, transparent 60%, rgba(255,255,255,0.07));
  pointer-events: none;
}
.ctl-vinyl-label {
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #7bdcff) 50%, transparent);
}
.ctl-vinyl-hole {
  position: absolute; top: 50%; left: 50%;
  width: 4px; height: 4px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0a0e17;
  z-index: 1;
}
.ctl-radio.is-playing .ctl-vinyl { animation: ctlSpin 3.2s linear infinite; }
@keyframes ctlSpin { to { transform: rotate(360deg); } }

.ctl-radio-meta { flex: 1; min-width: 0; }
.ctl-radio-title {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 14px; font-weight: 600;
  color: var(--text, #eef3ff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctl-radio-sub {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ctl-radio-browse { margin-top: 12px; }
.ctl-radio-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted, #a8b9d4);
}
.ctl-radio-search:focus-within { border-color: color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent); }
.ctl-radio-search svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.ctl-radio-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text, #eef3ff); font-family: var(--font-sans, "Manrope", sans-serif); font-size: 12px;
}
.ctl-radio-search input::placeholder { color: color-mix(in srgb, var(--text-muted, #a8b9d4) 75%, transparent); }

.ctl-radio-list {
  margin-top: 8px;
  max-height: 160px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
}
.ctl-station {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ctl-station:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.ctl-station.is-current { background: color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent); border-color: color-mix(in srgb, var(--accent, #7bdcff) 30%, transparent); }
.ctl-station-flag { font-size: 14px; flex-shrink: 0; width: 18px; text-align: center; color: var(--accent, #7bdcff); }
.ctl-station-info { flex: 1; min-width: 0; }
.ctl-station-name {
  font-size: 12px; font-weight: 500; color: var(--text, #eef3ff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctl-station-country {
  font-size: 10px; color: var(--text-muted, #a8b9d4); opacity: 0.8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctl-radio-loading { font-size: 11px; color: var(--text-muted, #a8b9d4); opacity: 0.7; text-align: center; padding: 12px 0; }

.ctl-play[disabled] { opacity: 0.4; cursor: default; pointer-events: none; }
.ctl-play .tb-icon-pause { display: none; }
.ctl-radio.is-playing .ctl-play .tb-icon-play { display: none; }
.ctl-radio.is-playing .ctl-play .tb-icon-pause { display: block; }

.ctl-play {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  cursor: pointer;
  color: #04111c;
  border: none;
  background: linear-gradient(145deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  box-shadow:
    0 4px 14px color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform 0.2s cubic-bezier(0.34,1.5,0.5,1), box-shadow 0.2s ease;
}
.ctl-play:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent, #7bdcff) 55%, transparent), inset 0 1px 0 rgba(255,255,255,0.5);
}
.ctl-play:active { transform: scale(0.94); }
.ctl-play svg { width: 17px; height: 17px; }

.ctl-vol {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text-muted, #a8b9d4);
}
.ctl-vol svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.ctl-vol input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; border-radius: 999px;
  background: linear-gradient(to right,
    var(--accent, #7bdcff) 0%, var(--accent, #7bdcff) var(--vol, 60%),
    rgba(255,255,255,0.12) var(--vol, 60%), rgba(255,255,255,0.12) 100%);
  cursor: pointer;
}
.ctl-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; cursor: pointer;
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent, #7bdcff) 60%, transparent);
  transition: transform 0.15s ease;
}
.ctl-vol input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.ctl-vol input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%; background: #fff; cursor: pointer;
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent, #7bdcff) 60%, transparent);
}

.ctl-sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ctl-sound-row .tb-wave { transform-origin: left center; opacity: 0.85; }
.ctl-sound-row.is-muted .tb-wave { display: none; }
.ctl-switch.is-active .tb-wave-1 { animation: ctlWave 1.4s ease-in-out infinite; }
.ctl-switch.is-active .tb-wave-2 { animation: ctlWave 1.4s ease-in-out infinite 0.2s; }
@keyframes ctlWave { 0%,100%{opacity:.4} 50%{opacity:1} }

.ctl-switch {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.ctl-switch-knob {
  position: absolute;
  top: 50%; left: 3px;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--text-muted, #a8b9d4);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transition: left 0.26s cubic-bezier(0.34,1.5,0.5,1), background 0.25s ease;
}
.ctl-switch.is-active {
  background: linear-gradient(135deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 55%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent, #7bdcff) 32%, transparent);
}
.ctl-switch.is-active .ctl-switch-knob {
  left: 23px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.ctl-switch:focus-visible { outline: 2px solid var(--accent, #7bdcff); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ctl-radio.is-playing .ctl-vinyl,
  .ctl-switch.is-active .tb-wave-1,
  .ctl-switch.is-active .tb-wave-2 { animation: none !important; }
}

@media (max-width: 480px) {
  .ctl-panel {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .ctl-trigger-label { display: none; }
  .ctl-trigger {
    padding-left: 10px;
    padding-right: 10px;
    min-width: 38px;
    justify-content: center;
  }
}

/* === components.css === */
.glass-panel {
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 80%, transparent), color-mix(in srgb, var(--glass-bg) 65%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), var(--glass-glow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.glass-panel > * {
  position: relative;
  z-index: 1;
}

/* Liquid glass highlight — top-left caustic light */
.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--liquid-highlight),
    var(--liquid-caustic);
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* (Removed dead .glass-panel::after "panelGlow" rule — it was overridden by the
   later .glass-panel::after borderShimmer rule, leaving only stray inset/opacity.
   The border-shimmer is now hover-gated for performance.) */

.glass-panel:hover:not(body.is-admin-page .glass-panel),
.glass-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  box-shadow:
    var(--glass-shadow),
    0 0 0 1px var(--border-glow),
    0 0 50px rgba(123, 220, 255, 0.15),
    var(--glass-glow);
}

/* The Find panel manages its own focus styling (on the input), so it should
   not get the panel-wide focus-within ring/glow or the lift. */
.find-panel.glass-panel:focus-within {
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  transform: none;
}

body:not(.is-admin-page) .glass-panel:hover,
body:not(.is-admin-page) .glass-panel:focus-within {
  transform: translateY(-3px);
}
body:not(.is-admin-page) .find-panel.glass-panel:focus-within { transform: none; }

.glass-panel:hover::before {
  opacity: 0.7;
}

.glass-card {
  background: linear-gradient(155deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-sm)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(155%);
  position: relative;
  overflow: hidden;
}

.glass-nav {
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 92%, transparent), color-mix(in srgb, var(--glass-bg) 82%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
}

.glass-modal {
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3), var(--glass-glow);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
}

.glass-button,
.glass-button-primary {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.glass-input {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
}

/* Keep decorative pseudo-layers aligned to host corner radius. */
:where(
  .glass-panel,
  .glass-card,
  .glass-nav,
  .glass-modal,
  .glass-button,
  .glass-button-primary,
  .btn,
  .btn-primary,
  .btn-ghost,
  .btn-outline,
  .btn-chip,
  .pill,
  .toggle,
  .cyno-select__button,
  .cyno-select__panel,
  .cyno-select__option,
  .hint-popover,
  .context-menu,
  .find-overlay,
  .catalog-media,
  .catalog-media-frame,
  .store-3d-front,
  .store-3d-card,
  .preview-3d-front,
  .preview-3d-face,
  .spline-stage,
  .landing-spline-shell,
  .plan-card,
  .plan-option,
  .service-card,
  .status-row,
  .message-item,
  .ticket-item,
  .profile-row,
  .auth-card
)::before,
:where(
  .glass-panel,
  .glass-card,
  .glass-nav,
  .glass-modal,
  .glass-button,
  .glass-button-primary,
  .btn,
  .btn-primary,
  .btn-ghost,
  .btn-outline,
  .btn-chip,
  .pill,
  .toggle,
  .cyno-select__button,
  .cyno-select__panel,
  .cyno-select__option,
  .hint-popover,
  .context-menu,
  .find-overlay,
  .catalog-media,
  .catalog-media-frame,
  .store-3d-front,
  .store-3d-card,
  .preview-3d-front,
  .preview-3d-face,
  .spline-stage,
  .landing-spline-shell,
  .plan-card,
  .plan-option,
  .service-card,
  .status-row,
  .message-item,
  .ticket-item,
  .profile-row,
  .auth-card
)::after {
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .glass-panel::after {
    animation: none;
  }

  .btn,
  .glass-button {
    transition: none;
  }
}

.panel-body {
  padding: 20px;
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
}

.panel-header h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.panel-header p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.panel-header + .panel-body {
  padding-top: 12px;
}

.panel-body,
.metric-label,
.metric-value,
.status-meta,
.status-name,
.message-title,
.message-preview,
.thread-meta,
.catalog-title,
.catalog-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.field {
  display: grid;
  gap: 10px;
}

.field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.toggle-label {
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toggle {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-sm)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(155%);
}

.tilt-card {
  --tilt-x: 0;
  --tilt-y: 0;
  --tilt-scale: 1;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--tilt-y) * 1deg)) rotateY(calc(var(--tilt-x) * 1deg)) scale(var(--tilt-scale));
  transition: transform 0.35s ease;
  will-change: transform;
}

.tilt-card.is-tilting {
  transition: transform 0.08s ease;
}

.tilt-layer {
  transform: translateZ(18px);
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card,
  .tilt-card.is-tilting {
    transition: none;
    transform: none;
  }
}

.glass-input,
.catalog-search input,
.field input,
.field select,
.field textarea,
.thread-search,
.thread-input input {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 86%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  color: var(--text);
  padding: 11px 14px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.38);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.thread-input input {
  flex: 1;
}

.glass-input:focus,
.catalog-search input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.thread-search:focus,
.thread-input input:focus {
  outline: none;
}

.glass-input:focus-visible,
.catalog-search input:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.thread-search:focus-visible,
.thread-input input:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

.field input::placeholder,
.field textarea::placeholder,
.thread-input input::placeholder,
.thread-search::placeholder {
  color: color-mix(in srgb, var(--text-muted) 85%, transparent);
}

select {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 86%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  color: var(--text);
  padding: 11px 40px 11px 14px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.38);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

select:not([multiple]):not([size]) {
  appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--text-muted) 75%, transparent) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--text-muted) 75%, transparent) 50%, transparent 50%),
    linear-gradient(90deg, color-mix(in srgb, var(--glass-border) 60%, transparent), color-mix(in srgb, var(--glass-border) 60%, transparent));
  background-position: right 18px center, right 12px center, right 34px center;
  background-size: 6px 6px, 6px 6px, 1px 55%;
  background-repeat: no-repeat;
}

select[multiple],
select[size] {
  border-radius: var(--radius-md);
  min-height: 160px;
  padding: 10px 12px;
  appearance: auto;
  background-image: none;
  overflow: auto;
  scrollbar-gutter: stable;
}

select:focus {
  outline: none;
}

select:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

select option,
select optgroup {
  background-color: var(--bg-1);
  color: var(--text);
}

/* Custom select (replaces native <select> dropdown to avoid OS resize cursors like sizeNS). */
.cyno-select {
  position: relative;
  width: 100%;
}

.cyno-select > select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.cyno-select__button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 86%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  color: var(--text);
  padding: 11px 14px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.38);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, translate 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.cyno-select__button:focus {
  outline: none;
}

.cyno-select__button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

.cyno-select__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.cyno-select__chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  position: relative;
}

.cyno-select__chevron::before,
.cyno-select__chevron::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 2px;
  background: color-mix(in srgb, var(--text-muted) 80%, transparent);
  transform-origin: center;
}

.cyno-select__chevron::before {
  left: 3px;
  transform: translateY(-50%) rotate(45deg);
}

.cyno-select__chevron::after {
  right: 3px;
  transform: translateY(-50%) rotate(-45deg);
}

.cyno-select.is-open .cyno-select__chevron {
  transform: rotate(180deg);
}

.cyno-select__panel {
  /* Rendered into document.body (see app.js) to avoid being clipped by ancestor overflow. */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10020;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 82%, transparent);
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(123, 220, 255, 0.14), transparent 58%),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 94%, transparent), color-mix(in srgb, var(--glass-bg) 86%, transparent));
  box-shadow: 0 24px 54px rgba(2, 6, 12, 0.62), 0 0 38px rgba(123, 220, 255, 0.12), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  display: none;
  cursor: default;
}

/* Visibility is toggled via JS because the panel is not a DOM child of .cyno-select. */

.cyno-select__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, translate 0.2s ease;
}

.cyno-select__option:hover {
  background: color-mix(in srgb, var(--accent) 15%, var(--glass-bg) 85%);
  translate: 2px 0;
}

.cyno-select__option:focus {
  outline: none;
}

.cyno-select__option:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--glass-bg) 86%);
}

.cyno-select__option.is-selected {
  background: color-mix(in srgb, var(--accent) 20%, var(--glass-bg) 80%);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.cyno-select__option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input[type="file"] {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text);
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  margin-right: 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: linear-gradient(150deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 70%, transparent));
  color: var(--text);
  padding: 8px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(2, 6, 12, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: var(--font-sans);
}

input[type="file"]:focus {
  outline: none;
}

input[type="file"]:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

/* --- Checkboxes / radios --- */

input[type="radio"] {
  accent-color: var(--accent);
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--glass-bg-strong) 84%, transparent),
    color-mix(in srgb, var(--glass-bg) 68%, transparent)
  );
  box-shadow: 0 10px 22px rgba(2, 6, 12, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  transform: translateZ(0);
  transition: transform 120ms ease, border-color 180ms ease, background 220ms ease, box-shadow 220ms ease;
}

input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid rgba(4, 16, 24, 0.92);
  border-bottom: 2px solid rgba(4, 16, 24, 0.92);
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

input[type="checkbox"]:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--glass-border));
  box-shadow: 0 12px 26px rgba(2, 6, 12, 0.38), 0 0 22px rgba(123, 220, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 32%, transparent),
    0 0 18px rgba(123, 220, 255, 0.22),
    0 12px 26px rgba(2, 6, 12, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

input[type="checkbox"]:active {
  transform: scale(0.96);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 26px rgba(123, 220, 255, 0.28), 0 14px 30px rgba(2, 6, 12, 0.45);
}

input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--accent) 74%, #0d1a2a),
    color-mix(in srgb, var(--accent-2) 58%, #0d1a2a)
  );
  box-shadow: 0 16px 34px rgba(2, 6, 12, 0.42), 0 0 22px rgba(123, 220, 255, 0.26);
  animation: checkbox-flash 420ms ease;
}

input[type="checkbox"]:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes checkbox-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(123, 220, 255, 0.0), 0 16px 34px rgba(2, 6, 12, 0.38);
  }
  35% {
    box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.18), 0 0 28px rgba(123, 220, 255, 0.28), 0 18px 40px rgba(2, 6, 12, 0.52);
  }
  100% {
    box-shadow: 0 16px 34px rgba(2, 6, 12, 0.42), 0 0 22px rgba(123, 220, 255, 0.26);
  }
}

/* ============================================================
   Luxury Glassmorphism Button System
   ============================================================ */

/* ── Base Button ── */
.glass-button,
.btn {
  --agx: 0px;
  --agy: 0px;
  --liquid-x: 50%;
  --liquid-y: 50%;
  --btn-glow-pulse-color: rgba(123, 220, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-padding-base);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 72%, transparent);
  background: linear-gradient(155deg, color-mix(in srgb, var(--glass-bg-strong) 84%, transparent), color-mix(in srgb, var(--glass-bg) 74%, transparent));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--btn-font-base);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(2, 6, 12, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  translate: var(--agx) var(--agy);
  max-width: 100%;
  transition:
    transform 0.3s var(--btn-transition-spring),
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    translate 0.24s var(--btn-transition-spring);
}

/* On narrow screens, let button labels wrap instead of being clipped by the
   button's `overflow: hidden` when a flex/grid cell can't give them full width
   (e.g. "Submit Reset Request" on the profile/dashboard HWID forms at ~430px). */
@media (max-width: 480px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
}

/* Hover — lift + glow */
.btn:hover,
.glass-button:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 30px rgba(123, 220, 255, 0.18),
    var(--glass-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Active — press down */
.btn:active,
.glass-button:active,
.glass-button-primary:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-outline:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

/* Focus-visible — accessibility ring */
.glass-button:focus-visible,
.glass-button-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25);
}

/* Shimmer layer (light highlight) */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(145px 85px at var(--liquid-x) var(--liquid-y), rgba(255, 255, 255, 0.34), transparent 62%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(240deg, rgba(123, 220, 255, 0.12), transparent 48%);
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.btn:hover::before,
.glass-button:hover::before {
  opacity: 0.6;
}

/* ─ Primary Button ── */
.glass-button-primary,
.btn-primary {
  background: linear-gradient(130deg, color-mix(in srgb, var(--accent) 68%, #0d1a2a), color-mix(in srgb, var(--accent-2) 72%, #0d1a2a));
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  color: #041018;
  font-weight: 600;
  box-shadow:
    0 16px 34px rgba(4, 10, 20, 0.4),
    0 0 28px rgba(123, 220, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  box-shadow:
    0 22px 44px rgba(4, 10, 20, 0.5),
    0 0 40px rgba(123, 220, 255, 0.35),
    0 0 80px rgba(123, 220, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:focus-visible {
  box-shadow:
    0 0 0 3px rgba(123, 220, 255, 0.25),
    0 0 30px rgba(123, 220, 255, 0.15),
    var(--btn-shadow, none);
}

/* Liquid fill sweep on hover */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.btn-primary:hover::after {
  opacity: 1;
}

/* ─ Ghost Button ── */
.btn-ghost {
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  border-color: color-mix(in srgb, var(--glass-border) 55%, transparent);
  color: var(--text-soft);
}
.btn-ghost:focus-visible {
  box-shadow:
    0 0 0 3px rgba(123, 220, 255, 0.15),
    0 0 15px rgba(123, 220, 255, 0.08);
}

/* ── Outline Button ── */
.btn-outline {
  background: color-mix(in srgb, var(--glass-bg) 25%, transparent);
  border-color: color-mix(in srgb, var(--glass-border) 85%, transparent);
  color: var(--text);
}

/* ── Secondary Button ── */
.btn-secondary:focus-visible {
  box-shadow:
    0 0 0 3px rgba(123, 220, 255, 0.2),
    0 0 20px rgba(123, 220, 255, 0.1);
}

/* ── Chip Button ── */
.btn-chip {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.06em;
  border-color: color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  color: var(--text-muted);
}
.btn-chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
}
.btn-chip:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* ── Size Modifiers ── */
.btn-xs {
  padding: var(--btn-padding-xs);
  font-size: var(--btn-font-xs);
  line-height: 1;
}
.btn-sm {
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm);
}
.btn-lg {
  padding: var(--btn-padding-lg);
  font-size: var(--btn-font-lg);
  font-weight: 700;
}
.btn-xl {
  padding: var(--btn-padding-xl);
  font-size: var(--btn-font-xl);
  font-weight: 700;
}

/* ── Status Color Variants ── */
.btn-success {
  background: var(--btn-success-bg);
  border-color: var(--btn-success-border);
  color: color-mix(in srgb, var(--status-success) 90%, #e8f6f1);
  --btn-glow-pulse-color: var(--btn-success-glow);
}
.btn-success:hover {
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 var(--btn-glow-spread) var(--btn-success-glow),
    var(--glass-glow);
  border-color: color-mix(in srgb, var(--status-success) 55%, var(--glass-border));
}

.btn-warning {
  background: var(--btn-warning-bg);
  border-color: var(--btn-warning-border);
  color: color-mix(in srgb, var(--status-warning) 90%, #f7efe2);
  --btn-glow-pulse-color: var(--btn-warning-glow);
}
.btn-warning:hover {
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 var(--btn-glow-spread) var(--btn-warning-glow),
    var(--glass-glow);
  border-color: color-mix(in srgb, var(--status-warning) 55%, var(--glass-border));
}

.btn-danger {
  background: var(--btn-danger-bg);
  border-color: var(--btn-danger-border);
  color: color-mix(in srgb, var(--status-danger) 90%, #f4e6e9);
  --btn-glow-pulse-color: var(--btn-danger-glow);
}
.btn-danger:hover {
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 var(--btn-glow-spread) var(--btn-danger-glow),
    var(--glass-glow);
  border-color: color-mix(in srgb, var(--status-danger) 55%, var(--glass-border));
}

/* ── Icon-Only Buttons ── */
.btn-icon-only {
  width: var(--btn-icon-size);
  height: var(--btn-icon-size);
  padding: 0;
  border-radius: 50%;
}
.btn-icon-only svg,
.btn-icon-only .btn-icon {
  width: 18px;
  height: 18px;
}
.btn-icon-only.btn-sm {
  width: var(--btn-icon-size-sm);
  height: var(--btn-icon-size-sm);
}
.btn-icon-only.btn-sm svg,
.btn-icon-only.btn-sm .btn-icon {
  width: 14px;
  height: 14px;
}
.btn-icon-only.btn-lg {
  width: var(--btn-icon-size-lg);
  height: var(--btn-icon-size-lg);
}
.btn-icon-only.btn-lg svg,
.btn-icon-only.btn-lg .btn-icon {
  width: 22px;
  height: 22px;
}

/* ── Gradient Border Button ── */
.btn-gradient-border {
  position: relative;
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  border: none;
  z-index: 1;
}
.btn-gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  background-size: 300% 300%;
  animation: btnBorderShimmer var(--btn-border-shimmer-speed) ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
.btn-gradient-border:hover::before {
  animation-duration: 1.5s;
}

/* ── Loading State ── */
.btn.is-loading {
  pointer-events: none;
  color: transparent !important;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, var(--glass-border) 30%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
  pointer-events: none;
}
.btn-primary.is-loading::after {
  border-top-color: #041018;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Disabled State ── */
.btn:disabled,
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}
.btn:disabled::before,
.btn.is-disabled::before,
.btn:disabled::after,
.btn.is-disabled::after {
  animation: none !important;
  opacity: 0 !important;
}

/* ── Luxury Button ── */
.btn-luxury {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-3) 30%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--accent) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--accent-2) 25%, var(--glass-bg-strong))
  );
  background-size: 200% 200%;
  animation: btnCausticRipple 4s ease-in-out infinite;
  border-color: color-mix(in srgb, var(--accent-3) 40%, var(--accent) 30%, transparent);
  color: var(--text);
  box-shadow:
    0 16px 34px rgba(2, 6, 12, 0.4),
    0 0 28px color-mix(in srgb, var(--accent-3) 15%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-luxury::before {
  background:
    radial-gradient(145px 85px at var(--liquid-x) var(--liquid-y), rgba(217, 183, 77, 0.35), transparent 62%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.25), transparent 42%),
    linear-gradient(240deg, rgba(217, 183, 77, 0.15), transparent 48%);
}
.btn-luxury::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), rgba(217, 183, 77, 0.1), transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}
.btn-luxury:hover::after {
  animation: btnShineSweep var(--btn-shine-duration) ease forwards;
}
.btn-luxury:hover {
  box-shadow:
    0 22px 44px rgba(2, 6, 12, 0.5),
    0 0 40px color-mix(in srgb, var(--accent-3) 20%, transparent),
    0 0 80px color-mix(in srgb, var(--accent) 10%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: color-mix(in srgb, var(--accent-3) 50%, var(--accent) 40%, transparent);
}

/* ── Icon Toggle Pill Group ──
   Usage:
   <div class="icon-toggle-pill">
     <button class="icon-toggle-pill__btn" aria-label="Notifications">
       <svg>...</svg>
     </button>
     <button class="icon-toggle-pill__btn is-active" aria-label="Toggle">
       <svg>...</svg>
     </button>
   </div>
*/
.icon-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--toggle-pill-bg);
  border: 1px solid var(--toggle-pill-border);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.35),
    0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.icon-toggle-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--toggle-pill-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 10px 28px rgba(2, 6, 12, 0.45),
    0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent),
    0 0 20px color-mix(in srgb, var(--accent) 8%, transparent);
}

.icon-toggle-pill__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--toggle-pill-btn-bg);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    transform var(--transition-fast) var(--btn-transition-spring),
    box-shadow var(--transition-base);
}
.icon-toggle-pill__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.icon-toggle-pill__btn:hover {
  background: color-mix(in srgb, var(--glass-bg-strong) 70%, transparent);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--text);
  transform: scale(1.05);
}
.icon-toggle-pill__btn:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
}
.icon-toggle-pill__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-toggle-pill__btn.is-active {
  background: var(--toggle-pill-btn-active-bg);
  border-color: var(--toggle-pill-btn-active-border);
  color: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 15%, transparent);
}
.icon-toggle-pill__btn.is-active:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Glow ring pulse on active toggle */
.icon-toggle-pill__btn.is-active::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 30%, transparent);
  animation: btnGlowPulse 2s ease-in-out infinite;
  pointer-events: none;
}

/* Sliding indicator variant */
.icon-toggle-pill--sliding {
  position: relative;
}
.icon-toggle-pill--sliding .icon-toggle-pill__indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--toggle-pill-btn-active-bg);
  border: 1px solid var(--toggle-pill-btn-active-border);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 15%, transparent);
  transition: transform 0.35s var(--btn-transition-spring);
  pointer-events: none;
  z-index: 0;
}
.icon-toggle-pill--sliding[data-active-index="1"] .icon-toggle-pill__indicator {
  transform: translateX(calc(36px + 4px));
}
.icon-toggle-pill--sliding .icon-toggle-pill__btn {
  z-index: 1;
  background: transparent;
  border-color: transparent;
}
.icon-toggle-pill--sliding .icon-toggle-pill__btn.is-active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--accent);
}

/* ── Pill (non-button badge) ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  color: var(--text-muted);
  background: linear-gradient(135deg, color-mix(in srgb, var(--glass-bg) 65%, transparent), color-mix(in srgb, var(--glass-bg-strong) 55%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px var(--border-inner), 0 10px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.pill:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 26px rgba(2, 6, 12, 0.4), 0 0 20px rgba(123, 220, 255, 0.1);
}
.pill:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

/* ── Status Pills ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  justify-content: center;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 20px rgba(2, 6, 12, 0.35);
}
.status-pill--operational {
  background: color-mix(in srgb, var(--status-success) 18%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 45%, transparent);
  color: color-mix(in srgb, var(--status-success) 85%, #e8f6f1 15%);
}
.status-pill--monitoring,
.status-pill--updating {
  background: color-mix(in srgb, var(--status-warning) 20%, transparent);
  border-color: color-mix(in srgb, var(--status-warning) 45%, transparent);
  color: color-mix(in srgb, var(--status-warning) 86%, #f7efe2 14%);
}
.status-pill--offline {
  background: color-mix(in srgb, var(--status-danger) 20%, transparent);
  border-color: color-mix(in srgb, var(--status-danger) 45%, transparent);
  color: color-mix(in srgb, var(--status-danger) 86%, #f4e6e9 14%);
}
.status-pill--discontinued {
  background: color-mix(in srgb, var(--status-muted) 20%, transparent);
  border-color: color-mix(in srgb, var(--status-muted) 45%, transparent);
  color: color-mix(in srgb, var(--status-muted) 86%, #e4eaf4 14%);
}

/* ─ Status Dots ── */
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status-muted);
}
.status-dot--live {
  background: var(--status-success);
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-success) 70%, transparent);
  animation: statusPulse 1.6s ease-in-out infinite;
}
.status-dot--warning {
  background: var(--status-warning);
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-warning) 70%, transparent);
  animation: statusPulse 2s ease-in-out infinite;
}
.status-dot--danger {
  background: var(--status-danger);
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-danger) 70%, transparent);
  animation: statusPulse 2.2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}


.eyebrow {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(123, 220, 255, 0.9);
}

/* Gradient text for primary headings */
.heading-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #7bdcff 50%, #8de6d6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero text glow */
.hero-text-glow {
  text-shadow: 0 0 40px rgba(123, 220, 255, 0.25), 0 0 80px rgba(123, 220, 255, 0.08);
}

/* Gradient title utility */
.gradient-title {
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass) 55%, transparent);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(123, 220, 255, 0.4), 0 0 4px rgba(123, 220, 255, 0.6);
  position: relative;
}

.progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 60%, rgba(255, 255, 255, 0.3));
  animation: holoShimmer 3s ease-in-out infinite;
  background-size: 200% 100%;
}

.is-hidden {
  display: none !important;
}

.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.timeline-list {
  display: grid;
  gap: 8px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 74%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.35);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.timeline-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.detail-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  display: grid;
  gap: 6px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.thread-header {
  display: grid;
  gap: 6px;
}

.thread-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.thread-body {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.thread-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.thread-input textarea {
  flex: 1;
  min-height: 44px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text);
  padding: 10px 14px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.thread-input textarea:focus {
  outline: none;
}

.thread-input textarea:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 16px 28px rgba(2, 6, 12, 0.45);
}

.thread-toolbar,
.thread-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 75%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.message-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.message-author {
  font-weight: 600;
}

.message-text {
  color: var(--text-soft);
}

.message-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   Luxury Glassmorphism Toggle — Shared Component
   Usage: <label class="glass-toggle"><input type="checkbox"><span class="glass-slider"><span class="glass-knob"></span></span></label>
   ============================================================ */

.glass-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  display: inline-block;
}

/* Global SVG icon sizing — icon containers */
.action-icon,
.role-icon,
.achievement-icon svg,
.feed-item-icon svg,
.games-hub-icon svg,
.announcement-type-badge svg {
  width: 1em;
  height: 1em;
  display: block;
}

.glass-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.glass-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}

.glass-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.glass-knob::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
  transition: background 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.glass-toggle input:checked + .glass-slider {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.05)), color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.02)));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 15%, transparent), inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.glass-toggle input:checked + .glass-slider::before {
  opacity: 1;
}

.glass-toggle input:checked + .glass-slider .glass-knob {
  left: 27px;
  background: linear-gradient(145deg, #ffffff, color-mix(in srgb, var(--accent) 20%, #ffffff));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 1px 3px rgba(255, 255, 255, 1);
}

.glass-toggle input:checked + .glass-slider .glass-knob::after {
  width: 6px;
  height: 6px;
  background: color-mix(in srgb, var(--accent) 60%, #ffffff);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 40%, transparent);
}

.glass-toggle:hover .glass-slider {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.glass-toggle input:checked + .glass-slider:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 0 16px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 1px 3px rgba(255, 255, 255, 0.15);
}

.glass-toggle input:focus-visible + .glass-slider {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 3px;
}

.message-title {
  font-size: 13px;
  font-weight: 600;
}

.message-preview {
  font-size: 12px;
  color: var(--text-muted);
}

.find-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Icon stays centered while the label is collapsed (gap only on expand). */
  gap: 0;
  padding: 8px 14px;
  position: relative;
  min-width: 40px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans, "Manrope", sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  /* Same rationale as .find-toggle: keep icon centered while label is collapsed. */
  gap: 0;
  padding: 8px 12px;
  justify-content: center;
  min-width: 40px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--glass) 70%, transparent);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: border-color 1.25s ease, box-shadow 1.25s ease, transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sound-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 35%, transparent);
  box-sizing: border-box;
  opacity: 0.95;
}

.sound-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.92;
  /*
    Clean speaker glyph using a mask so it inherits currentColor.
    The data-sound-level attribute swaps the wave count.
  */
  -webkit-mask: var(--sound-glyph) center / contain no-repeat;
  mask: var(--sound-glyph) center / contain no-repeat;
}

.sound-toggle[data-sound-level="subtle"] .sound-icon {
  --sound-glyph: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2.4 4.9H4.1L6.2 3.3v5.4L4.1 7.1H2.4z%22/%3E%3Cpath d=%22M8.2 4.6c.55.45.55 2.35 0 2.8%22/%3E%3C/g%3E%3C/svg%3E');
}

.sound-toggle[data-sound-level="normal"] .sound-icon {
  --sound-glyph: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2.4 4.9H4.1L6.2 3.3v5.4L4.1 7.1H2.4z%22/%3E%3Cpath d=%22M8.1 4.2c.8.65.8 2.95 0 3.6%22/%3E%3Cpath d=%22M9.5 3.2c1.35 1.1 1.35 4.5 0 5.6%22/%3E%3C/g%3E%3C/svg%3E');
}

.sound-toggle[data-sound-level="off"] .sound-icon {
  --sound-glyph: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22%3E%3Cpath d=%22M2.4 4.9H4.1L6.2 3.3v5.4L4.1 7.1H2.4z%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E');
}


.sound-label {
  max-width: 0;
  min-width: 0;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transform: translateX(-6px);
  transition: max-width 1.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.05s ease, transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: inline-block;
}

.sound-toggle:hover .sound-label,
.sound-toggle:focus-visible .sound-label {
  max-width: 160px;
  opacity: 1;
  transform: translateX(0);
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  gap: 6px;
}

.sound-toggle[data-sound-level="off"] .sound-icon {
  opacity: 0.65;
}

.sound-toggle[data-sound-level="off"] .sound-icon::before {
  opacity: 0.25;
}

.sound-toggle[data-sound-level="off"] .sound-icon::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, transparent 44%, currentColor 44% 56%, transparent 56%);
  opacity: 0.8;
}


.sound-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-subtle));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 12px 26px rgba(2, 6, 12, 0.45);
  transform: translateY(-1px);
}

.sound-toggle:active {
  transform: translateY(0);
}

.sound-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

.find-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  box-sizing: border-box;
  opacity: 1;
  flex-shrink: 0;
}

.find-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: currentColor;
  border-radius: 0;
  opacity: 1;
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%227%22/%3E%3Cpath d=%22M21 21l-4.3-4.3%22/%3E%3C/g%3E%3C/svg%3E') center / contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%227%22/%3E%3Cpath d=%22M21 21l-4.3-4.3%22/%3E%3C/g%3E%3C/svg%3E') center / contain no-repeat;
}

.find-label {
  max-width: 0;
  min-width: 0;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transform: translateX(-6px);
  transition: max-width 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: inline-block;
}

.find-toggle:hover .find-label,
.find-toggle:focus-visible .find-label,
.find-toggle.is-active .find-label {
  max-width: 120px;
  opacity: 1;
  transform: translateX(0);
}

.find-toggle:hover,
.find-toggle:focus-visible,
.find-toggle.is-active {
  gap: 8px;
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg-strong) 60%, transparent),
    color-mix(in srgb, var(--glass-bg) 40%, transparent)
  );
  color: var(--text);
  backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent),
    0 8px 32px rgba(2, 6, 12, 0.4),
    0 0 24px color-mix(in srgb, var(--accent) 14%, transparent);
}

.find-toggle:active {
  transform: scale(0.98);
}

.find-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

.find-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.find-toggle.is-loading .find-icon {
  animation: findPulse 0.9s ease-in-out infinite;
}

@keyframes findPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.find-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 12% 10%, rgba(123, 220, 255, 0.14), transparent 58%),
    radial-gradient(120% 90% at 88% 90%, rgba(217, 183, 122, 0.12), transparent 60%),
    color-mix(in srgb, var(--overlay) 70%, transparent);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 90;
}

.find-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.find-panel {
  width: min(720px, calc(100% - 28px));
  padding: 24px;
  display: grid;
  gap: 14px;
  border-radius: calc(var(--radius-lg) + 4px);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.find-overlay.is-open .find-panel {
  transform: translateY(0) scale(1);
}

.find-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.find-header h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.find-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 12px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--glass-border) 78%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 76%, transparent));
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 32px rgba(2, 6, 12, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.find-input-wrap:focus-within {
  /* No focus line: the field looks identical focused or not. The input is
     auto-focused on open so the user can type immediately, but we never draw
     an accent border/glow/ring around it. Values mirror the resting state. */
  border-color: color-mix(in srgb, var(--glass-border) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 32px rgba(2, 6, 12, 0.45);
  transform: none;
}

.find-input-icon {
  width: 18px;
  height: 18px;
  position: relative;
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
  opacity: 0.95;
}

.find-input-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
}

.find-input-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.find-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  padding: 16px 0;
}

.find-input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 84%, transparent);
}

.find-input::-webkit-search-cancel-button {
  opacity: 0.85;
  cursor: pointer;
}

.find-input-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 68%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 72%, transparent);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.find-results {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.find-result {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 74%, transparent));
  color: var(--text);
  padding: 13px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.find-result:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border-strong));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 14px 30px rgba(2, 6, 12, 0.45);
  transform: translateY(-2px);
}

.find-meta {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.find-empty {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.find-hint {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  opacity: 0.9;
}

.context-menu {
  position: fixed;
  min-width: 200px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-lg)) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: var(--z-tooltip);
}

.context-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.context-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.context-item:hover,
.context-item:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}

.context-section {
  display: grid;
  gap: 6px;
}

.context-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
}

.hint-popover {
  position: fixed;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-lg)) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9997;
}

.hint-popover.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hint-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hint-body {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-panel,
  .glass-card,
  .glass-nav,
  .glass-modal,
  .topbar,
  .glass-button,
  .btn,
  .glass-input,
  .catalog-search input,
  .field input,
  .field select,
  .field textarea,
  select,
  input[type="file"],
  .thread-search,
  .thread-input input,
  .toggle,
  .detail-card,
  .thread-toolbar,
  .thread-attachments,
  .message-row,
  .context-menu,
  .hint-popover,
  .find-overlay {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
  }
}

body.has-custom-cursor.is-cursor-enabled model-viewer,
body.has-custom-cursor.is-cursor-enabled .product-3d-viewer {
  cursor: none !important;
}

/* ── Luxury custom cursor ─────────────────────────────────────
   A precision-instrument cursor: a refined outer ring with a soft
   accent halo, a slowly rotating accent arc, and a crisp centre dot.
   States: .is-active (interactive hover), .is-text (caret morph). */
.cyno-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  /* faint glass ring + soft inner sheen */
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background:
    radial-gradient(circle at 50% 50%,
      color-mix(in srgb, var(--accent) 10%, transparent) 0%,
      transparent 58%);
  box-shadow:
    0 0 0 1px rgba(6, 10, 18, 0.18),
    0 0 14px color-mix(in srgb, var(--accent) 28%, transparent),
    inset 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease,
    border-radius 0.2s ease,
    background 0.2s ease,
    box-shadow 0.25s ease,
    opacity 0.2s ease;
  /* Sit above every overlay (select panels at 10020, modals, etc.) so the
     custom cursor is never hidden behind a dropdown or popover. */
  z-index: 2147483647;
  mix-blend-mode: normal;
  will-change: transform;
}

/* Soft accent halo that breathes — refined, not a busy spinning arc */
.cyno-cursor::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--accent) 22%, transparent) 0%,
    transparent 62%);
  opacity: 0.7;
  animation: cynoCursorBreathe 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cynoCursorBreathe {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50%      { opacity: 0.85; transform: scale(1.06); }
}

/* Crisp centre dot — the actual aiming point */
.cyno-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, white 8%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: width 0.18s ease, height 0.18s ease, background 0.18s ease, border-radius 0.18s ease;
}

@keyframes cynoCursorSpin {
  to { transform: rotate(360deg); }
}

.cyno-cursor.is-hidden {
  opacity: 0;
}

/* Interactive targets — ring blooms open, arc fades, dot grows into a soft disc */
.cyno-cursor.is-active {
  width: 40px;
  height: 40px;
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 62%);
  box-shadow:
    0 0 0 1px rgba(6, 10, 18, 0.2),
    0 0 28px color-mix(in srgb, var(--accent) 55%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent);
}
.cyno-cursor.is-active::before {
  opacity: 0;
}
.cyno-cursor.is-active::after {
  width: 7px;
  height: 7px;
  background: color-mix(in srgb, var(--accent) 80%, white 20%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent);
}

/* Text targets — morph into a slim luxury caret beam */
.cyno-cursor.is-text {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  border-color: transparent;
  background: linear-gradient(180deg,
    transparent,
    color-mix(in srgb, var(--accent) 78%, white 12%) 22%,
    color-mix(in srgb, var(--accent) 78%, white 12%) 78%,
    transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
}
.cyno-cursor.is-text::before {
  opacity: 0;
}
.cyno-cursor.is-text::after {
  opacity: 0;
}

.text-magnify {
  position: relative;
  z-index: 2;
  overflow: visible;
  transform: scale(1.04);
  transform-origin: left center;
  text-shadow: 0 0 10px rgba(125, 223, 207, 0.18);
  filter: brightness(1.12);
  transition: transform 0.12s ease, text-shadow 0.12s ease, filter 0.12s ease;
}

.text-magnify::after {
  content: "";
  position: absolute;
  inset: -2px -4px;
  border-radius: 10px;
  border: 1px solid rgba(125, 223, 207, 0.14);
  background: radial-gradient(circle at 50% 40%, rgba(125, 223, 207, 0.12), transparent 65%);
  box-shadow: 0 0 14px rgba(125, 223, 207, 0.12);
  opacity: 0.45;
  pointer-events: none;
}

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-bg) 90%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.45);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.alert-banner strong {
  font-weight: 600;
}

.date-picker,
.date-range,
.color-picker,
.upload-zone,
.autocomplete,
.tag-input,
.rich-editor,
.code-editor,
.dual-range,
.pagination,
.rating {
  display: grid;
  gap: 10px;
}

.date-picker,
.date-range {
  position: relative;
}

.date-picker .date-input,
.date-range .date-input {
  width: 100%;
  border-radius: var(--radius-xs);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text);
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.date-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(320px, 90vw);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.date-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.calendar {
  display: grid;
  gap: 8px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.calendar-nav {
  display: flex;
  gap: 6px;
}

.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-week span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-align: center;
}

.calendar-day {
  border-radius: 8px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  padding: 6px 0;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.calendar-day.is-muted {
  opacity: 0.4;
  cursor: default;
}

.calendar-day:hover:not(.is-muted) {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  transform: translateY(-1px);
}

.calendar-day.is-selected,
.calendar-day.is-start,
.calendar-day.is-end {
  background: color-mix(in srgb, var(--accent) 20%, var(--glass) 80%);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  color: var(--text);
}

.calendar-day.is-range {
  background: color-mix(in srgb, var(--accent) 10%, var(--glass) 90%);
}

.date-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.date-range-row .range-sep {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(140deg, rgba(102, 211, 229, 0.4), rgba(125, 223, 207, 0.2));
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.4);
}

.color-picker .color-input {
  width: 48px;
  height: 38px;
  border: none;
  background: transparent;
  padding: 0;
}

.upload-zone {
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--glass-bg) 72%, transparent);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.upload-zone.is-dragover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-bg) 90%);
}

.upload-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.upload-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.progress-bar span {
  position: absolute;
  inset: 0;
  width: var(--value, 0%);
  background: linear-gradient(90deg, rgba(102, 211, 229, 0.9), rgba(125, 223, 207, 0.8));
  box-shadow: 0 0 10px rgba(102, 211, 229, 0.4);
}

.dual-range {
  position: relative;
}

.dual-range input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 32px;
  margin: 0;
  border: 0;
  outline: none;
  cursor: none;
}

/*
  Dual slider: fully neutralize native tracks so only the custom track/fill is visible.
  Without this, some browsers render their own thick track + default thumbs over the custom UI.
*/
.dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(102, 211, 229, 0.55);
  background: color-mix(in srgb, var(--glass-bg-strong) 85%, transparent);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(102, 211, 229, 0.12);
  cursor: none;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dual-range input[type="range"]::-moz-range-progress {
  height: 8px;
  background: transparent;
}

.dual-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(102, 211, 229, 0.55);
  background: color-mix(in srgb, var(--glass-bg-strong) 85%, transparent);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(102, 211, 229, 0.12);
  cursor: none;
}

.dual-range-track {
  height: 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  position: relative;
  box-shadow: inset 0 0 0 1px var(--border-inner);
  touch-action: none;
}

.dual-range-fill {
  position: absolute;
  left: var(--min, 0%);
  right: calc(100% - var(--max, 100%));
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(102, 211, 229, 0.9), rgba(125, 223, 207, 0.8));
  box-shadow: 0 0 10px rgba(102, 211, 229, 0.4);
}

.dual-range-values {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rating button {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.rating button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 14%, var(--glass) 86%);
}

.tag-input {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.tag-input input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  flex: 1;
  min-width: 120px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}

.autocomplete {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  z-index: 8;
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.autocomplete-list.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  display: grid;
}

.autocomplete-item {
  padding: 10px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-soft);
}

.autocomplete-item:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.rich-editor {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  overflow: hidden;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.rich-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 82%, transparent);
}

.rich-toolbar button {
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  padding: 6px 8px;
  cursor: pointer;
}

.rich-surface {
  min-height: 120px;
  padding: 12px;
  font-size: 12px;
  color: var(--text);
}

.code-editor {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg-strong) 82%, transparent);
  display: grid;
  grid-template-columns: 44px 1fr;
  overflow: hidden;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.code-lines {
  padding: 10px 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  border-right: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 86%, transparent);
  line-height: 1.6;
}

.code-input {
  border: none;
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 10px;
  line-height: 1.6;
  resize: vertical;
  min-height: 160px;
}

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: var(--z-toast);
}

.toast {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  font-size: 12px;
  color: var(--text-soft);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
}

.toast.is-success {
  border-color: color-mix(in srgb, var(--status-success) 40%, var(--border-subtle));
}

.toast.is-warning {
  border-color: color-mix(in srgb, var(--status-warning) 40%, var(--border-subtle));
}

.toast.is-danger {
  border-color: color-mix(in srgb, var(--status-danger) 40%, var(--border-subtle));
}

/* Content-Area Links */
.panel-body a:not(.btn):not([class]),
.glass-panel a:not(.btn):not([class]),
.thread-body a:not(.btn):not([class]) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.panel-body a:not(.btn):not([class]):hover,
.glass-panel a:not(.btn):not([class]):hover,
.thread-body a:not(.btn):not([class]):hover {
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
}

.panel-body a:not(.btn):not([class]):focus-visible,
.glass-panel a:not(.btn):not([class]):focus-visible,
.thread-body a:not(.btn):not([class]):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Generic Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-content {
  width: min(600px, 90vw);
  max-height: 85vh;
  border-radius: 20px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 85%, transparent), color-mix(in srgb, var(--glass-bg) 70%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--glass-glow);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

/* Password Strength Meter */
.password-strength {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.password-strength-meter {
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  overflow: hidden;
  margin-top: 4px;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-bar.weak {
  width: 25%;
  background: var(--status-danger);
}

.password-strength-bar.fair {
  width: 50%;
  background: var(--status-warning);
}

.password-strength-bar.good {
  width: 75%;
  background: var(--accent);
}

.password-strength-bar.strong {
  width: 100%;
  background: var(--status-success);
}

.password-strength-label {
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid color-mix(in srgb, var(--glass-border) 30%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  /* If dropped inside a multi-column grid list (subscriptions, achievements,
     marketplace, forums, etc.) span the full row so it centers across the whole
     panel instead of sitting in the first column. Ignored in non-grid parents. */
  grid-column: 1 / -1;
}

/* Luxury empty-state: a soft glowing orb above the message gives bare "no data"
   states an intentional, premium feel. Only applies to block-level empty states
   (not table-cell ones, which stay inline). */
.empty-state:not(td):not(th)::before {
  content: "";
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(123, 220, 255, 0.28), rgba(123, 220, 255, 0.05) 60%, transparent 70%);
  border: 1px solid rgba(123, 220, 255, 0.22);
  box-shadow: inset 0 0 14px rgba(123, 220, 255, 0.18), 0 0 22px rgba(123, 220, 255, 0.08);
}

.loading-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* span the full row when inside a grid list; ignored otherwise */
  grid-column: 1 / -1;
}

.loading-state::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(123, 220, 255, 0.18);
  border-top-color: var(--accent, #7bdcff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 18px rgba(123, 220, 255, 0.18);
}

/* Keep table-cell loading states inline (don't flex a <td>). */
td.loading-state, th.loading-state { display: table-cell; }
td.loading-state::before, th.loading-state::before { margin-right: 8px; vertical-align: middle; box-shadow: none; }

/* Rewards Page Spin Wheel */
.spin-wheel-container {
  position: relative;
  text-align: center;
  padding: 20px;
}

.spin-wheel-hint {
  margin-top: 12px;
}

#spinWheel {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  box-shadow: 0 0 20px rgba(123, 220, 255, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.2);
  background: conic-gradient(
    var(--wheel-1) 0deg 51.4deg,
    var(--wheel-2) 51.4deg 102.8deg,
    var(--wheel-3) 102.8deg 154.3deg,
    var(--wheel-4) 154.3deg 205.7deg,
    var(--wheel-5) 205.7deg 257.1deg,
    var(--wheel-6) 257.1deg 308.6deg,
    var(--wheel-7) 308.6deg 360deg
  );
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  cursor: pointer;
}

#spinWheel:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(123, 220, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 2FA Modal Styles */
.qr-code-image {
  max-width: 256px;
  margin: 16px auto;
  display: block;
}

.totp-secret-code {
  display: block;
  text-align: center;
  font-size: 18px;
  margin: 8px 0;
  font-family: monospace;
}

.backup-codes-list {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  line-height: 2;
  text-align: center;
}

/* Two-Factor Actions Row */
.two-factor-actions {
  margin-top: 12px;
}

.modal-step-label {
  margin-top: 16px;
}

/* Forum Styles */
.forums-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.forums-shell .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
    max-height: 90vh;
    margin: 16px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  background-size: 200% 100%;
  animation: skeletonWave 1.6s ease-in-out infinite;
}

.skeleton-line {
  height: 10px;
}

.skeleton-block {
  height: 40px;
}

@keyframes skeletonWave {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, var(--glass-bg) 82%);
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.avatar-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--status-success);
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 8px rgba(110, 227, 178, 0.6);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-soft);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  cursor: pointer;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.page-btn:hover {
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  transform: translateY(-1px);
}

.page-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 12%, var(--glass) 88%);
}

.infinite-list {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.infinite-item {
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

/* Utility Classes */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.cursor-pointer { cursor: pointer; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.p-28 { padding: 28px; }
.pb-16 { padding-bottom: 16px; }
.m-0 { margin: 0; }
.text-accent { color: var(--accent); }
.text-muted-sm { font-size: 12px; color: var(--text-muted); }
.scrollable-y { max-height: 300px; overflow-y: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .data-table {
    font-size: var(--fs-sm);
  }
}

/* Mobile card-layout for tables */
@media (max-width: 640px) {
  .data-table-wrapper {
    overflow-x: visible;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .data-table tbody {
    display: grid;
    gap: 8px;
  }

  .data-table tr {
    padding: 12px;
    margin-bottom: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
  }

  .data-table td {
    padding: 6px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 50%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--fs-sm);
  }

  .data-table td:last-child {
    border-bottom: none;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    min-width: 80px;
  }

  .data-table td .btn,
  .data-table td button,
  .data-table td .pill {
    flex-shrink: 0;
  }
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-soft);
}

.data-table th {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.data-table th:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
}

/* Subtle luxury row hover — gives every data table an interactive, premium
   feel. Skips the header row and the placeholder/empty rows. */
.data-table tbody tr {
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.data-table tbody tr:hover:not(.is-selected):not(:has(.empty-state)):not(:has(.loading-state)) {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
}

.data-table tr.is-selected {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.table-expand {
  display: none;
  font-size: 11px;
  color: var(--text-muted);
}

.table-expand.is-open {
  display: table-row;
}

.table-expand td {
  padding: 12px 10px;
  background: color-mix(in srgb, var(--glass) 88%, transparent);
  border-bottom: 1px solid var(--border-subtle);
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

/* Additional Utility Classes */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.ml-8 { margin-left: 8px; }
.mr-8 { margin-right: 8px; }
.p-4 { padding: 4px; }
.p-8 { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.pt-8 { padding-top: 8px; }
.pt-12 { padding-top: 12px; }
.pb-8 { padding-bottom: 8px; }
.pl-8 { padding-left: 8px; }
.pr-8 { padding-right: 8px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.text-success { color: var(--status-success); }
.text-danger { color: var(--status-danger); }
.text-warning { color: var(--status-warning); }
.text-info { color: var(--accent); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.font-mono { font-family: var(--font-mono, monospace); }
.font-sans { font-family: var(--font-sans, system-ui, sans-serif); }

.letter-spacing-sm { letter-spacing: 0.05em; }
.letter-spacing-md { letter-spacing: 0.1em; }
.letter-spacing-lg { letter-spacing: 0.15em; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.resize-none { resize: none; }
.resize-both { resize: both; }
.resize-horizontal { resize: horizontal; }
.resize-vertical { resize: vertical; }

.select-all::selection {
  background: var(--accent);
  color: var(--bg-0);
}

.mono-input {
  font-family: var(--font-mono, monospace);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 18px;
  text-align: center;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.grow { flex-grow: 1; }
.shrink { flex-shrink: 1; }
.shrink-0 { flex-shrink: 0; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-0 { min-height: 0; }
.min-h-5 { min-height: 20px; }
.min-h-10 { min-height: 40px; }

.pos-relative { position: relative; }

.flex-center-gap { display: flex; align-items: center; gap: 16px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.min-w-0 { min-width: 0; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.transition-fast { transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-base { transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
.transition-slow { transition: opacity 0.5s ease, transform 0.5s ease, background-color 0.5s ease, border-color 0.5s ease; }

.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 8px; }
.flex-wrap-gap-sm { display: flex; flex-wrap: wrap; gap: 4px; }
.flex-gap-12 { display: flex; gap: 12px; }
.flex-gap-16 { display: flex; gap: 16px; }
.form-validation { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 4px; }
.section-spacer { margin-top: 1.5rem; }
.grid-auto-min { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }

/* --- Luxury Background Atmosphere --- */
/* Merged into .body-bg pseudo-elements in base.css to avoid conflicts */

/* Selection highlight */
::selection {
  background: rgba(123, 220, 255, 0.25);
  color: var(--text);
}

::-moz-selection {
  background: rgba(123, 220, 255, 0.25);
  color: var(--text);
}

/* --- Luxury Glass Enhancements --- */

@keyframes borderShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes shimmerSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

/* Premium border shimmer on glass panels */
.glass-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: borderShimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

/* Hero glass - deeper blur */
.glass-panel.hero-glass {
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
}

/* Gradient border glow on focus */
.glass-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
}

/* --- Luxury Card Hover Effects --- */

.catalog-card,
.game-card,
.forum-category-card,
.message-item,
.reward-card,
.leaderboard-row {
  transform-style: preserve-3d;
  perspective: 800px;
  position: relative;
  overflow: hidden;
}

/* 3D tilt on hover */
.catalog-card:hover,
.game-card:hover,
.forum-category-card:hover,
.message-item:hover,
.reward-card:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-3deg) translateY(-6px);
}

/* Underlight glow on hover */
.catalog-card::after,
.game-card::after,
.forum-category-card::after,
.message-item::after,
.reward-card::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 10%;
  right: 10%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(123,220,255,0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.catalog-card:hover::after,
.game-card:hover::after,
.forum-category-card:hover::after,
.message-item:hover::after,
.reward-card:hover::after {
  opacity: 0.6;
}

/* Shimmer sweep on hover */
.catalog-card::before,
.game-card::before,
.forum-category-card::before,
.message-item::before,
.reward-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.catalog-card:hover::before,
.game-card:hover::before,
.forum-category-card:hover::before,
.message-item:hover::before,
.reward-card:hover::before {
  animation: shimmerSweep 1s ease forwards;
}

/* ============================================================
   Billing page (added)
   ============================================================ */
.bill-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 30px 32px;
}
.bill-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(16, 24, 40, 0.4);
  border: 1px solid rgba(160, 190, 230, 0.12);
}
.bill-summary-stat { text-align: center; }
.bill-summary-stat__val { font-family: var(--font-display, sans-serif); font-size: 20px; font-weight: 700; color: #eef3ff; line-height: 1.1; }
.bill-summary-stat__key { font-size: 11px; color: var(--text-muted, #a8b9d4); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

.bill-sub-list { display: grid; gap: 12px; margin-top: 8px; }
.bill-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(16, 24, 40, 0.34);
  border: 1px solid rgba(160, 190, 230, 0.12);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.bill-sub:hover { border-color: rgba(123, 220, 255, 0.3); transform: translateY(-1px); }
.bill-sub__name { font-size: 15px; font-weight: 600; color: #eef3ff; }
.bill-sub__meta { font-size: 12px; color: var(--text-muted, #a8b9d4); margin-top: 3px; }
.bill-sub__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.bill-table-wrap { overflow-x: auto; margin-top: 8px; }
#billInvoiceTable { width: 100%; min-width: 560px; }

@media (max-width: 768px) {
  .bill-hero { grid-template-columns: 1fr; }
  .bill-sub { flex-direction: column; align-items: flex-start; }
  .bill-sub__right { width: 100%; justify-content: space-between; }
}
/* ============================================================
   User preferences hub (profile page) — toggles, selects, rows
   ============================================================ */
.pref-group { display: grid; gap: 4px; margin-top: 6px; }

.pref-row,
.pref-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent);
}
.pref-group > :last-child { border-bottom: none; }
.pref-toggle { cursor: pointer; }

.pref-row__text { display: grid; gap: 2px; min-width: 0; }
.pref-row__title { font-size: 13.5px; font-weight: 600; color: var(--text, #eef3ff); }
.pref-row__desc  { font-size: 11.5px; color: var(--text-muted, #9fb1cc); line-height: 1.3; }

/* Glass select */
.pref-select {
  flex: 0 0 auto;
  min-width: 130px;
  padding: 8px 30px 8px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--text, #eef3ff);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0)) ,
    color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  border-radius: 10px;
  -webkit-appearance: none; appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239fb1cc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pref-select:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pref-select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.pref-select option { background: #0c1426; color: #eef3ff; }

/* Toggle switch */
.pref-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.pref-switch {
  flex: 0 0 auto;
  position: relative; width: 44px; height: 25px; border-radius: 999px;
  background: color-mix(in srgb, var(--glass-border) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.pref-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #e7eefc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.35);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), background 0.25s ease;
}
.pref-checkbox:checked + .pref-switch {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 80%, transparent), color-mix(in srgb, var(--accent) 55%, transparent));
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}
.pref-checkbox:checked + .pref-switch::after { transform: translateX(19px); background: #fff; }
.pref-checkbox:focus-visible + .pref-switch { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

.pref-divider { border: none; border-top: 1px solid color-mix(in srgb, var(--glass-border) 30%, transparent); margin: 8px 0; }

.pref-status {
  margin-top: 12px; padding: 8px 12px; border-radius: 9px;
  font-size: 12.5px; font-weight: 500;
}
.pref-status--ok    { color: #7df0c8; background: color-mix(in srgb, var(--status-success, #5fd0a8) 12%, transparent); border: 1px solid color-mix(in srgb, var(--status-success, #5fd0a8) 30%, transparent); }
.pref-status--error { color: #ffb0b0; background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.3); }

/* Live pref effects (apply site-wide when preferences.js sets the classes) */
html.compact-mode .page-shell { gap: 14px; }
html.compact-mode .glass-panel .panel-body { padding: 16px; }
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after { animation-duration: 0.001s !important; transition-duration: 0.05s !important; }
html.no-custom-cursor .cyno-cursor { display: none !important; }
html.no-custom-cursor, html.no-custom-cursor * { cursor: auto !important; }
/* ============================================================
   Tickets — list controls (priority filter + sort) & canned replies
   ============================================================ */
.ticket-list-controls {
  display: flex; gap: 10px; margin: 10px 0 12px;
}
.ticket-list-controls .pref-select { flex: 1 1 0; min-width: 0; }

.thread-canned { margin-bottom: 8px; }
.thread-canned .pref-select { width: 100%; }

@media (max-width: 520px) {
  .ticket-list-controls { flex-direction: column; }
}
/* Rewards — transaction filter chips (added) */
.rewards-tx-filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
/* ============================================================
   GLOBAL FRIENDS DOCK — pinned sidebar on every page (not index)
   ============================================================ */
.friends-dock {
  position: fixed; top: 80px; right: 0; z-index: 1200;
  font-size: 13px; font-family: "Manrope","Sora",sans-serif;
  transition: left 0.4s cubic-bezier(0.16,1,0.3,1), right 0.4s cubic-bezier(0.16,1,0.3,1), top 0.4s cubic-bezier(0.16,1,0.3,1);
}
.friends-dock .fd-panel {
  width: 400px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
  border-radius: 16px 0 0 16px;
  overflow: hidden; clip-path: inset(0 0 0 0 round 16px 0 0 16px);
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease, box-shadow 0.3s ease, border-radius 0.3s ease;
}
.friends-dock.is-collapsed .fd-panel { width: 0; opacity: 0; border-width: 0; padding: 0; pointer-events: none; }
.friends-dock.is-docked-left { right: auto; left: 0; }
.friends-dock.is-docked-left .fd-panel { border-radius: 0 16px 16px 0; clip-path: inset(0 0 0 0 round 0 16px 16px 0); }
.friends-dock.is-dragging { z-index: 10000; transition: none !important; }
.friends-dock.is-dragging .fd-panel {
  border-radius: 16px; clip-path: none;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55), 0 0 40px rgba(99,179,237,0.1), inset 0 1px 0 rgba(255,255,255,0.06);
}
.friends-dock.near-edge .fd-panel {
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 50px rgba(99,179,237,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Standalone open button */
.fd-open-btn {
  position: fixed; top: 80px; right: 0; z-index: 1201;
  width: 46px; height: 50px;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text, #eef3ff);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 80%, transparent), color-mix(in srgb, var(--glass-bg) 65%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-right: none;
  border-radius: 14px 0 0 14px;
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.fd-open-btn:hover { box-shadow: var(--glass-shadow), -4px 0 20px rgba(99,179,237,0.12); }
.fd-open-btn.is-active { opacity: 0; pointer-events: none; }
.fd-open-btn svg { width: 20px; height: 20px; }
.fd-open-btn.fd-open-left {
  right: auto; left: 0;
  border-radius: 0 14px 14px 0;
  border-left: none;
  border-right: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
}
.fd-toggle-badge {
  position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; color: #fff;
  background: #ef4444; box-shadow: 0 0 0 2px #0c1322, 0 0 8px rgba(239,68,68,0.4);
  animation: fdBadgePulse 2s ease-in-out infinite;
}
@keyframes fdBadgePulse { 0%,100%{box-shadow:0 0 0 2px #0c1322,0 0 8px rgba(239,68,68,0.3);} 50%{box-shadow:0 0 0 2px #0c1322,0 0 14px rgba(239,68,68,0.6);} }

/* ── Header & tabs ── */
.fd-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 10px 12px; min-width: 368px; white-space: nowrap;
  border-bottom: 1px solid rgba(99,179,237,0.06);
  background: linear-gradient(180deg, rgba(99,179,237,0.05) 0%, transparent 100%);
  cursor: grab; user-select: none; position: relative;
}
.fd-head::before {
  content: ''; position: absolute; left: 50%; top: 3px; transform: translateX(-50%);
  width: 32px; height: 3px; border-radius: 2px;
  background: rgba(99,179,237,0.2);
  opacity: 0; transition: opacity 0.25s;
}
.fd-head:hover::before { opacity: 1; }
.friends-dock.is-dragging .fd-head { cursor: grabbing; }
.friends-dock.is-dragging .fd-head::before { opacity: 1; background: rgba(99,179,237,0.4); }
.fd-head .fd-tabs { flex: 1; }
.fd-head .fd-online { margin-left: auto; }
.fd-close {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06); cursor: pointer;
  color: rgba(255,255,255,0.3);
  transition: all 0.25s ease;
}
.fd-close svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.fd-close:hover {
  background: rgba(245,101,101,0.12);
  border-color: rgba(245,101,101,0.2);
  color: #f87171;
  box-shadow: 0 0 10px rgba(245,101,101,0.1);
}
.fd-close:hover svg { transform: rotate(90deg); }
.fd-close:active { transform: scale(0.9); }
.fd-tabs {
  display: flex; gap: 2px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px; padding: 3px;
}
.fd-tab {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  cursor: pointer; color: rgba(255,255,255,0.35); background: none; border: none;
  border-radius: 8px; flex: 1; justify-content: center;
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}
.fd-tab svg { width: 12px; height: 12px; }
.fd-tab:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.03); }
.fd-tab.is-active {
  color: #63b3ed; background: rgba(99,179,237,0.12);
  box-shadow: 0 0 12px rgba(99,179,237,0.06), inset 0 0 8px rgba(99,179,237,0.04);
  text-shadow: 0 0 10px rgba(99,179,237,0.35);
}
.fd-online {
  font-size: 10px; font-weight: 700; color: rgba(99,179,237,0.7);
  padding: 4px 10px; border-radius: 8px; letter-spacing: 0.04em;
  background: rgba(99,179,237,0.06);
  border: 1px solid rgba(99,179,237,0.1);
  white-space: nowrap; flex-shrink: 0;
}

/* ── Body panels ── */
.fd-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 368px; overflow: hidden; }

/* ── Search ── */
.fd-search-wrap { position: relative; margin: 10px 12px 6px; }
.fd-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.fd-search-icon svg { width: 14px; height: 14px; color: rgba(255,255,255,0.3); }
.fd-search {
  width: 100%; padding: 9px 12px 9px 34px; font-size: 12px;
  color: var(--text,#eef3ff); background: rgba(255,255,255,0.03);
  border: 1px solid rgba(99,179,237,0.08);
  border-radius: 10px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.fd-search:focus { border-color: rgba(99,179,237,0.3); box-shadow: 0 0 0 3px rgba(99,179,237,0.06), inset 0 0 12px rgba(99,179,237,0.03); background: rgba(255,255,255,0.05); }
.fd-search::placeholder { color: rgba(255,255,255,0.3); }

.fd-scroll { overflow-y: auto; padding: 4px 8px 8px; flex: 1 1 auto; }
.fd-sec { display: flex; align-items: center; gap: 6px; padding: 10px 8px 5px; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted,#9fb1cc); }
.fd-sec-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.fd-sec-dot--on { background: #63b3ed; box-shadow: 0 0 6px rgba(99,179,237,0.5); }
.fd-sec-dot--off { background: #5a6478; }
.fd-sec-dot--req { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.5); }
.fd-sec-dot--pending { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.fd-empty-state { padding: 44px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.fd-empty-icon {
  margin: 0 auto 18px; width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,179,237,0.12) 0%, rgba(99,179,237,0.03) 70%);
  border: 1px solid rgba(99,179,237,0.15);
  box-shadow: 0 0 28px rgba(99,179,237,0.08);
  animation: fdEmptyPulse 3s ease-in-out infinite;
}
@keyframes fdEmptyPulse { 0%,100%{box-shadow:0 0 28px rgba(99,179,237,0.08);} 50%{box-shadow:0 0 36px rgba(99,179,237,0.18);} }
.fd-empty-icon svg { width: 28px; height: 28px; color: #63b3ed; filter: drop-shadow(0 0 6px rgba(99,179,237,0.3)); }
.fd-empty-title { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 6px; letter-spacing: 0.01em; }
.fd-empty-sub { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.6; }

/* ── Friend card ── */
.fd-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.fd-card:hover { background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); }
.fd-card.is-off { opacity: 0.5; }
.fd-card.is-off:hover { opacity: 0.7; }
.fd-card--req { border: 1px solid rgba(239,68,68,0.12); background: rgba(239,68,68,0.04); }
.fd-card-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fd-card-name { font-size: 13px; font-weight: 700; color: var(--text,#eef3ff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.fd-card-sub { font-size: 11px; color: var(--text-muted,#9fb1cc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-card-acts { display: flex; gap: 4px; }
.fd-card-hover { display: flex; gap: 3px; opacity: 0; transition: opacity 0.2s ease; flex: 0 0 auto; }
.fd-card:hover .fd-card-hover { opacity: 1; }
.fd-st-on { color: #63b3ed; }
.fd-st-lobby { color: #63b3ed; font-weight: 700; font-size: 10px; letter-spacing: 0.06em; }
.fd-muted-tag { display: inline-flex; }
.fd-muted-tag svg { width: 11px; height: 11px; color: var(--text-muted,#9fb1cc); }
.fd-unread {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
  background: #63b3ed; color: #fff; box-shadow: 0 0 8px rgba(99,179,237,0.4);
}
.fd-pending-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 7px;
  border-radius: 6px; color: #f59e0b; background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
}

/* ── Avatar ── */
.fd-av { position: relative; flex: 0 0 auto; border-radius: 50%; display: block; }
.fd-av img, .fd-fall {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
.fd-fall {
  display: grid; place-items: center; font-weight: 800; color: #eaf2ff;
  background: linear-gradient(140deg, rgba(99,179,237,0.35), #141d33 70%);
}
.fd-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
.fd-av.is-speak .fd-ring {
  border-color: #63b3ed;
  box-shadow: 0 0 0 2px rgba(99,179,237,0.3), 0 0 12px rgba(99,179,237,0.55);
  animation: fdSpeak 1.1s ease-in-out infinite;
}
@keyframes fdSpeak { 0%,100%{box-shadow:0 0 0 2px rgba(99,179,237,0.28),0 0 10px rgba(99,179,237,0.45);} 50%{box-shadow:0 0 0 4px rgba(99,179,237,0.16),0 0 18px rgba(99,179,237,0.7);} }
.fd-dot {
  position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%;
  background: #5a6478; border: 2px solid #0c1322; transition: background 0.3s, box-shadow 0.3s;
}
.fd-av.is-on .fd-dot { background: #63b3ed; box-shadow: 0 0 6px rgba(99,179,237,0.5); }

/* ── Hover / inline buttons ── */
.fd-hbtn {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; cursor: pointer; color: var(--text-soft,#c4d2ea);
  background: rgba(255,255,255,0.05); border: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.fd-hbtn:hover { background: rgba(99,179,237,0.15); color: #fff; border-color: rgba(99,179,237,0.25); box-shadow: 0 0 8px rgba(99,179,237,0.15); }
.fd-hbtn:disabled { opacity: 0.3; cursor: not-allowed; }
.fd-hbtn svg { width: 13px; height: 13px; }
.fd-ibtn {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  cursor: pointer; border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  transition: background 0.2s, transform 0.15s; background: rgba(255,255,255,0.05);
}
.fd-ibtn:hover { transform: scale(1.08); }
.fd-ibtn svg { width: 14px; height: 14px; }
.fd-ibtn--ok { color: #7df0c8; } .fd-ibtn--ok:hover { background: rgba(125,240,200,0.15); }
.fd-ibtn--no { color: #ff9d9d; } .fd-ibtn--no:hover { background: rgba(255,157,157,0.15); }

/* ── Chat header ── */
.fd-ch-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent);
  background: linear-gradient(180deg, rgba(99,179,237,0.04) 0%, transparent 100%);
}
.fd-ch-back { width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; background: none; border: none; color: var(--text-muted,#9fb1cc); border-radius: 8px; transition: background 0.15s, color 0.15s; }
.fd-ch-back:hover { background: rgba(255,255,255,0.06); color: #fff; }
.fd-ch-back svg { width: 16px; height: 16px; }
.fd-ch-who { flex: 1; min-width: 0; display: grid; gap: 1px; }
.fd-ch-name { font-weight: 700; font-size: 13px; color: var(--text,#eef3ff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-ch-status { font-size: 10px; color: var(--text-muted,#9fb1cc); }
.fd-ch-tools { display: flex; gap: 3px; }
.fd-typing { color: #63b3ed; font-style: italic; }
.fd-dots { display: inline-flex; gap: 2px; margin-left: 2px; }
.fd-dots i { width: 3px; height: 3px; border-radius: 50%; background: #63b3ed; display: inline-block; animation: fdDotBounce 1.4s infinite ease-in-out both; }
.fd-dots i:nth-child(2) { animation-delay: 0.16s; }
.fd-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes fdDotBounce { 0%,80%,100%{opacity:0.3;transform:scale(0.8);}40%{opacity:1;transform:scale(1.2);} }

/* ── Chat messages ── */
.fd-ch-scroll { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.fd-ch-date { text-align: center; padding: 8px 0; }
.fd-ch-date span { font-size: 10px; font-weight: 600; color: var(--text-muted,#9fb1cc); padding: 3px 10px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid color-mix(in srgb, var(--glass-border) 25%, transparent); }
.fd-ch-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; animation: fdMsgIn 0.2s ease-out; }
.fd-ch-msg.is-mine { align-self: flex-end; align-items: flex-end; }
@keyframes fdMsgIn { from { opacity: 0; transform: translateY(6px); } }
.fd-ch-bubble {
  padding: 9px 14px; border-radius: 16px 16px 16px 4px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid color-mix(in srgb, var(--glass-border) 20%, transparent);
  color: var(--text,#eef3ff); font-size: 13px; line-height: 1.5; word-break: break-word;
  display: flex; align-items: center; gap: 6px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.fd-ch-msg.is-mine .fd-ch-bubble {
  background: linear-gradient(135deg, rgba(99,179,237,0.22), rgba(99,179,237,0.1));
  border-color: rgba(99,179,237,0.18); border-radius: 16px 16px 4px 16px;
}
.fd-ch-msg.is-burner .fd-ch-bubble { border: 1px dashed rgba(245,158,11,0.4); background: linear-gradient(135deg, rgba(245,158,11,0.08), transparent); }
.fd-ch-burn-tag svg { width: 11px; height: 11px; color: #f59e0b; flex: 0 0 auto; }
.fd-ch-meta { display: flex; align-items: center; gap: 4px; margin-top: 3px; padding: 0 6px; }
.fd-ch-time { font-size: 10px; color: var(--text-muted,#9fb1cc); }
.fd-ch-read svg { width: 12px; height: 12px; color: var(--text-muted,#9fb1cc); }
.fd-ch-read.is-read svg { color: #63b3ed; }
.fd-link { color: #63b3ed; text-decoration: underline; text-underline-offset: 2px; }
.fd-link:hover { color: #8ccbf5; }
.fd-ch-lobby { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(99,179,237,0.2); width: 100%; }
.fd-ch-lobby-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(99,179,237,0.12); flex: 0 0 auto; }
.fd-ch-lobby-icon svg { width: 18px; height: 18px; color: #63b3ed; }
.fd-ch-lobby-info { flex: 1; display: grid; gap: 2px; }
.fd-ch-lobby-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #63b3ed; }
.fd-ch-lobby-name { font-size: 12.5px; font-weight: 600; color: var(--text,#eef3ff); }
.fd-btn-join { padding: 6px 14px; font-size: 11px; font-weight: 800; border-radius: 8px; background: linear-gradient(135deg, #63b3ed, #539fe0); color: #fff; border: none; cursor: pointer; transition: box-shadow 0.2s, transform 0.15s; box-shadow: 0 2px 8px rgba(99,179,237,0.25); }
.fd-btn-join:hover { box-shadow: 0 4px 16px rgba(99,179,237,0.4); transform: translateY(-1px); }

/* ── Chat input ── */
.fd-ch-input { border-top: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent); padding: 8px 10px 10px; background: linear-gradient(0deg, rgba(99,179,237,0.03) 0%, transparent 100%); }
.fd-ch-bar { display: flex; gap: 2px; margin-bottom: 7px; align-items: center; flex-wrap: wrap; }
.fd-tbtn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: var(--text-muted,#9fb1cc); background: none; border: none; transition: color 0.15s, background 0.15s; }
.fd-tbtn:hover { color: #63b3ed; background: rgba(99,179,237,0.08); }
.fd-tbtn.is-on { color: #f59e0b !important; background: rgba(245,158,11,0.12) !important; box-shadow: inset 0 0 8px rgba(245,158,11,0.1); }
.fd-tbtn svg { width: 15px; height: 15px; }
.fd-burn-label { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; color: #f59e0b; display: flex; align-items: center; gap: 3px; margin-left: auto; padding: 2px 8px; border-radius: 6px; background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.15); }
.fd-burn-label svg { width: 10px; height: 10px; }
.fd-ch-compose { display: flex; gap: 6px; align-items: center; }
.fd-ch-text {
  flex: 1; padding: 9px 14px; font-size: 12.5px; color: var(--text,#eef3ff);
  background: rgba(255,255,255,0.05); border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  border-radius: 12px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.fd-ch-text:focus { border-color: rgba(99,179,237,0.5); box-shadow: 0 0 0 3px rgba(99,179,237,0.1), inset 0 0 12px rgba(99,179,237,0.03); }
.fd-ch-text::placeholder { color: var(--text-muted,#9fb1cc); }
.fd-ch-send {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, #63b3ed, #539fe0); border: none; border-radius: 10px;
  cursor: pointer; color: #fff; transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 10px rgba(99,179,237,0.25);
}
.fd-ch-send:hover { box-shadow: 0 4px 18px rgba(99,179,237,0.45); transform: translateY(-1px); }
.fd-ch-send svg { width: 14px; height: 14px; }
.fd-emoji-wrap { margin-bottom: 6px; border-radius: 10px; }
.fd-emoji-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: 2px; padding: 8px; max-height: 160px; overflow-y: auto; }
.fd-emoji { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 18px; border: none; background: none; border-radius: 6px; cursor: pointer; transition: background 0.12s, transform 0.12s; }
.fd-emoji:hover { background: rgba(99,179,237,0.12); transform: scale(1.2); }

/* ── Add friend tab ── */
.fd-add-wrap { padding: 20px 16px 12px; }
.fd-add-hero { text-align: center; margin-bottom: 20px; }
.fd-add-hero-icon {
  width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center;
  border-radius: 50%; background: radial-gradient(circle, rgba(99,179,237,0.14) 0%, rgba(99,179,237,0.04) 70%);
  border: 1px solid rgba(99,179,237,0.22); box-shadow: 0 0 20px rgba(99,179,237,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}
.fd-add-hero-icon svg { width: 24px; height: 24px; color: #63b3ed; filter: drop-shadow(0 0 4px rgba(99,179,237,0.35)); }
.fd-add-hero-title { font-size: 16px; font-weight: 800; color: var(--text,#eef3ff); letter-spacing: 0.01em; }
.fd-add-hero-sub { font-size: 12.5px; color: var(--text-muted,#9fb1cc); margin-top: 4px; line-height: 1.4; }
.fd-add-form {
  display: flex; gap: 8px; padding: 8px; border-radius: 12px;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(99,179,237,0.06);
  overflow: hidden;
}
.fd-add-form .fd-btn { flex-shrink: 0; padding: 9px 14px; font-size: 11px; }
.fd-add-input {
  flex: 1; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text,#eef3ff);
  background: rgba(255,255,255,0.03); border: 1px solid rgba(99,179,237,0.1);
  border-radius: 10px; outline: none; transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.fd-add-input:focus {
  border-color: rgba(99,179,237,0.35); background: rgba(99,179,237,0.03);
  box-shadow: 0 0 0 3px rgba(99,179,237,0.06), 0 0 12px rgba(99,179,237,0.05);
}
.fd-add-input::placeholder { color: rgba(255,255,255,0.3); font-weight: 400; }
.fd-add-section { padding: 4px 12px 12px; }
.fd-add-result { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.fd-add-result svg { width: 14px; height: 14px; flex: 0 0 auto; }
.fd-add-result.is-ok { background: rgba(99,179,237,0.1); color: #63b3ed; border: 1px solid rgba(99,179,237,0.15); }
.fd-add-result.is-err { background: rgba(239,68,68,0.1); color: #ff9d9d; border: 1px solid rgba(239,68,68,0.15); }
.fd-btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 10px 16px; font-size: 12px; font-weight: 800; letter-spacing: 0.03em;
  border-radius: 11px; border: none; cursor: pointer; white-space: nowrap;
  transition: box-shadow 0.25s, transform 0.18s, background 0.25s;
}
.fd-btn::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.18) 45%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.18) 55%, transparent 65%);
  transition: opacity 0.3s;
}
.fd-btn:hover::after { opacity: 1; animation: btnShineSweep 0.7s ease-out; }
.fd-btn--primary {
  background: linear-gradient(135deg, rgba(99,179,237,0.22), rgba(99,179,237,0.1));
  color: #fff; border: 1px solid rgba(99,179,237,0.3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(99,179,237,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
  text-shadow: 0 0 10px rgba(99,179,237,0.4);
}
.fd-btn--primary:hover {
  background: linear-gradient(135deg, rgba(99,179,237,0.3), rgba(99,179,237,0.15));
  border-color: rgba(99,179,237,0.45);
  box-shadow: 0 4px 20px rgba(99,179,237,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.fd-btn--primary:active { transform: translateY(0.5px) scale(0.98); box-shadow: 0 1px 6px rgba(99,179,237,0.15); }
.fd-btn--ghost {
  background: rgba(255,255,255,0.05); color: var(--text-soft,#c4d2ea);
  border: 1px solid rgba(160,190,230,0.18); backdrop-filter: blur(6px);
}
.fd-btn--ghost:hover { background: rgba(255,255,255,0.09); border-color: rgba(160,190,230,0.3); box-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.fd-btn--accent {
  background: linear-gradient(135deg, #5baaed, #3d8fd4); color: #fff;
  box-shadow: 0 2px 12px rgba(99,179,237,0.25);
}
.fd-btn svg { width: 14px; height: 14px; position: relative; z-index: 1; }
/* ── Context menu ── */
.fd-ctx {
  position: fixed; z-index: 2000; min-width: 200px; padding: 6px;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
  animation: fdCtxIn 0.18s cubic-bezier(0.16,1,0.3,1);
}
@keyframes fdCtxIn { from { opacity: 0; transform: scale(0.92) translateY(-6px); } to { opacity: 1; transform: none; } }
.fd-ctx-head { padding: 8px 14px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; color: #63b3ed; text-transform: uppercase; }
.fd-ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 14px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  color: var(--text-soft,#c4d2ea); background: none; border: none; border-radius: 9px;
  transition: background 0.15s, color 0.15s;
}
.fd-ctx-item:hover { background: rgba(99,179,237,0.08); color: #fff; }
.fd-ctx-item svg { width: 14px; height: 14px; flex: 0 0 auto; }
.fd-ctx--danger { color: #ff9d9d; }
.fd-ctx--danger:hover { background: rgba(239,68,68,0.1) !important; color: #ff9d9d !important; }
.fd-ctx-sep { height: 1px; background: color-mix(in srgb, var(--glass-border) 25%, transparent); margin: 4px 10px; }

/* ── Floating notification ── */
.fd-notif {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 5000; width: min(420px, 92vw);
  animation: fdNotifIn 0.35s cubic-bezier(0.16,1,0.3,1);
}
.fd-notif--out { animation: fdNotifOut 0.3s ease-in forwards; }
@keyframes fdNotifIn { from { opacity: 0; transform: translateX(-50%) translateY(-24px) scale(0.96); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes fdNotifOut { from { opacity: 1; transform: translateX(-50%) scale(1); } to { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(0.96); } }
.fd-notif-card { border-radius: 16px; overflow: hidden; }
.fd-notif-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.fd-notif-av { flex: 0 0 auto; }
.fd-notif-av img { width: 32px; height: 32px; border-radius: 50%; }
.fd-notif-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.fd-notif-body strong { font-size: 13px; color: var(--text,#eef3ff); }
.fd-notif-body p { margin: 0; font-size: 12px; color: var(--text-soft,#c4d2ea); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-notif-x { width: 26px; height: 26px; display: grid; place-items: center; background: none; border: none; color: var(--text-muted,#9fb1cc); cursor: pointer; border-radius: 7px; transition: background 0.15s; }
.fd-notif-x:hover { background: rgba(255,255,255,0.06); }
.fd-notif-x svg { width: 13px; height: 13px; }
.fd-notif-reply { display: flex; gap: 8px; padding: 8px 16px 14px; border-top: 1px solid color-mix(in srgb, var(--glass-border) 25%, transparent); }
.fd-notif-input { flex: 1; padding: 8px 12px; font-size: 12px; color: var(--text,#eef3ff); background: rgba(255,255,255,0.05); border: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent); border-radius: 10px; outline: none; transition: border-color 0.2s; }
.fd-notif-input:focus { border-color: rgba(99,179,237,0.5); }
.fd-notif-input::placeholder { color: var(--text-muted,#9fb1cc); }
.fd-notif-send { width: 30px; height: 30px; display: grid; place-items: center; background: linear-gradient(135deg, #63b3ed, #539fe0); border: none; border-radius: 9px; cursor: pointer; color: #fff; box-shadow: 0 2px 8px rgba(99,179,237,0.3); }
.fd-notif-send:hover { box-shadow: 0 4px 14px rgba(99,179,237,0.5); }
.fd-notif-send svg { width: 13px; height: 13px; }
.fd-notif-bar-wrap { height: 3px; background: rgba(255,255,255,0.04); }
.fd-notif-bar { height: 100%; width: 100%; background: linear-gradient(90deg, #63b3ed, #539fe0); animation: fdNotifCountdown 8s linear forwards; transform-origin: left; }
@keyframes fdNotifCountdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ── Voice recorder modal ── */
.fd-overlay { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: rgba(4,8,16,0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fdFadeIn 0.2s ease-out; }
@keyframes fdFadeIn { from { opacity: 0; } }
.fd-modal { width: min(420px, 92vw); border-radius: 16px; overflow: hidden; }
.fd-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent); font-size: 13px; color: var(--text,#eef3ff); }
.fd-modal-x { width: 28px; height: 28px; display: grid; place-items: center; background: none; border: none; color: var(--text-muted,#9fb1cc); cursor: pointer; border-radius: 8px; }
.fd-modal-x:hover { background: rgba(255,255,255,0.06); }
.fd-modal-x svg { width: 14px; height: 14px; }
.fd-modal-body { padding: 24px 20px; display: grid; gap: 18px; justify-items: center; }
.fd-vm-vis { display: grid; place-items: center; position: relative; }
.fd-vm-ring { width: 80px; height: 80px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--glass-border) 40%, transparent); transition: border-color 0.3s, box-shadow 0.3s; }
.fd-vm-ring.is-rec { border-color: #ef4444; box-shadow: 0 0 0 6px rgba(239,68,68,0.15), 0 0 20px rgba(239,68,68,0.2); animation: fdVmPulse 1.5s ease-in-out infinite; }
@keyframes fdVmPulse { 0%,100%{box-shadow:0 0 0 4px rgba(239,68,68,0.12),0 0 16px rgba(239,68,68,0.15);} 50%{box-shadow:0 0 0 8px rgba(239,68,68,0.08),0 0 28px rgba(239,68,68,0.25);} }
.fd-vm-time { position: absolute; font-family: "Sora",sans-serif; font-size: 22px; font-weight: 700; color: var(--text,#eef3ff); }
.fd-vm-acts { display: flex; gap: 10px; }
.fd-vm-audio { width: 100%; max-height: 36px; }

/* Hide dock on small screens */
@media (max-width: 900px) { .friends-dock { display: none; } }
@media (hover: none),(pointer: coarse) {
  .fd-card-hover { opacity: 1 !important; }
  .fd-hbtn, .fd-ibtn { min-width: 44px; min-height: 44px; }
}
.fd-card:focus-within .fd-card-hover { opacity: 1; }
/* Profile — friends management panel (added) */
.pf-add-friend { display: flex; gap: 8px; }
.pf-add-friend input {
  flex: 1 1 auto; padding: 10px 12px; font-size: 13.5px; color: var(--text,#eef3ff);
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent); border-radius: 10px;
}
.pf-add-friend input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.pf-search-results { margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent); }
.pf-noresult { padding: 12px; font-size: 12px; color: var(--text-muted,#9fb1cc); }

.pf-friends-list { display: grid; gap: 6px; }
.pf-friend { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; transition: background 0.15s ease; }
.pf-friend:hover { background: rgba(255,255,255,0.04); }
.pf-friend__name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--text-soft,#c4d2ea); display: grid; gap: 1px; }
.pf-friend__status { font-size: 11px; font-weight: 500; color: var(--text-muted,#9fb1cc); }
.pf-friend__actions { display: flex; gap: 6px; flex: 0 0 auto; }
.pf-danger { color: #ff9d9d; }
.pf-danger:hover { border-color: rgba(239,68,68,0.4); }

.pf-avatar { position: relative; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; }
.pf-avatar img, .pf-fallback { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pf-fallback { display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #eaf2ff; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 50%, #1a2540), #141d33); }
.pf-dot { position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: #5a6478; border: 2px solid #0c1322; }
.pf-avatar.is-online .pf-dot { background: var(--status-success,#5fd0a8); }

.pf-vm.is-unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pf-vm-audio { height: 34px; max-width: 200px; }
/* ============================================================
   PERFORMANCE — gate always-on infinite animations.
   These ran continuously on every glass panel and every progress
   bar site-wide (N compositor animations per page). Make them
   rest-quiet: only animate on hover/loading, never on touch.
   ============================================================ */
.glass-panel::after { animation: none; }
@media (hover: hover) and (pointer: fine) {
  .glass-panel:hover::after,
  .glass-panel:focus-within::after { animation: borderShimmer 8s ease-in-out infinite; }
}

.progress span::after { animation: none; }
.progress.is-loading span::after { animation: holoShimmer 3s linear infinite; }

/* Promote large blurred ambient layers so they don't re-rasterize each frame. */
.body-bg::before, .ambient-orb { will-change: transform; }

/* Honor reduced-motion globally for these too. */
@media (prefers-reduced-motion: reduce) {
  .glass-panel::after, .progress span::after, .progress.is-loading span::after { animation: none !important; }
}
/* ============================================================
   TOUCH REACHABILITY — hover-only actions must be reachable on
   touch devices; small targets must meet the 44px minimum.
   ============================================================ */
@media (hover: none), (pointer: coarse) {
  .fd-friend__actions { opacity: 1 !important; }
  .fd-mini { min-width: 44px; min-height: 44px; }
  .fd-req-actions .fd-mini { min-width: 44px; min-height: 44px; }
}
.fd-friend:focus-within .fd-friend__actions { opacity: 1; }

/* Custom checkbox: keep the 18px visual, expand only the HIT area via ::before
   pseudo (the checkmark uses ::after, so ::before is free). Prevents the coarse
   min-height:44px rule from stretching the box and breaking the checkmark. */
@media (pointer: coarse) {
  input[type="checkbox"], input[type="radio"] {
    min-width: 0 !important; min-height: 0 !important; position: relative;
  }
  input[type="checkbox"]::before, input[type="radio"]::before {
    content: ""; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 44px; height: 44px;
  }
  /* Range thumb needs explicit size, not min-* (which the pseudo ignores). */
  input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
}
/* Modal must include its margin in the width budget (no horizontal overflow). */
@media (max-width: 768px) {
  .modal-content { width: calc(100vw - 32px); margin: 16px auto; }
}

/* === store.css === */
.product-shell {
  display: grid;
  gap: 24px;
}

.catalog-hero {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: center;
}

.catalog-hero h1 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 0;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.catalog-hero p {
  margin: 0;
}

.catalog-hero-actions {
  display: block;
}

.catalog-controls-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.catalog-controls-row:last-child {
  margin-bottom: 0;
}

.catalog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-sort label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.catalog-sort select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.catalog-sort select:focus {
  outline: none;
}

.catalog-sort select:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 0 0 1px var(--border-inner);
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.catalog-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  min-height: 380px;
  cursor: pointer;
  perspective: 800px;
}

/* 3D hover tilt for catalog cards */
.catalog-card:hover {
  transform: perspective(800px) rotateX(1deg) rotateY(-1deg);
}

.catalog-card:active {
  transform: perspective(800px) rotateX(0deg) rotateY(0deg) scale(0.98);
  transition-duration: 0.1s;
}

.catalog-media {
  position: relative;
  padding: 0;
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  background: transparent;
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: none;
  isolation: isolate;
}

.catalog-media::after {
  content: "";
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(circle at 22% 18%, rgba(123, 220, 255, 0.28), transparent 58%),
    radial-gradient(circle at 80% 85%, rgba(217, 183, 122, 0.2), transparent 62%);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}

.catalog-card:hover .catalog-media::after {
  opacity: 0.6;
}

.catalog-media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background:
    var(--liquid-highlight),
    linear-gradient(150deg, color-mix(in srgb, var(--glass-bg-strong) 85%, transparent), color-mix(in srgb, var(--glass-bg) 60%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px var(--border-inner),
    0 18px 32px rgba(2, 6, 12, 0.45),
    0 0 24px color-mix(in srgb, var(--product-accent, var(--accent)) 28%, transparent);
  isolation: isolate;
  z-index: 1;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

.catalog-media-frame::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: linear-gradient(
    120deg,
    transparent 42%,
    rgba(255, 255, 255, 0.55) 49%,
    color-mix(in srgb, var(--product-accent, var(--accent)) 35%, transparent) 52%,
    transparent 60%
  );
  opacity: 0;
  transform: translateX(-35%) rotate(1deg);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Flash effect on hover */
.catalog-media-frame::after {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(circle at 75% 20%, color-mix(in srgb, var(--product-accent, var(--accent)) 45%, transparent), transparent 65%);
  opacity: 0.32;
  filter: blur(24px);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.catalog-card:hover .catalog-media-frame::before {
  opacity: 1;
  transform: translateX(35%) rotate(-1deg);
}

.catalog-card:hover .catalog-media-frame::after {
  opacity: 0.7;
  filter: blur(32px);
}

/* Shimmer sweep on hover */
.catalog-media-frame .catalog-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.15) 45%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.15) 55%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: none;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
}

.catalog-card:hover .catalog-shimmer {
  transform: translateX(100%);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glow pulse on hover */
.catalog-card:hover .catalog-media-frame {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 0 0 1px var(--border-inner),
    0 24px 48px rgba(2, 6, 12, 0.55),
    0 0 40px color-mix(in srgb, var(--product-accent, var(--accent)) 40%, transparent),
    0 0 80px color-mix(in srgb, var(--product-accent, var(--accent)) 20%, transparent);
  border-color: color-mix(in srgb, var(--product-accent, var(--accent)) 50%, transparent);
}

.catalog-card:hover .catalog-media-image {
  transform: scale(1.06);
  filter: saturate(1.15) contrast(1.08) brightness(1.05);
}

.catalog-media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  filter: saturate(1.05) contrast(1.05);
  position: relative;
  z-index: 0;
  transform: scale(1.02);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}

.catalog-media-frame.is-fallback {
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.06), transparent 40%),
    linear-gradient(150deg, rgba(15, 24, 42, 0.88), rgba(10, 16, 28, 0.72));
}

.catalog-media-frame.is-fallback .catalog-media-image {
  object-fit: contain;
  transform: scale(0.96);
  filter: saturate(1) contrast(1);
}

.catalog-media-frame.is-missing {
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.06), transparent 40%),
    linear-gradient(150deg, rgba(12, 20, 36, 0.92), rgba(8, 12, 22, 0.78));
}

.catalog-media-frame.is-missing::after {
  opacity: 0.2;
}

.catalog-media-mark {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: color-mix(in srgb, var(--product-accent, var(--accent)) 70%, rgba(240, 248, 255, 0.8));
  border: 1px solid color-mix(in srgb, var(--product-accent, var(--accent)) 45%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px var(--border-inner), 0 12px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  opacity: 0.92;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 3;
}

.catalog-status {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
}

.catalog-card-badges {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: none;
}

.catalog-badge--undetected {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--status-success);
  border: 1px solid color-mix(in srgb, var(--status-success) 35%, transparent);
  background: color-mix(in srgb, var(--status-success) 10%, transparent);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.catalog-badge--undetected::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 6px var(--status-success);
}

.catalog-badge {
  display: none;
}

.catalog-content {
  display: grid;
  gap: 12px;
  align-content: start;
}

.catalog-head,
.catalog-back-head {
  display: grid;
  gap: 6px;
}

.catalog-back-head .metric-label {
  font-size: 11px;
  color: var(--text-muted);
}

.catalog-content h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.catalog-content p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.catalog-values {
  display: grid;
  gap: 8px;
}

.catalog-security-info {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.catalog-security-info .catalog-value {
  font-weight: 600;
}

.catalog-security-info .catalog-value[data-detection] {
  color: var(--status-success);
}

.catalog-security-info .catalog-value[data-detection="monitoring"] {
  color: var(--status-warning);
}

.catalog-security-info .catalog-value[data-detection="high"] {
  color: var(--status-danger);
}

.catalog-value {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}

.catalog-foot {
  display: grid;
  gap: 10px;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-actions .btn {
  flex: 1 1 120px;
  justify-content: center;
}

.catalog-card:hover .catalog-media-image {
  transform: scale(1.08);
  filter: saturate(1.15) brightness(1.06);
}

.catalog-card:hover .catalog-media-frame {
  transform: translateY(-10px);
  border-color: color-mix(in srgb, var(--product-accent, var(--accent)) 50%, var(--glass-border));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px var(--border-inner),
    0 30px 50px rgba(2, 6, 12, 0.6),
    0 12px 32px rgba(8, 18, 34, 0.5),
    0 0 40px color-mix(in srgb, var(--product-accent, var(--accent)) 35%, transparent);
}

.catalog-card:hover .catalog-media-frame::before {
  animation: catalogSheen 1.6s ease-out;
  opacity: 0.7;
}

.catalog-card:hover .catalog-media-frame::after {
  opacity: 0.5;
}

@keyframes catalogSheen {
  0%,
  68% {
    opacity: 0;
    transform: translateX(-45%) rotate(1deg);
  }
  74% {
    opacity: 0.35;
  }
  82% {
    opacity: 0.65;
  }
  100% {
    opacity: 0;
    transform: translateX(45%) rotate(1deg);
  }
}

.catalog-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.catalog-price--prominent {
  display: flex;
  align-items: baseline;
  gap: 6px;
  justify-content: flex-start;
}

.catalog-price__from {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.catalog-price__amount {
  font-family: "Sora", ui-monospace, monospace;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.catalog-price__term {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 3D Product Preview Box for Store ── */
.store-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: center;
  gap: 28px;
  padding: 30px;
}

.store-spotlight-copy {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.store-spotlight-copy h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}

.store-spotlight-copy p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.store-spotlight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.store-spotlight-pills .pill {
  border-color: color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 72%, transparent);
}

.store-preview-3d {
  --store-halo-shift-x: 0px;
  --store-halo-shift-y: 0px;
  --store-halo-scale: 1;
  display: grid;
  place-items: center;
  position: relative;
  padding: 48px 24px 30px;
  min-height: 500px;
  overflow: visible;
  isolation: isolate;
}

.store-preview-3d::before {
  content: "";
  position: absolute;
  width: 88%;
  height: 66%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(96, 182, 255, 0.26), transparent 68%),
    radial-gradient(circle at 40% 60%, rgba(123, 220, 255, 0.14), transparent 54%);
  filter: blur(26px);
  transform: translate(var(--store-halo-shift-x), calc(16px + var(--store-halo-shift-y))) scale(var(--store-halo-scale));
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.store-feature-lineup {
  --lineup-shift-x: 0px;
  --lineup-shift-y: 0px;
  position: relative;
  width: min(100%, 980px);
  min-height: 394px;
  transform: translate(var(--lineup-shift-x), var(--lineup-shift-y));
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.store-feature-lineup.is-interacting {
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.store-feature-card {
  --feature-x: 0px;
  --feature-y: 0px;
  --feature-rotate-z: 0deg;
  --feature-scale: 1;
  --feature-drift-x: 0px;
  --feature-drift-y: 0px;
  --feature-hover-y: 0px;
  --feature-hover-scale: 0;
  --feature-hover-rotate: 0deg;
  --feature-light-x: 50%;
  --feature-light-y: 14%;
  --feature-glow: rgba(123, 220, 255, 0.3);
  --feature-shine-delay: 0s;
  --feature-shadow-depth: 0px;
  /* Entrance reveal: cards start collapsed toward centre + scaled down. */
  --reveal-collapse: -1;          /* 1 = collapsed (pre-reveal), 0 = settled */
  --reveal-delay: 0ms;
  --reveal-x: 0px;
  --reveal-scale: 1;
  --reveal-opacity: 1;
  --idle-y: 0px;
  --feature-tilt-x: 0deg;
  --feature-tilt-y: 0deg;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 186px;
  aspect-ratio: 2 / 3;
  color: var(--text);
  text-decoration: none;
  transform-style: preserve-3d;
  transform:
    perspective(1100px)
    translate(-50%, -50%)
    translate(
      calc((var(--feature-x) + var(--feature-drift-x)) * (1 - var(--reveal-collapse, 1) * 0.78) + var(--reveal-x)),
      calc(var(--feature-y) + var(--feature-drift-y) + var(--feature-hover-y))
    )
    rotate(calc((var(--feature-rotate-z) + var(--feature-hover-rotate)) * (1 - var(--reveal-collapse, 1))))
    rotateX(var(--feature-tilt-x))
    rotateY(var(--feature-tilt-y))
    scale(calc((var(--feature-scale) + var(--feature-hover-scale)) * var(--reveal-scale)));
  opacity: var(--reveal-opacity);
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.5s ease,
    opacity 0.5s ease;
  z-index: var(--feature-stack, 1);
  will-change: transform;
  cursor: pointer;
}

/* Pre-reveal: collapsed toward centre, scaled down, faded. */
.store-feature-lineup:not(.is-revealed) .store-feature-card {
  --reveal-collapse: 1;
  --reveal-scale: 0.82;
  --reveal-opacity: 0;
  transition: none;
}
/* Revealed: each card eases out to its fan position on a staggered delay. */
.store-feature-lineup.is-revealed .store-feature-card {
  --reveal-collapse: 0;
  --reveal-scale: 1;
  --reveal-opacity: 1;
  transition:
    transform 0.95s cubic-bezier(0.22, 1, 0.3, 1) var(--reveal-delay),
    opacity 0.7s ease var(--reveal-delay);
}
/* (Idle float removed — it competed with the pointer parallax and caused
   jank on mouse-move. The entrance reveal + hover provide the motion.) */

/* While interacting, keep transforms responsive but silky (not the old 120ms
   snap), and let filter/opacity glide for the depth recede. */
.store-feature-lineup.is-interacting .store-feature-card {
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.4s ease,
    opacity 0.4s ease;
}
/* Non-focused cards recede: shrink (via JS scale) + dim (opacity) + soft blur
   so the hovered card clearly pops with real depth. */
.store-feature-lineup.is-interacting .store-feature-card:not(.is-active) {
  filter: brightness(0.7) saturate(0.85) blur(1.5px);
}
.store-feature-lineup.is-interacting .store-feature-card.is-active {
  filter: brightness(1.04) saturate(1.08);
}

/* Focused card sits clearly above; its immediate neighbours layer just under
   it so nothing pops over a larger card awkwardly. */
.store-feature-card.is-active {
  z-index: 20;
}
.store-feature-lineup.is-interacting .store-feature-card { z-index: 5; }
.store-feature-lineup.is-interacting .store-feature-card.is-active { z-index: 20; }
.store-feature-card.is-active .store-feature-card__surface {
  border-color: color-mix(in srgb, var(--feature-glow) 65%, transparent);
  box-shadow:
    0 40px 70px rgba(2,8,18,0.6),
    0 0 0 1px color-mix(in srgb, var(--feature-glow) 40%, transparent),
    0 0 60px color-mix(in srgb, var(--feature-glow) 50%, transparent);
}

.store-feature-card::before {
  content: "";
  position: absolute;
  inset: -24%;
  background:
    radial-gradient(circle at 50% 85%, var(--feature-glow), transparent 58%),
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--feature-glow) 60%, transparent), transparent 52%);
  filter: blur(32px);
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.store-feature-card.is-active::before {
  opacity: 1;
  transform: translateY(18px);
}

.store-feature-card:hover,
.store-feature-card:focus-visible {
  --feature-hover-y: -14px;
  --feature-hover-scale: 0.03;
  --feature-hover-rotate: 0deg;
  filter: brightness(1.05) saturate(1.08);
  /* Lift the hovered card above all siblings so its name is never
     tucked behind a neighbouring card (beats .is-active's z-index: 9). */
  z-index: 12;
}

.store-feature-card:hover .store-feature-card__surface,
.store-feature-card:focus-visible .store-feature-card__surface {
  border-color: color-mix(in srgb, var(--feature-glow) 45%, var(--glass-border));
  box-shadow:
    0 36px 60px rgba(4, 10, 24, 0.62),
    0 16px 32px rgba(2, 6, 12, 0.42),
    0 0 48px color-mix(in srgb, var(--feature-glow) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.store-feature-card__surface {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background-color: rgba(8, 14, 24, 0.92);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03) 22%, rgba(255, 255, 255, 0) 42%),
    var(--feature-art, none),
    linear-gradient(160deg, rgba(11, 18, 32, 0.7), rgba(8, 14, 24, 0.82));
  background-position: center top, var(--feature-art-position, 50% 18%), center center;
  background-size: auto, var(--feature-art-size, 122%), auto;
  background-repeat: no-repeat, no-repeat, no-repeat;
  box-shadow:
    0 28px 48px rgba(4, 10, 24, 0.56),
    0 12px 24px rgba(2, 6, 12, 0.38),
    0 0 32px color-mix(in srgb, var(--feature-glow) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.5s ease, border-color 0.4s ease;
}

.store-feature-card__surface::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: linear-gradient(
    124deg,
    transparent 24%,
    rgba(255, 255, 255, 0.08) 38%,
    rgba(255, 255, 255, 0.28) 48%,
    rgba(255, 255, 255, 0.38) 50%,
    rgba(255, 255, 255, 0.28) 52%,
    rgba(255, 255, 255, 0.08) 62%,
    transparent 76%
  );
  transform: translateX(-75%) rotate(14deg);
  mix-blend-mode: screen;
  opacity: 0;
  animation: storeFeatureShine 7s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  animation-delay: var(--feature-shine-delay);
  pointer-events: none;
}

.store-feature-card__surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--feature-light-x) var(--feature-light-y), rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 16%, transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015) 20%, rgba(5, 10, 18, 0.03) 52%, rgba(5, 10, 18, 0.22) 100%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.07), transparent 22%, transparent 68%, rgba(255, 255, 255, 0.03));
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.store-feature-card__meta {
  position: absolute;
  left: 14px;
  width: min(var(--feature-meta-width), calc(100% - 28px));
  bottom: 12px;
  z-index: 2;
  display: grid;
  gap: 4px;
  pointer-events: none;
}

.store-feature-card__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(219, 237, 255, 0.84);
  text-shadow: 0 6px 18px rgba(6, 10, 18, 0.65);
}

.store-feature-card__title {
  font-family: var(--font-display);
  font-size: var(--feature-title-size);
  line-height: 1.02;
  max-width: 100%;
  letter-spacing: -0.02em;
  text-shadow: 0 10px 26px rgba(6, 10, 18, 0.78);
}

.store-feature-card--left-edge {
  --feature-x: -320px;
  --feature-y: 18px;
  --feature-rotate-z: -12deg;
  --feature-scale: 0.9;
  --feature-stack: 1;
}

.store-feature-card--left {
  --feature-x: -160px;
  --feature-y: 8px;
  --feature-rotate-z: -6deg;
  --feature-scale: 0.97;
  --feature-stack: 2;
}

.store-feature-card--center {
  --feature-x: 0px;
  --feature-y: 0px;
  --feature-rotate-z: 0deg;
  --feature-scale: 1.04;
  --feature-stack: 5;
  width: 202px;
}

.store-feature-card--right {
  --feature-x: 160px;
  --feature-y: 8px;
  --feature-rotate-z: 6deg;
  --feature-scale: 0.97;
  --feature-stack: 4;
}

.store-feature-card--right-edge {
  --feature-x: 320px;
  --feature-y: 18px;
  --feature-rotate-z: 12deg;
  --feature-scale: 0.9;
  --feature-stack: 3;
}

/* Tighter fan inside the two-column Featured stage so every card (incl. the
   edges) stays fully within the panel and never clips off-screen. */
.store-featured-stage .store-feature-card { width: 132px; }
.store-featured-stage .store-feature-card--center { width: 146px; }
.store-featured-stage .store-feature-card--left-edge  { --feature-x: -132px; --feature-rotate-z: -9deg; --feature-scale: 0.86; }
.store-featured-stage .store-feature-card--left       { --feature-x: -70px; }
.store-featured-stage .store-feature-card--right      { --feature-x: 70px; }
.store-featured-stage .store-feature-card--right-edge { --feature-x: 132px; --feature-rotate-z: 9deg; --feature-scale: 0.86; }

.store-3d-card {
  --store-box-depth: 189px;
  --cover-image: url("../products/rust/hero.webp");
  --store-rotate-y: -16deg;
  --store-rotate-x: 7deg;
  --store-lift: -8px;
  --store-scale: 1.02;
  --store-glare-x: 28%;
  --store-glare-y: 18%;
  --store-glare-opacity: 0.42;
  --store-cover-shift-x: 0px;
  --store-cover-shift-y: 0px;
  --store-rim-opacity: 0.18;
  width: 100%;
  max-width: 180px;
  aspect-ratio: 2 / 3;
  position: relative;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transform: rotateY(var(--store-rotate-y)) rotateX(var(--store-rotate-x)) translateY(var(--store-lift)) scale(var(--store-scale));
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;
  isolation: isolate;
  will-change: transform;
}

.store-3d-card.tilt-card {
  animation: none;
}

.store-3d-card:not(.tilt-card):hover {
  transform: rotateY(var(--store-rotate-y)) rotateX(var(--store-rotate-x)) translateY(var(--store-lift)) scale(var(--store-scale));
}

.store-3d-card.is-interacting {
  transition-duration: 70ms;
}

.store-3d-face {
  position: absolute;
  border: 1px solid rgba(116, 178, 255, 0.42);
  backface-visibility: hidden;
  pointer-events: none;
  box-shadow:
    0 12px 26px rgba(4, 10, 24, 0.5),
    inset 0 0 0 1px rgba(214, 236, 255, 0.1);
}

.store-3d-front {
  inset: 0;
  transform: translateZ(calc(var(--store-box-depth) * 0.5));
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cover-image) calc(50% + var(--store-cover-shift-x)) calc(50% + var(--store-cover-shift-y)) / cover no-repeat;
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  filter: saturate(1.06) contrast(1.04) brightness(0.98);
  box-shadow:
    0 20px 36px rgba(4, 10, 28, 0.56),
    0 0 30px rgba(74, 156, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.store-3d-back {
  inset: 0;
  transform: rotateY(180deg) translateZ(calc(var(--store-box-depth) * 0.5));
  background: linear-gradient(160deg, rgba(126, 198, 255, 0.22), rgba(8, 22, 52, 0.92));
  filter: saturate(1.06) brightness(0.72);
}

.store-3d-right,
.store-3d-left {
  top: 0;
  bottom: 0;
  width: var(--store-box-depth);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(188, 228, 255, 0.28), rgba(8, 24, 56, 0.86));
}

.store-3d-right {
  right: calc(var(--store-box-depth) * -0.5);
  border-left: 1px solid rgba(146, 208, 255, 0.52);
  border-right: 1px solid rgba(84, 134, 216, 0.36);
  transform-origin: center center;
  transform: rotateY(90deg);
  background-position: right center;
  filter: saturate(0.98) brightness(0.96);
}

.store-3d-left {
  left: calc(var(--store-box-depth) * -0.5);
  border-right: 1px solid rgba(146, 208, 255, 0.52);
  border-left: 1px solid rgba(84, 134, 216, 0.36);
  transform-origin: center center;
  transform: rotateY(-90deg);
  background-position: left center;
  filter: saturate(0.88) brightness(0.78);
}

.store-3d-right::before,
.store-3d-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 34%, rgba(8, 18, 40, 0.56)),
    repeating-linear-gradient(0deg, rgba(190, 224, 255, 0.05) 0 1px, transparent 1px 14px);
  opacity: 0.85;
}

.store-3d-top,
.store-3d-bottom {
  left: 0;
  right: 0;
  height: var(--store-box-depth);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(176, 220, 255, 0.24), rgba(8, 20, 48, 0.92));
}

.store-3d-top {
  top: calc(var(--store-box-depth) * -0.5);
  border-bottom: 1px solid rgba(140, 196, 255, 0.46);
  transform-origin: center center;
  transform: rotateX(90deg);
  background-position: center top;
  filter: brightness(0.98);
}

.store-3d-bottom {
  bottom: calc(var(--store-box-depth) * -0.5);
  border-top: 1px solid rgba(122, 170, 236, 0.42);
  transform-origin: center center;
  transform: rotateX(-90deg);
  background-position: center bottom;
  filter: brightness(0.64);
}

.store-3d-front::before {
  content: "";
  position: absolute;
  inset: -16%;
  background:
    radial-gradient(circle at var(--store-glare-x) var(--store-glare-y), rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.22) 12%, rgba(255, 255, 255, 0.08) 24%, transparent 42%),
    linear-gradient(132deg, transparent 18%, rgba(255, 255, 255, 0.12) 34%, rgba(255, 255, 255, var(--store-glare-opacity)) 48%, transparent 66%);
  opacity: 0.95;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.store-3d-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 30%, rgba(7, 13, 24, 0.26) 100%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 28%, transparent 64%, rgba(255, 255, 255, 0.12) 84%, rgba(255, 255, 255, 0.05));
  opacity: 0.9;
  pointer-events: none;
}

.store-3d-info {
  position: absolute;
  inset: 14px;
  z-index: 2;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(216, 186, 255, 0.36);
  background:
    linear-gradient(160deg, rgba(18, 10, 42, 0.34), rgba(11, 8, 30, 0.64)),
    radial-gradient(circle at 16% 0%, rgba(232, 201, 255, 0.12), transparent 58%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(8, 6, 24, 0.34);
}

.store-3d-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(210, 176, 255, 0.4);
  background: rgba(26, 14, 58, 0.65);
  color: rgba(241, 223, 255, 0.92);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.store-3d-info h3 {
  margin: 0;
  align-self: end;
  max-width: 88%;
  color: rgba(248, 238, 255, 0.96);
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 8px 22px rgba(6, 4, 18, 0.58);
}

.store-3d-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: rgba(227, 201, 255, 0.84);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-top: 1px solid rgba(198, 156, 255, 0.2);
  padding-top: 7px;
}

.store-3d-row span:last-child {
  color: rgba(244, 228, 255, 0.95);
}

.store-3d-card::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 100%;
  height: 32px;
  bottom: calc(var(--store-box-depth) * -0.22);
  transform: translateX(-50%) translateZ(-30px);
  background: radial-gradient(ellipse at center, rgba(118, 208, 255, 0.84) 0%, rgba(86, 156, 255, 0.52) 46%, rgba(56, 104, 204, 0.28) 70%, transparent 88%);
  filter: blur(11px);
  pointer-events: none;
}

@keyframes storeFeatureShine {
  0%,
  100% {
    transform: translateX(-75%) rotate(14deg);
    opacity: 0;
  }
  12% {
    opacity: 0.6;
  }
  28% {
    opacity: 0.85;
  }
  50% {
    transform: translateX(75%) rotate(14deg);
    opacity: 0.7;
  }
  72% {
    opacity: 0.5;
  }
  88% {
    opacity: 0.15;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .catalog-media-frame {
    background: color-mix(in srgb, var(--surface) 92%, #0a0f1b);
  }
}

@media (min-width: 1180px) {
  .product-shell {
    gap: 28px;
  }

  .catalog-hero {
    padding: 34px;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    gap: 30px;
    align-items: stretch;
  }

  .catalog-hero h1 {
    font-size: clamp(32px, 2.9vw, 44px);
    max-width: 14ch;
  }

  .catalog-hero p {
    max-width: 56ch;
    font-size: 14px;
    line-height: 1.72;
  }

  .catalog-hero-actions {
    width: min(100%, 560px);
    justify-self: end;
  }

  .catalog-search {
    width: 100%;
    flex-wrap: nowrap;
  }

  .catalog-search input {
    flex: 1 1 320px;
    min-width: 320px;
  }

  .catalog-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .catalog-card {
    gap: 18px;
    padding: 20px;
    min-height: 360px;
  }

  .catalog-content h3 {
    font-size: 16px;
  }

  .catalog-content p {
    font-size: 12.5px;
    line-height: 1.65;
  }
}

@media (min-width: 1440px) {
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .store-preview-3d {
    min-height: 420px;
    padding: 38px 18px 24px;
  }

  .store-feature-lineup {
    width: min(100%, 820px);
    min-height: 332px;
  }

  .store-feature-card {
    width: 162px;
  }

  .store-feature-card--left-edge {
    --feature-x: -236px;
    --feature-y: 16px;
  }

  .store-feature-card--left {
    --feature-x: -118px;
  }

  .store-feature-card--center {
    width: 178px;
    --feature-y: 0px;
  }

  .store-feature-card--right {
    --feature-x: 118px;
  }

  .store-feature-card--right-edge {
    --feature-x: 236px;
    --feature-y: 16px;
  }
}

@media (max-width: 720px) {
  .store-preview-3d {
    min-height: auto;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 16px;
  }

  .store-preview-3d::before {
    left: 50%;
    width: 82%;
    height: 54%;
    transform: translate(-50%, 90px) scale(1);
  }

  .store-feature-lineup {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    width: max-content;
    min-height: 0;
    padding: 12px 18px 22px;
    transform: none !important;
  }

  .store-feature-card {
    position: relative;
    left: auto;
    top: auto;
    width: 156px;
    --feature-hover-y: 0px;
    --feature-hover-scale: 0;
    --feature-hover-rotate: 0deg;
    transform: none !important;
    filter: none;
  }

  .store-feature-card--center {
    width: 176px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-feature-lineup {
    transform: none;
    transition: none;
  }

  .catalog-media-image {
    transition: none;
    transform: none;
  }

  .catalog-media-frame::before {
    animation: none;
    opacity: 0.2;
    transform: none;
  }

  .catalog-media-frame {
    transition: none;
    transform: none;
  }

  .store-feature-card,
  .store-feature-card:hover,
  .store-feature-card:focus-visible {
    --feature-hover-y: 0px;
    --feature-hover-scale: 0;
    --feature-hover-rotate: 0deg;
    transition: none;
    transform:
      translate(-50%, -50%)
      translate(var(--feature-x), var(--feature-y))
      rotate(var(--feature-rotate-z))
      scale(var(--feature-scale));
    filter: none;
  }

  .store-feature-card__surface::before {
    animation: none;
    opacity: 0.42;
  }

  .store-3d-card {
    animation: none;
  }

  .catalog-card:hover {
    transform: none;
  }
}

/* Feature Card Product Modifiers */
.store-feature-card--r6s {
  --feature-art: url('../products/r6s/hero.webp');
  --feature-art-position: 52% 26%;
  --feature-art-size: 124%;
  --feature-meta-width: 108px;
  --feature-title-size: 15px;
}
.store-feature-card--r6s .store-feature-card__surface {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01) 22%, rgba(255, 255, 255, 0) 42%), url('../products/r6s/hero.webp'), linear-gradient(160deg, rgba(11, 18, 32, 0.58), rgba(8, 14, 24, 0.68));
}

.store-feature-card--rust {
  --feature-art: url('../products/rust/hero.webp');
  --feature-art-position: 50% 18%;
  --feature-art-size: 122%;
  --feature-meta-width: 116px;
  --feature-title-size: 15px;
}
.store-feature-card--rust .store-feature-card__surface {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01) 22%, rgba(255, 255, 255, 0) 42%), url('../products/rust/hero.webp'), linear-gradient(160deg, rgba(11, 18, 32, 0.58), rgba(8, 14, 24, 0.68));
}

.store-feature-card--cs2 {
  --feature-art: url('../products/cs2/hero.webp');
  --feature-art-position: 54% 12%;
  --feature-art-size: 118%;
  --feature-meta-width: 148px;
  --feature-title-size: 16px;
}
.store-feature-card--cs2 .store-feature-card__surface {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01) 22%, rgba(255, 255, 255, 0) 42%), url('../products/cs2/hero.webp'), linear-gradient(160deg, rgba(11, 18, 32, 0.58), rgba(8, 14, 24, 0.68));
}

.store-feature-card--marvel-rivals {
  --feature-art: url('../products/marvel-rivals/hero.webp');
  --feature-art-position: 50% 14%;
  --feature-art-size: 128%;
  --feature-meta-width: 122px;
  --feature-title-size: 13px;
}
.store-feature-card--marvel-rivals .store-feature-card__surface {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01) 22%, rgba(255, 255, 255, 0) 42%), url('../products/marvel-rivals/hero.webp'), linear-gradient(160deg, rgba(11, 18, 32, 0.58), rgba(8, 14, 24, 0.68));
}

.store-feature-card--apex {
  --feature-art: url('../products/apex-legends/hero.webp');
  --feature-art-position: 58% 20%;
  --feature-art-size: 136%;
  --feature-meta-width: 122px;
  --feature-title-size: 13px;
}
.store-feature-card--apex .store-feature-card__surface {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01) 22%, rgba(255, 255, 255, 0) 42%), url('../products/apex-legends/hero.webp'), linear-gradient(160deg, rgba(11, 18, 32, 0.58), rgba(8, 14, 24, 0.68));
}

/* Blocked / offline product cards — dark, unclickable */
.store-feature-card.is-blocked {
  filter: grayscale(1) brightness(0.25);
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.store-feature-card.is-blocked::after {
  content: "Currently unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: inherit;
  z-index: 10;
  pointer-events: none;
}

.store-feature-card.is-blocked:hover {
  filter: grayscale(1) brightness(0.25);
  opacity: 0.5;
  transform: none;
}

.store-feature-card.is-blocked .store-feature-card__surface::before {
  animation: none;
  opacity: 0;
}

/* ─── Bundle Cards ────────────────────────────────────────────────────────── */

.bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.bundle-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.bundle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.bundle-card.is-featured {
  border-color: rgba(110, 227, 178, 0.3);
  background: linear-gradient(135deg, rgba(110, 227, 178, 0.05), var(--glass-bg));
}

.bundle-card.is-featured::before {
  content: "Featured";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--success);
  border-radius: 999px;
}

.bundle-icon {
  font-size: 36px;
  line-height: 1;
}

.bundle-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.bundle-description {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.bundle-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bundle-product-tag {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(123, 220, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(123, 220, 255, 0.2);
}

.bundle-pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
}

.bundle-original-price {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.bundle-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
}

.bundle-discount {
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg);
  background: var(--success);
  border-radius: 6px;
}

.bundle-actions {
  display: flex;
  gap: 10px;
}

/* ─── Gift CTA Section ────────────────────────────────────────────────────── */

.gift-cta-wrapper {
  display: flex;
  justify-content: center;
}

.gift-cta-content {
  text-align: center;
  max-width: 480px;
}

.gift-cta-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.gift-cta-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.gift-cta-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

/* ─── Gift Form ───────────────────────────────────────────────────────────── */

.gift-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gift-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gift-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.gift-form input,
.gift-form select,
.gift-form textarea {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.gift-form input:focus,
.gift-form select:focus,
.gift-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.gift-form textarea {
  resize: vertical;
  min-height: 80px;
}

.gift-form small.text-muted {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Gift Preview ────────────────────────────────────────────────────────── */

.gift-preview {
  padding: 16px;
  border-radius: 10px;
  background: rgba(123, 220, 255, 0.05);
  border: 1px solid rgba(123, 220, 255, 0.15);
}

.gift-preview-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(123, 220, 255, 0.1);
}

.gift-preview-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.gift-preview-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

.gift-preview-total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(123, 220, 255, 0.1);
  font-size: 15px;
}

.gift-preview-total span:last-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
}

/* ─── Gift Success ────────────────────────────────────────────────────────── */

.gift-success-content {
  text-align: center;
  padding: 20px 0;
}

.gift-success-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.gift-success-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
  margin: 0 0 8px;
}

.gift-success-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.gift-code-display {
  padding: 20px;
  border-radius: var(--radius-xs);
  background: rgba(123, 220, 255, 0.05);
  border: 2px dashed rgba(123, 220, 255, 0.3);
  margin-bottom: 20px;
}

.gift-code-display p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.gift-code-display code {
  display: block;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 3px;
  padding: 12px 0;
}

/* ─── Bundle Detail Modal ─────────────────────────────────────────────────── */

.bundle-detail-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.bundle-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.bundle-detail-icon {
  font-size: 40px;
}

.bundle-detail-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.bundle-detail-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.bundle-detail-products {
  margin: 20px 0;
}

.bundle-detail-products h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}

.bundle-detail-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(123, 220, 255, 0.05);
  margin-bottom: 8px;
}

.bundle-detail-product-item .check {
  color: var(--success);
  font-size: 18px;
}

.bundle-detail-product-item .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.bundle-detail-product-item .price {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-muted);
}

.bundle-detail-pricing {
  padding: 20px;
  border-radius: 10px;
  background: rgba(110, 227, 178, 0.05);
  border: 1px solid rgba(110, 227, 178, 0.2);
  margin: 20px 0;
}

.bundle-detail-pricing .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.bundle-detail-pricing .row .label {
  color: var(--text-muted);
}

.bundle-detail-pricing .row .value {
  font-weight: 600;
  color: var(--text);
}

.bundle-detail-pricing .row.original .value {
  text-decoration: line-through;
  color: var(--text-muted);
}

.bundle-detail-pricing .row.total {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(110, 227, 178, 0.2);
  font-size: 18px;
}

.bundle-detail-pricing .row.total .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--success);
}

.bundle-detail-pricing .savings {
  text-align: center;
  padding: 8px;
  margin-top: 10px;
  border-radius: 6px;
  background: rgba(110, 227, 178, 0.1);
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
}

.bundle-detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.bundle-detail-actions .btn {
  flex: 1;
}

/* ─── Modal Actions ───────────────────────────────────────────────────────── */

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* --- Luxury Store Enhancements --- */

/* Featured product ribbon */
.catalog-card.featured {
  position: relative;
}

.catalog-card.featured::before {
  content: "FEATURED";
  position: absolute;
  top: 12px;
  right: -30px;
  background: linear-gradient(135deg, #d9b77a, #f0e68c);
  color: #0a0f19;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 40px;
  transform: rotate(45deg);
  z-index: 5;
}

/* Price badge styling */
.price-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(217, 183, 122, 0.2), rgba(240, 230, 140, 0.15));
  border: 1px solid rgba(217, 183, 122, 0.3);
  font-weight: 700;
  font-size: 14px;
  color: #d9b77a;
}

/* Category pill hover glow */
.catalog-controls-row .btn-chip:hover {
  box-shadow: 0 0 16px rgba(123, 220, 255, 0.2);
}

/* ============================================================
   Storefront — detail sections (stats, assurance, catalog head, CTA)
   ============================================================ */

/* Trust / live stats bar (inside hero) */
.catalog-stats {
  grid-column: 1 / -1;
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-border) 40%, transparent);
}
.catalog-stat {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--surface, #0c1626) 78%, transparent);
}
.catalog-stat-val {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 22px; font-weight: 700; line-height: 1;
  color: var(--text, #eef3ff);
}
.catalog-stat:first-child .catalog-stat-val,
.catalog-stat:nth-child(3) .catalog-stat-val {
  background: linear-gradient(135deg, var(--accent, #7bdcff), var(--accent-2, #9b8cff));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.catalog-stat-key {
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); opacity: 0.8;
}

/* Assurance trio */
.store-assurance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 4px;
}
.store-assure-card {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background:
    radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface, #0c1626) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.store-assure-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: 0 24px 48px rgba(2,8,18,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
.store-assure-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; margin-bottom: 14px;
  color: var(--accent, #7bdcff);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.store-assure-icon svg { width: 22px; height: 22px; }
.store-assure-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text, #eef3ff); }
.store-assure-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-soft, #c4d2ea); }

/* Catalog section header */
.catalog-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin: 4px 2px -4px;
}
.catalog-section-head h2 { font-size: 22px; }
.catalog-count {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent, #7bdcff);
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  white-space: nowrap;
}

/* Closing CTA band */
.store-cta {
  display: grid;
  grid-template-columns: 1.6fr auto;
  align-items: center;
  gap: 28px;
  padding: 32px;
}
.store-cta-title { margin: 6px 0 10px; font-size: 26px; line-height: 1.15; color: var(--text, #eef3ff); }
.store-cta-text { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--text-soft, #c4d2ea); max-width: 62ch; }
.store-cta-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.store-pay-pill {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 6px 12px; border-radius: 999px;
  color: var(--text-soft, #c4d2ea);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}
.store-cta-actions { display: grid; gap: 10px; min-width: 190px; }
.store-cta-actions .btn { width: 100%; }

@media (max-width: 900px) {
  .catalog-stats { grid-template-columns: repeat(2, 1fr); }
  .store-assurance { grid-template-columns: 1fr; }
  .store-cta { grid-template-columns: 1fr; }
  .store-cta-actions { min-width: 0; }
}
/* ============================================================
   Catalog — luxury poster showcase cards
   Tall hero/box-art poster fills the card; name + price + CTA
   ride a gradient scrim at the bottom. Detailed spec blocks are
   hidden for a clean storefront look (full detail on product page).
   ============================================================ */
.catalog-card.catalog-card--poster {
  position: relative;
  padding: 0 !important;            /* image must reach the card edges */
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  perspective: none;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s ease, border-color 0.45s ease;
}
/* Media + frame + image fill the whole card with matching radius */
.catalog-card--poster .catalog-media,
.catalog-card--poster .catalog-media-frame { width: 100%; border-radius: 18px; }
.catalog-card--poster .catalog-media-image {
  width: 100%; height: 100%; object-fit: cover; border-radius: 18px;
}
.catalog-card--poster:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--product-accent, var(--accent)) 50%, transparent);
  box-shadow:
    0 34px 60px rgba(2,8,18,0.6),
    0 0 50px color-mix(in srgb, var(--product-accent, var(--accent)) 26%, transparent);
}
.catalog-card--poster:active { transform: translateY(-3px) scale(0.992); }

/* The media becomes the whole card */
.catalog-card--poster { display: block; }
.catalog-card--poster .catalog-media { padding: 0; height: 100%; display: block; }
.catalog-card--poster .catalog-media::after { display: none; }
.catalog-card--poster .catalog-media-frame {
  aspect-ratio: 3 / 4;            /* portrait box-art */
  min-height: 300px;             /* never collapse before the image loads */
  border: none;
  border-radius: 18px;
  box-shadow: none;
  background: #0a1018;           /* solid base under the poster image */
}
/* Kill the 16:9-era frame glow/shine artifacts (the blurred pill) on posters */
.catalog-card--poster .catalog-media-frame::before,
.catalog-card--poster .catalog-media-frame::after,
.catalog-card--poster .catalog-shimmer { display: none !important; }
/* The fallback/missing background washes were leaking through — reset them */
.catalog-card--poster .catalog-media-frame.is-fallback,
.catalog-card--poster .catalog-media-frame.is-missing { background: #0a1018; }
.catalog-card--poster .catalog-media-image {
  border-radius: 18px;
  transform: scale(1.03);
  filter: saturate(1.06) contrast(1.05);
}
.catalog-card--poster:hover .catalog-media-image {
  transform: scale(1.09);
  filter: saturate(1.18) contrast(1.08) brightness(1.04);
}

/* Gradient scrim so text stays legible over any poster */
.catalog-poster-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(4,9,18,0.0) 38%, rgba(4,9,18,0.55) 70%, rgba(3,7,14,0.92) 100%),
    linear-gradient(180deg, rgba(4,9,18,0.35) 0%, transparent 26%);
}

/* Overlay content */
.catalog-poster-overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 13px;
  pointer-events: none;
}
.catalog-poster-overlay .catalog-poster-cta,
.catalog-poster-overlay a { pointer-events: auto; }

.catalog-poster-bottom { display: grid; gap: 6px; }
.catalog-poster-eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: color-mix(in srgb, var(--product-accent, var(--accent)) 75%, white 25%);
}
.catalog-poster-name {
  margin: 0; font-family: "Sora","Manrope",sans-serif;
  font-size: 20px; font-weight: 700; line-height: 1.1; color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.catalog-poster-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 6px; flex-wrap: nowrap;
}
.catalog-poster-price {
  display: inline-flex; align-items: baseline; gap: 4px;
  flex: 0 1 auto; white-space: nowrap; min-width: 0;
  font-family: "Sora","Manrope",sans-serif; font-weight: 700; font-size: 16px; color: #fff;
}
.catalog-poster-price > span { white-space: nowrap; }
.catalog-poster-from { font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.catalog-poster-term { font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.55); }
.catalog-poster-cta {
  display: inline-flex; align-items: center; gap: 5px;
  flex: 0 0 auto;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
  padding: 7px 12px; border-radius: 999px;
  color: #04121c;
  text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--product-accent, var(--accent)) 92%, white), color-mix(in srgb, var(--product-accent-2, var(--accent-2)) 80%, white));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--product-accent, var(--accent)) 30%, transparent);
  transform: translateY(2px); opacity: 0.96;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease;
  white-space: nowrap;
}
.catalog-poster-cta svg { width: 14px; height: 14px; }
.catalog-card--poster:hover .catalog-poster-cta {
  transform: translateY(0);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--product-accent, var(--accent)) 42%, transparent);
}

/* Keep status pill + monogram + undetected badge visible, lift above scrim */
.catalog-card--poster .catalog-status { position: absolute; top: 12px; left: 12px; right: auto; bottom: auto; z-index: 5; padding: 0; width: auto; height: auto; }
/* Compact the top chips so the status pill and undetected badge never collide */
.catalog-card--poster .catalog-status .status-pill { font-size: 9px; padding: 4px 8px; }
.catalog-card--poster .catalog-badge--undetected { font-size: 9px; padding: 3px 8px; }
/* Reset the base bottom/left insets so the badge chip sizes to its content
   instead of stretching into a tall frosted pill over the poster. */
.catalog-card--poster .catalog-card-badges {
  position: absolute; top: 12px; right: 12px; left: auto; bottom: auto;
  width: auto; height: auto; max-width: 50%; z-index: 5; display: flex; gap: 6px;
}
/* The big monogram is a no-image fallback. Hide it when the poster image
   loaded (it was bleeding through as faded giant letters), but keep it when
   the frame falls back to no image. */
.catalog-card--poster .catalog-media-frame:not(.is-fallback):not(.is-missing) .catalog-media-mark { display: none; }
.catalog-card--poster .catalog-media-mark { z-index: 1; }

/* Hide the verbose spec blocks in the showcase (full detail lives on the
   product page). They remain in the DOM for any logic that reads them. */
.catalog-card--poster .catalog-content { display: none; }

@media (max-width: 600px) {
  .catalog-poster-name { font-size: 18px; }
  .catalog-poster-cta { padding: 7px 11px; font-size: 11px; }
}
/* Catalog group box wrapping the showcase grid */
.catalog-box {
  padding: 26px 26px 28px;
  display: grid;
  gap: 20px;
}
.catalog-box .catalog-section-head { margin: 0; }
.catalog-box-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-soft, #c4d2ea);
}
.catalog-box .catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
/* Tablets / large phones: two roomy columns. */
@media (max-width: 720px) {
  .catalog-box .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
/* Small phones: a single full-width column so poster cards (title + price +
   buy button) stay legible instead of two cramped 130px columns. */
@media (max-width: 480px) {
  .catalog-box .catalog-grid { grid-template-columns: 1fr; gap: 14px; }
}
/* ── Storefront toggles (Auto rotate / Show availability) ──────── */
/* Auto rotate OFF → freeze the spotlight idle shine/motion */
.store-feature-lineup.is-paused .store-feature-card__surface::before { animation: none !important; }
.store-feature-lineup.is-paused .store-feature-card { transition: none; }

/* Show availability OFF → hide the status chips on catalog cards */
#catalogGrid.hide-availability .catalog-status,
#catalogGrid.hide-availability .catalog-card-badges { display: none !important; }
/* ============================================================
   Featured / Spotlight — luxury two-column hero
   ============================================================ */
.store-featured { overflow: hidden; }
.store-featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 32px;
  align-items: center;
}
.store-featured-detail { display: grid; gap: 14px; align-content: center; }

.store-featured-tag {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 85%, white 15%);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.store-featured-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: storeFeaturedPulse 2s ease-in-out infinite;
}
@keyframes storeFeaturedPulse { 0%,100%{opacity:1;} 50%{opacity:0.45;} }

.store-featured-title {
  margin: 0; font-family: "Sora","Manrope",sans-serif;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; font-weight: 800;
  background: linear-gradient(135deg, var(--text) 25%, var(--accent) 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.store-featured-desc {
  margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-soft, #c4d2ea); max-width: 52ch;
}
.store-featured-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 9px; }
.store-featured-points li {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  font-size: 13.5px; color: var(--text-soft, #c4d2ea);
}
.store-featured-points svg {
  width: 16px; height: 16px; margin-top: 2px; color: var(--status-success, #5fd0a8);
}

.store-featured-meta {
  display: flex; flex-wrap: wrap; gap: 22px;
  margin-top: 6px; padding: 16px 0 4px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
}
.store-featured-stat { display: grid; gap: 3px; }
.store-featured-stat-val {
  font-family: "Sora","Manrope",sans-serif; font-weight: 700; font-size: 18px; color: var(--text, #eef3ff);
}
.store-featured-stat:first-child .store-featured-stat-val { color: color-mix(in srgb, var(--status-success) 85%, #e8f6f1 15%); }
.store-featured-term { font-size: 11px; font-weight: 500; color: var(--text-muted, #a8b9d4); margin-left: 2px; }
.store-featured-stat-key { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted, #a8b9d4); opacity: 0.8; }

.store-featured-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.store-featured-stage { display: grid; gap: 10px; }
.store-featured-stage-head { display: grid; gap: 4px; }
.store-featured-stage-sub {
  margin: 0;
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted, #9fb1cc);
}
.store-featured-stage .store-preview-3d { margin-top: 4px; }

@media (max-width: 900px) {
  .store-featured-grid { grid-template-columns: 1fr; gap: 24px; }
  .store-featured-stage { order: -1; }
}
/* Honor the hidden attribute (a display rule was overriding it). */
.catalog-controls-row[hidden] { display: none !important; }
/* ============================================================
   Catalog poster cards — luxury / advanced upgrade (added)
   ============================================================ */

/* The grid gives depth context so the 3D tilt reads properly. */
.catalog-grid { perspective: 1400px; }

/* Base card: smooth 3D transform driven by initTilt() vars (--tilt-x/-y),
   richer resting shadow, and a will-change for buttery motion. */
.catalog-card--poster {
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    transform 0.5s cubic-bezier(0.16,1,0.3,1),
    box-shadow 0.5s ease,
    border-color 0.5s ease;
  box-shadow:
    0 18px 40px rgba(2,8,18,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}
/* Live 3D tilt while pointer is over the card. */
.catalog-card--poster.is-tilting {
  transform:
    perspective(1400px)
    rotateX(calc(var(--tilt-y, 0) * 1deg))
    rotateY(calc(var(--tilt-x, 0) * 1deg))
    translateY(-8px) scale(1.025);
  box-shadow:
    0 44px 80px rgba(2,8,18,0.66),
    0 0 60px color-mix(in srgb, var(--product-accent, var(--accent)) 30%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--product-accent, var(--accent)) 45%, transparent);
}

/* Pointer-tracked glare sweeping across the poster — the "expensive glass" look. */
.catalog-card--poster .catalog-media-frame::after {
  content: "" !important;
  display: block !important;
  position: absolute; inset: 0; z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background:
    radial-gradient(420px 320px at var(--glare-x, 50%) var(--glare-y, 0%),
      rgba(255,255,255,0.28), rgba(255,255,255,0.06) 32%, transparent 60%);
  mix-blend-mode: screen;
}
.catalog-card--poster:hover .catalog-media-frame::after { opacity: 1; }

/* Animated accent edge — a soft conic glow that breathes in the product color on hover. */
.catalog-card--poster::before {
  content: "";
  position: absolute; inset: -1px; z-index: 6;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--edge-rot, 0deg),
    transparent 0deg,
    color-mix(in srgb, var(--product-accent, var(--accent)) 70%, transparent) 60deg,
    transparent 140deg,
    color-mix(in srgb, #8de6d6 60%, transparent) 220deg,
    transparent 300deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.catalog-card--poster:hover::before { opacity: 1; animation: cardEdgeSpin 5s linear infinite; }
@keyframes cardEdgeSpin { to { --edge-rot: 360deg; } }
@property --edge-rot { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Overlay content lifts slightly on hover for a layered, parallax feel. */
.catalog-card--poster .catalog-poster-bottom {
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.catalog-card--poster:hover .catalog-poster-bottom { transform: translateY(-2px); }

/* The Buy CTA becomes a glowing accent pill on hover. */
.catalog-poster-cta {
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.catalog-card--poster:hover .catalog-poster-cta {
  box-shadow: 0 6px 20px color-mix(in srgb, var(--product-accent, var(--accent)) 40%, transparent);
}

/* Staggered, cinematic entrance as cards mount. */
@keyframes cardRise {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.catalog-card--poster { animation: cardRise 0.6s cubic-bezier(0.16,1,0.3,1) backwards; }
.catalog-grid .catalog-card--poster:nth-child(1) { animation-delay: 0.02s; }
.catalog-grid .catalog-card--poster:nth-child(2) { animation-delay: 0.06s; }
.catalog-grid .catalog-card--poster:nth-child(3) { animation-delay: 0.10s; }
.catalog-grid .catalog-card--poster:nth-child(4) { animation-delay: 0.14s; }
.catalog-grid .catalog-card--poster:nth-child(5) { animation-delay: 0.18s; }
.catalog-grid .catalog-card--poster:nth-child(6) { animation-delay: 0.22s; }
.catalog-grid .catalog-card--poster:nth-child(n+7) { animation-delay: 0.26s; }

@media (prefers-reduced-motion: reduce) {
  .catalog-card--poster,
  .catalog-card--poster:hover::before { animation: none !important; }
  .catalog-card--poster.is-tilting { transform: translateY(-6px); }
}
/* ============================================================
   Split card layout — art on top, frosted info panel below.
   Reuses the existing .catalog-content bindings (name, price,
   stability, status, Buy). Activated by .catalog-card--split.
   ============================================================ */
.catalog-card--split {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(20,30,52,0.55), rgba(10,16,30,0.85));
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  border-radius: 20px;
}

/* ART region: fixed cinematic box at the top, square-ish poster crop. */
.catalog-card--split .catalog-media,
.catalog-card--split .catalog-media-frame {
  aspect-ratio: 16 / 10;
  min-height: 0;
  border-radius: 0 !important;
}
.catalog-card--split .catalog-media-frame { border-bottom: 1px solid rgba(160,190,230,0.14); }
.catalog-card--split .catalog-media-image {
  border-radius: 0 !important;
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), filter 0.4s ease;
}
.catalog-card--split:hover .catalog-media-image { transform: scale(1.08); filter: saturate(1.12) brightness(1.04); }

/* Keep the status chip (top-left) but DROP the text overlay on the art. */
.catalog-card--split .catalog-poster-overlay,
.catalog-card--split .catalog-poster-scrim { display: none !important; }
.catalog-card--split .catalog-status {
  position: absolute; top: 10px; left: 10px; z-index: 5;
}

/* INFO PANEL: show the previously-hidden content as a frosted panel below. */
.catalog-card--split .catalog-content {
  display: grid !important;
  gap: 10px;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}
/* Trim the verbose spec blocks — keep it tight & premium. */
.catalog-card--split .catalog-tags,
.catalog-card--split .catalog-meta,
.catalog-card--split .catalog-content > .catalog-head > p { display: none; }

.catalog-card--split .catalog-head { display: grid; gap: 3px; }
.catalog-card--split .catalog-head .eyebrow {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: color-mix(in srgb, var(--product-accent, var(--accent)) 78%, white 22%);
}
.catalog-card--split .catalog-head h3 {
  margin: 0; font-family: "Sora","Manrope",sans-serif;
  font-size: 17px; font-weight: 700; line-height: 1.15; color: #fff;
}

/* Foot: stability bar + price row + actions. */
.catalog-card--split .catalog-foot { display: grid; gap: 10px; margin: 0; }
.catalog-card--split .stability-item { display: grid; gap: 5px; }
.catalog-card--split .stability-item .metric-label {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted,#9fb1cc);
}
.catalog-card--split .progress {
  height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(160,190,230,0.14);
}
.catalog-card--split .progress span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--product-accent, var(--accent)), color-mix(in srgb,#8de6d6 70%, var(--accent)));
}
.catalog-card--split .catalog-price--prominent {
  display: flex; align-items: baseline; gap: 5px;
}
.catalog-card--split .catalog-price__from { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted,#9fb1cc); }
.catalog-card--split .catalog-price__amount { font-family:"Sora",sans-serif; font-size: 21px; font-weight: 800; color: #fff; }
.catalog-card--split .catalog-price__term { font-size: 11px; color: var(--text-muted,#9fb1cc); }
.catalog-card--split .catalog-price [data-risk] { display: none; }

.catalog-card--split .catalog-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.catalog-card--split .catalog-split-details { padding: 9px 12px; font-size: 12px; }
.catalog-card--split .catalog-split-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px; font-size: 13px; font-weight: 700;
}
.catalog-card--split .catalog-split-buy svg { width: 15px; height: 15px; }

/* Hover lift + accent glow on the whole card. */
.catalog-card--split { transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, border-color 0.4s ease; }
.catalog-card--split:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--product-accent, var(--accent)) 50%, transparent);
  box-shadow:
    0 30px 60px rgba(2,8,18,0.6),
    0 0 46px color-mix(in srgb, var(--product-accent, var(--accent)) 24%, transparent);
}
/* ============================================================
   3D Coverflow showcase — Apple/visionOS-style carousel.
   Activated when #catalogGrid has .is-coverflow.
   ============================================================ */
#catalogGrid.is-coverflow {
  display: block !important;
  position: relative;
  padding: 20px 0 8px;
  outline: none;
}

.coverflow-stage {
  position: relative;
  height: 560px;
  perspective: 1700px;
  perspective-origin: 50% 45%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.coverflow-stage.is-dragging { cursor: grabbing; }

.coverflow-track {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}

/* Each card is centered then offset by the layout() transforms. */
.coverflow-item {
  position: absolute;
  top: 50%; left: 50%;
  width: 340px;
  margin: 0 !important;
  transform-origin: 50% 50%;
  transition:
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease;
  will-change: transform, opacity;
  /* Coverflow owns the entrance — neutralize the grid card entrance anim. */
  animation: none !important;
}

/* Reflection / floor glow under the active card. */
.coverflow-item.is-active::after {
  content: "";
  position: absolute;
  left: 8%; right: 8%; bottom: -34px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--product-accent, var(--accent)) 38%, transparent),
    transparent 70%);
  filter: blur(14px);
  opacity: 0.9;
  z-index: -1;
  animation: cfFloat 4.5s ease-in-out infinite;
}
/* Subtle hover float for the centered product (Apple "hovering" feel). */
.coverflow-item.is-active {
  box-shadow:
    0 50px 90px rgba(2,8,18,0.62),
    0 0 70px color-mix(in srgb, var(--product-accent, var(--accent)) 28%, transparent);
  border-color: color-mix(in srgb, var(--product-accent, var(--accent)) 55%, transparent) !important;
}
@keyframes cfFloat { 0%,100%{ transform: scaleX(1); opacity:0.9; } 50%{ transform: scaleX(0.9); opacity:0.6; } }

/* Side cards dim a touch so the center pops. */
.coverflow-item:not(.is-active) { filter: saturate(0.85) brightness(0.82); }
.coverflow-item:not(.is-active):hover { filter: saturate(1) brightness(0.95); cursor: pointer; }

/* Navigation arrows. */
.coverflow-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 200;
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #eaf2ff;
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.7)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(2,8,18,0.5);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.coverflow-nav:hover {
  transform: translateY(-50%) scale(1.08);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--glass-bg, rgba(20,30,52,0.7)));
}
.coverflow-nav:active { transform: translateY(-50%) scale(0.96); }
.coverflow-nav svg { width: 24px; height: 24px; }
.coverflow-nav--prev { left: 10px; }
.coverflow-nav--next { right: 10px; }

/* Dot indicators. */
.coverflow-dots {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.coverflow-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted, #9fb1cc) 45%, transparent);
  cursor: pointer; transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.coverflow-dot:hover { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.coverflow-dot.is-active {
  width: 24px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb,#8de6d6 70%, var(--accent)));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
}

/* Mobile: tighter stage, smaller cards, arrows lower-profile. */
@media (max-width: 640px) {
  .coverflow-stage { height: 470px; perspective: 1100px; }
  .coverflow-item { width: 270px; }
  .coverflow-nav { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .coverflow-item { transition: opacity 0.3s ease; }
  .coverflow-item.is-active::after { animation: none; }
}
/* ============================================================
   3D FLOATING BOXES — grid of cards that lift off the page and
   tilt toward the cursor with layered parallax depth.
   Activated by .catalog-card--float (set in buildProductCard).
   ============================================================ */

/* Deep perspective on the grid so every box reads as 3D. */
.catalog-box .catalog-grid,
#catalogGrid { perspective: 1100px; }
.catalog-box .catalog-grid { gap: 26px 22px; }

/* Entrance must NOT animate transform (it would override the tilt).
   Override the older cardRise entrance with an opacity-only fade-in. */
@keyframes floatBoxIn { from { opacity: 0; } to { opacity: 1; } }
.catalog-card--float { animation: floatBoxIn 0.5s ease both !important; }

/* The box itself. Rest = flat & settled; hover = lifted, tilted, glowing. */
.catalog-card--float {
  position: relative;
  transform: none;                /* flat at rest — no 3D until lifted */
  transition:
    transform 0.4s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  box-shadow: 0 14px 30px rgba(2,8,18,0.45);
  will-change: transform;
}
.catalog-card--float.is-lifted { transform-style: preserve-3d; }
.catalog-card--float.is-lifted {
  transform:
    perspective(1100px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateZ(26px) scale(1.03);
  border-color: color-mix(in srgb, var(--product-accent, var(--accent)) 60%, transparent) !important;
  box-shadow:
    0 50px 90px rgba(2,8,18,0.62),
    0 0 70px color-mix(in srgb, var(--product-accent, var(--accent)) 30%, transparent);
}

/* Layered depth: the poster art floats FORWARD off the box,
   the info panel stays near the base — parallax separation. */
.catalog-card--float .catalog-media {
  transform: translateZ(0);
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
  transform-style: preserve-3d;
}
.catalog-card--float.is-lifted .catalog-media { transform: translateZ(48px); }

.catalog-card--float .catalog-content {
  transform: translateZ(0);
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.catalog-card--float.is-lifted .catalog-content { transform: translateZ(20px); }

/* The status chip pops the furthest forward — floating tag. */
.catalog-card--float .catalog-status {
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.catalog-card--float.is-lifted .catalog-status { transform: translateZ(70px); }

/* Buy button lifts toward the viewer too. */
.catalog-card--float .catalog-actions { transition: transform 0.4s cubic-bezier(0.22,1,0.36,1); transform-style: preserve-3d; }
.catalog-card--float.is-lifted .catalog-actions { transform: translateZ(34px); }

/* Pointer-tracked glare across the whole box (screen blend = expensive glass). */
/* (Removed the full-card glare ::after — its white screen-blend radial lit up
   the TOP of the card art over the status pill. Completely disabled.) */
.catalog-card--float::after {
  content: none !important;
  display: none !important;
}
.catalog-card--float.is-lifted::after { opacity: 1; }

/* Floating contact shadow on the "floor" beneath a lifted box. */
.catalog-card--float::before {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -22px; height: 40px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--product-accent, var(--accent)) 34%, #000 10%),
    transparent 72%);
  filter: blur(16px);
  opacity: 0;
  transform: translateZ(-40px) scaleX(0.92);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: -1;
}
.catalog-card--float.is-lifted::before { opacity: 0.85; transform: translateZ(-40px) scaleX(1); }

/* Touch / no-hover devices: keep it clean & flat (no broken tilt). */
@media (hover: none) {
  .catalog-card--float.is-lifted { transform: translateY(-4px); }
  .catalog-card--float .catalog-media,
  .catalog-card--float .catalog-content,
  .catalog-card--float .catalog-status,
  .catalog-card--float .catalog-actions { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-card--float, .catalog-card--float * { transition: none !important; }
  .catalog-card--float.is-lifted { transform: translateY(-4px); }
}
/* ============================================================
   LUXURY MATERIAL PASS — make the split/float cards feel like
   premium frosted glass with accent lighting. (added)
   ============================================================ */

/* Richer glass body: layered translucency + real blur + edge light. */
.catalog-card--split.catalog-card--float {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 22%),
    linear-gradient(180deg, rgba(26,38,64,0.62) 0%, rgba(12,18,34,0.9) 55%, rgba(8,12,24,0.96) 100%);
  border: 1px solid rgba(170,195,235,0.16);
  border-radius: 22px;
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.10) inset,   /* top edge highlight */
    0 22px 46px rgba(2,6,16,0.55);
}

/* Accent light bloom rising from behind the info panel, tinted to the game. */
.catalog-card--split.catalog-card--float .catalog-content {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), transparent 60%);
  padding: 16px 18px 18px;
}
.catalog-card--split.catalog-card--float .catalog-content::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -1px; height: 130px;
  pointer-events: none;
  background: radial-gradient(120% 90px at 50% 0%,
    color-mix(in srgb, var(--product-accent, var(--accent)) 26%, transparent),
    transparent 70%);
  opacity: 0.55;
  transition: opacity 0.4s ease;
}
.catalog-card--split.catalog-card--float:hover .catalog-content::before { opacity: 0.9; }

/* Soften the hard line where art meets panel — melt the image into the glass. */
.catalog-card--split.catalog-card--float .catalog-media-frame { border-bottom: none; }
.catalog-card--split.catalog-card--float .catalog-media-frame::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(11,17,33,0.82));
}

/* Eyebrow → refined inline chip, not a wide bar. */
.catalog-card--split.catalog-card--float .catalog-head .eyebrow {
  display: inline-flex; align-items: center; width: fit-content;
  padding: 3px 10px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em;
  color: color-mix(in srgb, var(--product-accent, var(--accent)) 82%, white 18%);
  background: color-mix(in srgb, var(--product-accent, var(--accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--product-accent, var(--accent)) 30%, transparent);
}

/* Product name: larger, tighter, luminous. */
.catalog-card--split.catalog-card--float .catalog-head h3 {
  font-size: 18.5px; font-weight: 800; letter-spacing: -0.01em;
  margin-top: 8px;
  background: linear-gradient(180deg, #ffffff, #cfdcf2);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Stability bar: thinner, glassy track, glowing accent fill. */
.catalog-card--split.catalog-card--float .stability-item .metric-label { opacity: 0.72; }
.catalog-card--split.catalog-card--float .progress {
  height: 4px; background: rgba(150,180,225,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.catalog-card--split.catalog-card--float .progress span {
  background: linear-gradient(90deg, var(--product-accent, var(--accent)), color-mix(in srgb,#a9f0e2 75%, var(--accent)));
  box-shadow: 0 0 10px color-mix(in srgb, var(--product-accent, var(--accent)) 60%, transparent);
}

/* Price: refined hierarchy. */
.catalog-card--split.catalog-card--float .catalog-price__amount {
  font-size: 23px; letter-spacing: -0.02em;
}
.catalog-card--split.catalog-card--float .catalog-price__from,
.catalog-card--split.catalog-card--float .catalog-price__term { opacity: 0.65; }

/* Buy button → premium gradient pill with inner light + accent glow. */
.catalog-card--split.catalog-card--float .catalog-split-buy {
  position: relative; overflow: hidden;
  /* Consistent BRAND action color on every card (not per-game) for a
     confident, luxurious storefront. */
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0) 48%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 94%, #06121a), color-mix(in srgb, var(--accent) 66%, #06121a));
  color: #04141a; font-weight: 800;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.25s ease, box-shadow 0.3s ease, filter 0.25s ease;
}
.catalog-card--split.catalog-card--float .catalog-split-buy:hover {
  filter: brightness(1.08);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 52%, transparent);
}
/* Sheen sweep across Buy on card hover. */
.catalog-card--split.catalog-card--float .catalog-split-buy::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-18deg); opacity: 0;
}
.catalog-card--split.catalog-card--float:hover .catalog-split-buy::after {
  animation: buySheen 0.9s ease forwards;
}
@keyframes buySheen { from { left: -60%; opacity: 0.9; } to { left: 130%; opacity: 0; } }

/* Details button → quiet glass ghost. */
.catalog-card--split.catalog-card--float .catalog-split-details {
  border: 1px solid rgba(170,195,235,0.18);
  background: rgba(255,255,255,0.03);
  color: #c8d6f0; font-weight: 600;
}
.catalog-card--split.catalog-card--float .catalog-split-details:hover {
  background: rgba(255,255,255,0.07); color: #fff;
}

/* Status chip → frosted glass pill that floats. */
.catalog-card--split.catalog-card--float .catalog-status .status-pill {
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(2,6,16,0.5);
}
/* ============================================================
   ADVANCED LUXURY LAYER — ambient grid grade, specular edge,
   and a premium hover-rise for the whole catalog. (added)
   ============================================================ */

/* Ambient depth wash behind the whole grid so cards sit in a "scene". */
.catalog-box {
  position: relative;
}
.catalog-box::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0; border-radius: inherit;
  background:
    radial-gradient(60% 40% at 18% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    radial-gradient(50% 40% at 85% 12%, color-mix(in srgb, var(--accent-3, #8d6bff) 7%, transparent), transparent 72%);
  opacity: 0.8;
}
.catalog-box > * { position: relative; z-index: 1; }

/* (Removed the top-edge specular highlight — it created a bright light streak
   across the top of the card / over the status pill on hover, which read as a
   visual glitch. The glare layer (.catalog-box-glare) already provides the
   glass sheen without overlapping the status chip.) */
.catalog-card--float .catalog-media-frame::after { display: none !important; }

/* Premium settle: cards gently rise + sharpen when the grid is hovered,
   while non-hovered siblings recede slightly (focus the one you're on). */
@media (hover: hover) {
  .catalog-box .catalog-grid:hover .catalog-card--float:not(:hover) {
    filter: saturate(0.92) brightness(0.9);
    transform: scale(0.99);
  }
}

/* Richer, tighter glare highlight that reads as polished glass. */
.catalog-card--float::after {
  background:
    radial-gradient(300px 240px at var(--gx,50%) var(--gy,30%),
      rgba(255,255,255,0.26), rgba(255,255,255,0.06) 38%, transparent 64%);
}

/* A hairline luminous top border that lights up on lift. */
.catalog-card--split.catalog-card--float {
  position: relative;
}
.catalog-card--split.catalog-card--float::marker { content: none; }
/* ============================================================
   PREMIUM GAMING ENERGY — make every card feel ALIVE.
   Animated neon frame, living poster, power-on entrance,
   pulsing status, energy stability bar. (added)
   ============================================================ */

@property --nrot { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ── Flowing neon border that runs around the card frame ─────────── */
.catalog-card--float {
  isolation: isolate;
}
.catalog-card--float .neon-frame,
.catalog-card--float::after { /* keep existing glare ::after; frame added via real element below */ }

/* We draw the neon edge with a pseudo on an inner wrapper instead of an
   extra DOM node: use the card's own ::before is taken (floor shadow),
   so paint the animated edge on the media+content stack via outline glow. */
.catalog-card--float {
  --neon: var(--product-accent, var(--accent));
}

/* Animated conic ring sitting just inside the border. */
.catalog-card--float .catalog-media::before {
  content: "";
  position: absolute; inset: 0; z-index: 7;
  border-radius: 22px 22px 0 0;
  padding: 1.5px;
  background: conic-gradient(from var(--nrot),
    transparent 0deg,
    color-mix(in srgb, var(--neon) 95%, white 5%) 40deg,
    transparent 110deg,
    transparent 250deg,
    color-mix(in srgb, var(--neon) 70%, transparent) 300deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;                 /* hidden at rest — no constant repaint */
  pointer-events: none;
  transition: opacity 0.4s ease;
}
/* Neon ring only spins while THIS card is hovered (1 card at a time, cheap). */
.catalog-card--float:hover .catalog-media::before {
  opacity: 1;
  animation: neonSpin 2.6s linear infinite;
}
@keyframes neonSpin { to { --nrot: 360deg; } }

/* ── Poster Ken-Burns drift — ONLY on hover (not all 15 at once). ── */
.catalog-card--float .catalog-media-image {
  transform: scale(1.04);
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), filter 0.4s ease;
}
.catalog-card--float:hover .catalog-media-image {
  transform: scale(1.12);
  filter: saturate(1.2) brightness(1.08) contrast(1.05);
}

/* (Removed the scanline sweep — it slid a translucent skewed band from
   top-left to top-right across the card on hover, which read as a "pill"
   gliding over the card. The cursor-tracked glare is enough sheen.) */
.catalog-card--float .catalog-media-frame .catalog-shimmer {
  display: none !important;
}

/* ── Status chip: live heartbeat pulse ──────────────────────────── */
.catalog-card--float .catalog-status .status-pill {
  position: relative;
}
.catalog-card--float .catalog-status .status-pill::after {
  content: "";
  position: absolute; left: 8px; top: 50%; width: 6px; height: 6px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;       /* steady glow dot at rest */
}
/* Heartbeat pulse only on hover (avoids 15 continuous pulses). */
.catalog-card--float:hover .catalog-status .status-pill::after {
  animation: chipHeartbeat 2s ease-out infinite;
}
@keyframes chipHeartbeat {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* give the dot room */
.catalog-card--float .catalog-status .status-pill { padding-left: 20px; }

/* ── Energy flowing through the stability bar ───────────────────── */
.catalog-card--float .progress span {
  position: relative; overflow: hidden;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--neon) 85%, transparent),
    color-mix(in srgb, #b6f5ea 80%, var(--neon)));
}
.catalog-card--float .progress span::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  background-size: auto;
  width: 40%;
  transform: translateX(-120%);
  opacity: 0;
  animation: none;            /* kill the global infinite holoShimmer at rest */
}
/* Energy streak runs only while the card is hovered. */
.catalog-card--float:hover .progress span::after {
  opacity: 1;
  animation: energyFlow 2.6s linear infinite;
}
@keyframes energyFlow { from { transform: translateX(-120%); } to { transform: translateX(320%); } }

/* ── POWER-ON entrance: cards ignite in sequence ────────────────── */
@keyframes powerOn {
  0%   { opacity: 0; transform: translateY(20px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* backwards (not both): entrance releases transform when done so the
   cursor tilt (.is-lifted) can take over instead of being frozen. */
.catalog-card--float { animation: powerOn 0.65s cubic-bezier(0.22,1,0.36,1) backwards !important; }
.catalog-grid .catalog-card--float:nth-child(1){animation-delay:.04s}
.catalog-grid .catalog-card--float:nth-child(2){animation-delay:.10s}
.catalog-grid .catalog-card--float:nth-child(3){animation-delay:.16s}
.catalog-grid .catalog-card--float:nth-child(4){animation-delay:.22s}
.catalog-grid .catalog-card--float:nth-child(5){animation-delay:.28s}
.catalog-grid .catalog-card--float:nth-child(6){animation-delay:.34s}
.catalog-grid .catalog-card--float:nth-child(n+7){animation-delay:.40s}

/* Stronger hover power-up glow in the game color. */
.catalog-card--float.is-lifted {
  box-shadow:
    0 50px 90px rgba(2,8,18,0.62),
    0 0 90px color-mix(in srgb, var(--neon) 40%, transparent) !important;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-card--float,
  .catalog-card--float .catalog-media-image,
  .catalog-card--float .catalog-media::before,
  .catalog-card--float .progress span::after,
  .catalog-card--float .catalog-status .status-pill::after { animation: none !important; }
}
/* ============================================================
   3D GAME BOX — catalog cards become physical game cases with the
   hero art as the front cover, a side spine, and a glossy glare
   that tracks the cursor. Driven by initFloatBox vars (--rx/--ry/
   --gx/--gy) + .is-lifted on hover.
   ============================================================ */

/* Deep stage so the box reads as a real 3D object. Perspective only matters
   while a card is being lifted; the resting grid stays a clean flat layout. */
.catalog-box .catalog-grid,
#catalogGrid { perspective: 1500px; perspective-origin: 50% 30%; }

/* preserve-3d ONLY while lifted — at rest the card is a flat 2D tile so the
   grid never distorts and the spine stays flush inside the card. */
.catalog-card--float.is-lifted .catalog-media,
.catalog-card--float.is-lifted .catalog-media-frame {
  transform-style: preserve-3d;
}

/* Stronger, box-like 3D rotation on hover (amplifies the float-box tilt). */
.catalog-card--float.is-lifted {
  transform:
    perspective(1500px)
    rotateX(calc(var(--rx, 0deg) * 1.25))
    rotateY(calc(var(--ry, 0deg) * 1.35))
    translateZ(40px) scale(1.04) !important;
}

/* ── The spine: a thin side face hinged at the LEFT edge of the cover,
   rotated back into 3D space so it shows when the box turns. ── */
.catalog-box-spine {
  position: absolute;
  top: 0; left: 0;
  width: 26px; height: 100%;
  transform-origin: left center;
  transform: rotateY(-90deg) translateZ(0);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(0,0,0,0.35)),
    linear-gradient(180deg,
      color-mix(in srgb, var(--product-accent, var(--accent)) 60%, #0a1020),
      color-mix(in srgb, var(--product-accent, var(--accent)) 30%, #060a14));
  border-radius: 4px 0 0 4px;
  box-shadow: inset -6px 0 14px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 4;
  pointer-events: none;
  /* vertical "game title on the spine" sheen lines */
  background-clip: padding-box;
}
.catalog-card--float.is-lifted .catalog-box-spine { opacity: 1; }

/* (Top-edge box face omitted — the ::before on .catalog-media-frame is already
   used by the art-melt gradient. The spine + glare give the 3D box feel without
   a pseudo-element conflict.) */

/* ── Glossy glare that follows the cursor across the cover. ──
   Anchored below the status-pill zone and masked at the top so it never
   blooms a bright band over the UNDETECTED/status chip. Softened brightness. */
.catalog-box-glare {
  position: absolute; left: 0; right: 0; top: 28%; bottom: 0; z-index: 5; pointer-events: none;
  border-radius: 0 0 inherit inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  background:
    radial-gradient(360px 300px at var(--gx, 50%) var(--gy, 60%),
      rgba(255,255,255,0.18), rgba(255,255,255,0.04) 36%, transparent 64%);
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 18%);
  mask: linear-gradient(180deg, transparent 0%, #000 18%);
  mix-blend-mode: screen;
}
.catalog-card--float.is-lifted .catalog-box-glare { opacity: 1; }

/* Deepen the cover art for a "printed cover" look. */
.catalog-card--float .catalog-media-image { filter: saturate(1.08) contrast(1.05); }
.catalog-card--float.is-lifted .catalog-media-image { filter: saturate(1.18) contrast(1.08) brightness(1.05); }

/* Richer floor shadow so the box reads as floating/standing. */
.catalog-card--float.is-lifted {
  box-shadow:
    0 60px 100px rgba(2,6,16,0.7),
    0 0 80px color-mix(in srgb, var(--product-accent, var(--accent)) 32%, transparent) !important;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-card--float.is-lifted { transform: translateY(-6px) !important; }
  .catalog-box-spine { opacity: 0 !important; }
}
@media (hover: none) {
  .catalog-box-spine, .catalog-box-glare { display: none; }
}
/* ============================================================
   3D box clipping fix — let lifted/rotated game boxes extend
   beyond the catalog panel instead of being cut at its edge.
   The .glass-panel default overflow:hidden was clipping them.
   ============================================================ */
.catalog-box.glass-panel { overflow: visible; }

/* Comfortable row spacing so neighbours don't collide when one box lifts.
   (No negative margins — those pulled the grid past the panel's bottom edge
   and made the last row spill into the next section.) */
.catalog-box .catalog-grid {
  row-gap: 34px;
  column-gap: 24px;
}

/* The card lifts toward the viewer — keep it above neighbours while lifted so
   it overlaps cleanly instead of being clipped/overlapped by the next row. */
.catalog-card--float { position: relative; z-index: 1; }
.catalog-card--float.is-lifted { z-index: 30; }

/* The panel's decorative ::before/::after glow stays clipped to the rounded
   panel via their own inset; visible overflow only affects the cards. */
/* ============================================================
   Buy / Details — smooth hover affordance + easy clicking on the 3D box.
   When the box tilts, the actions row pops forward (translateZ) and the
   buttons get a clear, smooth individual hover so they feel clickable.
   ============================================================ */

/* Actions row already lifts toward the viewer on box-lift; make the buttons
   sit on their own raised plane so the tilt never buries them. */
.catalog-card--float.is-lifted .catalog-actions { transform: translateZ(48px); }
.catalog-card--float .catalog-split-buy,
.catalog-card--float .catalog-split-details {
  transition:
    transform 0.22s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.25s ease,
    background 0.25s ease,
    filter 0.2s ease;
  will-change: transform;
}

/* Individual button hover — smooth lift + accent glow so it's obvious & inviting. */
.catalog-card--float .catalog-split-buy:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
  filter: brightness(1.06);
}
.catalog-card--float .catalog-split-buy:active { transform: translateY(0) scale(0.98); transition-duration: 0.08s; }
.catalog-card--float .catalog-split-buy:hover svg { transform: translateX(3px); }

.catalog-card--float .catalog-split-details:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--accent) 14%, rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: #fff;
}
.catalog-card--float .catalog-split-details:active { transform: translateY(0) scale(0.98); transition-duration: 0.08s; }

/* Make the whole actions row a reliable, generous hit target on the lifted box
   (so a slightly-tilted box never makes the click feel "off"). */
.catalog-card--float .catalog-actions { position: relative; z-index: 9; }

/* Touch: no tilt, so buttons are flat — just keep the press feedback. */
@media (hover: none) {
  .catalog-card--float.is-lifted .catalog-actions { transform: none; }
  .catalog-card--float .catalog-split-buy:active,
  .catalog-card--float .catalog-split-details:active { transform: scale(0.97); }
}
/* ============================================================
   Store catalog — ownership badge.
   Overlaid by app.js decorateOwnershipBadges() on cards whose
   product slug is in the signed-in user's active entitlements.
   ============================================================ */
.catalog-owned-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 4;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--status-success, #6ee3b2) 90%, var(--text));
  background: color-mix(in srgb, var(--status-success, #6ee3b2) 16%, rgba(8,16,28,0.7));
  border: 1px solid color-mix(in srgb, var(--status-success, #6ee3b2) 45%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
}
.catalog-card--owned {
  box-shadow:
    0 16px 48px rgba(3, 8, 18, 0.55),
    0 0 0 1px color-mix(in srgb, var(--status-success, #6ee3b2) 28%, transparent),
    0 0 32px color-mix(in srgb, var(--status-success, #6ee3b2) 12%, transparent);
}


/* === product.css === */
.product-detail {
  display: grid;
  gap: 24px;
}

.product-hero {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.product-hero-main {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.product-headline {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-buy {
  display: grid;
  gap: 10px;
}

.product-buy-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.product-buy-status {
  font-size: 12px;
  color: var(--text-muted);
}

.product-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  gap: 12px;
}

.viewer-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.showcase-character {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 68%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px var(--border-inner),
    0 24px 44px rgba(2, 6, 12, 0.5),
    0 0 40px rgba(123, 220, 255, 0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 900px;
  transform-style: preserve-3d;
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
}

.model-host {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.model-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.model-fallback img,
.model-fallback {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
}

.character-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 80%, rgba(102, 211, 229, 0.25), transparent 55%);
  opacity: 0.5;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-list {
  display: grid;
  gap: 10px;
}

.feature-list li {
  font-size: 12px;
  color: var(--text-soft);
}

.stability-item {
  display: grid;
  gap: 6px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.price-card {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 26px rgba(2, 6, 12, 0.45);
  display: grid;
  gap: 8px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.specs-grid,
.sync-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.showcase-screen-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.showcase-shot {
  position: relative;
  min-height: 180px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 24px 40px rgba(2, 6, 12, 0.45);
  overflow: hidden;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.showcase-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-overlay {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  gap: 4px;
  z-index: 1;
}

.shot-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shot-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.video-frame {
  position: relative;
  height: 240px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 22px 38px rgba(2, 6, 12, 0.48);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px;
  gap: 12px;
}

@media (min-width: 1180px) {
  .product-detail {
    gap: 28px;
  }

  .product-hero {
    padding: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 420px);
    align-items: start;
    gap: 32px;
    flex-wrap: nowrap;
  }

  .product-hero h1 {
    margin: 0;
    font-size: clamp(36px, 3.1vw, 52px);
    line-height: 1.04;
    letter-spacing: -0.03em;
  }

  .product-hero-main {
    max-width: none;
    gap: 14px;
  }

  .product-headline {
    font-size: 15px;
  }

  .product-buy {
    gap: 12px;
    padding-top: 4px;
  }

  .product-buy-options {
    gap: 10px;
  }

  .product-hero-card {
    min-width: 0;
    align-items: stretch;
  }

  .showcase-character {
    min-height: 380px;
  }

  .viewer-controls {
    justify-content: flex-start;
  }

  .product-grid {
    gap: 20px;
  }

  .pricing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .specs-grid,
  .sync-grid,
  .showcase-screen-grid {
    gap: 16px;
  }

  .showcase-shot {
    min-height: 220px;
  }

  .video-frame {
    height: 280px;
  }
}

@media (max-width: 980px) {
  .specs-grid,
  .sync-grid,
  .showcase-screen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .specs-grid,
  .sync-grid,
  .showcase-screen-grid {
    grid-template-columns: 1fr;
  }
}

.config-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.config-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-version-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.config-update-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(123, 220, 255, 0.15);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  animation: pulse-attention 2s ease-in-out infinite;
}

.config-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.config-feature-modules {
  margin-bottom: 16px;
}

.config-feature-modules .feature-list {
  margin-top: 8px;
}

@keyframes pulse-attention {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .pulse-attention {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 980px) {
  .config-details-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* === pricing.css === */
.pricing-shell {
  display: grid;
  gap: 24px;
}

.pricing-hero {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.selected-product {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.plan-card {
  padding: 24px;
  display: grid;
  gap: 14px;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-highlight);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.plan-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(123, 220, 255, 0.06) 50%,
    transparent 70%
  );
  animation: holoShimmer 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.plan-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 40px rgba(123, 220, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-card h2 {
  position: relative;
  z-index: 2;
}

.plan-features {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  position: relative;
  z-index: 2;
}

.plan-features li,
.plan-features div {
  transition: color 0.3s ease, transform 0.3s ease;
}

.plan-card:hover .plan-features li,
.plan-card:hover .plan-features div {
  color: var(--text-soft);
}

.pricing-compare .panel-body {
  padding: 20px 24px 26px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-grid {
  display: grid;
  gap: 10px;
  min-width: 640px;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.3s ease;
}

.compare-row:hover {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.compare-row--head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.compare-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  font-size: 11px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 18px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.compare-pill:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 12px 24px rgba(2, 6, 12, 0.4),
    0 0 16px rgba(123, 220, 255, 0.08);
}


/* === status.css === */
.status-shell {
  display: grid;
  gap: 24px;
  max-width: 1520px;
  margin: 0 auto;
}

.status-hero {
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
  align-items: center;
}

.status-summary {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-item {
  display: grid;
  gap: 4px;
  min-width: 120px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.summary-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(2, 6, 12, 0.4), 0 0 20px rgba(123, 220, 255, 0.05);
}

.status-grid {
  display: grid;
  gap: 16px;
}

.status-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.status-list {
  display: grid;
  gap: 12px;
  position: relative;
  /* Flow on the page instead of an inner 720px scrollbox — removes the
     custom-scrollbar JS (forced reflows on scroll) and lets content-visibility
     cull off-screen cards during normal page scroll. Big perf win. */
}

.status-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.cyno-scrollbar {
  position: absolute;
  top: 10px;
  right: 8px;
  bottom: 10px;
  width: 8px;
  pointer-events: auto;
  z-index: 5;
}

.cyno-scrollbar.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.cyno-scrollbar__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cyno-scrollbar__thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(123, 220, 255, 0.38), rgba(255, 255, 255, 0.16));
  box-shadow: 0 8px 20px rgba(2, 6, 12, 0.22),
              inset 0 0 0 1px rgba(255, 255, 255, 0.16),
              0 0 12px rgba(123, 220, 255, 0.12);
  touch-action: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.cyno-scrollbar__thumb:hover {
  background: linear-gradient(180deg, rgba(123, 220, 255, 0.5), rgba(255, 255, 255, 0.2));
  box-shadow: 0 8px 20px rgba(2, 6, 12, 0.22),
              inset 0 0 0 1px rgba(255, 255, 255, 0.2),
              0 0 18px rgba(123, 220, 255, 0.2);
}

.status-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status row: header + expandable details */
.status-row {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  min-height: 64px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: border-color 0.35s ease,
              box-shadow 0.4s ease,
              background 0.35s ease;
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
}

/* Header: product info on left, tags on right */
.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.status-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.status-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
}

.status-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.status-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
  opacity: 0.6;
}

.status-chevron::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-top: -3px;
}

.status-row.is-expanded .status-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--accent);
}

.status-row:hover .status-chevron {
  opacity: 0.9;
}

.status-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Expand section: hidden by default, revealed with max-height + opacity */
.status-expand {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              margin 0.35s ease,
              padding 0.35s ease;
  margin-top: 0;
  padding-top: 0;
  position: relative;
  z-index: 1;
}

.status-row.is-expanded .status-expand {
  max-height: 1200px;
  opacity: 1;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

/* Divider line between collapsed and expanded content */
.status-expand-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--glass-border) 50%, transparent), transparent);
  margin: 4px 0 0;
}

/* Expanded detail grid */
.expand-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.expand-detail-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  display: grid;
  gap: 8px;
}

.expand-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.expand-detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.expand-detail-sub {
  font-size: 12px;
  color: var(--text-soft);
}

/* Uptime bars */
.uptime-bars {
  display: grid;
  gap: 10px;
}

.uptime-row {
  display: grid;
  grid-template-columns: 50px 1fr 52px;
  align-items: center;
  gap: 10px;
}

.uptime-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.uptime-track {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--glass-bg-strong) 60%, transparent);
  overflow: hidden;
  position: relative;
}

.uptime-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--status-success), color-mix(in srgb, var(--status-success) 80%, white));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.uptime-fill.warn {
  background: linear-gradient(90deg, var(--status-warning), color-mix(in srgb, var(--status-warning) 80%, white));
}

.uptime-fill.bad {
  background: linear-gradient(90deg, var(--status-danger), color-mix(in srgb, var(--status-danger) 80%, white));
}

.uptime-pct {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Mini incidents list */
.expand-incidents {
  display: grid;
  gap: 8px;
}

.expand-incident-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 30%, transparent);
}

.expand-incident-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.expand-incident-dot.critical { background: var(--status-danger); box-shadow: 0 0 6px color-mix(in srgb, var(--status-danger) 40%, transparent); }
.expand-incident-dot.high { background: #f97316; box-shadow: 0 0 6px color-mix(in srgb, #f97316 40%, transparent); }
.expand-incident-dot.medium { background: var(--status-warning); box-shadow: 0 0 6px color-mix(in srgb, var(--status-warning) 40%, transparent); }
.expand-incident-dot.low { background: var(--status-success); box-shadow: 0 0 6px color-mix(in srgb, var(--status-success) 40%, transparent); }

.expand-incident-text {
  flex: 1;
  min-width: 0;
}

.expand-incident-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expand-incident-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Region grid */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.region-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

.region-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.region-dot.online { background: var(--status-success); }
.region-dot.degraded { background: var(--status-warning); }
.region-dot.offline { background: var(--status-danger); }

/* Response time display */
.response-time-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.response-time-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.response-time-unit {
  font-size: 12px;
  color: var(--text-muted);
}

/* Section headers within expanded content */
.expand-section-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 30%, transparent);
  margin-bottom: 4px;
}

/* Liquid highlight overlay */
.status-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-highlight);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  clip-path: inset(0 round var(--radius-md));
  z-index: 0;
}

.status-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-bg) 88%);
}

.status-row.is-active::before {
  opacity: 0.6;
}

.status-row:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 18px 36px rgba(2, 6, 12, 0.45),
    0 0 24px rgba(123, 220, 255, 0.05);
}

.status-row:hover::before {
  opacity: 0.7;
}

.status-controls {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

@media (max-width: 720px) {
  .status-controls {
    grid-template-columns: 1fr;
  }
}

/* Enhanced LED status dots with glow */
.status-dot--live {
  box-shadow: 0 0 6px 2px rgba(74, 222, 128, 0.4),
              0 0 16px 4px rgba(74, 222, 128, 0.15);
}

.status-dot--warning {
  box-shadow: 0 0 6px 2px rgba(250, 204, 21, 0.4),
              0 0 16px 4px rgba(250, 204, 21, 0.15);
}

.status-dot--danger {
  box-shadow: 0 0 6px 2px rgba(248, 113, 113, 0.4),
              0 0 16px 4px rgba(248, 113, 113, 0.15);
}

.no-led-pulse .status-dot--live,
.no-led-pulse .status-dot--warning,
.no-led-pulse .status-dot--danger {
  animation: none;
  box-shadow: none;
}

.expand-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.status-editor-form {
  display: grid;
  gap: 12px;
}

.status-service-panel .panel-body {
  display: grid;
  gap: 12px;
}

.status-service-panel #serviceStatusList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.service-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.35s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-highlight);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 18px 36px rgba(2, 6, 12, 0.45),
    0 0 24px rgba(123, 220, 255, 0.06);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
}

.service-card:hover::before {
  opacity: 0.7;
}

/* Incident History */
.status-incidents-panel {
  padding: 0;
}

.status-incidents {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.incident-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 80%, transparent), color-mix(in srgb, var(--glass-bg) 65%, transparent));
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incident-card:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 20px 50px rgba(3, 8, 18, 0.45), 0 0 35px rgba(118, 224, 255, 0.15), inset 0 0 0 1px var(--border-inner);
}

.incident-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.incident-card-info {
  display: grid;
  gap: 4px;
}

.incident-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.incident-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.severity-critical {
  color: var(--status-danger);
  font-weight: 700;
}

.severity-high {
  color: #f97316;
  font-weight: 600;
}

.severity-medium {
  color: var(--status-warning);
  font-weight: 600;
}

.severity-low {
  color: var(--status-success);
}

.incident-card-body {
  display: grid;
  gap: 8px;
}

.incident-card-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}

.incident-card-detail {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.resolution-note {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.status-pill--resolved {
  background: color-mix(in srgb, var(--status-success) 20%, transparent);
  color: var(--status-success);
  border: 1px solid color-mix(in srgb, var(--status-success) 30%, transparent);
}

@media (max-width: 768px) {
  .status-incidents {
    grid-template-columns: 1fr;
  }
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .expand-incident-item,
  .uptime-fill,
  .region-dot {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   Product status board (status-products.js)
   ============================================================================ */
.status-prod-section-title {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4);
  margin: 6px 2px 12px;
}
.status-prod-section-title + .status-prod-grid { margin-bottom: 26px; }

.status-prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.status-prod {
  display: block;
  text-decoration: none; color: inherit;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), border-color 0.25s ease, box-shadow 0.3s ease, background 0.25s ease;
}
.status-prod:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 30%, transparent);
  box-shadow: 0 14px 32px rgba(2,6,14,0.4), 0 0 28px color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent);
}

.status-prod-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.status-prod-mark {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 11px;
  font-family: "Sora", sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--accent, #7bdcff);
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent, #7bdcff) 20%, #0c1626), color-mix(in srgb, var(--accent-2, #8de6d6) 12%, #0c1626));
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 30%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.status-prod-id { min-width: 0; flex: 1; }
.status-prod-name {
  display: block; font-size: 14px; font-weight: 600; color: var(--text, #eef3ff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-prod-meta {
  display: block; font-size: 11px; color: var(--text-muted, #a8b9d4); opacity: 0.8; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* Status pill + LED, colored per state */
.status-prod .status-pill {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px;
  border: 1px solid transparent;
}
.status-led { width: 6px; height: 6px; border-radius: 50%; }
.status-pill--operational { color: #6ee7b7; background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.3); }
.status-pill--operational .status-led { background: #34d399; box-shadow: 0 0 6px #34d399; animation: statusLed 1.6s ease-in-out infinite; }
.status-pill--monitoring { color: #fcd34d; background: rgba(234,179,8,0.12); border-color: rgba(234,179,8,0.3); }
.status-pill--monitoring .status-led { background: #eab308; box-shadow: 0 0 6px #eab308; }
.status-pill--updating { color: #93c5fd; background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.32); }
.status-pill--updating .status-led { background: #60a5fa; box-shadow: 0 0 6px #60a5fa; animation: statusLed 1s ease-in-out infinite; }
.status-pill--offline { color: #fca5a5; background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); }
.status-pill--offline .status-led { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
@keyframes statusLed { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Uptime spark bars */
.status-spark {
  display: flex; align-items: flex-end; gap: 2px;
  height: 28px; margin-bottom: 12px;
}
.status-spark-bar {
  flex: 1; border-radius: 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent, #7bdcff) 70%, transparent), color-mix(in srgb, var(--accent, #7bdcff) 25%, transparent));
  min-height: 3px;
}
.status-spark-bar.is-low {
  background: linear-gradient(180deg, #fcd34d, color-mix(in srgb, #eab308 30%, transparent));
}

.status-prod-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px;
}
.status-prod-uptime { color: var(--text, #eef3ff); font-weight: 600; font-family: "JetBrains Mono", ui-monospace, monospace; }
.status-prod-updated { color: var(--text-muted, #a8b9d4); opacity: 0.75; }

@media (prefers-reduced-motion: reduce) {
  .status-pill .status-led { animation: none !important; }
  .status-tl-marker { animation: none !important; }
}
@media (max-width: 520px) {
  .status-prod-grid { grid-template-columns: 1fr; }
}
/* ── Banner mark (image with letter fallback) ── */
.status-prod { /* card is now a <button> */
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
  -webkit-appearance: none; appearance: none;
}
.status-prod:focus-visible {
  outline: 2px solid var(--accent, #7bdcff); outline-offset: 2px;
}
.status-prod-mark {
  position: relative;
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 11px; overflow: hidden;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 28%, transparent);
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent, #7bdcff) 20%, #0c1626), color-mix(in srgb, var(--accent-2, #8de6d6) 12%, #0c1626));
}
.status-prod-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.status-prod-mono {
  display: none;
  font-family: "Sora", sans-serif; font-size: 14px; font-weight: 700;
  color: var(--accent, #7bdcff);
}
.status-prod-mark.is-fallback .status-prod-mono { display: block; }

/* ============================================================================
   Product detail modal
   ============================================================================ */
.status-modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(3, 7, 14, 0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.22s ease;
}
/* Honor the hidden attribute — the display:grid above was overriding it, so
   after closing, the overlay stayed as an invisible full-screen click-blocker
   (you couldn't open any other card). */
.status-modal-overlay[hidden] { display: none !important; }
.status-modal-overlay.is-open { opacity: 1; }
.status-modal {
  width: min(520px, 100%);
  max-height: 88vh; overflow-y: auto;
  border-radius: 22px;
  position: relative;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34,1.4,0.5,1);
}
.status-modal-overlay.is-open .status-modal { transform: none; }
.status-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  color: var(--text, #eef3ff);
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}
.status-modal-close:hover { background: rgba(0,0,0,0.55); transform: scale(1.06); }
.status-modal-close svg { width: 16px; height: 16px; }

.status-modal-banner {
  position: relative;
  /* Match the wide aspect of the source banner art instead of a fixed crop
     height, so the whole image shows without harsh zoom/cut. */
  aspect-ratio: 16 / 7;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent, #7bdcff) 26%, #0c1626), color-mix(in srgb, var(--accent-2, #8de6d6) 16%, #0c1626));
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
/* Blurred, cover-scaled copy of the same art fills any letterbox gap behind the
   crisp contained image — so banners of any aspect read full and intentional. */
.status-modal-banner .status-modal-img--blur {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(26px) saturate(1.3) brightness(0.7);
  transform: scale(1.15);
  z-index: 0;
}
/* The real banner: shown in full, fit to the widget, never cropped. */
.status-modal-img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.status-modal-banner::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(8,13,24,0.7));
  pointer-events: none;
}
.status-modal-mono {
  display: none;
  font-family: "Sora", sans-serif; font-size: 44px; font-weight: 800;
  color: color-mix(in srgb, var(--accent, #7bdcff) 85%, #fff);
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.status-modal-banner.is-fallback .status-modal-mono { display: block; }
.status-modal-pill { position: absolute; bottom: 12px; left: 16px; z-index: 2; }

.status-modal-body { padding: 18px 22px 22px; }
.status-modal-title {
  font-family: "Sora","Manrope",sans-serif; font-size: 22px; font-weight: 700;
  margin: 0 0 16px; color: var(--text, #eef3ff);
}
.status-modal-note {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft, #c4d2ea);
}

/* Per-loadout builds (Internal / External) */
.sm-builds { display: grid; gap: 8px; }
.sm-build {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border, rgba(255,255,255,0.1)) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg, rgba(255,255,255,0.04)) 45%, transparent);
}
.sm-build-type {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text, #eef3ff);
}
.sm-build-type::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent, #7bdcff);
}
.sm-build--external .sm-build-type::before {
  background: color-mix(in srgb, var(--accent-2, #9b8cff) 90%, transparent);
  border-radius: 50%;
}
.sm-build-ver {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px; color: var(--text-soft, #c4d2ea);
}
.sm-build-pill { justify-self: end; }
@media (max-width: 480px) {
  .sm-build { grid-template-columns: 1fr auto; }
  .sm-build-ver { grid-column: 1 / -1; }
}
.status-modal-grid {
  display: grid; gap: 1px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08); margin-bottom: 18px;
}
.status-modal-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 14px; background: rgba(255,255,255,0.02);
}
.status-modal-key { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted, #a8b9d4); }
.status-modal-val { font-size: 13px; font-weight: 600; color: var(--text, #eef3ff); font-family: "JetBrains Mono", ui-monospace, monospace; }
.status-modal-section { margin-bottom: 16px; }
.status-modal-section .eyebrow { margin-bottom: 8px; }
.status-spark--lg { height: 44px; }
.status-modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.status-modal-tag {
  font-size: 11px; padding: 5px 10px; border-radius: 999px;
  color: var(--accent, #7bdcff);
  background: color-mix(in srgb, var(--accent, #7bdcff) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 25%, transparent);
}
.status-modal-log {
  margin: 0; padding-left: 18px;
  font-size: 13px; line-height: 1.7; color: var(--text-soft, #a8b9d4);
}
.status-modal-cta { width: 100%; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .status-modal-overlay, .status-modal { transition: none; }
}
/* ── Modal: premium stat tiles + graph (features/log removed) ── */
.status-modal-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.sm-stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.sm-stat-val {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 18px; font-weight: 700; color: var(--text, #eef3ff);
  line-height: 1.1;
}
.sm-stat-accent {
  background: linear-gradient(135deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sm-stat-key {
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); opacity: 0.75;
}

.sm-graph-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sm-graph-head .eyebrow { margin: 0; }
.sm-graph-avg {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px;
  color: var(--accent, #7bdcff);
}
.sm-graph {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  position: relative;
}
/* baseline reference line */
.sm-graph::before {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 26%;
  height: 1px; background: rgba(255,255,255,0.10);
}
.status-spark--lg { height: 56px; position: relative; z-index: 1; }
.sm-graph-axis {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 10px; letter-spacing: 0.08em;
  color: var(--text-muted, #a8b9d4); opacity: 0.6;
}
/* ============================================================================
   Premium status hero + summary (status.html redesign)
   ============================================================================ */
.status-hero2 {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 36px;
  padding: 34px 44px 34px 36px;
}
.status-hero2-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent, #7bdcff) 14%, transparent), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--accent-2, #8de6d6) 9%, transparent), transparent 55%);
}
.status-hero2-left { position: relative; z-index: 1; min-width: 0; }
.status-hero2-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.28);
  margin-bottom: 14px;
}
.status-hero2-led { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: statusLed 1.6s ease-in-out infinite; }
.status-hero2 h1 { margin: 0 0 8px; }
.status-hero2 .metric-label { max-width: 52ch; }

/* Heartbeat EKG line */
.status-heartbeat { width: 100%; height: 48px; margin-top: 16px; overflow: visible; }
.status-heartbeat-track { stroke: rgba(255,255,255,0.07); stroke-width: 1.5; fill: none; }
.status-heartbeat-line {
  stroke: url(#hbGrad); stroke-width: 2.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent, #7bdcff) 55%, transparent));
  stroke-dasharray: 760; stroke-dashoffset: 760;
  animation: hbSweep 3.4s cubic-bezier(0.6,0,0.2,1) infinite;
}
@keyframes hbSweep { 0% { stroke-dashoffset: 760; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -760; } }

/* Uptime ring */
.status-hero2-right { position: relative; z-index: 1; padding: 6px; }
.status-uptime-ring { position: relative; width: 150px; height: 150px; }
.status-uptime-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.status-uptime-ring .ring-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 7; }
.status-uptime-ring .ring-fill {
  fill: none; stroke: url(#ringGrad); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 339; stroke-dashoffset: 12;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent, #7bdcff) 45%, transparent));
  transition: stroke-dashoffset 1.1s cubic-bezier(0.16,1,0.3,1);
}
.status-uptime-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; text-align: center;
}
.status-uptime-val {
  font-family: "Sora","Manrope",sans-serif; font-size: 26px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--text, #eef3ff), var(--accent, #7bdcff));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.status-uptime-cap {
  font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); white-space: nowrap;
}

/* Summary stat strip */
.status-summary2 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.status-stat {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), border-color 0.3s ease;
}
.status-stat:hover { transform: translateY(-3px); }
.status-stat-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-stat-num { font-family: "Sora","Manrope",sans-serif; font-size: 30px; font-weight: 700; line-height: 1; color: var(--text, #eef3ff); }
.status-stat-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted, #a8b9d4); }
.status-stat[data-stat="operational"] { border-color: rgba(52,211,153,0.22); }
.status-stat[data-stat="operational"] .status-stat-dot { background: #34d399; box-shadow: 0 0 8px #34d399; }
.status-stat[data-stat="monitoring"] .status-stat-dot { background: #eab308; box-shadow: 0 0 8px #eab308; }
.status-stat[data-stat="updating"] .status-stat-dot { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.status-stat[data-stat="offline"] .status-stat-dot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

/* Board control bar */
.status-board-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.status-board-bar-id h2 { margin: 2px 0 0; }
.status-live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent, #7bdcff);
  background: color-mix(in srgb, var(--accent, #7bdcff) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 26%, transparent);
}
.status-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent, #7bdcff); box-shadow: 0 0 8px var(--accent, #7bdcff); animation: statusLed 1.4s ease-in-out infinite; }
.status-board-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.status-led-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .status-heartbeat-line, .status-hero2-led, .status-live-dot { animation: none; }
  .status-heartbeat-line { stroke-dashoffset: 0; }
}
@media (max-width: 760px) {
  .status-hero2 { grid-template-columns: 1fr; }
  .status-hero2-right { justify-self: center; }
  .status-summary2 { grid-template-columns: repeat(2, 1fr); }
  .status-board-bar, .status-board-controls { flex-direction: column; align-items: flex-start; }
}
/* ============================================================================
   Performance: keep paint isolated per card. (content-visibility was removed —
   with a multi-column grid + wrong intrinsic size it caused scroll-time
   re-layout jank, which was the real lag source.)
   ============================================================================ */
.status-prod { contain: paint; }

/* The pulsing LED on every pill is cheap individually but ~25 at once adds up.
   Keep it only on the hero/live indicators; product-card LEDs stay static. */
.status-prod .status-pill .status-led { animation: none !important; }
.status-prod .status-spark-bar { will-change: auto; }
/* ── Recent incidents timeline ── */
.status-timeline { list-style: none; margin: 6px 0 0; padding: 0; position: relative; }
.status-timeline::before {
  content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent, #7bdcff) 38%, transparent),
    color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent) 60%,
    transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #7bdcff) 20%, transparent);
}
.status-tl-item { position: relative; padding: 0 0 22px 34px; }
.status-tl-item:last-child { padding-bottom: 4px; }

/* Marker orb — glowing, with a ring; resolved shows a check, live ones pulse. */
.status-tl-marker {
  position: absolute; left: -1px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255,255,255,0.16);
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.08), rgba(8,14,24,0.9));
  z-index: 1;
}
.status-tl-marker svg { width: 11px; height: 11px; }
.status-tl-pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Resolved — filled green orb + check */
.status-tl-resolved .status-tl-marker {
  color: #04130d; border-color: transparent;
  background: linear-gradient(140deg, #34d399, #2dd4bf);
  box-shadow: 0 0 14px rgba(52,211,153,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
/* Monitoring — amber glow, pulsing */
.status-tl-monitoring .status-tl-marker {
  color: #eab308; border-color: color-mix(in srgb, #eab308 55%, transparent);
  box-shadow: 0 0 0 4px rgba(234,179,8,0.10), 0 0 16px rgba(234,179,8,0.5);
  animation: statusTlPulse 2s ease-in-out infinite;
}
/* Investigating — red glow, pulsing */
.status-tl-investigating .status-tl-marker {
  color: #ef4444; border-color: color-mix(in srgb, #ef4444 55%, transparent);
  box-shadow: 0 0 0 4px rgba(239,68,68,0.10), 0 0 16px rgba(239,68,68,0.5);
  animation: statusTlPulse 1.6s ease-in-out infinite;
}
.status-tl-monitoring .status-tl-pulse { box-shadow: 0 0 8px #eab308; }
.status-tl-investigating .status-tl-pulse { box-shadow: 0 0 8px #ef4444; }

@keyframes statusTlPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,255,255,0.0), 0 0 16px currentColor; }
  50% { box-shadow: 0 0 0 7px rgba(255,255,255,0.0), 0 0 24px currentColor; }
}

.status-tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.status-tl-title { font-size: 14px; font-weight: 600; color: var(--text, #eef3ff); }
.status-tl-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.status-tl-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.status-tl-badge-resolved { color: #6ee7b7; background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3); }
.status-tl-badge-monitoring { color: #fcd34d; background: rgba(234,179,8,0.12); border: 1px solid rgba(234,179,8,0.3); }
.status-tl-badge-investigating { color: #fca5a5; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); }
.status-tl-text { margin: 0 0 6px; font-size: 13px; line-height: 1.55; color: var(--text-soft, #a8b9d4); max-width: 70ch; }
.status-tl-meta {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--text-muted, #a8b9d4); opacity: 0.75;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.status-tl-dot { opacity: 0.5; }
.status-tl-auto {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  vertical-align: middle;
}
/* ============================================================================
   PERFORMANCE (status page): an animated full-screen background behind many
   backdrop-filter glass panels forces the browser to re-blur every frame.
   Freeze the ambient background here and lighten glass so the page is smooth.
   Visuals look the same (static blurred gradient) — only the constant re-
   compositing is removed.
   ============================================================================ */
body[data-page="status"] .body-bg::before,
body[data-page="status"] .body-bg::after {
  animation: none !important;
}
/* Product cards never sat over moving content anyway — make sure they don't
   use backdrop-filter (they use a solid-ish fill), and isolate them. */
.status-prod { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* The big section panels: drop the heavy blur to a cheap one. The dark fill
   already reads as glass; the expensive part is the live blur. */
body[data-page="status"] .glass-panel {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: linear-gradient(160deg, rgba(20,30,52,0.82), rgba(10,16,30,0.86)) !important;
}
/* Lite card (no inline spark graph) — tighten spacing so it doesn't look empty */
.status-prod--lite .status-prod-head { margin-bottom: 12px; }
.status-prod--lite .status-prod-foot { padding-top: 2px; }

/* Show-all button */
.status-showall {
  margin-top: 14px;
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text, #eef3ff);
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.1);
  -webkit-appearance: none; appearance: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.status-showall:hover {
  background: color-mix(in srgb, var(--accent, #7bdcff) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 32%, transparent);
}
.status-showall span {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px;
  color: var(--accent, #7bdcff);
  padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent);
}

/* Guest hint — some titles hidden until sign-in */
.status-guest-note {
  margin: 14px 0 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 12.5px; letter-spacing: 0.01em;
  color: var(--text-dim, #9fb1cc);
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  text-align: center;
}
.status-guest-note a {
  color: var(--accent, #7bdcff);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 35%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.status-guest-note a:hover {
  color: color-mix(in srgb, var(--accent, #7bdcff) 80%, white 20%);
  border-bottom-color: var(--accent, #7bdcff);
}

/* === maintenance.css === */
.maintenance-shell {
  display: grid;
  gap: 24px;
  max-width: 1260px;
  margin: 0 auto;
}

.maintenance-hero {
  padding: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.maintenance-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.maintenance-copy h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.maintenance-copy p {
  margin: 0;
}

.maintenance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maintenance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.maintenance-eta {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 72%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 16px 32px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  display: grid;
  gap: 10px;
  align-content: start;
}

.maintenance-eta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.maintenance-eta-time {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.maintenance-eta p {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.maintenance-card {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.maintenance-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.maintenance-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.maintenance-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 62%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  padding: 10px 12px;
  font-size: 13px;
}

.maintenance-list li span:first-child {
  color: var(--text-soft);
}

.maintenance-note .panel-body {
  text-align: center;
  gap: 6px;
}

@media (max-width: 1100px) {
  .maintenance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .maintenance-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .maintenance-hero {
    padding: 22px;
    gap: 14px;
  }

  .maintenance-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-card {
    padding: 16px;
  }
}

/* ============================================================================
   Maintenance v2 — premium hero, countdown ring, live deployment progress
   ============================================================================ */
.mnt-fx { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.mnt-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(123,220,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,220,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
}
.mnt-orb { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.45; animation: mntFloat 18s ease-in-out infinite; }
.mnt-orb.a { width: 360px; height: 360px; top: -90px; left: -70px; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%); }
.mnt-orb.b { width: 300px; height: 300px; bottom: -90px; right: -70px; animation-delay: -9s; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 70%); }
@keyframes mntFloat { 0%,100% { transform: translate(0,0); } 50% { transform: translate(34px,-28px); } }

.maintenance-shell { position: relative; z-index: 1; }

/* Hero */
.maintenance-hero2 {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 36px;
  padding: 34px 40px;
}
.mnt-hero-left { display: flex; align-items: flex-start; gap: 22px; min-width: 0; }
.mnt-hero-copy { min-width: 0; }
.mnt-hero-copy h1 { margin: 8px 0; }

/* Animated gear emblem */
.mnt-emblem { position: relative; width: 76px; height: 76px; flex-shrink: 0; display: grid; place-items: center; }
.mnt-emblem-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid transparent; border-top-color: var(--accent);
  border-right-color: color-mix(in srgb, var(--accent) 40%, transparent);
  animation: mntSpin 2.4s linear infinite;
}
.mnt-emblem-core {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 22%, #0c1626), color-mix(in srgb, var(--accent-2) 14%, #0c1626));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 26px color-mix(in srgb, var(--accent) 24%, transparent);
}
.mnt-gear { width: 30px; height: 30px; color: var(--accent); animation: mntSpin 6s linear infinite; }
@keyframes mntSpin { to { transform: rotate(360deg); } }
.mnt-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 7px #34d399; margin-right: 5px; vertical-align: middle; animation: mntPulse 1.5s ease-in-out infinite; }
@keyframes mntPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ETA ring */
.mnt-eta { display: grid; justify-items: center; gap: 12px; }
.mnt-eta-ring { position: relative; width: 150px; height: 150px; }
.mnt-eta-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.mnt-ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 7; }
.mnt-ring-fill {
  fill: none; stroke: url(#mntRing); stroke-width: 7; stroke-linecap: round;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 45%, transparent));
  transition: stroke-dashoffset 1s linear;
}
.mnt-eta-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.mnt-eta-time { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.mnt-eta-cap { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.mnt-eta-note { font-size: 12px; color: var(--text-muted); margin: 0; text-align: center; }
.mnt-eta-note strong { color: var(--accent); font-family: "JetBrains Mono", ui-monospace, monospace; }

/* Grid */
.maintenance-grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }

/* Deployment progress card */
.mnt-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mnt-card-head h2 { margin: 2px 0 0; }
.mnt-progress-pct { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 18px; font-weight: 700; color: var(--accent); }
.mnt-progress-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; margin-bottom: 16px; }
.mnt-progress-fill {
  display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
/* ── Luxury deployment timeline ───────────────────────────────
   Orbs threaded on a vertical rail that fills with an accent glow as
   each phase completes; the active orb pulses, done orbs check-fill. */
.mnt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mnt-step {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 4px; border-radius: 12px;
  border: 1px solid transparent; background: transparent;
  transition: border-color 0.35s ease, background 0.35s ease;
}
.mnt-step.is-active {
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

/* Connecting rail — sits behind the orbs, running through their centres. */
.mnt-step::before {
  content: ""; position: absolute; left: 24px; top: 50%; bottom: -4px; width: 2px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.10);
  z-index: 0;
}
.mnt-step:last-child::before { display: none; }
/* Completed segment glows accent. */
.mnt-step.is-done::before {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 70%, transparent),
    color-mix(in srgb, var(--accent-2) 55%, transparent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Orb */
.mnt-step-ico {
  position: relative; z-index: 1;
  width: 26px; height: 26px; flex-shrink: 0; margin-left: 7px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.16);
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.06), rgba(8,14,24,0.85));
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, color 0.35s ease;
}
/* queued: a faint dot in the centre */
.mnt-step-ico::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  transition: opacity 0.3s ease;
}
.mnt-step-ico svg { position: absolute; width: 13px; height: 13px; opacity: 0; transition: opacity 0.3s ease; }
.mnt-step-spin { position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid transparent; border-top-color: var(--accent); border-right-color: color-mix(in srgb, var(--accent) 45%, transparent); animation: mntSpin 0.9s linear infinite; display: none; }

.mnt-step-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-muted); transition: color 0.3s ease; }
.mnt-step-state { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); opacity: 0.65; transition: color 0.3s ease, opacity 0.3s ease; }

/* ── Active state — glowing, pulsing orb ── */
.mnt-step.is-active .mnt-step-ico {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 22%, transparent), rgba(8,14,24,0.9));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: mntOrbPulse 2s ease-in-out infinite;
}
.mnt-step.is-active .mnt-step-ico::after {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.mnt-step.is-active .mnt-step-spin { display: block; }
.mnt-step.is-active .mnt-step-name { color: var(--text); }
.mnt-step.is-active .mnt-step-state { color: var(--accent); opacity: 1; }

/* ── Done state — filled gradient orb with check ── */
.mnt-step.is-done .mnt-step-ico {
  color: #04111c; border-color: transparent;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255,255,255,0.35);
}
.mnt-step.is-done .mnt-step-ico::after { opacity: 0; }
.mnt-step.is-done .mnt-step-ico svg { opacity: 1; }
.mnt-step.is-done .mnt-step-name { color: var(--text); }
.mnt-step.is-done .mnt-step-state { color: #6ee7b7; opacity: 1; }

@keyframes mntOrbPulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 4%, transparent), 0 0 26px color-mix(in srgb, var(--accent) 60%, transparent); }
}

/* Recheck footer */
.mnt-recheck { display: flex; align-items: center; gap: 10px; }
.mnt-recheck-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: mntPulse 1.4s ease-in-out infinite; flex-shrink: 0; }
.mnt-recheck-dot.is-ok { background: #34d399; box-shadow: 0 0 8px #34d399; animation: none; }

@media (prefers-reduced-motion: reduce) {
  .mnt-orb, .mnt-emblem-ring, .mnt-gear, .mnt-live-dot, .mnt-step-spin, .mnt-recheck-dot, .mnt-step-ico { animation: none !important; }
}
@media (max-width: 820px) {
  .maintenance-hero2 { grid-template-columns: 1fr; }
  .mnt-eta { justify-self: center; }
  .maintenance-grid2 { grid-template-columns: 1fr; }
  .mnt-hero-left { flex-direction: column; }
}
/* ============================================================================
   Maintenance v3 — bold split hero: orbiting emblem + live console
   ============================================================================ */
.maintenance-hero3 {
  display: grid; grid-template-columns: 1.25fr 0.95fr; gap: 16px;
  align-items: stretch;
}

/* Left main panel */
.mnt-hero-main {
  position: relative; overflow: hidden;
  padding: 36px 38px;
  display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center;
}

/* Orbiting-rings emblem */
.mnt-orbit { position: relative; width: 140px; height: 140px; flex-shrink: 0; display: grid; place-items: center; }
.mnt-orbit-ring { position: absolute; border-radius: 50%; border: 1px solid transparent; }
.mnt-orbit-ring.r1 { inset: 0; border-top-color: var(--accent); border-right-color: color-mix(in srgb, var(--accent) 30%, transparent); animation: mntSpin 3.2s linear infinite; }
.mnt-orbit-ring.r2 { inset: 16px; border-bottom-color: var(--accent-2); border-left-color: color-mix(in srgb, var(--accent-2) 30%, transparent); animation: mntSpin 4.6s linear infinite reverse; }
.mnt-orbit-ring.r3 { inset: 30px; border: 1px solid rgba(255,255,255,0.08); }
.mnt-orbit-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); top: 50%; left: 50%; margin: -3.5px; }
.mnt-orbit-dot.d1 { animation: mntOrbit1 3.2s linear infinite; }
.mnt-orbit-dot.d2 { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); animation: mntOrbit2 4.6s linear infinite; }
@keyframes mntOrbit1 { from { transform: rotate(0) translateX(70px) rotate(0); } to { transform: rotate(360deg) translateX(70px) rotate(-360deg); } }
@keyframes mntOrbit2 { from { transform: rotate(0) translateX(54px) rotate(0); } to { transform: rotate(-360deg) translateX(54px) rotate(360deg); } }
.mnt-orbit-core {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 24%, #0c1626), color-mix(in srgb, var(--accent-2) 16%, #0c1626));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 30px color-mix(in srgb, var(--accent) 28%, transparent);
}
.mnt-orbit-core svg { width: 32px; height: 32px; color: var(--accent); animation: mntSpin 7s linear infinite; }
@keyframes mntSpin { to { transform: rotate(360deg); } }

.mnt-hero-copy h1 { margin: 8px 0 10px; }
.mnt-hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 7px; }

/* Hero stat trio */
.mnt-hero-stats { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.mnt-hero-stat {
  flex: 1; min-width: 110px;
  padding: 13px 16px; border-radius: 13px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.08);
}
.mnt-hero-stat-val { display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.mnt-hero-stat:first-child .mnt-hero-stat-val,
.mnt-hero-stat:nth-child(2) .mnt-hero-stat-val {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mnt-hero-stat-cap { display: block; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-top: 5px; }

/* Live console */
.mnt-console { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.mnt-console-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
}
.mnt-console-dots { display: inline-flex; gap: 6px; }
.mnt-console-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.mnt-console-dots i:nth-child(1) { background: #ff5f57; }
.mnt-console-dots i:nth-child(2) { background: #febc2e; }
.mnt-console-dots i:nth-child(3) { background: #28c840; }
.mnt-console-title { flex: 1; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--text-muted); }
.mnt-console-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #6ee7b7; }
.mnt-console-body {
  flex: 1; min-height: 230px; max-height: 320px; overflow-y: auto;
  padding: 14px 16px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.8;
  background: rgba(2,6,14,0.35);
}
.mnt-log-line { display: flex; gap: 10px; white-space: pre-wrap; animation: mntLogIn 0.25s ease; }
@keyframes mntLogIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.mnt-log-time { color: var(--text-muted); opacity: 0.55; flex-shrink: 0; }
.mnt-log-msg { color: var(--text-soft); }
.mnt-log-ok .mnt-log-msg { color: #6ee7b7; }
.mnt-log-run .mnt-log-msg { color: var(--accent); }
.mnt-log-info .mnt-log-msg { color: var(--text-soft); }
.mnt-log-warn .mnt-log-msg { color: #fcd34d; }
.mnt-log-caret { display: inline-block; width: 8px; height: 14px; background: var(--accent); vertical-align: -2px; animation: mntBlink 1s steps(1) infinite; }
@keyframes mntBlink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mnt-orbit-ring, .mnt-orbit-dot, .mnt-orbit-core svg, .mnt-log-caret { animation: none !important; }
}
@media (max-width: 920px) {
  .maintenance-hero3 { grid-template-columns: 1fr; }
  .mnt-hero-main { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .mnt-hero-stats { justify-content: center; }
  .maintenance-actions { justify-content: center; }
}

/* === purchase.css === */
/* ═══════════════════════════════════════════════════════════
   CYNO.GG — Purchase / Checkout Page Styles
   Luxury glass-morphism duration cards + payment selector
   ═══════════════════════════════════════════════════════════ */

.purchase-shell {
  display: grid;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.purchase-hero {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* Product Selector */
.purchase-product-select {
  padding: 24px;
}

.purchase-product-select h2 {
  margin: 0 0 16px;
}

.purchase-product-dropdown {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.purchase-product-dropdown:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Duration Cards Grid */
.purchase-duration {
  padding: 24px;
}

.purchase-duration h2 {
  margin: 0 0 20px;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .duration-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .duration-grid {
    grid-template-columns: 1fr;
  }
}

/* Duration Card */
.duration-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: grid;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--glass-bg-strong) 70%, transparent),
    color-mix(in srgb, var(--glass-bg) 50%, transparent)
  );
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 12px 32px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  transition:
    border-color 0.35s ease,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease,
    background 0.35s ease;
  overflow: hidden;
}

.duration-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-highlight);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.duration-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 18px 40px rgba(2, 6, 12, 0.4),
    0 0 20px rgba(123, 220, 255, 0.06);
}

.duration-card:hover::before {
  opacity: 1;
}

.duration-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--accent) 12%, var(--glass-bg-strong) 80%),
    color-mix(in srgb, var(--accent) 6%, var(--glass-bg) 60%)
  );
  box-shadow:
    inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent),
    0 18px 40px rgba(2, 6, 12, 0.4),
    0 0 28px rgba(123, 220, 255, 0.12),
    0 0 0 4px color-mix(in srgb, var(--accent) 8%, transparent);
  transform: translateY(-3px);
}

.duration-card.is-active::before {
  opacity: 1;
}

/* Duration label (e.g. "30 days") */
.duration-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* Duration price */
.duration-price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.duration-card.is-active .duration-price {
  background: linear-gradient(135deg, var(--accent) 30%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Per-day cost */
.duration-per-day {
  font-size: 12px;
  color: var(--text-muted);
}

/* Discount badge */
.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: color-mix(in srgb, var(--status-success) 20%, transparent);
  color: var(--status-success);
  border: 1px solid color-mix(in srgb, var(--status-success) 30%, transparent);
}

/* Best value badge (annual plan) */
.best-value-badge {
  position: absolute;
  /* Anchored top-LEFT so it never overlaps the top-right discount badge on the
     12-month card (which has both). */
  top: 10px;
  left: 10px;
  right: auto;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-3) 38%, #0c1424),
    color-mix(in srgb, var(--accent-3) 18%, #0c1424)
  );
  color: var(--accent-3);
  border: 1px solid color-mix(in srgb, var(--accent-3) 45%, transparent);
  box-shadow: 0 0 12px rgba(217, 183, 122, 0.2);
  z-index: 2;
}
/* Make room: when a card carries the Best Value badge, nudge its label down so
   the badge sits above it cleanly. */
.duration-card:has(.best-value-badge) .duration-card-header { margin-top: 22px; }

/* Payment Methods */
.purchase-checkout {
  padding: 24px;
}

.purchase-checkout h2 {
  margin: 0 0 20px;
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }
}

.payment-method-card {
  position: relative;
  cursor: pointer;
}

.payment-method-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-card-inner {
  padding: 18px 16px;
  border-radius: var(--radius-md);
  display: grid;
  gap: 6px;
  text-align: center;
  border: 1.5px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 55%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 8px 20px rgba(2, 6, 12, 0.25);
  backdrop-filter: blur(var(--blur-md)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(150%);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.payment-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  stroke: var(--accent);
  opacity: 0.8;
}

.payment-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.payment-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.payment-method-card input:checked + .payment-card-inner {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--glass-bg) 85%);
  box-shadow:
    inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 30%, transparent),
    0 8px 20px rgba(2, 6, 12, 0.3),
    0 0 16px rgba(123, 220, 255, 0.08);
}

.payment-method-card input:checked + .payment-card-inner .payment-icon {
  opacity: 1;
}

/* Checkout Button */
.checkout-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.checkout-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: holoShimmer 3s ease-in-out infinite;
}

.checkout-lock {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Summary Panel */
.purchase-summary {
  padding: 24px;
  position: sticky;
  top: 80px;
}

.summary-body {
  display: grid;
  gap: 12px;
  position: relative;
}

.summary-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-caustic);
  opacity: 0.4;
  pointer-events: none;
  border-radius: inherit;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.3s ease;
  position: relative;
  z-index: 1;
}

.summary-row:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.summary-row--total {
  padding: 14px 16px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: var(--radius-md);
}

.summary-row--total .metric-label {
  font-weight: 700;
  color: var(--text);
}

.summary-row--total > span:last-child {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 40%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 900px) {
  .purchase-shell {
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-btn::before {
    animation: none;
  }
}

/* Checkout trust band — reassurance directly under the purchase button. */
.checkout-trust {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
}
.checkout-trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft, #c8d5f2);
  white-space: nowrap;
}
.checkout-trust svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--status-success, #6ee3b2);
}
@media (max-width: 480px) {
  .checkout-trust { gap: 8px 14px; }
  .checkout-trust li { font-size: 12px; }
}


/* === dashboard.css === */
.dashboard-shell {
  display: grid;
  gap: 24px;
}

.dashboard-hero {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 20px;
  display: grid;
  gap: 8px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow:
    var(--glass-shadow),
    0 0 40px rgba(123, 220, 255, 0.12),
    var(--glass-glow);
}

.metric-value {
  font-size: 28px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-chat-panel {
  grid-column: span 2;
  min-height: 320px;
}

.dashboard-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 8px 18px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.heat-cell:hover {
  transform: scale(1.15);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 8px 18px rgba(2, 6, 12, 0.35), 0 0 15px rgba(123, 220, 255, 0.2);
}

.heat-cell[data-level="1"] { background: color-mix(in srgb, var(--accent) 14%, var(--glass) 86%); box-shadow: inset 0 0 0 1px var(--border-inner), 0 0 8px rgba(123, 220, 255, 0.08); }
.heat-cell[data-level="2"] { background: color-mix(in srgb, var(--accent) 24%, var(--glass) 76%); box-shadow: inset 0 0 0 1px var(--border-inner), 0 0 12px rgba(123, 220, 255, 0.12); }
.heat-cell[data-level="3"] { background: color-mix(in srgb, var(--accent) 35%, var(--glass) 65%); box-shadow: inset 0 0 0 1px var(--border-inner), 0 0 16px rgba(123, 220, 255, 0.18); }
.heat-cell[data-level="4"] { background: color-mix(in srgb, var(--accent) 45%, var(--glass) 55%); box-shadow: inset 0 0 0 1px var(--border-inner), 0 0 22px rgba(123, 220, 255, 0.25); }

.heatmap--mini {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.heatmap--mini .heat-cell {
  border-radius: 6px;
}

.dashboard-chat {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.chat-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
}

.chat-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.chat-text {
  font-size: 13px;
  color: var(--text-soft);
  word-break: break-word;
}

.chat-time {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-tools {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.dashboard-chat-input {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px var(--border-inner), 0 10px 24px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-chat-input:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    0 0 25px rgba(123, 220, 255, 0.15),
    0 14px 28px rgba(2, 6, 12, 0.45);
}

.chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chat-meta .metric-label {
  margin-left: auto;
}

.dashboard-chat-input input {
  flex: 1;
  min-height: 36px;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
}

.dashboard-chat-input input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 85%, transparent);
}

.dashboard-chat-input input:focus {
  outline: none;
}

.dashboard-chat-input input:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25);
}

.dashboard-chat-input .btn {
  min-height: 32px;
  padding: 6px 14px;
}

.chat-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--glass) 60%, transparent);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 0 0 1px var(--border-inner);
}

.stack-fill {
  width: var(--value);
  transition: transform 0.4s ease;
  transform-origin: left;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.12);
  position: relative;
}

.stack-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 50%, rgba(255, 255, 255, 0.2));
  border-radius: inherit;
}

.stack-fill--core {
  background: linear-gradient(90deg, rgba(102, 211, 229, 0.9), rgba(92, 200, 255, 0.8));
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.12), 0 0 10px rgba(102, 211, 229, 0.3);
}

.stack-fill--prime {
  background: linear-gradient(90deg, rgba(125, 223, 207, 0.9), rgba(110, 231, 183, 0.8));
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.12), 0 0 10px rgba(110, 231, 183, 0.3);
}

.stack-fill--elite {
  background: linear-gradient(90deg, rgba(212, 177, 117, 0.85), rgba(248, 224, 168, 0.75));
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.12), 0 0 10px rgba(217, 183, 122, 0.3);
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.quick-actions .btn {
  justify-content: space-between;
}

.quick-actions .btn span {
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* Subscription Cards */
.dashboard-subscriptions-panel {
  padding: 0;
}

.dashboard-subscriptions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.subscription-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 80%, transparent), color-mix(in srgb, var(--glass-bg) 65%, transparent));
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.subscription-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 24px 60px rgba(3, 8, 18, 0.5), 0 0 40px rgba(118, 224, 255, 0.2), inset 0 0 0 1px var(--border-inner);
}

.subscription-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.subscription-card-info {
  display: grid;
  gap: 4px;
}

.subscription-card-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subscription-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.status-active {
  color: var(--status-success);
  font-weight: 600;
}

.status-expired {
  color: var(--text-muted);
}

.subscription-card-body {
  display: grid;
  gap: 6px;
}

.subscription-card-detail {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.subscription-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.subscription-card-actions .btn {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .dashboard-subscriptions {
    grid-template-columns: 1fr;
  }
}

/* Announcements Panel */
.dashboard-announcements-panel {
  margin-bottom: 8px;
}

.dashboard-announcements {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.announcement-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 75%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  display: grid;
  gap: 8px;
  position: relative;
}

.announcement-card.is-critical {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), color-mix(in srgb, var(--glass-bg) 70%, transparent));
}

.announcement-card.is-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), color-mix(in srgb, var(--glass-bg) 70%, transparent));
}

.announcement-card.is-maintenance {
  border-color: rgba(99, 102, 241, 0.3);
}

.announcement-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-type-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.announcement-type-badge svg {
  width: 14px;
  height: 14px;
}

.announcement-type-badge.is-info { background: rgba(59, 130, 246, 0.2); }
.announcement-type-badge.is-warning { background: rgba(245, 158, 11, 0.2); }
.announcement-type-badge.is-critical { background: rgba(239, 68, 68, 0.2); }
.announcement-type-badge.is-maintenance { background: rgba(99, 102, 241, 0.2); }

.announcement-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.announcement-priority {
  margin-left: auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.announcement-message {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}

.announcement-time {
  font-size: 11px;
  color: var(--text-muted);
}

.announcement-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  line-height: 1;
}

.announcement-dismiss:hover {
  color: var(--text);
}

/* HWID Reset Panel */
.hwid-reset-panel {
  padding: 0;
}

.hwid-reset-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  margin-bottom: 12px;
}

.hwid-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hwid-status-dot.is-available { background: var(--status-success); box-shadow: 0 0 8px var(--status-success); }
.hwid-status-dot.is-cooldown { background: var(--status-warning); }
.hwid-status-dot.is-banned { background: var(--status-danger); box-shadow: 0 0 8px var(--status-danger); }

.hwid-reset-form {
  display: grid;
  gap: 10px;
}

.hwid-reset-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
}

.hwid-reset-form textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.15);
}

.hwid-reset-history {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.hwid-reset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  font-size: 12px;
}

.hwid-reset-reason {
  flex: 1;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hwid-reset-status-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hwid-reset-status-pill.is-pending { background: color-mix(in srgb, var(--status-warning) 15%, transparent); color: var(--status-warning); }
.hwid-reset-status-pill.is-approved { background: color-mix(in srgb, var(--status-success) 15%, transparent); color: var(--status-success); }
.hwid-reset-status-pill.is-rejected { background: color-mix(in srgb, var(--status-danger) 15%, transparent); color: var(--status-danger); }

/* Sessions List (profile) */
.sessions-list {
  display: grid;
  gap: 10px;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
}

.session-info {
  flex: 1;
}

.session-device {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.session-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.session-current-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(123, 220, 255, 0.15);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Achievements Grid (profile) */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.achievement-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  text-align: center;
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 6, 12, 0.4);
}

.achievement-card.is-locked {
  opacity: 0.5;
  filter: grayscale(0.5);
}

.achievement-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-icon svg {
  width: 28px;
  height: 28px;
}

.achievement-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.achievement-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.achievement-date {
  font-size: 10px;
  color: var(--text-muted);
}

/* Changelog Timeline (product page) */
.changelog-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.changelog-entry {
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--glass-bg) 55%, transparent);
}

.changelog-version {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.changelog-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.changelog-changes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.changelog-changes li {
  font-size: 12px;
  color: var(--text-soft);
  padding-left: 16px;
  position: relative;
}

.changelog-changes li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--accent);
}

/* Cloud Config UI */
.config-save-load {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.config-save-load input {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  color: var(--text);
  font-size: 13px;
}

.saved-configs-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.saved-config-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  font-size: 12px;
}

.saved-config-name {
  flex: 1;
  color: var(--text);
  font-weight: 500;
}

.saved-config-actions {
  display: flex;
  gap: 10px;
}

.saved-config-actions button {
  padding: 4px 8px;
  font-size: 11px;
}

@media (max-width: 720px) {
  .dashboard-announcements {
    max-height: 300px;
  }
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .session-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Launch Button */
.btn-launch {
  position: relative;
  background: linear-gradient(135deg, var(--status-success), color-mix(in srgb, var(--status-success) 80%, #059669));
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--status-success) 30%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--status-success) 20%, transparent);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-launch::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 30px color-mix(in srgb, var(--status-success) 40%, transparent), 0 0 40px color-mix(in srgb, var(--status-success) 30%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 50%, transparent);
}

.btn-launch:hover::before {
  left: 100%;
}

.btn-launch:active {
  transform: translateY(0);
}

.btn-launch .launch-icon {
  display: inline-block;
  margin-right: 6px;
  width: 14px;
  height: 14px;
}

.btn-launch .launch-icon::before {
  content: '▶';
  font-size: 12px;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.btn-launch .launch-text {
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Launch Modal */
.launch-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.launch-modal-closing {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.launch-modal-content {
  width: min(calc(100% - 48px), 560px);
  max-width: 560px;
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--status-success) 30%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--status-success) 8%, transparent), rgba(5, 7, 13, 0.95));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px color-mix(in srgb, var(--status-success) 20%, transparent);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.launch-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.launch-modal-header h2 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--status-success), color-mix(in srgb, var(--status-success) 70%, #34d399));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.launch-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease,
              border-color 0.2s ease,
              transform 0.2s ease;
  display: grid;
  place-items: center;
}

.launch-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.launch-modal-body {
  margin-bottom: 24px;
}

.launch-progress {
  margin-bottom: 24px;
}

.launch-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 12px;
}

.launch-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--status-success), color-mix(in srgb, var(--status-success) 70%, #34d399));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px color-mix(in srgb, var(--status-success) 50%, transparent);
}

.launch-status-text {
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
  font-weight: 500;
}

.launch-steps {
  display: grid;
  gap: 12px;
}

.launch-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.launch-step.active {
  background: color-mix(in srgb, var(--status-success) 8%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 30%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--status-success) 15%, transparent);
}

.launch-step.complete {
  background: color-mix(in srgb, var(--status-success) 5%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 20%, transparent);
}

.launch-step.error {
  background: color-mix(in srgb, var(--status-danger) 8%, transparent);
  border-color: color-mix(in srgb, var(--status-danger) 30%, transparent);
}

.launch-step .step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.launch-step .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--status-success) 30%, transparent);
  border-top-color: var(--status-success);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.launch-step .checkmark {
  color: var(--status-success);
  font-size: 16px;
  font-weight: bold;
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.launch-step .cross {
  color: var(--status-danger);
  font-size: 16px;
  font-weight: bold;
}

.launch-step .step-text {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}

.launch-step.active .step-text {
  color: var(--text);
}

.launch-step.complete .step-text {
  color: var(--status-success);
}

.launch-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Radar Quick Stats */
.radar-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
}

.radar-quick-stats .metric-label {
  font-size: 10px;
}

.radar-quick-stats .metric-value {
  font-size: 18px;
}

/* Radar Action Buttons */
.radar-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.radar-actions .btn {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Luxury Dashboard Enhancements --- */

/* Pulse animation for live stat indicators */
@keyframes statPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.stat-indicator-live {
  animation: statPulse 2s ease-in-out infinite;
}

/* Metric card gradient glow on hover */
.dashboard-metric-card:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, var(--glass-border)),
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(123, 220, 255, 0.08);
}

/* Chat bubble glass effect */
.chat-bubble {
  background: linear-gradient(145deg, rgba(10, 15, 25, 0.5), rgba(10, 15, 25, 0.35));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-bubble.sent {
  background: linear-gradient(145deg, rgba(123, 220, 255, 0.12), rgba(123, 220, 255, 0.06));
  border-color: rgba(123, 220, 255, 0.15);
}

/* Subscription Summary Card */
.dashboard-subscription-card {
  padding: 0;
}

.subscription-card-grid {
  margin-top: 16px;
}

.subscription-main {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.subscription-plan-name {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
}
/* Transient loading / reconnecting state — calmer than the bold gradient title
   so a brief network hiccup doesn't read like a broken page. */
.subscription-plan-name.is-loading {
  background: none;
  -webkit-text-fill-color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
  color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
  font-weight: 500;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0;
}

.subscription-tier-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(123, 220, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(123, 220, 255, 0.2);
}

.subscription-tier-badge.tier-member {
  background: rgba(123, 220, 255, 0.12);
  color: var(--accent);
  border-color: rgba(123, 220, 255, 0.2);
}

.subscription-tier-badge.tier-core {
  background: rgba(102, 211, 229, 0.15);
  color: #66d3e5;
  border-color: rgba(102, 211, 229, 0.25);
}

.subscription-tier-badge.tier-prime {
  background: rgba(110, 231, 183, 0.15);
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.25);
}

.subscription-tier-badge.tier-premium {
  background: rgba(217, 183, 122, 0.15);
  color: #d9b77a;
  border-color: rgba(217, 183, 122, 0.25);
}

.subscription-tier-badge.tier-elite {
  background: rgba(248, 224, 168, 0.18);
  color: #f8e0a8;
  border-color: rgba(248, 224, 168, 0.3);
}

.subscription-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.subscription-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.detail-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Usage Stats Card */
.dashboard-usage-card {
  padding: 0;
}

.dashboard-usage-card .panel-body {
  padding: 24px;
}

.usage-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  width: fit-content;
}

.usage-tab-btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}

.usage-tab-btn:hover {
  color: var(--text);
}

.usage-tab-btn.active {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(123, 220, 255, 0.12);
}

.usage-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.usage-stat-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg-strong) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.usage-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 6, 12, 0.4);
}

.usage-stat-value {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.usage-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.usage-top-product {
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), color-mix(in srgb, var(--glass-bg-strong) 50%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  text-align: center;
}

.usage-top-product-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  font-family: var(--font-display);
}

.usage-top-product-count {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .usage-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .subscription-details {
    grid-template-columns: repeat(2, 1fr);
  }
  .subscription-main {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .usage-stats-grid {
    grid-template-columns: 1fr;
  }
  .usage-tabs {
    width: 100%;
  }
  .usage-tab-btn {
    flex: 1;
    text-align: center;
  }
}

/* ============================================================
   Dashboard hero — KPI strip + ambient glow (added)
   ============================================================ */
.dashboard-hero {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}
.dashboard-hero::before {
  content: "";
  position: absolute; top: -40%; right: -10%;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none; z-index: 0;
}
.dashboard-hero > * { position: relative; z-index: 1; }

.dashboard-hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
}
.dashboard-kpi {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  border: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.dashboard-kpi:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 18px 38px rgba(2,8,18,0.45), 0 0 32px color-mix(in srgb, var(--accent) 16%, transparent);
}
.dashboard-kpi__icon {
  grid-row: 1 / span 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  color: color-mix(in srgb, var(--accent) 88%, white 12%);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.dashboard-kpi__icon svg { width: 20px; height: 20px; }
.dashboard-kpi__val {
  font-family: "Sora","Manrope",sans-serif;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 800; line-height: 1.1; color: #fff;
  /* Prevent ugly mid-word breaks on short status labels like "Protected" /
     "Active". The value should fit on one line at typical widths and ellipsize
     gracefully on the rare narrow viewport. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dashboard-kpi__val--ok { color: color-mix(in srgb, var(--status-success, #5fd0a8) 88%, #eafff6 12%); }
.dashboard-kpi__key {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted, #9fb1cc); margin-top: 3px;
}
.dashboard-kpi--clickable { cursor: pointer; }
.kpi-popover {
  display: none;
  position: fixed;
  z-index: 800;
  min-width: 300px;
  max-width: 380px;
  max-height: 420px;
  overflow-y: auto;
  padding: 14px 0;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(16,24,38,0.97), rgba(10,16,28,0.98));
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  box-shadow: 0 24px 48px rgba(0,0,0,0.55), 0 0 40px rgba(0,200,255,0.06);
  backdrop-filter: blur(16px);
}
.kpi-popover.is-open { display: block; }
.kpi-popover__title {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted, #9fb1cc); padding: 0 16px 10px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.kpi-popover__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px; transition: background 0.15s ease;
}
.kpi-popover__row:hover { background: rgba(255,255,255,0.04); }
.kpi-popover__product { font-size: 13px; font-weight: 600; color: #e8edf4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.kpi-popover__days { font-size: 12px; font-weight: 700; white-space: nowrap; padding-left: 12px; }
.kpi-popover__days--ok { color: var(--status-success, #5fd0a8); }
.kpi-popover__days--warn { color: #f5a623; }
.kpi-popover__days--expired { color: #f56565; }

@media (max-width: 760px) {
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 420px) {
  .dashboard-kpis { grid-template-columns: 1fr; }
}
/* ============================================================
   Dashboard quick actions + widget customizer (added)
   ============================================================ */
.dash-qa-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

.dash-qa-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.dash-qa {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 16px 10px; text-align: center; text-decoration: none;
  border-radius: 14px;
  color: var(--text, #eef3ff);
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  border: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.dash-qa:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 16px 34px rgba(2,8,18,0.45), 0 0 30px color-mix(in srgb, var(--accent) 16%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, transparent), rgba(255,255,255,0.02));
}
.dash-qa__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  color: color-mix(in srgb, var(--accent) 90%, white 10%);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.dash-qa__icon svg { width: 22px; height: 22px; }
.dash-qa__label { font-size: 12.5px; font-weight: 600; line-height: 1.2; }

.dash-customize {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}
.dash-widget-toggles {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 4px 24px; margin-top: 8px;
}

@media (max-width: 900px) { .dash-qa-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 560px) {
  .dash-qa-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dash-widget-toggles { grid-template-columns: 1fr; }
}
/* ============================================================
   Responsive collapses — kept INSIDE dashboard.css because
   dashboard.html re-links this file after main.css, so these
   must live here to win over the non-media grid rules above.
   ============================================================ */
@media (max-width: 1100px) {
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dashboard-split { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 721px) and (max-width: 980px) {
  .dashboard-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ============================================================
   Per-product entitlement cards — dashboard "Owned games" grid.
   One card per active product the user owns; rendered into
   [data-entitlements] by app.js fetchEntitlementCards().
   ============================================================ */

.dashboard-entitlements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dashboard-ent {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background:
    radial-gradient(120% 50% at 50% 0%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 70%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 32px rgba(2,6,12,0.32);
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), border-color 0.22s ease;
}
.dashboard-ent:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--glass-border));
}

.dashboard-ent--warn {
  border-color: color-mix(in srgb, var(--status-warning, #eab308) 40%, var(--glass-border));
}
.dashboard-ent--expired {
  opacity: 0.78;
  border-color: color-mix(in srgb, var(--text-muted) 30%, var(--glass-border));
}

.dashboard-ent__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.dashboard-ent__name {
  font-family: var(--font-display, "Sora"), sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-ent__pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dashboard-ent__pill--ok {
  color: color-mix(in srgb, var(--status-success, #6ee3b2) 85%, var(--text));
  background: color-mix(in srgb, var(--status-success, #6ee3b2) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-success, #6ee3b2) 38%, transparent);
}
.dashboard-ent__pill--warn {
  color: color-mix(in srgb, var(--status-warning, #eab308) 85%, var(--text));
  background: color-mix(in srgb, var(--status-warning, #eab308) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-warning, #eab308) 38%, transparent);
}
.dashboard-ent__pill--expired {
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-muted) 30%, transparent);
}

.dashboard-ent__body {
  display: grid;
  gap: 4px;
}
.dashboard-ent__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft, #c4d2ea);
}
.dashboard-ent__row > span:first-child {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10.5px;
  align-self: center;
}

.dashboard-ent__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.dashboard-ent__actions .btn-chip {
  font-size: 12.5px;
  padding: 6px 12px;
  flex: 1 1 0;
  text-align: center;
}
.dashboard-ent-refund[disabled] {
  opacity: 0.65;
  cursor: progress;
}


/* === landing.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Landing Page (Splash-Style Centered Design)
   ═══════════════════════════════════════════════════════════════ */

/* Background shell for post-splash landing */
.landing-bg-shell {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Subtle background image — very low opacity for depth */
.landing-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.07;
  filter: saturate(0.6) brightness(0.5) blur(2px);
  z-index: 0;
  animation: landingBgDrift 30s ease-in-out infinite alternate;
}

@keyframes landingBgDrift {
  0% {
    transform: scale(1.05) translate(0, 0);
    opacity: 0.06;
  }
  50% {
    transform: scale(1.08) translate(-1%, 1%);
    opacity: 0.08;
  }
  100% {
    transform: scale(1.05) translate(1%, -1%);
    opacity: 0.06;
  }
}

body[data-page="landing"] .landing-bg-shell {
  z-index: -1;
}

.landing-bg-shell .splash-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.landing-bg-shell .splash-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.landing-bg-shell .landing-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
}

.landing-bg-shell .splash-orb {
  position: absolute;
  z-index: 3;
}

/* Main landing shell — centered layout */
body[data-page="landing"].splash-scrollable {
  min-height: 100vh;
}

.landing-page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.landing-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  /* Balanced vertical padding so the hero centres in the viewport the same way
     the splash logo does — this keeps cyno.gg in the exact same spot through
     the crossfade (no vertical jump). */
  padding: 24px;
}

/* Center content container.
   The hero block is taller than the splash (it has slogan + buttons + banner),
   so simple centering puts the cyno.gg logo higher than the splash logo and it
   appears to jump up after the crossfade. Nudging the block down aligns the
   logo with the splash position for a seamless handoff. */
.landing-center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: clamp(120px, 30vh, 240px);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

/* ─ Force landing brand text visible ─ */
.landing-brand {
  margin: 0;
  /* Hold the logo at its resting glow (no breathing) through the crossfade so
     it matches the splash logo exactly — no glow "pop" at the handoff. The
     gentle breathe only begins once the whole intro has settled. */
  animation: none;
  text-shadow:
    0 0 8px rgba(123, 220, 255, 0.6),
    0 0 20px rgba(123, 220, 255, 0.4),
    0 0 40px rgba(123, 220, 255, 0.25),
    0 0 80px rgba(123, 220, 255, 0.12),
    0 0 120px rgba(123, 220, 255, 0.06);
}
body.is-landing-ready .landing-brand {
  animation: splashBreathe 3s ease-in-out infinite;
}

/* Override splash-letter hidden state */
.landing-brand .splash-letter {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
  filter: blur(0) !important;
  animation: none !important;
}

/* Trigger the light sweep on landing brand.
   NOTE: do NOT force `opacity: 1` here — an !important opacity overrides the
   keyframe opacity values and parks the shine permanently over the text.
   The keyframes fade 0 → peak → 0 themselves; `both` fill keeps it invisible
   both before (during the delay) and after the sweep. */
.landing-brand::before {
  opacity: 0;
  animation: splashSmoothSweep 2.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both !important;
}

.landing-brand::after {
  opacity: 0;
  animation: splashGlowSmoothSweep 2.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both !important;
}

.landing-brand .sparkle-trail {
  opacity: 0;
  animation: sparkleTrailSmooth 2.8s cubic-bezier(0.4, 0, 0.2, 1) 0.72s both !important;
}

/* Tagline — force visible immediately */
.landing-tagline {
  margin: 0;
  opacity: 1 !important;
  transform: translateY(0) !important;
  animation: none !important;
}

/* Brand slogan — a quiet, glowing micro-line beneath the tagline.
   Understated and spaced to match cyno's minimal aesthetic. */
.landing-slogan {
  margin: 14px 0 0;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: clamp(0.62rem, 1.3vw, 0.74rem);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-indent: 0.34em; /* balance the trailing letter-spacing for true centering */
  color: rgba(207, 226, 255, 0.42);
  text-shadow: 0 0 18px rgba(123, 220, 255, 0.18);
  /* Hidden until the JS staggered reveal fades it in (see init.js). */
  opacity: 0;
  transform: translateY(10px);
}

/* CTA buttons centered */
.landing-cta-center {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.landing-cta-center .btn {
  min-width: 140px;
}

/* Access/banner note */
.landing-access-banner {
  margin-top: 4px;
  text-align: center;
  max-width: 480px;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 24px 24px 20px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 25%, transparent);
  margin-top: auto;
}

body[data-page="landing"] .site-footer {
  margin-top: 40px;
}

.site-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--status-success);
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-soft);
}

/* ── Topbar override for landing ──────────────────────────── */
/* The landing page shows its brand in the centered hero, and the nav is
   hidden for guests — so the topbar would render as an empty bar with just a
   background + bottom border. Hide it entirely on landing. */
body[data-page="landing"] .topbar {
  display: none !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .landing-shell {
    padding: 70px 16px 0;
  }

  .landing-center-content {
    gap: 16px;
  }

  .landing-brand {
    font-size: clamp(2rem, 10vw, 3.5rem);
    padding: 12px 20px;
    letter-spacing: 0.05em;
  }

  .landing-tagline {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
  }

  .landing-cta-center {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .landing-cta-center .btn {
    width: 100%;
    justify-content: center;
  }

  .site-footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .landing-shell {
    padding: 60px 12px 0;
  }

  .landing-access-banner {
    font-size: 12px;
    padding: 10px 14px;
  }
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .landing-bg-shell .splash-bg,
  .landing-bg-shell .splash-grid,
  .landing-bg-shell .splash-particle,
  .landing-bg-shell .splash-orb {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .landing-brand {
    animation: none !important;
  }

  .landing-brand .splash-letter {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    filter: blur(0) !important;
  }

  .landing-brand::before {
    animation: none !important;
    opacity: 1 !important;
  }

  .landing-brand::after {
    animation: none !important;
    opacity: 1 !important;
  }

  .landing-brand .sparkle-trail {
    animation: none !important;
    opacity: 1 !important;
  }

  .landing-tagline {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* ── Touch Devices ────────────────────────────────────────── */
@media (pointer: coarse) {
  .landing-bg-shell .landing-particles {
    display: none;
  }
}


/* === auth.css === */
.auth-shell {
  display: grid;
  gap: 24px;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  animation: fadeInUp 0.6s ease;
  /* Fill the viewport (minus topbar) and center the card so the footer sits
     at the bottom with no large dead gap below it. */
  min-height: calc(100vh - 160px);
  align-content: center;
}

/* Quiet the glass caustic veil on auth cards so text reads crisp, not blurry. */
.auth-card.glass-panel::before { opacity: 0.18 !important; }

/* ============================================================================
   Registration wizard — luxury stepped application form
   ============================================================================ */
.reg-wizard { gap: 22px; }
.reg-head { display: grid; gap: 8px; }

/* Step progress */
.reg-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 4px 0 6px;
  padding: 0;
}
.reg-steps-track {
  position: absolute;
  top: 16px; left: 7%; right: 7%;
  height: 2px;
  background: rgba(255,255,255,0.10);
  border-radius: 2px;
  z-index: 0;
}
.reg-steps-fill {
  display: block; height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent, #7bdcff) 50%, transparent);
  transition: width 0.45s cubic-bezier(0.34,1.2,0.5,1);
}
.reg-step {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  flex: 1;
}
.reg-step-dot {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 13px; font-weight: 700;
  color: var(--text-muted, #a8b9d4);
  background: linear-gradient(180deg, #15203a, #0d1526);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.35s cubic-bezier(0.34,1.4,0.5,1), border-color 0.35s cubic-bezier(0.34,1.4,0.5,1), transform 0.35s cubic-bezier(0.34,1.4,0.5,1), box-shadow 0.35s cubic-bezier(0.34,1.4,0.5,1);
}
.reg-step-label {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4);
  transition: color 0.3s ease;
}
.reg-step.is-active .reg-step-dot {
  color: #04111c;
  background: linear-gradient(140deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  border-color: transparent;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent, #7bdcff) 45%, transparent);
}
.reg-step.is-active .reg-step-label { color: var(--text, #eef3ff); }
.reg-step.is-done .reg-step-dot {
  color: var(--accent, #7bdcff);
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 45%, transparent);
  background: color-mix(in srgb, var(--accent, #7bdcff) 14%, #0d1526);
}

/* Panels (steps) */
.reg-panel { display: grid; gap: 16px; }
.reg-panel[hidden] { display: none; }
.reg-panel.is-active { animation: regPanelIn 0.4s cubic-bezier(0.22,1,0.36,1); }
@keyframes regPanelIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Field with leading icon */
.reg-field label { display: flex; align-items: center; gap: 6px; }
.reg-opt {
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); opacity: 0.65;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 5px; padding: 1px 5px;
}
.reg-input {
  position: relative;
  display: flex; align-items: center;
}
.reg-input > svg {
  position: absolute; left: 14px;
  width: 17px; height: 17px;
  color: var(--text-muted, #a8b9d4);
  pointer-events: none;
  transition: color 0.25s ease;
  /* Sit above the input/select fill (which paints in normal flow and was
     covering the absolutely-positioned icon). */
  z-index: 2;
}
.reg-input > input,
.reg-input > select {
  width: 100%;
  padding-left: 42px !important;
}
/* Keep the select below the icon layer; text already cleared by padding-left. */
.reg-input > select {
  position: relative;
  z-index: 1;
}

/* The native <select> is enhanced into a .cyno-select button at runtime, so the
   visible text lives in .cyno-select__button — pad it past the icon too, or the
   placeholder ("Select a game") sits under the icon. */
.reg-input > .cyno-select { width: 100%; }
.reg-input > .cyno-select .cyno-select__button { padding-left: 42px !important; }

.reg-input:focus-within > svg { color: var(--accent, #7bdcff); }
.reg-input > .cyno-select.is-open ~ svg,
.reg-input:has(.cyno-select.is-open) > svg { color: var(--accent, #7bdcff); }

/* Products multi-select — chip checkboxes */
.reg-products {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px;
}
.reg-product-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text-soft, #c4d2ea);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer; user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.reg-product-chip:hover {
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 30%, transparent);
  color: var(--text, #eef3ff);
}
.reg-product-chip input { position: absolute; opacity: 0; pointer-events: none; }
.reg-product-chip::before {
  content: ""; width: 15px; height: 15px; border-radius: 5px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.25);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.reg-product-chip:has(input:checked) {
  color: var(--text, #eef3ff);
  background: color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 45%, transparent);
}
.reg-product-chip:has(input:checked)::before {
  background: linear-gradient(135deg, var(--accent, #7bdcff), var(--accent-2, #9b8cff));
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(4,12,22,0.55);
}
.reg-product-chip:has(input:focus-visible) {
  outline: 2px solid color-mix(in srgb, var(--accent, #7bdcff) 60%, transparent);
  outline-offset: 2px;
}

/* Review summary (step 3) */
.reg-review {
  display: grid; gap: 1px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.reg-review-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
}
.reg-review-key {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4);
}
.reg-review-val {
  font-size: 13px; color: var(--text, #eef3ff); font-weight: 500;
  text-align: right; overflow-wrap: anywhere;
}
.reg-review-val.is-empty { color: var(--text-muted, #a8b9d4); opacity: 0.6; font-weight: 400; font-style: italic; }

.reg-tos {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-weight: 400;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
}
.reg-tos input { margin-top: 2px; flex-shrink: 0; }

/* Wizard nav */
.reg-nav {
  display: flex; align-items: center; gap: 10px;
  margin-top: 4px;
}
.reg-nav #regNextBtn,
.reg-nav #registerSubmitBtn { margin-left: auto; }
.reg-login-link { font-size: 12px; opacity: 0.7; }

@media (max-width: 560px) {
  .reg-row { grid-template-columns: 1fr; }
  .reg-step-label { display: none; }
  .reg-login-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reg-panel.is-active { animation: none; }
  .reg-steps-fill { transition: none; }
}

.auth-shell--wide {
  max-width: 980px;
}

.auth-card {
  padding: 28px;
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
  /* More opaque fill so text is crisp over an empty dark backdrop instead of
     looking washed-out / blurry (the glass-panel backdrop-blur + caustic veil
     otherwise leave it low-contrast). */
  background:
    linear-gradient(160deg, rgba(20,30,52,0.92), rgba(12,19,33,0.95));
}

/* The base .glass-panel already paints a caustic veil; the auth-card's own
   caustic on top double-washes the card. Tone it down for legibility. */
.auth-card::before { opacity: 0.12 !important; }

/* CRITICAL: display:grid above overrides the [hidden] attribute, so the
   2FA / backup-code panels (which start hidden) would all show at once.
   Force hidden panels to actually hide. */
.auth-card[hidden] { display: none !important; }

/* Descriptions / eyebrows must wrap inside the card (it has overflow:hidden,
   and the uppercase + letter-spaced text can otherwise be clipped at the edge). */
.auth-card .metric-label,
.auth-card .eyebrow,
.auth-card .auth-helper {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-caustic);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.auth-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(123, 220, 255, 0.3),
    rgba(141, 230, 214, 0.2),
    transparent
  );
  z-index: 1;
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-card--wide {
  padding: 36px;
  gap: 18px;
}

.auth-card h1 {
  margin: 0;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.auth-form-grid input,
.auth-form-grid select {
  transition: box-shadow 0.35s ease,
              border-color 0.35s ease,
              background 0.3s ease;
}

.auth-form-grid input:focus,
.auth-form-grid select:focus {
  outline: none;
}

.auth-form-grid input:focus-visible,
.auth-form-grid select:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent),
              0 0 20px rgba(123, 220, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border));
}

.auth-card form {
  display: grid;
  gap: 16px;
  margin: 0;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.auth-forgot-link {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  text-decoration: underline;
}

.auth-helper {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.auth-helper:hover {
  color: var(--accent);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  font-size: 12px;
  color: var(--text-soft);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.consent:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 14px 28px rgba(2, 6, 12, 0.42),
    0 0 16px rgba(123, 220, 255, 0.04);
}

.consent input {
  accent-color: var(--accent);
  margin-top: 2px;
}

input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  transition: box-shadow 0.35s ease;
}

.access-closed-card {
  max-width: 760px;
  margin: 0 auto;
}

.access-closed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.access-closed-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 74%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(155%);
}

.access-closed-item .metric-label {
  font-size: 11px;
}

/* ============================================================
   AUTH PAGES — LUXURY POLISH LAYER
   Targets: login.html, register.html, forgot-password.html,
   reset-password.html, blocked.html, 2FA + backup code panels.
   Pure-CSS additions; existing rules above untouched.
   ============================================================ */

/* ---- Ambient depth ----------------------------------------- */
/* Soft accent halo + ghost cyno sigil floating behind the card.
   Lives on body[data-page="login"|"register"|...] so other pages
   are not affected. */
body[data-page="login"]::before,
body[data-page="register"]::before,
body[data-page="forgot-password"]::before,
body[data-page="reset-password"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(80% 65% at 10% 8%,   rgba(123, 220, 255, 0.22), transparent 55%),
    radial-gradient(65% 60% at 90% 12%,  rgba(217, 183, 122, 0.16), transparent 50%),
    radial-gradient(55% 50% at 6% 55%,   rgba(56, 189, 195, 0.14), transparent 48%),
    radial-gradient(60% 55% at 80% 48%,  rgba(139, 120, 220, 0.13), transparent 50%),
    radial-gradient(75% 60% at 48% 88%,  rgba(110, 231, 183, 0.14), transparent 52%),
    radial-gradient(50% 45% at 50% 35%,  rgba(123, 220, 255, 0.12), transparent 48%),
    radial-gradient(45% 40% at 85% 78%,  rgba(230, 160, 90, 0.10), transparent 46%);
  animation: authMeshDrift 18s ease-in-out infinite alternate;
}

body[data-page="login"]::after,
body[data-page="register"]::after {
  content: "";
  position: fixed;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(320px, 40vw, 520px);
  height: clamp(320px, 40vw, 520px);
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(closest-side,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent 65%),
    radial-gradient(closest-side at 60% 40%,
      rgba(139, 120, 220, 0.10),
      transparent 60%);
  filter: blur(44px);
  opacity: 0.55;
  animation: authHaloDrift 14s ease-in-out infinite;
}

@keyframes authMeshDrift {
  0%   { transform: scale(1)    translate(0, 0);        opacity: 0.9;  }
  33%  { transform: scale(1.03) translate(-0.6%, 0.5%);  opacity: 1;    }
  66%  { transform: scale(1.01) translate(0.4%, -0.3%);  opacity: 0.94; }
  100% { transform: scale(1.02) translate(-0.2%, 0.6%);  opacity: 0.97; }
}
@keyframes authHaloDrift {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -52%) scale(1.06); }
}

/* Keep the form above the halo. */
.auth-shell { position: relative; z-index: 1; }

/* ---- Card entrance + lift ---------------------------------- */
/* fadeInUp is already on .auth-shell, but the inner card needs a
   sharper reveal so it doesn't read as flat after the shell lands. */
.auth-card {
  animation: authCardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease,
    border-color 0.5s ease;
}

.auth-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 32px 60px rgba(2, 8, 18, 0.55),
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 9%, transparent);
}

@keyframes authCardReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Animated 1px conic gradient ring around the card edge. Adds
   the same depth language as the error pages without competing
   with .auth-card::after (top sheen). */
.auth-card {
  position: relative;
  isolation: isolate;
}

.auth-card .auth-ring,
.auth-card::marker {
  /* placeholder so the ::before below can attach without colliding
     with the existing .auth-card::before (caustic) — we use
     .auth-card > *:first-child::before instead via wrapping below. */
}

/* Wrap the conic ring on a fresh pseudo so we don't clobber the
   existing ::before that paints the caustic layer. We use
   .glass-panel.auth-card descendant — the section element. */
.glass-panel.auth-card > .eyebrow:first-child {
  /* Make the first-eyebrow position-aware so the ring can hang
     off the auth-card itself via a custom outline trick below. */
}

/* The ring: drawn with outline + animation. outline doesn't
   participate in layout, so it never shifts content. */
.auth-card {
  outline: 1px solid transparent;
  outline-offset: 0;
}
.auth-card.has-ring,
.auth-card {
  background-image:
    /* keep current background source */
    linear-gradient(180deg, transparent, transparent);
}

/* ---- Field labels: float on input + focus ------------------ */
.auth-card .field {
  position: relative;
}

.auth-card .field label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition:
    color 0.3s ease,
    transform 0.25s ease,
    letter-spacing 0.25s ease;
  transform-origin: left center;
}

.auth-card .field:focus-within label,
.auth-card .field input:not(:placeholder-shown) ~ label,
.auth-card .field input:focus + label {
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  letter-spacing: 0.16em;
}

/* ---- Input focus glow (over and above what's already in
   auth.css for .auth-form-grid). Targets .field input directly,
   which is the markup login.html actually uses. -------------- */
.auth-card .field input {
  transition:
    box-shadow 0.4s ease,
    border-color 0.4s ease,
    background 0.3s ease,
    transform 0.3s ease;
}

.auth-card .field input:focus,
.auth-card .field input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 12%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Filled state — slight border tint so the user sees their data is
   accepted before they submit. */
.auth-card .field input:not(:placeholder-shown):not(:focus) {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--glass-border));
}

/* ---- Sign in button: idle ready pulse + hover sweep -------- */
.auth-card .btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.auth-card .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.auth-card .btn-primary:hover::after {
  transform: translateX(120%);
}

/* Subtle pulse only while the form is enabled, idle, and the
   user hasn't focused inside the form yet (don't pulse during typing). */
.auth-card form:not(.auth-form-disabled):not(:focus-within) .btn-primary {
  animation: authBtnReadyPulse 3.6s ease-in-out infinite;
}

@keyframes authBtnReadyPulse {
  0%, 100% {
    box-shadow:
      0 14px 26px rgba(2, 6, 12, 0.42),
      0 0 0 0 color-mix(in srgb, var(--accent) 18%, transparent);
  }
  50% {
    box-shadow:
      0 14px 26px rgba(2, 6, 12, 0.42),
      0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

/* ---- 2FA + backup code: monospaced digit feel -------------- */
#twoFactorCode,
#backupCode {
  font-family: "Sora", ui-monospace, "JetBrains Mono", monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.55em;
  text-align: center;
  padding-left: 18px;  /* offset for tracking */
  caret-color: var(--accent);
}

#twoFactorCode::placeholder,
#backupCode::placeholder {
  letter-spacing: 0.4em;
  color: color-mix(in srgb, var(--text-muted) 70%, transparent);
}

/* Bottom-edge "fill" indicator that grows as the user types. */
#twoFactorForm .field,
#backupCodeForm .field {
  position: relative;
}
#twoFactorForm .field::after,
#backupCodeForm .field::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 80%, transparent),
    color-mix(in srgb, #8de6d6 80%, transparent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#twoFactorForm .field:focus-within::after,
#backupCodeForm .field:focus-within::after {
  transform: scaleX(1);
}

/* ---- Topbar on auth pages: tighter, calmer ----------------- */
body[data-page="login"] .topbar,
body[data-page="register"] .topbar,
body[data-page="forgot-password"] .topbar {
  /* Already great; just lift z-index above the new body::before halo. */
  z-index: 21;
}

/* ---- Forgot link micro polish ------------------------------ */
.auth-forgot-link {
  position: relative;
  padding-bottom: 1px;
}
.auth-forgot-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.auth-forgot-link:hover::after,
.auth-forgot-link:focus-visible::after {
  transform: scaleX(1);
  opacity: 0.8;
}

/* ---- Reduced motion ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .auth-card,
  body[data-page="login"]::after,
  body[data-page="register"]::after,
  .auth-card form:not(.auth-form-disabled):not(:focus-within) .btn-primary,
  .auth-card .btn-primary::after,
  #twoFactorForm .field::after,
  #backupCodeForm .field::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   AUTH PAGES — LUXURY POLISH LAYER (PART 1)
   Targets: login.html, register.html, forgot-password.html,
   reset-password.html, blocked.html, 2FA + backup code panels.
   Pure-CSS additions; existing rules above untouched.
   ============================================================ */

/* ── Ambient particle field for auth pages ─────────────────── */
.auth-particle-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.auth-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 220, 255, 0.35), transparent 70%);
  animation: authParticleDrift var(--dur, 10s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
}

@keyframes authParticleDrift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translate(var(--dx, 30px), var(--dy, -60px)) scale(0.3); opacity: 0; }
}

/* ── Title glow pulse ──────────────────────────────────────── */
.auth-card .gradient-title {
  animation: authTitleGlow 4s ease-in-out infinite;
}

@keyframes authTitleGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(123, 220, 255, 0.12)); }
  50% { filter: drop-shadow(0 0 18px rgba(123, 220, 255, 0.28)); }
}

/* ── Remember me / options row ─────────────────────────────── */
.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.auth-checkbox-label:hover {
  color: var(--accent);
}

.auth-checkbox-label input[type="checkbox"] {
  margin: 0;
  accent-color: var(--accent);
}

/* ── Error message with shake ──────────────────────────────── */
.auth-error {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--status-danger) 35%, transparent);
  background: color-mix(in srgb, var(--status-danger) 8%, var(--glass-bg) 92%);
  color: var(--status-danger);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 0 16px rgba(240, 156, 176, 0.1);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.auth-error.is-visible {
  display: flex;
  animation: authShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.auth-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── State crossfade transitions ───────────────────────────── */
.auth-state {
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-state-exit {
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.auth-state-enter {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}

.auth-state-enter.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── Input validation states ───────────────────────────────── */
.auth-card .field input.is-invalid {
  border-color: color-mix(in srgb, var(--status-danger) 55%, var(--glass-border));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--status-danger) 20%, transparent),
    0 0 16px color-mix(in srgb, var(--status-danger) 10%, transparent);
}

.auth-card .field input.is-valid:not(:placeholder-shown) {
  border-color: color-mix(in srgb, var(--status-success) 45%, var(--glass-border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--status-success) 15%, transparent);
}

/* ── Loading state for submit button ───────────────────────── */
.auth-card .btn-primary.is-loading {
  pointer-events: none;
  color: transparent !important;
  position: relative;
}

.auth-card .btn-primary.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #041018;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

/* ── Success checkmark animation ───────────────────────────── */
.auth-checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--status-success) 18%, transparent), color-mix(in srgb, var(--accent-2) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--status-success) 40%, transparent);
  box-shadow: 0 0 24px rgba(110, 227, 178, 0.15);
  animation: checkmarkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes checkmarkPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.auth-checkmark svg {
  width: 32px;
  height: 32px;
  stroke: var(--status-success);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-checkmark svg .checkmark-path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmarkDraw 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

@keyframes checkmarkDraw {
  to { stroke-dashoffset: 0; }
}

/* ── Enhanced email provider links ─────────────────────────── */
.email-provider-links .btn-ghost {
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.email-provider-links .btn-ghost:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  box-shadow: 0 0 12px rgba(123, 220, 255, 0.08);
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .auth-particle,
  .auth-card .gradient-title,
  .auth-error.is-visible,
  .auth-checkmark,
  .auth-checkmark svg .checkmark-path {
    animation: none !important;
  }

  .auth-state {
    transition: none !important;
  }
}

/* ── Small screens: lighter ambient, tighter padding ───────── */
@media (max-width: 540px) {
  body[data-page="login"]::after,
  body[data-page="register"]::after {
    width: 80vw;
    height: 80vw;
    filter: blur(34px);
    opacity: 0.5;
  }
  .auth-shell {
    padding: 28px 14px 60px;
    gap: 18px;
  }
  .auth-card {
    padding: 22px 20px;
  }
  #twoFactorCode,
  #backupCode {
    font-size: 18px;
    letter-spacing: 0.4em;
  }
}

/* Request-access page — owned chips + pending dot */
.ra-owned-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ra-owned-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  color: color-mix(in srgb, var(--status-success, #5fd0a8) 85%, #e8f6f1 15%);
  background: color-mix(in srgb, var(--status-success, #5fd0a8) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-success, #5fd0a8) 30%, transparent);
}
.ra-owned-chip::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--status-success, #5fd0a8);
  box-shadow: 0 0 6px var(--status-success, #5fd0a8);
}
.ra-pending-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
  background: var(--status-warning, #eab308);
  box-shadow: 0 0 8px var(--status-warning, #eab308);
  animation: raPendingPulse 2s ease-in-out infinite;
}
@keyframes raPendingPulse { 0%,100%{opacity:1;} 50%{opacity:0.45;} }
/* ============================================================
   Permanent suspension panel — shown on /login when the server returns
   PERMANENTLY_SUSPENDED. Calm, serious, on-brand: glass card, scarlet
   accent halo, destructive icon, refined typography. The destructive
   tone is restrained — no flashing — to stay luxury rather than alarmist.
   ============================================================ */
.suspension-panel {
  position: relative;
  margin: 0 0 22px;
  padding: 26px 28px 22px;
  border-radius: 20px;
  background:
    radial-gradient(900px 220px at 0% 0%,
      color-mix(in srgb, #f43f5e 16%, transparent) 0%,
      transparent 60%),
    linear-gradient(180deg, rgba(20,12,16,0.85), rgba(8,11,20,0.85));
  border: 1px solid color-mix(in srgb, #f43f5e 36%, rgba(255,255,255,0.06));
  box-shadow:
    0 30px 70px -32px rgba(244, 63, 94, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}
.suspension-panel__halo {
  position: absolute; inset: 0;
  background: radial-gradient(600px 240px at 100% 100%,
    color-mix(in srgb, #f43f5e 14%, transparent) 0%,
    transparent 60%);
  pointer-events: none;
}
.suspension-panel__head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.suspension-panel__icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(60% 60% at 50% 30%,
      color-mix(in srgb, #f43f5e 22%, transparent),
      transparent 70%),
    rgba(255,255,255,0.04);
  border: 1px solid color-mix(in srgb, #f43f5e 42%, transparent);
  color: #fda4af;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.suspension-panel__icon svg { width: 24px; height: 24px; }
.suspension-panel__eyebrow {
  font: 700 10.5px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fda4af;
  opacity: 0.92;
  margin-bottom: 6px;
}
.suspension-panel__title {
  margin: 0;
  font: 600 22px/1.2 "Sora", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fca5a5, #f43f5e 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.suspension-panel__lead {
  position: relative; z-index: 1;
  margin: 0 0 18px;
  font: 500 14px/1.55 "Manrope", system-ui, sans-serif;
  color: color-mix(in srgb, var(--text, #eef3ff) 88%, transparent);
}
.suspension-panel__lead strong { color: #fca5a5; font-weight: 600; }
.suspension-panel__details {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 22px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.06);
}
.suspension-panel__details div { min-width: 0; }
.suspension-panel__details dt {
  font: 700 10.5px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
  margin-bottom: 5px;
}
.suspension-panel__details dd {
  margin: 0;
  font: 500 13.5px/1.45 "Manrope", system-ui, sans-serif;
  color: var(--text, #eef3ff);
  word-break: break-word;
}
.suspension-panel__details dd.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.suspension-panel__scope {
  position: relative; z-index: 1;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 16px;
}
.suspension-panel__scope-title {
  font: 700 10.5px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text, #eef3ff) 60%, transparent);
  margin-bottom: 10px;
}
.suspension-panel__scope ul {
  margin: 0; padding-left: 18px;
  font: 500 13px/1.5 "Manrope", system-ui, sans-serif;
  color: color-mix(in srgb, var(--text, #eef3ff) 82%, transparent);
}
.suspension-panel__scope li { margin-bottom: 4px; }
.suspension-panel__scope li:last-child { margin-bottom: 0; }
.suspension-panel__foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.suspension-panel__foot .metric-label {
  flex: 1;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
  color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
}
@media (max-width: 540px) {
  .suspension-panel { padding: 20px 18px 18px; }
  .suspension-panel__title { font-size: 19px; }
  .suspension-panel__foot { flex-direction: column; align-items: stretch; }
}
/* ============================================================
   AUTH SPLIT-SCREEN — "Framed Aurora Monolith"
   Login + Register: brand aurora panel | form column, one frame.
   Scoped to body[data-page="login"|"register"]. Layout/CSS only.
   ============================================================ */

/* 2.1 Shell becomes a full-bleed centered container (grid lives one level down) */
body[data-page="login"] .auth-shell,
body[data-page="register"] .auth-shell{
  max-width:1240px; margin-inline:auto;
  padding:clamp(20px,4vw,40px) clamp(16px,4vw,40px) clamp(40px,6vw,72px);
  display:block;                 /* cancel the centered single-col grid */
  min-height:auto;               /* cancel calc(100vh-160px) magic number */
  align-content:initial;
  position:relative; z-index:1;
}
body[data-page="register"] .auth-shell--wide{ max-width:1240px; }

/* 2.2 The shared rounded frame = the grid itself (NO per-column seam) */
.auth-split{
  display:grid;
  grid-template-columns:1.05fr 1fr;
  gap:0;
  align-items:stretch;
  border:1px solid var(--glass-border);
  border-radius:var(--radius-xl,32px);
  overflow:hidden;
  background:var(--glass-bg);
  box-shadow:0 40px 110px -44px rgba(2,6,14,.82), inset 0 0 0 1px var(--border-inner,rgba(255,255,255,.04));
  isolation:isolate;
}

/* 2.3 Brand panel — self-contained aurora (fills its OWN box at any height) */
.auth-brand{
  position:relative; overflow:clip;
  display:grid; place-content:center;
  padding:clamp(32px,5vw,72px);
  min-height:min(640px, calc(100svh - 220px));
  background:
    radial-gradient(70% 60% at 15% 15%, rgba(123,220,255,0.10), transparent 55%),
    radial-gradient(60% 55% at 80% 20%, rgba(217,183,122,0.08), transparent 50%),
    radial-gradient(55% 50% at 10% 70%, rgba(56,189,195,0.07), transparent 48%),
    radial-gradient(50% 45% at 75% 65%, rgba(139,120,220,0.06), transparent 45%),
    linear-gradient(155deg,#0a1322 0%,#070b16 60%,#05080f 100%);
  border-right:1px solid var(--glass-border);
}
.auth-brand::before{
  content:""; position:absolute; inset:-30%; pointer-events:none;
  background:conic-gradient(from 120deg at 30% 30%,
    color-mix(in srgb,var(--accent) 55%,transparent),
    color-mix(in srgb,var(--accent-2) 50%,transparent),
    color-mix(in srgb,var(--accent-3) 30%,transparent),
    color-mix(in srgb,var(--accent) 55%,transparent));
  filter:blur(60px) saturate(140%); opacity:.5;
  animation:authAuroraSpin 30s linear infinite;
}
.auth-brand::after{
  content:""; position:absolute; inset:-20%; pointer-events:none;
  background:
    radial-gradient(40% 50% at 25% 30%, color-mix(in srgb,var(--accent) 55%,transparent), transparent 70%),
    radial-gradient(45% 45% at 80% 75%, color-mix(in srgb,var(--accent-2) 48%,transparent), transparent 70%);
  filter:blur(50px); opacity:.5; mix-blend-mode:screen;
  animation:authAuroraDrift 24s ease-in-out infinite alternate;
}
.auth-brand-grid{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);
  background-size:44px 44px;
  -webkit-mask-image:radial-gradient(70% 70% at 50% 40%,#000,transparent);
          mask-image:radial-gradient(70% 70% at 50% 40%,#000,transparent);
}
@keyframes authAuroraSpin{ to{ transform:rotate(360deg) } }
@keyframes authAuroraDrift{ from{ transform:translate(-4%,-3%) scale(1) } to{ transform:translate(4%,3%) scale(1.06) } }

.auth-brand-content{ position:relative; z-index:2; }
.auth-brand-mark{
  font-family:var(--font-display,"Sora"); font-weight:700;
  font-size:clamp(48px,6.5vw,92px); line-height:.95; letter-spacing:-.02em;
  color:var(--text);
  text-shadow:0 0 40px color-mix(in srgb,var(--accent) 22%,transparent);
}

/* ── Particle aurora — floating orbs + tiny particles ────────────────────── */
.auth-brand-particles{
  position:absolute; inset:0; z-index:1; pointer-events:none; overflow:hidden;
}

/* Large soft orbs — slow drift, blurred glow */
.auth-orb{
  position:absolute; border-radius:50%;
  filter:blur(40px);
  opacity:0;
  animation:authOrbFloat 18s ease-in-out infinite;
}
.auth-orb--1{
  width:180px; height:180px; top:8%; left:12%;
  background:radial-gradient(circle, rgba(123,220,255,0.5), transparent 70%);
  animation-delay:0s; animation-duration:20s;
}
.auth-orb--2{
  width:140px; height:140px; bottom:15%; right:8%;
  background:radial-gradient(circle, rgba(141,230,214,0.45), transparent 70%);
  animation-delay:-4s; animation-duration:22s;
}
.auth-orb--3{
  width:120px; height:120px; top:55%; left:50%;
  background:radial-gradient(circle, rgba(139,120,220,0.4), transparent 70%);
  animation-delay:-8s; animation-duration:24s;
}
.auth-orb--4{
  width:100px; height:100px; top:20%; right:20%;
  background:radial-gradient(circle, rgba(217,183,122,0.35), transparent 70%);
  animation-delay:-12s; animation-duration:19s;
}
.auth-orb--5{
  width:160px; height:160px; bottom:5%; left:30%;
  background:radial-gradient(circle, rgba(123,220,255,0.35), transparent 70%);
  animation-delay:-6s; animation-duration:26s;
}

@keyframes authOrbFloat{
  0%   { opacity:0; transform:translate(0,0) scale(0.8); }
  15%  { opacity:0.7; }
  50%  { opacity:0.5; transform:translate(30px,-20px) scale(1.15); }
  85%  { opacity:0.7; }
  100% { opacity:0; transform:translate(-10px,15px) scale(0.8); }
}

/* Tiny particles — sharp dots that drift upward */
.auth-particle{
  position:absolute; border-radius:50%;
  background:rgba(123,220,255,0.8);
  box-shadow:0 0 6px rgba(123,220,255,0.5), 0 0 12px rgba(123,220,255,0.2);
  opacity:0;
  animation:authParticleRise linear infinite;
}
.auth-particle--1{ width:3px; height:3px; left:18%; bottom:-5%; animation-duration:12s; animation-delay:0s; }
.auth-particle--2{ width:2px; height:2px; left:35%; bottom:-5%; animation-duration:14s; animation-delay:-2s; }
.auth-particle--3{ width:4px; height:4px; left:52%; bottom:-5%; animation-duration:16s; animation-delay:-5s;
  background:rgba(141,230,214,0.7); box-shadow:0 0 6px rgba(141,230,214,0.4); }
.auth-particle--4{ width:2px; height:2px; left:70%; bottom:-5%; animation-duration:11s; animation-delay:-3s; }
.auth-particle--5{ width:3px; height:3px; left:85%; bottom:-5%; animation-duration:15s; animation-delay:-7s;
  background:rgba(139,120,220,0.7); box-shadow:0 0 6px rgba(139,120,220,0.4); }
.auth-particle--6{ width:2px; height:2px; left:25%; bottom:-5%; animation-duration:13s; animation-delay:-9s; }
.auth-particle--7{ width:3px; height:3px; left:60%; bottom:-5%; animation-duration:17s; animation-delay:-4s;
  background:rgba(217,183,122,0.6); box-shadow:0 0 6px rgba(217,183,122,0.3); }
.auth-particle--8{ width:2px; height:2px; left:45%; bottom:-5%; animation-duration:10s; animation-delay:-6s; }

@keyframes authParticleRise{
  0%   { opacity:0; transform:translateY(0) translateX(0); }
  10%  { opacity:0.8; }
  50%  { opacity:0.6; transform:translateY(-50vh) translateX(15px); }
  90%  { opacity:0.3; }
  100% { opacity:0; transform:translateY(-110vh) translateX(-10px); }
}

@media (prefers-reduced-motion:reduce){
  .auth-orb, .auth-particle{ animation:none !important; opacity:0 !important; }
}

/* ── Hide particles on narrow screens where the brand panel stacks ────── */

/* 2.4 Form column — restores centered-card behavior, scoped to the right half.
   The single grid track is minmax(0,1fr) so wide content (the wizard's step bar,
   product chips, nav buttons) can't blow the track past the column and overflow
   the rounded frame. The card is forced to the track width. */
.auth-form-col{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:24px; align-content:center;
  padding:clamp(28px,3.5vw,56px) clamp(22px,3vw,48px);
  min-width:0;
}
.auth-form-col > .auth-card{ width:100%; min-width:0; max-width:100%; }
/* Everything inside the card must be allowed to shrink to the track, or a
   nowrap flex row (the wizard nav) / wide grid establishes an intrinsic width
   that blows the card past the frame. */
.auth-form-col .auth-card > *,
.auth-form-col .auth-card form,
.auth-form-col .auth-card form > *{ min-width:0; }
/* The wizard nav buttons must wrap instead of forcing a 4-button-wide row. */
body[data-page="register"] .auth-form-col .reg-nav{ flex-wrap:wrap; min-width:0; }
body[data-page="register"] .auth-form-col .reg-steps{ min-width:0; }
body[data-page="register"] .auth-form-col{ align-content:start; }

/* 2.5 Register page (tall) — the brand stretches to fill the slab's full
   height alongside the form column. No sticky, no per-panel border-radius
   (the .auth-split frame already provides the rounded shell). This is the
   most robust model: the grid track equalizes the columns and the form's
   wizard never overflows past a shorter brand panel. */
@media (min-width:881px){
  body[data-page="register"] .auth-brand{
    position:relative;            /* not sticky — stretches via grid */
    align-self:stretch;
    height:auto;                  /* let the grid track decide */
    min-height:0;                 /* cancel the 640px floor on this page */
  }
}

/* 2.6 Responsive collapse: single column + slim static banner */
@media (max-width:880px){
  .auth-split{ grid-template-columns:1fr; border-radius:var(--radius-lg,24px); }
  .auth-brand{
    position:static; height:auto; min-height:auto;
    place-content:center; text-align:center;
    padding:26px clamp(20px,5vw,32px);
    border-right:0; border-bottom:1px solid var(--glass-border);
    border-radius:var(--radius-lg,24px) var(--radius-lg,24px) 0 0;
  }
  .auth-brand-content{ text-align:center; margin-inline:auto; }
  .auth-brand-mark{ font-size:clamp(30px,9vw,42px); }
  .auth-brand-grid{ display:none; }
  .auth-brand-particles{ display:none; }
  .auth-brand::before{ filter:blur(42px); }
  .auth-form-col{ padding:clamp(24px,6vw,32px) clamp(16px,5vw,24px); align-content:start; }
}

/* 2.7 Kill competing viewport-centered ambient systems on these pages */
body[data-page="login"] .auth-particle-field,
body[data-page="register"] .auth-particle-field{ display:none !important; }
body[data-page="login"]::after,
body[data-page="register"]::after{ content:none !important; display:none !important; animation:none !important; }
body[data-page="login"]::before,
body[data-page="register"]::before{ background:none !important; }
body[data-page="login"] .auth-card .gradient-title,
body[data-page="register"] .auth-card .gradient-title{ animation:none; }
body[data-page="login"] .auth-card:hover,
body[data-page="register"] .auth-card:hover{ transform:none; box-shadow:0 24px 50px rgba(2,8,18,.45); }

/* 2.9 Cards sit FLUSH inside the slab — the frame is the container now, so the
   per-card glass border/shadow/fill/top-sheen would read as a busy card-in-a-frame.
   Strip them; the .auth-form-col + .auth-split provide the surface. Keep padding 0
   (the form-col already pads) and keep the card's own grid gap. */
body[data-page="login"] .auth-form-col .auth-card,
body[data-page="register"] .auth-form-col .auth-card{
  background:none !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
  padding:0 !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  overflow:visible;            /* let focus rings / fill bars breathe */
}
body[data-page="login"] .auth-form-col .auth-card::before,
body[data-page="register"] .auth-form-col .auth-card::before,
body[data-page="login"] .auth-form-col .auth-card::after,
body[data-page="register"] .auth-form-col .auth-card::after{
  content:none !important;
}
/* the wizard card keeps its slightly larger internal rhythm */
body[data-page="register"] .auth-form-col .reg-wizard{ gap:22px; }

/* 2.8 Reduced motion: extend guards to the aurora */
@media (prefers-reduced-motion:reduce){
  .auth-brand::before, .auth-brand::after{ animation:none !important; }
}

/* ============================================================
   Register page — compact layout (fits 1280×900 without scroll)
   ============================================================ */

/* Tighter overall shell on the register page. The login form barely needs
   any vertical room; register's 3-step wizard does. We trim the rhythm
   without removing legibility — most savings come from gaps + the eyebrow/
   subhead block. */
body[data-page="register"] .auth-shell {
  padding-top: clamp(14px, 2.5vw, 24px);
  padding-bottom: clamp(20px, 3vw, 40px);
}

body[data-page="register"] .auth-card,
body[data-page="register"] .auth-form-col .auth-card {
  padding: 20px 22px !important;
  gap: 12px !important;
}
body[data-page="register"] .reg-wizard { gap: 14px; }
body[data-page="register"] .reg-head { gap: 4px; }
body[data-page="register"] .reg-head .gradient-title {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.1;
  margin: 0;
}
body[data-page="register"] .reg-head .metric-label {
  font-size: 12.5px;
  line-height: 1.4;
}

/* Compact step bar */
body[data-page="register"] .reg-steps { margin: 0 0 2px; }
body[data-page="register"] .reg-step-dot { width: 26px; height: 26px; font-size: 12px; }
body[data-page="register"] .reg-step-label { font-size: 9px; letter-spacing: 0.1em; }
body[data-page="register"] .reg-steps-track { top: 13px; }

/* Field row tightening */
body[data-page="register"] .reg-panel { gap: 10px; }
body[data-page="register"] .reg-field label {
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
body[data-page="register"] .reg-field .auth-helper {
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.3;
}
body[data-page="register"] .reg-input > input,
body[data-page="register"] .reg-input > select,
body[data-page="register"] .reg-input > textarea,
body[data-page="register"] .reg-field textarea {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
body[data-page="register"] .password-strength { margin: 4px 0 0; }

/* Wizard nav buttons row */
body[data-page="register"] .reg-nav { margin-top: 6px; gap: 8px; }
body[data-page="register"] .reg-nav .btn { padding-top: 9px; padding-bottom: 9px; }

/* Squeeze the split form column padding on register — the wizard already
   has its own card padding, the auth-form-col padding above adds 80+ px of
   pure top/bottom dead space on a page that's vertical-budget-constrained. */
body[data-page="register"] .auth-form-col {
  padding: 14px clamp(16px, 2vw, 28px) !important;
  align-content: start !important;
}
/* Brand panel on the left already stretches; tighten its padding too so the
   shared frame ends sooner overall. */
body[data-page="register"] .auth-brand {
  padding: clamp(16px, 2vw, 28px) clamp(20px, 3vw, 40px);
  min-height: 0;
}
/* Footer doesn't need huge breathing room directly below a tightly-packed
   wizard. */
body[data-page="register"] .site-footer { padding-top: 12px; padding-bottom: 12px; }

/* Step 2 product-chip grid + the "why are you applying" textarea are the
   tallest pieces on the wizard. Trim chip padding + textarea rows so step 2
   also fits a 1440x900 desktop without scroll. */
body[data-page="register"] .reg-product-chip {
  padding: 5px 10px;
  font-size: 12px;
}
body[data-page="register"] .reg-product-chip::before { width: 13px; height: 13px; }
body[data-page="register"] .reg-products { gap: 6px; margin-top: 0; }
body[data-page="register"] .reg-field textarea {
  min-height: 0;
  height: auto;
}
body[data-page="register"] textarea#registerWhy { min-height: 56px; }

/* ============================================================
   Register page — laptop (~1366×768) compaction.
   Triggers only when viewport height is short; doesn't touch the
   roomy 1080p / 1440p layout that's already verified above.
   Goal: step 1 Continue button visible without scroll on a 768px
   viewport (top bar ~74px + footer leaves ~620px for the wizard).
   ============================================================ */
@media (max-height: 820px) {
  body[data-page="register"] .auth-shell {
    padding-top: 8px !important;
    padding-bottom: 12px !important;
  }
  body[data-page="register"] .auth-form-col {
    padding: 6px clamp(14px, 1.6vw, 22px) !important;
  }
  body[data-page="register"] .auth-card,
  body[data-page="register"] .auth-form-col .auth-card {
    padding: 12px 16px !important;
    gap: 6px !important;
  }
  body[data-page="register"] .reg-wizard { gap: 8px; }
  body[data-page="register"] .reg-head { gap: 2px; }
  body[data-page="register"] .reg-head .eyebrow {
    font-size: 10px;
    margin: 0;
  }
  body[data-page="register"] .reg-head .gradient-title {
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.05;
  }
  body[data-page="register"] .reg-head .metric-label {
    font-size: 11.5px;
    line-height: 1.3;
    margin: 0;
  }
  body[data-page="register"] .reg-steps { margin: 0; }
  body[data-page="register"] .reg-step-dot { width: 22px; height: 22px; font-size: 11px; }
  body[data-page="register"] .reg-step-label { font-size: 8.5px; }
  body[data-page="register"] .reg-steps-track { top: 11px; }
  body[data-page="register"] .reg-panel { gap: 6px; }
  body[data-page="register"] .reg-field label {
    font-size: 10.5px;
    margin-bottom: 1px;
  }
  body[data-page="register"] .reg-input > input,
  body[data-page="register"] .reg-input > select {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
  body[data-page="register"] .reg-field .auth-helper {
    font-size: 10.5px;
    margin-top: 1px;
    line-height: 1.25;
  }
  body[data-page="register"] .password-strength { margin: 2px 0 0; height: 4px; }
  body[data-page="register"] .reg-nav { margin-top: 2px; }
  body[data-page="register"] .reg-nav .btn {
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 13px;
  }
  body[data-page="register"] .auth-brand {
    padding: 14px clamp(16px, 2vw, 28px) !important;
  }
  body[data-page="register"] .site-footer {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
}


/* === admin.css === */
.admin-shell {
  display: grid;
  gap: 24px;
}

.admin-management-suite,
.admin-ops-suite {
  margin-top: 12px;
}

.admin-hero {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-panel {
  min-height: auto;
}

.admin-product-list,
.admin-user-list,
.admin-revenue {
  display: grid;
  /* Cap the single column to the container width (the 0 minimum stops long row
     content from blowing the grid track out to ~2000px and overflowing the
     panel — which made descriptions run off-screen with no visible ellipsis). */
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  /* Make room for the overlay scrollbar (and avoid native OS cursors on thin scrollbars). */
  padding-right: 18px;
  scrollbar-gutter: stable;

  /* Hide native scrollbars (overlay scrollbar is injected via JS). */
  scrollbar-width: none;
}

.admin-product-list::-webkit-scrollbar,
.admin-user-list::-webkit-scrollbar,
.admin-revenue::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.admin-management-suite .admin-list-stack {
  max-height: 220px;
  overflow: auto;
  padding-right: 18px;
  scrollbar-gutter: stable;

  /* Hide native scrollbars (overlay scrollbar is injected via JS). */
  scrollbar-width: none;
}

.admin-management-suite .admin-list-stack::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.admin-inline-row label {
  display: grid;
  gap: 6px;
}

.admin-ui-lab {
  display: grid;
  gap: 16px;
}

.admin-lab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.admin-lab-card {
  min-height: 220px;
}

.admin-lab-wide {
  display: grid;
  gap: 12px;
}

.admin-lab-table {
  overflow: auto;
}

@media (max-width: 1200px) {
  .admin-lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .admin-lab-grid {
    grid-template-columns: 1fr;
  }
}

.admin-analytics .admin-panel {
  min-height: auto;
}

.admin-row,
.admin-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.admin-row {
  cursor: pointer;
}

.admin-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-bg) 88%);
}

.admin-row--compact {
  cursor: default;
}

/* The text column must be allowed to shrink so its children can truncate
   instead of overflowing the (overflow:hidden) row and showing a mid-slice. */
.admin-row > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-row-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* keep the ellipsis off the panel edge */
  padding-right: 8px;
}

.admin-row-meta {
  font-size: 12px;
  color: var(--text-muted);
  /* single-line preview with ellipsis — the full description shows in the
     product detail panel. Keeps every row a clean, uniform height. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  /* breathing room so the truncated text + ellipsis never sit flush against
     (and get clipped by) the panel's rounded right edge. */
  padding-right: 8px;
  margin-top: 3px;
  line-height: 1.4;
}

.admin-row-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.admin-sparkline {
  width: 100%;
  height: 64px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 26px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.admin-sparkline svg {
  width: 100%;
  height: 100%;
  padding: 10px 12px;
}

.admin-sparkline polyline {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 80%, #bfeaf2);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(102, 211, 229, 0.35));
}

.admin-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-mini-table th,
.admin-mini-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-soft);
}

.admin-mini-table th {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px;
}

/* ---- adminOLD migrated ---- */

.admin-main {
  display: grid;
  gap: 18px;
  
  /* Glass thin scrollbars (admin scope) */
  --sb-size: 3px;
  --sb-track: rgba(255, 255, 255, 0.06);
  --sb-thumb: rgba(123, 220, 255, 0.26);
  --sb-thumb-hover: rgba(123, 220, 255, 0.36);
  --sb-thumb-border: rgba(255, 255, 255, 0.12);
  --sb-track-border: rgba(255, 255, 255, 0.12);

}


/* Admin scrollbar styling */
.admin-main,
.admin-main * {
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

.admin-main *::-webkit-scrollbar {
  width: var(--sb-size);
  height: var(--sb-size);
}

.admin-main *::-webkit-scrollbar-track {
  background: var(--sb-track);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--sb-track-border);
}

.admin-main *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--sb-thumb), rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  border: 1px solid var(--sb-thumb-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px) saturate(140%);
}

.admin-main *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--sb-thumb-hover), rgba(255, 255, 255, 0.14));
}

/*
  Ultra-thin scrollbars inside collapsible groupboxes.
  Firefox only supports keyword sizing ("thin"), so the 1-2px target mainly applies to WebKit.
  We override the CSS variables locally; the global admin scrollbar rules above consume these.
*/
.admin-main details.admin-collapsible,
.admin-main details.admin-subgroup,
.admin-main .panel.admin-subgroup {
  --sb-size: 2px;
  --sb-track: rgba(255, 255, 255, 0.05);
  --sb-track-border: rgba(255, 255, 255, 0.1);
  --sb-thumb: rgba(123, 220, 255, 0.22);
  --sb-thumb-hover: rgba(123, 220, 255, 0.32);
  --sb-thumb-border: rgba(255, 255, 255, 0.1);
}

.admin-actions {
  display: inline-flex;
  gap: 10px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.admin-stat-card {
  padding: 16px;
  border-radius: 16px;
}

.admin-stat-value {
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0;
}

.admin-stat-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 20px;
}

.admin-analytics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.admin-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  /* Stretch items so each row has equal-height tiles. */
  align-items: stretch;
}

.admin-management {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  /* Stretch items so each row has equal-height tiles. */
  align-items: stretch;
}

.admin-advanced {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.admin-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
}
/*
  Equal-height tile internals:
  The panel becomes a column-flex container, and the body stretches to fill remaining space.
  This prevents the "shorter windows" look when some cards have fewer list rows.
*/
.admin-settings > .panel,
.admin-management > .panel,
.admin-advanced > .panel,
.admin-subgrid > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin-settings > .panel > .panel-body,
.admin-management > .panel > .panel-body,
.admin-advanced > .panel > .panel-body,
.admin-subgrid > .panel > .panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.admin-settings > .panel > .panel-body.admin-card,
.admin-management > .panel > .panel-body.admin-card,
.admin-advanced > .panel > .panel-body.admin-card,
.admin-subgrid > .panel > .panel-body.admin-card {
  flex: 1;
}

.admin-advanced .admin-list-stack,
.admin-management .admin-list-stack,
.admin-settings .admin-list-stack,
.admin-subgrid .admin-list-stack {
  flex: 1;
  min-height: 140px;
}

.admin-card {
  display: grid;
  gap: 16px;
}

.admin-mini-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 75%, transparent);
  color: var(--text-soft);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 8px 16px rgba(2, 6, 12, 0.3);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-actions-row--right {
  justify-content: flex-end;
}

.admin-inline-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.admin-inline-row .btn {
  justify-self: end;
}

.admin-bulk-bar {
  /* Unified bulk-bar component (Admin management suite, advanced sections, etc.) */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.admin-inline-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea),
.admin-form :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea),
.admin-actions-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea),
.admin-bulk-bar :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea) {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text);
  padding: 10px 14px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-inline-row textarea,
.admin-form textarea,
.admin-actions-row textarea,
.admin-bulk-bar textarea {
  border-radius: var(--radius-md);
  min-height: 120px;
  resize: vertical;
}

.admin-inline-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus,
.admin-form :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus,
.admin-actions-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus,
.admin-bulk-bar :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus {
  outline: none;
}

.admin-inline-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus-visible,
.admin-form :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus-visible,
.admin-actions-row :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus-visible,
.admin-bulk-bar :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="tel"], textarea):focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

/* Bulk-bar sizing rules so controls stay inside the rounded container and wrap predictably */
.admin-bulk-bar > * {
  flex: 0 0 auto;
  max-width: 100%;
}

.admin-bulk-bar input[type="search"],
.admin-bulk-bar input[type="text"] {
  flex: 1 1 180px;
  min-width: 160px;
}

.admin-bulk-bar select,
.admin-bulk-bar .cyno-select {
  flex: 0 0 auto;
  min-width: 160px;
}

.admin-bulk-bar .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Visual separation between bulk actions and the list below */
.admin-bulk-bar + .admin-list-stack,
.admin-bulk-bar + .admin-sub-list,
.admin-bulk-bar + .admin-user-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.bulk-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.incident-row .bulk-check,
.alert-card .bulk-check {
  margin-left: auto;
}

.admin-user-tools {
  display: grid;
  gap: 14px;
}

.admin-user-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-user-tools-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 14px;
  align-items: start;
}

.admin-user-picker,
.admin-user-editor {
  padding: 12px;
  border-radius: 16px;
  width: 100%;
  min-width: 0;
}

.admin-user-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.admin-user-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.admin-user-item:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.admin-user-item input[type="checkbox"] {
  margin-left: auto;
}

.admin-list-stack {
  display: grid;
  gap: 10px;
}

.admin-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.admin-list-item:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.admin-list-item strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.admin-list-item span {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-user-item.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 18%, var(--glass-bg) 82%);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  width: 100%;
}

/* Moderation row: keep switches readable and keep action button in its own column */
.admin-form-grid--moderation {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  box-sizing: border-box;
}

/* Ensure switches look like standalone controls (no inherited separators) */
.admin-form-grid--moderation .switch,
.admin-form-grid--moderation .switch * {
  border-left: none !important;
  border-right: none !important;
}

/* Keep the button vertically centered and inside the row */
.admin-form-grid--moderation .btn {
  justify-self: end;
  align-self: center;
}

@media (max-width: 860px) {
  .admin-form-grid--moderation {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-form-grid--moderation .btn {
    justify-self: stretch;
    width: 100%;
  }
}

.admin-form-grid--moderation .btn {
  justify-self: end;
  align-self: center;
}

.toggle .toggle-label,
.switch .switch-label {
  white-space: nowrap;
  line-height: 1.1;
}


/* Account management: stable action rows (Product/Duration/Grant, Ban/Reason/Apply) */
.admin-form-grid.admin-action-row {
  grid-template-columns: minmax(150px, 220px) minmax(200px, 1fr) minmax(200px, 1fr) minmax(140px, 220px);
  gap: 16px;
}

.admin-form-grid.admin-action-row > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-form-grid.admin-action-row > label > input,
.admin-form-grid.admin-action-row > label > select,
.admin-form-grid.admin-action-row > label > .cyno-select {
  width: 100%;
  min-width: 0;
}

.admin-form-grid.admin-action-row > button {
  height: 42px;
  padding: 0 18px;
  white-space: nowrap;
  justify-self: end;
}

@media (max-width: 980px) {
  .admin-form-grid.admin-action-row {
    grid-template-columns: 1fr;
  }
  .admin-form-grid.admin-action-row > button {
    justify-self: stretch;
  }
}
.admin-form-grid label:not(.toggle) {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

/* Ensure action buttons align predictably inside grid rows. */
.admin-form-grid > button {
  align-self: end;
  justify-self: stretch;
  min-height: 40px;
}

.admin-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 12px 0;
}

.admin-sub-list {
  display: grid;
  gap: 8px;
}

.admin-sub-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.admin-user-editor {
  max-height: none;
  /* Avoid clipping dropdowns/focus outlines which can look like UI is misaligned. */
  overflow: visible;
}

.admin-user-editor .panel-body {
  overflow-y: auto;
  max-height: 520px;
  padding-right: 4px;
}



@media (max-width: 900px) {
  .admin-user-editor {
    max-height: none;
  }

  .admin-user-editor .panel-body {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .admin-user-tools-grid {
    grid-template-columns: 1fr;
  }
}

.admin-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 80;
}

.admin-modal.hidden {
  display: none;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg-0) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-modal-card {
  position: relative;
  width: min(640px, 90vw);
  z-index: 1;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-modal-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.admin-modal-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.admin-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-modal-actions-right {
  display: flex;
  gap: 10px;
}

.admin-modal-close {
  padding: 6px 12px;
  min-height: 44px;
  min-width: 44px;
}

.admin-modal-error {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
  font-size: 12px;
}

.admin-kv-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.admin-kv-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.admin-user-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 18px;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.admin-user-row strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.admin-user-row span {
  color: var(--text-muted);
  font-size: 11px;
}

.admin-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.kpi-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 18px;
  font-weight: 700;
}

.incident-list,
.alert-cards {
  display: grid;
  gap: 10px;
}

.incident-row,
.alert-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.incident-row strong,
.alert-card strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.incident-row span:last-child,
.alert-card span:last-child {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.admin-ops-list {
  display: grid;
  gap: 12px;
}

.ops-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 82%, transparent);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
}

.ops-row h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.ops-row p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.ops-row select {
  min-width: 150px;
  background: color-mix(in srgb, var(--glass-bg) 75%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.ops-row .btn {
  padding: 8px 16px;
  border-radius: 999px;
  border-color: rgba(92, 200, 255, 0.35);
  background: rgba(92, 200, 255, 0.12);
  color: #e0f2fe;
}

.ops-row .btn-secondary {
  background: rgba(110, 231, 183, 0.12);
  border-color: rgba(110, 231, 183, 0.45);
  color: #d1fae5;
}

.ops-row .btn-ghost {
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  border-color: color-mix(in srgb, var(--glass-border) 55%, transparent);
  color: var(--text-soft);
}

.ops-row .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(92, 200, 255, 0.18);
}

@media (max-width: 720px) {
  .ops-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.admin-bulk {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-bulk .btn {
  justify-self: end;
}

.admin-bulk label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.admin-flags {
  display: grid;
  gap: 10px;
}

.flag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.flag-row input {
  accent-color: rgba(92, 200, 255, 0.9);
}

.admin-roles {
  display: grid;
  gap: 12px;
}

.role-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  display: grid;
  gap: 8px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.role-card h4 {
  margin: 0;
  font-size: 14px;
}

.role-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.role-card ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-soft);
  display: grid;
  gap: 6px;
}

.role-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.admin-ops-suite .panel-body {
  display: grid;
  gap: 18px;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.ops-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 82%, transparent);
  display: grid;
  gap: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
}

.ops-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.ops-card-header h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.ops-card-header p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.admin-stack-bars {
  display: grid;
  gap: 12px;
}

.stack-bar {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.stack-track {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.2);
}

.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.legend-dot.basic {
  background: rgba(92, 200, 255, 0.85);
}

.legend-dot.pro {
  background: rgba(110, 231, 183, 0.85);
}

.legend-dot.premium {
  background: rgba(94, 234, 212, 0.75);
}

.admin-funnel {
  display: grid;
  gap: 10px;
}

.funnel-step {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.funnel-step::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(92, 200, 255, 0.18), rgba(110, 231, 183, 0.15));
  opacity: calc(var(--value) / 100);
  z-index: 0;
}

.funnel-step::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(92, 200, 255, 0.25), rgba(110, 231, 183, 0.18));
  transform-origin: left;
  transform: scaleX(0);
  animation: funnelGrow 1.1s ease forwards;
  z-index: 0;
}

.funnel-step span,
.funnel-step strong {
  position: relative;
  z-index: 1;
}

.funnel-step strong {
  font-size: 14px;
}

.funnel-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.cohort-grid {
  display: grid;
  gap: 20px;
}

.cohort-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.cohort-cells {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.cohort-cells span {
  display: block;
  padding-top: 100%;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.15);
  position: relative;
  overflow: hidden;
}

.cohort-cells span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(92, 200, 255, 0.85), rgba(110, 231, 183, 0.75));
  opacity: calc(var(--heat) / 100);
}

.cohort-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.cohort-scale {
  display: grid;
  grid-template-columns: repeat(5, 12px);
  gap: 4px;
}

.cohort-scale span {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.15);
  position: relative;
  overflow: hidden;
}

.cohort-scale span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(92, 200, 255, 0.85), rgba(110, 231, 183, 0.75));
  opacity: var(--heat);
}

.cohort-scale span:nth-child(1)::after { --heat: 0.2; }
.cohort-scale span:nth-child(2)::after { --heat: 0.4; }
.cohort-scale span:nth-child(3)::after { --heat: 0.6; }
.cohort-scale span:nth-child(4)::after { --heat: 0.8; }
.cohort-scale span:nth-child(5)::after { --heat: 1; }

.admin-dual-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-block {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  display: grid;
  gap: 8px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.metric-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-retention {
  width: 100%;
  height: 80px;
}

.admin-retention path {
  fill: none;
  stroke: rgba(110, 231, 183, 0.9);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: adminSpark 2.2s ease forwards;
}

.metric-sub {
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .admin-bulk {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-bulk .btn {
    justify-self: stretch;
  }
}

.admin-sparkline {
  width: 100%;
  height: 60px;
  margin-bottom: 12px;
}

.admin-sparkline polyline {
  fill: none;
  stroke: rgba(92, 200, 255, 0.9);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: adminSpark 2s ease forwards;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-soft);
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.admin-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.admin-log li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.admin-log li span:last-child {
  color: var(--text-muted);
}

.audit-timeline {
  display: grid;
  gap: 12px;
  /* Prevent the audit log from making the page endlessly long. */
  max-height: min(520px, 60vh);
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

/* Audit timeline scrollbar (kept subtle for the glass UI). */
.audit-timeline::-webkit-scrollbar {
  width: var(--sb-size);
}

.audit-timeline::-webkit-scrollbar-track {
  background: var(--sb-track);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--sb-track-border);
}

.audit-timeline::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--sb-thumb),
    rgba(255, 255, 255, 0.16)
  );
  border-radius: 999px;
  border: 1px solid var(--sb-thumb-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.audit-timeline::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--sb-thumb-hover),
    rgba(255, 255, 255, 0.2)
  );
}

.audit-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.audit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(92, 200, 255, 0.9);
  margin-top: 6px;
  box-shadow: 0 0 10px rgba(92, 200, 255, 0.6);
}

.audit-item h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.audit-item p {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.audit-time {
  font-size: 10px;
  color: var(--text-muted);
}

.admin-list input {
  width: 100%;
  margin-bottom: 12px;
}

.admin-product-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;

  /* Reserve space for the overlay scrollbar and hide the native scrollbar. */
  padding-right: 18px;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.admin-product-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* Shared glass scrollbar for internal admin scroll containers (Selection / Users / Audit panel-body / Review). */
.admin-user-results,
.admin-user-editor .panel-body,
.admin-collapsible.is-scrollable > .panel-body,
.review-body,
.review-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

.admin-user-results::-webkit-scrollbar,
.admin-user-editor .panel-body::-webkit-scrollbar,
.admin-collapsible.is-scrollable > .panel-body::-webkit-scrollbar,
.review-body::-webkit-scrollbar,
.review-panel::-webkit-scrollbar {
  width: var(--sb-size);
}

.admin-user-results::-webkit-scrollbar-track,
.admin-user-editor .panel-body::-webkit-scrollbar-track,
.admin-collapsible.is-scrollable > .panel-body::-webkit-scrollbar-track,
.review-body::-webkit-scrollbar-track,
.review-panel::-webkit-scrollbar-track {
  background: var(--sb-track);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--sb-track-border);
}

.admin-user-results::-webkit-scrollbar-thumb,
.admin-user-editor .panel-body::-webkit-scrollbar-thumb,
.admin-collapsible.is-scrollable > .panel-body::-webkit-scrollbar-thumb,
.review-body::-webkit-scrollbar-thumb,
.review-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--sb-thumb),
    rgba(255, 255, 255, 0.18)
  );
  border-radius: 999px;
  border: 1px solid var(--sb-thumb-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.admin-user-results::-webkit-scrollbar-thumb:hover,
.admin-user-editor .panel-body::-webkit-scrollbar-thumb:hover,
.admin-collapsible.is-scrollable > .panel-body::-webkit-scrollbar-thumb:hover,
.review-body::-webkit-scrollbar-thumb:hover,
.review-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--sb-thumb-hover),
    rgba(255, 255, 255, 0.22)
  );
}


.admin-product-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  cursor: pointer;
  display: grid;
  gap: 6px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.admin-product-item.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 18%, var(--glass-bg) 82%);
}

.admin-product-title {
  font-weight: 600;
}

.admin-product-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.admin-editor .panel-body {
  display: grid;
  gap: 16px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.admin-span {
  grid-column: 1 / -1;
}

.admin-pricing {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 980px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes stackGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes funnelGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes adminSpark {
  to { stroke-dashoffset: 0; }
}

/* --- Added: filters, saved views, review drawer, user tags/notes --- */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-subtle);
  color: var(--text);
}

.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}

.admin-user-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.admin-user-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.admin-user-quick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip--tag {
  cursor: pointer;
}

.note-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.note-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.note-text {
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
}

.note-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-soft);
}

.review-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}

.review-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.review-panel {
  position: relative;
  width: min(560px, 100%);
  height: 100%;
  border-left: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.review-body {
  flex: 1;
  overflow: auto;
  padding: 12px 0;
  display: grid;
  gap: 10px;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.pending-list {
  display: grid;
  gap: 10px;
}

.pending-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.pending-main {
  display: grid;
  gap: 4px;
}

.pending-main span {
  font-size: 12px;
  color: var(--text-soft);
}

.pending-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip--view.active {
  outline: 2px solid rgba(255, 255, 255, 0.22);
}

.chip-menu-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chip-menu {
  position: absolute;
  z-index: 80;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: rgba(18, 18, 24, 0.96);
  backdrop-filter: blur(10px);
  min-width: 160px;
}

.chip-menu button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.chip-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

/* --- Added: admin suite groupbox layout + custom sliders --- */

.admin-suite-panel .panel-body {
  padding: 16px;
}

.admin-suite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  /* Make cards in the same row match height (tallest card wins) */
  align-items: stretch;
}

.admin-suite-grid > .panel {
  min-width: 0;
}

.admin-suite-subpanel {
  margin-top: 16px;
}

/* Ensure the panel stretches with the grid item and the body can fill remaining space */
.admin-suite-grid > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin-suite-grid > .panel > .panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Keep lists growing and actions pinned to the bottom when there's extra height */
.admin-suite-grid .admin-list-stack {
  flex: 1;
  min-height: 0;
}

.admin-suite-grid .admin-actions-row {
  margin-top: auto;
}

/* Slightly reduce nested panel chrome so suites read as one surface */
.admin-suite-grid > .panel {
  box-shadow: none;
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
}

/* Fix long controls overflowing panels */
.admin-card,
.panel-body {
  min-width: 0;
}

.admin-user-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-user-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-user-search input[type="search"] {
  flex: 1;
  min-width: 240px;
}

/* Range slider */
.range-field {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.range-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.range-control--native {
  grid-template-columns: 1fr;
}

.native-range {
  width: 100%;
  accent-color: rgba(92, 200, 255, 0.9);
}

.range-out {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 75%, transparent);
  color: var(--text);
  font-size: 12px;
  min-width: 58px;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 8px 16px rgba(2, 6, 12, 0.3);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

/* Thin glass / SaaS slider */
.admin-range {
  --p: 10%;
  --track-h: 4px;
  --thumb-s: 12px;

  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px; /* hit area */
  background: transparent;
  border: 0;
  outline: none;
  cursor: none;
  touch-action: none;
}

.admin-range::-webkit-slider-runnable-track {
  height: var(--track-h);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(92, 200, 255, 0.95) var(--p), rgba(148, 163, 184, 0.18) var(--p));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.18);
}

.admin-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--thumb-s);
  height: var(--thumb-s);
  border-radius: 999px;
  margin-top: calc((var(--track-h) - var(--thumb-s)) / 2);
  border: 1px solid rgba(92, 200, 255, 0.55);
  background: color-mix(in srgb, var(--glass-bg-strong) 85%, transparent);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(92, 200, 255, 0.10);
  cursor: none;
}

.admin-range::-moz-range-track {
  height: var(--track-h);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.18);
}

.admin-range::-moz-range-progress {
  height: var(--track-h);
  border-radius: 999px;
  background: rgba(92, 200, 255, 0.95);
}

.admin-range::-moz-range-thumb {
  width: var(--thumb-s);
  height: var(--thumb-s);
  border-radius: 999px;
  border: 1px solid rgba(92, 200, 255, 0.55);
  background: color-mix(in srgb, var(--glass-bg-strong) 85%, transparent);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(92, 200, 255, 0.10);
  cursor: none;
}

.admin-range:focus-visible {
  outline: 2px solid rgba(92, 200, 255, 0.35);
  outline-offset: 4px;
}

@media (max-width: 720px) {

  .range-control {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .range-out {
    justify-self: start;
  }
}

/* --- Ops suite spacing + groupbox header text/action alignment --- */

/* Ops rows: top-align controls so toggles/selects/buttons align with the first text line */
.ops-row {
  align-items: start;
}

.ops-row > :last-child {
  align-self: start;
}

.ops-row select,
.ops-row .cyno-select,
.ops-row .btn {
  max-width: 100%;
}

/* Panel / groupbox headers: keep right-side actions (pill/button) aligned to top,
   and allow the text block to wrap instead of pushing controls out of the container. */
.panel-header,
.ops-card-header {
  align-items: flex-start;
}

.panel-header > :first-child,
.ops-card-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.panel-header > :last-child,
.ops-card-header > :last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}


/* ==========================================================================
   Layout containment + spacing fixes (auto-generated)
   Notes:
   - Keep controls inside their parent containers at narrow widths
   - Ensure grouped actions wrap instead of overflowing
   ========================================================================== */

/* Allow the page header actions to wrap instead of leaking out of the header */
.section-header {
  flex-wrap: wrap;
}

.section-header > :first-child {
  min-width: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

/* Prevent the badge from forcing extra height/width in tight rows */
.admin-actions .badge {
  flex: 0 0 auto;
}

/* Filter rows: make selects shrink + wrap cleanly inside narrow sidebars */
.admin-filter-row,
.admin-user-filters,
.admin-user-search {
  min-width: 0;
}

.admin-filter-row > * {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 100%;
}

.admin-filter-row select,
.admin-filter-row .cyno-select {
  width: 100%;
  min-width: 0;
}

/* User search row: allow the search input to shrink below the old min-width */
.admin-user-search input[type="search"] {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 100%;
}

/* User filter toolbar: every control can wrap + shrink */
.admin-user-filters > * {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 100%;
}

.admin-user-filters input[type="search"] {
  flex: 2 1 240px;
  min-width: 0;
}

/* Inline "quick add" rows: make controls fill their grid cells so buttons don't pop out */
.admin-inline-row {
  width: 100%;
  min-width: 0;
}

.admin-inline-row > * {
  min-width: 0;
  max-width: 100%;
}

.admin-inline-row input,
.admin-inline-row select,
.admin-inline-row .cyno-select {
  width: 100%;
}

.admin-inline-row .btn {
  justify-self: stretch;
}

@media (min-width: 720px) {
  .admin-inline-row .btn {
    justify-self: end;
  }
}

/* Bulk bars: allow controls to shrink and never exceed the container */
.admin-bulk-bar {
  min-width: 0;
}

.admin-bulk-bar > * {
  min-width: 0;
  max-width: 100%;
}

.admin-bulk-bar input[type="search"],
.admin-bulk-bar input[type="text"],
.admin-bulk-bar input[type="number"] {
  min-width: 140px;
}

.admin-bulk-bar select,
.admin-bulk-bar .cyno-select {
  min-width: 140px;
  max-width: 100%;
}

/* Meta rows can overflow when labels get long */
.admin-product-meta,
.funnel-meta,
.stack-legend {
  flex-wrap: wrap;
}

/* Tables: avoid layout blowouts on narrow screens */
.admin-table,
.admin-mini-table {
  table-layout: fixed;
  max-width: 100%;
}

.admin-table th,
.admin-table td,
.admin-mini-table th,
.admin-mini-table td {
  word-break: break-word;
}

/* Grids: prevent min column sizes from causing horizontal overflow */
.admin-analytics,
.admin-settings,
.admin-advanced,
.admin-stats,
.admin-suite-grid,
.ops-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.admin-suite-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* Extremely narrow screens: drop to single column sooner and reduce padding pressure */
@media (max-width: 520px) {
  .page-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .admin-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .admin-bulk-bar {
    gap: 8px;
    padding: 10px;
  }

  .admin-bulk-bar .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Correction: keep stats cards denser than the main panels */
.admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}

/* ==========================================================================
   Account management: containment + wrapping fixes
   ========================================================================== */

/* Flex/grid children often overflow unless min-width is explicitly reset. */
.admin-user-tools,
.admin-user-tools-grid,
.admin-user-picker,
.admin-user-editor,
.admin-user-results,
.admin-user-search,
.admin-user-filters {
  min-width: 0;
  max-width: 100%;
}

/* Filters: ensure selects/inputs never exceed the row width. */
.admin-user-filters > * {
  flex: 1 1 190px;
  min-width: 0;
  max-width: 100%;
}

.admin-user-filters select,
.admin-user-filters .cyno-select,
.admin-user-filters input[type="search"] {
  width: 100%;
  min-width: 0;
}

/* Search row: allow the search input to shrink instead of pushing layout wider. */
.admin-user-search > * {
  min-width: 0;
}

.admin-user-search input[type="search"] {
  flex: 1 1 260px;
  min-width: 0; /* override any min-width from earlier rules */
  max-width: 100%;
}

/* The 2-column picker/editor grid must collapse earlier on constrained layouts. */
@media (max-width: 1200px) {
  .admin-user-tools-grid {
    grid-template-columns: 1fr;
  }
}

/* If anything inside results is wider, hide X overflow to avoid the broken scrollbar look. */
.admin-user-results {
  overflow-x: hidden;
}

/* User rows: wrap actions instead of forcing horizontal scroll. */
.admin-user-item {
  flex-wrap: wrap;
  align-items: flex-start;
}

.admin-user-item > * {
  min-width: 0;
}

/* Common structure used by admin.js */
.admin-user-main {
  flex: 1 1 220px;
  min-width: 0;
}

.admin-user-quick {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Buttons inside rows should not blow up the row width */
.admin-user-item .btn {
  max-width: 100%;
}

/* Optional: keep long usernames/tags from widening the row */
.admin-user-item strong,
.admin-user-item span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* === Fix: make suite cards equal height per row (Compliance / Experiments / Automation) === */
.admin-suite-grid {
  align-items: stretch; /* override earlier 'start' so grid items share row height */
}

.admin-suite-grid > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin-suite-grid > .panel > .panel-body {
  flex: 1;
  min-height: 0; /* allows internal scroll areas to size correctly */
  display: flex;
  flex-direction: column;
}

/* The main list area should consume remaining height so footer actions align at bottom. */
.admin-suite-grid .admin-list-stack {
  flex: 1;
  min-height: 0;
}

/* Push actions row to the bottom when there is extra vertical space. */
.admin-suite-grid .admin-actions-row {
  margin-top: auto;
}

/* =====================================================================
   FIX: Admin management suite cards must match height per row
   Targets: Experiments (A/B testing), Compliance (Data requests), Automation (Status automation)
   ===================================================================== */
.admin-management-suite .admin-suite-grid {
  align-items: stretch !important;
}

.admin-management-suite .admin-suite-grid > .panel {
  height: 100% !important;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.admin-management-suite .admin-suite-grid > .panel > .panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-management-suite .admin-suite-grid .admin-list-stack {
  flex: 1;
  min-height: 0;
}

.admin-management-suite .admin-suite-grid .admin-actions-row {
  margin-top: auto;
}

/* --- Fix: Details pricing row overflow / overlapping inputs --- */

/* Ensure pricing cells can shrink inside CSS grid without overflowing the panel */
.admin-pricing {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.admin-pricing .admin-field {
  min-width: 0;
}

/* Force form controls to respect the available width */
.admin-form input,
.admin-form select,
.admin-form .cyno-select,
.admin-form textarea {
  width: 100%;
  max-width: 100%;
}

/* Responsive: keep pricing readable on narrower widths */
@media (max-width: 820px) {
  .admin-pricing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .admin-pricing {
    grid-template-columns: 1fr;
  }
}


/* ===========================
   Collapsible large sections
   =========================== */

.admin-collapsible {
  position: relative;
}

.admin-collapsible__summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.admin-collapsible__summary::-webkit-details-marker {
  display: none;
}

/* Chevron */
.admin-collapsible__summary::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-left: auto;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  transform: rotate(-45deg);
  transition: transform 180ms ease, opacity 180ms ease;
  opacity: 0.85;
}

.admin-collapsible[open] > .admin-collapsible__summary::after {
  transform: rotate(45deg);
  opacity: 0.95;
}

/* Keep header layout consistent when summary wraps the existing panel-header */
.admin-collapsible__summary.panel-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* Scrollable variant (useful for Audit / long lists) */
.admin-collapsible.is-scrollable > .panel-body {
  max-height: min(72vh, 720px);
  overflow: auto;
  scrollbar-gutter: stable;
  padding-right: 10px;
}

/* ===========================
   Collapsible animation helpers
   - Animated open/close for <details> sections (e.g., Audit)
   - Height animation is driven by JS (inline height).
   =========================== */

/* Default: allow content to size naturally. */
.admin-collapsible > .panel-body {
  min-width: 0;
}

/* During animation JS sets an explicit height; keep contents clipped. */
.admin-collapsible.is-animating > .panel-body {
  overflow: hidden;
  transition: height 220ms ease, opacity 220ms ease;
  will-change: height, opacity;
}

.admin-collapsible.is-animating.is-opening > .panel-body {
  opacity: 1;
}

.admin-collapsible.is-animating.is-closing > .panel-body {
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .admin-collapsible.is-animating > .panel-body {
    transition: none;
  }
}

/* If the audit timeline grows too much, keep it contained even without the scrollable variant */
.audit-timeline {
  scrollbar-gutter: stable;
}


/* --- Grouping: subgrid panels inside collapsible suites --- */
.admin-subgroup > .panel-body { padding-top: 14px; }



/* --- Fix: prevent collapsible subgroup headers from overlapping (double-toggle bug) --- */
.admin-collapsible.admin-subgroup { margin-top: 16px; }
.admin-collapsible.admin-subgroup:first-child { margin-top: 0; }

.admin-collapsible__summary { position: relative; z-index: 2; }
.admin-collapsible > .panel-body { position: relative; z-index: 1; }

/* Give each collapsible its own stacking/paint box to avoid click-through */
.admin-collapsible { isolation: isolate; }


/* ===========================
   Fix: side-by-side <details> subgroups (Core / Back office)
   - Avoid forcing <details> to be flex/100% height (can create "open but empty" panels)
   - Prevent grid row stretching that leaves a blank panel-body background
   =========================== */

.admin-advanced {
  align-items: start; /* don't force equal-height for the big subgroup containers */
}

.admin-advanced > details.panel {
  display: block;   /* override earlier .admin-advanced > .panel { display:flex } */
  height: auto;     /* override earlier .admin-advanced > .panel { height:100% } */
}

.admin-advanced > details.panel > .panel-body {
  display: block;   /* override earlier flex column rules */
  flex: initial;
}

/* Keep equal-height behavior INSIDE the subgroup grid */
.admin-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.admin-subgrid > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin-subgrid > .panel > .panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}


/* --- Patch: subgroup alignment + adaptive header height + prevent blank open state --- */

/* In the 2-up subgroup row (Core / Back office), avoid margin-based offsets.
   Spacing is handled by the parent grid gap. */
.admin-collapsible.admin-subgroup {
  margin-top: 0 !important;
}

/* Ensure the subgroup container grid can place Core + Back office side-by-side on wide screens */
.admin-advanced {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  align-items: stretch;
}

/* DO NOT apply equal-height flex rules to <details> containers (can cause "open but blank" rendering in some browsers). */
.admin-advanced > details.panel,
.admin-advanced > details.glass-panel.panel {
  display: block !important;
  height: auto !important;
}

.admin-advanced > details.panel > .panel-body,
.admin-advanced > details.glass-panel.panel > .panel-body {
  display: block !important;
  flex: initial !important;
  min-height: 0 !important;
}

/* Make both subgroup headers visually equal even if copy wraps differently.
   clamp() keeps it responsive without hard-coding a single pixel height. */
.admin-subgroup > summary.panel-header {
  min-height: clamp(84px, 8.5vw, 112px);
  align-items: center;
}

/* Keep the chevron / pill aligned and prevent text from pushing layout sideways */
.admin-subgroup > summary.panel-header > * {
  min-width: 0;
}

/* ===========================
   Fix: Core / Back office blank stretched panel
   =========================== */

/* Do not stretch the subgroup cards to the row height. */
.admin-advanced {
  align-items: start !important;
  grid-auto-rows: min-content;
}

/* Extra safety: ensure each subgroup <details> aligns to content height. */
.admin-advanced > details.admin-subgroup {
  align-self: start;
}

/* =====================================================================
   Patch: Incident row layout (status + select on top, title below)
   - Top line: status pill (left) + select checkbox (right)
   - Second line: incident title + meta (full width)
   ===================================================================== */

.incident-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Status pill stays top-left */
.incident-row > .pill,
.incident-row > span.pill {
  order: 1;
}

/* Select checkbox stays top-right */
.incident-row .bulk-check {
  order: 2;
  margin-left: auto;
  align-self: center;
}

/* Text block goes full-width under the top line */
.incident-row > div {
  order: 3;
  flex: 1 0 100%;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  text-align: left;
}

.incident-row > div strong {
  display: block;
  line-height: 1.2;
  margin: 0;
}

.incident-row > div span {
  display: block;
  margin-top: 2px;
  line-height: 1.2;
}

/* =====================================================================
   Patch: Incident / Alert cards overflow fix + shared row behavior
   - Prevent rows (e.g., "CS2 patch delay", "Planned maintenance") from
     exceeding the panel width.
   - Provides a shared "list-row" behavior via grouped selectors.
   ===================================================================== */

/* Ensure the list itself never exceeds the panel body width */
.incident-list,
.alert-cards {
  width: 100%;
  min-width: 0;
}

/* Shared row behavior (incident-row + alert-card) */
.incident-row,
.alert-card {
  width: 100%;
  min-width: 0; /* critical for flex overflow containment */
}

/* Make the main text container shrinkable so it doesn't push outside */
.incident-row > div,
.alert-card > div {
  flex: 1 1 auto;
  min-width: 0;
}

/* Keep the selection checkbox pinned right, but inside the row */
.incident-row .bulk-check,
.alert-card .bulk-check {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Text: allow wrapping/clamping without widening the row */
.incident-row strong,
.alert-card strong {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.incident-row span,
.alert-card span {
  min-width: 0;
  max-width: 100%;
}

/* Prevent any accidental horizontal scroll from long content */
.incident-row,
.alert-card,
.incident-list,
.alert-cards {
  overflow-x: hidden;
}


/* =====================================================================
   Patch: Incident text alignment
   - Fix awkward wrapping/centering in incident cards (CS2 patch delay,
     Planned maintenance)
   ===================================================================== */

.incident-row {
  align-items: flex-start;
}

/* Keep status pill aligned with the first text line */
.incident-row .pill {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* Ensure the text block is left-aligned and wraps naturally */
.incident-row > div {
  text-align: left;
  display: grid;
  gap: 4px;
}

.incident-row strong {
  text-align: left;
  line-height: 1.15;
}

/* Secondary line should wrap nicely without forcing weird breaks */
.incident-row span {
  line-height: 1.25;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Checkbox label alignment */
.incident-row .bulk-check {
  align-self: center;
}

/* =====================================================================
   Override: do not truncate incident titles when placed on their own line
   ===================================================================== */

.incident-row strong {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
}

.alert-card strong {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
}

/* =====================================================================
   Patch: Tools view name overflow fix
   - Ensure #viewNameInput stays within its panel on narrow widths.
   ===================================================================== */

#viewNameInput {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* The Tools action row contains: scope select, view name input, multiple buttons */
.admin-actions-row select#viewScope,
.admin-actions-row .cyno-select,
.admin-actions-row input#viewNameInput {
  flex: 1 1 200px;
  min-width: 0;
}

.admin-actions-row input#viewNameInput {
  flex: 2 1 260px;
}

/* Prevent any child control from forcing horizontal overflow */
.admin-actions-row > * {
  max-width: 100%;
  min-width: 0;
}


/* --- Fix: details body visibility for collapsibles (admin-settings) --- */
/* Ensure <details> panels don't show an empty body when closed.
   Some flex layout rules can override the UA rule that hides non-summary children. */
.admin-collapsible:not([open]):not(.is-animating) > .panel-body {
  display: none !important;
}

.admin-collapsible.is-animating > .panel-body {
  display: block;
}


/* --- Fix: admin-settings collapsibles should not stretch closed panels --- */
/* When panels in .admin-settings are <details>, the global "equal-height tile" rules
   (height:100% + flex column) make CLOSED panels stretch to the height of the OPEN one,
   which looks like multiple empty panels are opened.
   Override that behavior only for admin-settings collapsibles. */
.admin-settings {
  align-items: start;
  grid-auto-rows: min-content;
}

.admin-settings > details.panel,
.admin-settings > details.glass-panel.panel {
  display: block !important;
  height: auto !important;
}

.admin-settings > details.panel > .panel-body,
.admin-settings > details.glass-panel.panel > .panel-body {
  display: block;
  flex: initial !important;
}


/* --- Management suite spacing tightening --- */
/* Reduce excessive vertical gaps inside Admin management suite */
.admin-management-suite .panel-body {
  padding: 12px;
}

.admin-suite-grid {
  gap: 12px;
}

.admin-suite-grid > .panel {
  border-radius: 14px;
}

.admin-suite-grid > .panel > .panel-header {
  padding-bottom: 8px;
}

.admin-suite-grid > .panel > .panel-body {
  gap: 10px;
  padding: 10px;
}

/* Tighten internal cards (lists, forms) */
.admin-management-suite .admin-card {
  gap: 8px;
}

.admin-management-suite .admin-actions-row {
  gap: 8px;
  margin-top: 8px;
}

/* Reduce bottom padding caused by auto-push */
.admin-suite-grid .admin-actions-row {
  margin-top: 12px;
}


/* --- Management suite: remove forced vertical stretching (reduce empty space) --- */
/* The suite grid uses flex internals to equalize heights (list grows, actions pinned bottom).
   In Management suite this creates large empty areas (e.g., Subscriptions card).
   Override to let content pack naturally from the top. */
.admin-management-suite .admin-suite-grid > .panel > .panel-body {
  display: grid !important;
  align-content: start;
  gap: 12px;
}

.admin-management-suite .admin-suite-grid .admin-list-stack {
  flex: initial !important;
  min-height: 0 !important;
}

.admin-management-suite .admin-suite-grid .admin-actions-row {
  margin-top: 0 !important;
}


/* --- Added: standalone User tools section (Account management) --- */
.admin-user-tools-suite {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.admin-user-tools-suite > details.panel,
.admin-user-tools-suite > details.glass-panel.panel {
  display: block;
  height: auto;
}

.admin-user-tools-suite > details.panel > .panel-body,
.admin-user-tools-suite > details.glass-panel.panel > .panel-body {
  height: auto;
}



/* ===== Account management action rows ===== */
.admin-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.admin-action-row .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-action-row button {
    height: 42px;
    padding: 0 18px;
    white-space: nowrap;
    justify-self: end;
}

/* --- Switch (Selection moderation) --- */
/*
  Replace the legacy .toggle component with a dedicated .switch to avoid
  pseudo-element conflicts (components.css vs admin.css) that could cause
  the thumb to stop translating when :checked.
*/
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 75%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 10px 24px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.switch-track::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.switch input:checked + .switch-track {
  border-color: rgba(92, 200, 255, 0.55);
  background: linear-gradient(135deg, rgba(92, 200, 255, 0.18), rgba(110, 231, 183, 0.14));
  box-shadow: inset 0 0 0 1px rgba(92, 200, 255, 0.08), 0 14px 28px rgba(92, 200, 255, 0.12);
}

.switch input:checked + .switch-track::before {
  transform: translate(20px, -50%);
  background: #e0f2fe;
  border-color: rgba(92, 200, 255, 0.55);
}

.switch:focus-within .switch-track {
  outline: 2px solid rgba(92, 200, 255, 0.35);
  outline-offset: 3px;
}

.switch-label {
  padding-left: 0;
}


/* ==========================================================================
   Custom overlay scrollbar (Admin only)
   - Used to guarantee pixel-perfect 1-2px scrollbars even in Firefox
   - Native scrollbar is hidden only for selected containers (via JS .has-custom-sb)
   ========================================================================== */

.has-custom-sb {
  scrollbar-width: none !important; /* Firefox: hide native */
}

.has-custom-sb::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

.sb-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.sb-track {
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 4px;
  width: 2px; /* target thickness */
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(15, 23, 42, 0.1)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 10px 18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: auto;
}

.sb-thumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(92, 200, 255, 0.34),
    rgba(110, 231, 183, 0.28)
  );
  box-shadow:
    0 0 10px rgba(92, 200, 255, 0.18),
    0 0 18px rgba(110, 231, 183, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px) saturate(160%);
  cursor: grab;
}

.sb-wrap.is-dragging .sb-thumb {
  cursor: grabbing;
}

.sb-wrap:hover .sb-track,
.sb-wrap:focus-within .sb-track,
.sb-wrap.is-dragging .sb-track {
  opacity: 1;
}

/* Slightly reduce right offset in very tight panels */
@media (max-width: 520px) {
  .sb-track {
    right: 3px;
  }
}




.admin-user-editor .panel-body::-webkit-scrollbar {
  width: var(--sb-size);
}

.admin-user-editor .panel-body::-webkit-scrollbar-track {
  background: linear-gradient(
    180deg,
    var(--sb-track),
    rgba(15, 23, 42, 0.08)
  );
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px var(--sb-track-border),
    inset 0 10px 18px rgba(0, 0, 0, 0.18);
}

.admin-user-editor .panel-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--sb-thumb),
    rgba(255, 255, 255, 0.18)
  );
  box-shadow:
    0 0 10px rgba(92, 200, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.admin-user-editor .panel-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--sb-thumb-hover),
    rgba(255, 255, 255, 0.22)
  );
}


/* --- FIX: Metric tool collapse click reliability --- */
details.metric-tool > summary.metric-tool-summary{
  position: relative;
  z-index: 2;
}

details.metric-tool > .panel-body{
  position: relative;
  z-index: 1;
}

/* Ensure the whole summary area stays clickable */
details.metric-tool > summary.metric-tool-summary *{
  pointer-events: auto;
}

/* ==========================================================================
   Heatmap styling (Risk pulse)
   ========================================================================== */

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 12px 0;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(92, 200, 255, 0.08);
  transition: background 150ms ease;
}

.heat-cell[data-level="1"] {
  background: rgba(92, 200, 255, 0.15);
}

.heat-cell[data-level="2"] {
  background: rgba(92, 200, 255, 0.3);
}

.heat-cell[data-level="3"] {
  background: rgba(92, 200, 255, 0.5);
}

.heat-cell[data-level="4"] {
  background: rgba(92, 200, 255, 0.75);
}

.heat-cell[data-level="5"] {
  background: rgba(92, 200, 255, 1);
}

/* ==========================================================================
   Admin Panel Phase 6: Luxury Glass Design System
   Matches the Cyno.gg glass UI: pill shapes, cyan accents, backdrop blur,
   color-mix borders, liquid glass effects, spring transitions
   ========================================================================== */

/* --- Tab Navigation --- */
/* ── Sidebar layout: nav rail + content column ─────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.admin-tab-content { min-width: 0; }

/* Vertical sidebar nav (same .admin-tab buttons the JS already wires up). */
.admin-tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 12px;
  border-radius: var(--radius-lg, 20px);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 70%, transparent));
  backdrop-filter: blur(var(--blur-lg, 28px)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-lg, 28px)) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 50px rgba(2, 6, 12, 0.45);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Group label between sections */
.admin-nav-group {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 70%, var(--text-muted));
  padding: 14px 12px 6px;
  margin: 0;
}
.admin-nav-group:first-child { padding-top: 4px; }

.admin-tab {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.22s ease, background-color 0.22s ease,
              border-color 0.22s ease, padding-left 0.22s ease;
}
/* left accent rail */
.admin-tab::before {
  content: "";
  position: absolute;
  left: 4px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: height 0.22s ease;
}

.admin-tab:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  padding-left: 18px;
}
.admin-tab:hover::before { height: 50%; }

.admin-tab.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--glass-border));
  box-shadow: 0 4px 16px rgba(2, 6, 12, 0.3), 0 0 24px color-mix(in srgb, var(--accent) 12%, transparent);
}
.admin-tab.is-active::before { height: 62%; }

.admin-tab:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

/* Collapse to a top horizontal scroller on narrow screens. */
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-tabs {
    flex-direction: row;
    position: static;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 999px;
    padding: 8px;
    gap: 6px;
  }
  .admin-nav-group { display: none; }
  .admin-tab { width: auto; padding: 9px 16px; border-radius: 999px; }
  .admin-tab::before { display: none; }
}

/* --- Tab Panels --- */
.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  /* Flex column with a gap so every section/panel inside a tab (Users, Runs,
     etc.) is evenly spaced instead of stacking flush with no breathing room. */
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: tabFadeIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* Neutralise any stray bottom margins on direct children so the gap is the
   single source of vertical spacing. */
.admin-tab-panel.is-active > * { margin-top: 0; margin-bottom: 0; }

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Backup Management
   ========================================================================== */

.backup-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.backup-stat {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 8px 16px rgba(2, 6, 12, 0.3);
  backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(140%);
}

.backup-warning {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  font-size: 13px;
  margin-bottom: 16px;
}

.admin-backups-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-backups-list {
  display: grid;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 18px;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.admin-backups-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.admin-backup-log {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 18px;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.admin-backup-log::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ops-row .btn-secondary,
.ops-row .btn-ghost {
  font-size: 11px;
  padding: 3px 8px;
}

.text-warning {
  color: #fbbf24;
}

.text-danger {
  color: #fca5a5;
}

@media (max-width: 640px) {
  .backup-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-row-actions {
    flex-direction: column;
  }
}

/* --- Editor Toolbar --- */
.admin-editor-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-editor-toolbar .thread-search {
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}

/* --- Product Grid --- */
.admin-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.admin-product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 80%, transparent), color-mix(in srgb, var(--glass-bg) 65%, transparent));
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.admin-product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--pointer-x, 50%) var(--pointer-y, 20%), rgba(123, 220, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}

.admin-product-card:hover::before {
  opacity: 0.55;
}

.admin-product-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  box-shadow: 0 24px 60px rgba(3, 8, 18, 0.5), 0 0 40px rgba(118, 224, 255, 0.2), inset 0 0 0 1px var(--border-inner);
}

.admin-product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.admin-product-card-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-product-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-product-card-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.admin-product-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.admin-product-card-actions .btn {
  flex: 1;
}

/* --- Loader Config --- */
.admin-loader-editor {
  display: grid;
  gap: 20px;
}

.admin-loader-selector {
  display: flex;
  gap: 12px;
}

.admin-loader-selector select {
  flex: 1;
  max-width: 400px;
}

.admin-loader-form {
  display: grid;
  gap: 20px;
}

.admin-loader-section {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 72%, transparent), color-mix(in srgb, var(--glass-bg) 58%, transparent));
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow: var(--glass-shadow), inset 0 0 0 1px var(--border-inner);
}

.admin-loader-section h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text);
}

.admin-module-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-module-table th,
.admin-module-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
}

.admin-module-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.admin-module-table tr:last-child td {
  border-bottom: none;
}

.admin-module-table .switch {
  padding: 4px;
}

/* --- Users Table --- */
.admin-user-table {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.admin-user-row:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
}

.admin-user-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-row-main strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-row-main span {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- HWID Table --- */
.admin-hwid-table {
  display: grid;
  gap: 10px;
}

.admin-hwid-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  font-size: 13px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-hwid-row:hover {
  transform: translateY(-2px);
}

.admin-hwid-row-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  color: var(--text-muted);
}

.admin-hwid-row-main span {
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
}

/* --- Incidents List --- */
.admin-incident-list {
  display: grid;
  gap: 10px;
}

.admin-incident-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-incident-row:hover {
  transform: translateY(-2px);
}

.admin-incident-row.is-critical {
  border-color: color-mix(in srgb, var(--status-danger) 45%, var(--glass-border));
  background: color-mix(in srgb, rgba(240, 156, 176, 0.15) 30%, var(--glass-bg));
}

.admin-incident-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-incident-main strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.admin-incident-main span {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-incident-actions {
  display: flex;
  gap: 8px;
}

.admin-grant-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-grant-row:hover {
  transform: translateY(-2px);
}

.admin-grant-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-grant-main strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.admin-grant-main span {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-grant-actions {
  display: flex;
  gap: 8px;
}

/* --- Settings --- */
.admin-settings-editor {
  display: grid;
  gap: 28px;
}

.admin-settings-section h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  color: var(--text);
}

.admin-settings-form {
  display: grid;
  gap: 16px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .admin-form-row {
    grid-template-columns: 1fr;
  }
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* --- Feature Flags --- */
.admin-feature-flags {
  display: grid;
  gap: 10px;
}

.admin-flag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-flag-row:hover {
  transform: translateY(-2px);
}

.admin-flag-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.admin-flag-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- API Keys --- */
.admin-api-keys {
  display: grid;
  gap: 10px;
}

.admin-key-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-key-row:hover {
  transform: translateY(-2px);
}

.admin-key-info {
  display: grid;
  gap: 4px;
}

.admin-key-name {
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text);
}

.admin-key-value {
  color: var(--text-muted);
}

/* --- Modal --- */
.admin-modal-overlay[hidden] {
  display: none !important;
}

.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg-0) 70%, transparent);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  animation: modalOverlayIn 0.2s ease;
}


.admin-modal {
  width: min(640px, 90vw);
  max-height: 85vh;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 76%, transparent));
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  box-shadow: var(--shadow-3), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  position: relative;
}

.admin-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 30% 20%, rgba(123, 220, 255, 0.08), transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}


.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  position: relative;
  z-index: 1;
}

.admin-modal-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.admin-modal-close:hover {
  background: color-mix(in srgb, var(--glass-bg-strong) 55%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border));
  transform: translateY(-2px);
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 24px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  position: relative;
  z-index: 1;
}

/* --- Form Select/Inputs in Modals --- */
.admin-modal-body .field {
  display: grid;
  gap: 8px;
}

.admin-modal-body .field label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.admin-modal-body .field input,
.admin-modal-body .field select,
.admin-modal-body .field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 86%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.38);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.admin-modal-body .field input:focus,
.admin-modal-body .field select:focus,
.admin-modal-body .field textarea:focus {
  outline: none;
}

.admin-modal-body .field input:focus-visible,
.admin-modal-body .field select:focus-visible,
.admin-modal-body .field textarea:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25);
}

.admin-modal-body .field textarea {
  min-height: 90px;
  resize: vertical;
  border-radius: var(--radius-md);
}

/* --- Upload Zone --- */
.admin-upload-zone {
  border: 2px dashed color-mix(in srgb, var(--glass-border) 65%, transparent);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: border-color 0.25s ease,
              background-color 0.25s ease,
              color 0.25s ease,
              box-shadow 0.25s ease;
  cursor: pointer;
}

.admin-upload-zone:hover,
.admin-upload-zone.is-dragover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  background: color-mix(in srgb, rgba(123, 220, 255, 0.08) 40%, var(--glass-bg));
  color: var(--text);
  box-shadow: 0 0 24px rgba(123, 220, 255, 0.15);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .admin-tabs {
    padding: 6px;
  }

  .admin-tab {
    padding: 8px 16px;
    font-size: 12px;
  }

  .admin-product-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-row,
  .admin-hwid-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-modal {
    width: 100%;
    max-height: 90vh;
    margin: 16px;
  }

  .admin-modal-body {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .admin-tab {
    flex-shrink: 0;
  }

  .admin-editor-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-editor-toolbar .thread-search {
    max-width: none;
  }
}

/* ─── Status Badges for Bundles & Gifts ───────────────────────────────────── */

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: capitalize;
}

.status-active {
  background: rgba(110, 227, 178, 0.15);
  color: var(--status-success);
  border: 1px solid rgba(110, 227, 178, 0.3);
}

.status-draft {
  background: rgba(159, 177, 204, 0.15);
  color: #9fb1cc;
  border: 1px solid rgba(159, 177, 204, 0.3);
}

.status-archived {
  background: rgba(240, 156, 176, 0.1);
  color: var(--status-danger);
  border: 1px solid rgba(240, 156, 176, 0.2);
}

.status-pending {
  background: rgba(242, 201, 143, 0.15);
  color: var(--status-warning);
  border: 1px solid rgba(242, 201, 143, 0.3);
}

.status-sent {
  background: rgba(123, 220, 255, 0.15);
  color: #7bdcff;
  border: 1px solid rgba(123, 220, 255, 0.3);
}

.status-redeemed {
  background: rgba(110, 227, 178, 0.15);
  color: var(--status-success);
  border: 1px solid rgba(110, 227, 178, 0.3);
}

.status-expired {
  background: rgba(240, 156, 176, 0.1);
  color: var(--status-danger);
  border: 1px solid rgba(240, 156, 176, 0.2);
}

.status-cancelled {
  background: rgba(240, 156, 176, 0.1);
  color: var(--status-danger);
  border: 1px solid rgba(240, 156, 176, 0.2);
}

/* --- Pending Approvals --- */
.approval-row { align-items: flex-start; }
.approval-row.is-blocked {
  border-color: color-mix(in srgb, var(--status-warning) 28%, var(--border-subtle));
  background: color-mix(in srgb, var(--status-warning) 5%, transparent);
}
.approval-name { font-weight: 600; color: var(--text); }
.approval-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.approval-pill {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em;
  padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 5px;
}
.approval-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.approval-pill.is-verified {
  color: color-mix(in srgb, var(--status-success) 88%, #e8f6f1 12%);
  background: color-mix(in srgb, var(--status-success) 14%, transparent);
}
.approval-pill.is-unverified {
  color: color-mix(in srgb, var(--status-warning) 90%, #f7efe2 10%);
  background: color-mix(in srgb, var(--status-warning) 14%, transparent);
}
/* Approval panel — editable product grant chips */
.approval-products { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.approval-products-label { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted, #a8b9d4); margin-right: 2px; }
.approval-products-none { font-size: 11px; color: var(--text-muted, #a8b9d4); opacity: 0.7; }
.approval-prod-chip {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: var(--text-soft, #c4d2ea);
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer; user-select: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.approval-prod-chip input { position: absolute; opacity: 0; pointer-events: none; }
.approval-prod-chip::before {
  content: ""; width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.28);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.approval-prod-chip:has(input:checked) {
  color: var(--text, #eef3ff);
  background: color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 42%, transparent);
}
.approval-prod-chip:has(input:checked)::before {
  background: linear-gradient(135deg, var(--accent, #7bdcff), var(--accent-2, #9b8cff));
  border-color: transparent;
}

/* ============================================================
   Run History — luxury treatment matching cyno.gg's glass aesthetic.
   Goals: refined typography, glass surfaces, gradient accents on accents
   (kind/result/product), no awkward text-wrapping inside pills, calm
   hover lift with an inset accent glow.
   ============================================================ */

/* Header & summary pill */
.admin-runs-summary { display: flex; gap: 8px; align-items: center; }
.admin-runs-summary .pill {
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent, #7bdcff) 22%, transparent),
    color-mix(in srgb, var(--accent-2, #9b8cff) 18%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 38%, transparent);
  color: var(--text, #eef3ff);
  letter-spacing: 0.04em;
}

/* Filter rail — glass card with hairline accent border */
.admin-runs-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 16px;
  margin-bottom: 22px;
  padding: 18px 18px 16px;
  position: relative;
  border-radius: 18px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--accent, #7bdcff) 4%, rgba(8,11,20,0.55)),
      rgba(8,11,20,0.55));
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 14%, rgba(255,255,255,0.06));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 36px -18px rgba(0,0,0,0.6);
}
.admin-runs-filters::before {
  /* Subtle gradient hairline at the top edge */
  content: "";
  position: absolute; left: 18px; right: 18px; top: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--accent, #7bdcff) 60%, transparent),
    color-mix(in srgb, var(--accent-2, #9b8cff) 50%, transparent),
    transparent);
  opacity: 0.6;
  pointer-events: none;
}
.admin-runs-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.admin-runs-field .metric-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text, #eef3ff) 60%, transparent);
}
.admin-runs-field input,
.admin-runs-field select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  color: var(--text, #eef3ff);
  font: 500 13px/1.2 "Manrope", system-ui, sans-serif;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.admin-runs-field input::placeholder { color: color-mix(in srgb, var(--text, #eef3ff) 35%, transparent); }
.admin-runs-field input:hover,
.admin-runs-field select:hover {
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 35%, rgba(255,255,255,0.08));
}
.admin-runs-field input:focus,
.admin-runs-field select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 65%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #7bdcff) 20%, transparent);
  background: linear-gradient(180deg, rgba(123,220,255,0.05), rgba(255,255,255,0.02));
}
.admin-runs-actions { display: flex; gap: 8px; align-items: flex-end; }
.admin-runs-actions .btn { padding: 9px 14px; }

/* Per-user activity summary banner */
.run-user-summary {
  position: relative;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    radial-gradient(900px 200px at 0% 0%,
      color-mix(in srgb, var(--accent, #7bdcff) 16%, transparent) 0%,
      transparent 60%),
    linear-gradient(180deg, rgba(15,18,28,0.78), rgba(8,11,20,0.78));
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 22%, rgba(255,255,255,0.06));
  box-shadow: 0 24px 48px -28px rgba(123,220,255,0.35);
  overflow: hidden;
}
.run-user-summary__head { margin-bottom: 14px; }
.run-user-summary__head h3 {
  margin: 4px 0 0;
  font: 600 20px/1.2 "Sora", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: var(--text, #eef3ff);
}
.run-user-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 22px;
}
.run-user-summary__num {
  font: 600 18px/1.15 "Sora", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--text, #eef3ff);
  letter-spacing: -0.01em;
  margin-top: 4px;
}

/* Runs table — glass surface, hairline rows, refined header */
.admin-runs-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15,18,28,0.65), rgba(8,11,20,0.65));
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 10%, rgba(255,255,255,0.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 14px 40px -22px rgba(0,0,0,0.55);
}
.admin-runs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font: 500 13px/1.45 "Manrope", system-ui, sans-serif;
  min-width: 1120px;
}
.admin-runs-table thead th {
  text-align: left;
  font: 600 10.5px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border-bottom: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 12%, rgba(255,255,255,0.06));
  position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
}
.admin-runs-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.045);
  vertical-align: middle;
  /* Prevent awkward text-wrap on identifier-like cells */
  white-space: nowrap;
}
/* Allow user name + email to wrap to two lines (it's the only multi-line cell) */
.admin-runs-table tbody td:nth-child(2) { white-space: normal; min-width: 180px; }
.admin-runs-table tbody tr {
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.admin-runs-table tbody tr:hover {
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--accent, #7bdcff) 8%, transparent),
      transparent 70%);
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent, #7bdcff) 75%, transparent);
}
.admin-runs-table tbody tr:last-child td { border-bottom: none; }
.admin-runs-table .mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--text, #eef3ff) 82%, transparent);
}
.admin-runs-empty {
  text-align: center !important;
  padding: 44px 12px !important;
  color: color-mix(in srgb, var(--text, #eef3ff) 50%, transparent);
  font-style: italic;
}
.run-user strong {
  color: var(--text, #eef3ff);
  font: 600 13px/1.3 "Manrope", system-ui, sans-serif;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.run-user .metric-label {
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: color-mix(in srgb, var(--text, #eef3ff) 45%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* PRODUCT pill — glossy accent chip, no wrapping */
.run-product {
  display: inline-block;
  white-space: nowrap;
  padding: 4px 11px;
  border-radius: 999px;
  font: 600 11.5px/1.2 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent, #7bdcff) 96%, white);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent, #7bdcff) 22%, transparent),
    color-mix(in srgb, var(--accent-2, #9b8cff) 18%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

/* KIND chip — matches site's eyebrow rhythm, no wrap */
.run-kind {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 8px;
  font: 700 10.5px/1.2 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.run-kind--internal {
  color: #ffd8b4;
  background: linear-gradient(135deg,
    color-mix(in srgb, #ff9b6b 28%, transparent),
    color-mix(in srgb, #ff9b6b 10%, transparent));
  border-color: color-mix(in srgb, #ff9b6b 45%, transparent);
}
.run-kind--external {
  color: #d9d0ff;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-2, #9b8cff) 28%, transparent),
    color-mix(in srgb, var(--accent-2, #9b8cff) 10%, transparent));
  border-color: color-mix(in srgb, var(--accent-2, #9b8cff) 50%, transparent);
}

/* RESULT chip — calmer tones, dot indicator */
.run-result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 3px 10px 3px 8px;
  border-radius: 8px;
  font: 700 10.5px/1.2 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.run-result::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  opacity: 0.95;
}
.run-result--ok {
  color: #6ee7b7;
  background: color-mix(in srgb, #6ee7b7 14%, transparent);
  border-color: color-mix(in srgb, #6ee7b7 35%, transparent);
}
.run-result--err {
  color: #fca5a5;
  background: color-mix(in srgb, #f87171 14%, transparent);
  border-color: color-mix(in srgb, #f87171 35%, transparent);
}
.run-result--banned {
  color: #fda4af;
  background: color-mix(in srgb, #f43f5e 18%, transparent);
  border-color: color-mix(in srgb, #f43f5e 45%, transparent);
}
.run-result--pending {
  color: color-mix(in srgb, var(--text, #eef3ff) 72%, transparent);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
}
.run-result--pending::before { animation: runDotPulse 1.6s ease-in-out infinite; }
@keyframes runDotPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .run-result--pending::before { animation: none; }
}

/* Surface count chip */
.run-surface-count {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent),
    rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  font: 600 11.5px/1.2 "Sora", "Manrope", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--text, #eef3ff);
  letter-spacing: 0.02em;
}

/* Action column "Details" button */
.admin-runs-table .btn-sm {
  padding: 6px 12px;
  font: 600 11.5px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 9px;
  white-space: nowrap;
}

/* Pager */
.admin-runs-pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 18px;
  padding-top: 4px;
}
.admin-runs-pager .metric-label {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* ── Drill-in modal — glass card with gradient halo ── */
.admin-run-modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
}
.admin-run-modal[hidden] { display: none; }
.admin-run-modal__backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 50% 35%,
      color-mix(in srgb, var(--accent, #7bdcff) 8%, transparent) 0%,
      transparent 60%),
    rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(8px);
}
.admin-run-modal__card {
  position: relative;
  width: min(980px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
  padding: 0;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 24%, rgba(255,255,255,0.06));
  background:
    radial-gradient(800px 400px at 0% 0%,
      color-mix(in srgb, var(--accent, #7bdcff) 10%, transparent) 0%,
      transparent 60%),
    linear-gradient(180deg, rgba(14,17,26,0.94), rgba(8,11,20,0.94));
  box-shadow:
    0 50px 120px -40px rgba(0,0,0,0.85),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.admin-run-modal__card .panel-header { padding: 22px 24px 16px; align-items: flex-start; }
.admin-run-modal__card .panel-header h3 {
  margin: 4px 0 0;
  font: 600 22px/1.2 "Sora", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--accent, #7bdcff), var(--accent-2, #9b8cff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.admin-run-modal__card .panel-body { padding: 18px 24px 24px; }

.run-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 22px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  margin-bottom: 22px;
}
.run-meta-grid > div { min-width: 0; }
.run-meta-grid .metric-label {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
  margin-bottom: 4px;
}
.run-meta-grid .mono { word-break: break-all; font-size: 12.5px; }
.run-ua { font-size: 11px; }

.run-section-title {
  font: 600 11px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text, #eef3ff) 58%, transparent);
  margin: 26px 0 12px;
  display: flex; align-items: center; gap: 12px;
}
.run-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent, #7bdcff) 35%, transparent),
    transparent);
}

.run-surface-group { margin-bottom: 18px; }
.run-surface-group h4 {
  font: 700 10.5px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent, #7bdcff) 70%, var(--text-muted, #a8b9d4));
  margin: 0 0 10px;
}
.run-surface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.run-surface-cell {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 13px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.012));
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.run-surface-cell.is-on {
  border-color: color-mix(in srgb, #6ee7b7 45%, transparent);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, #6ee7b7 10%, transparent),
      color-mix(in srgb, #6ee7b7 3%, transparent));
}
.run-surface-cell.is-off { opacity: 0.48; }
.run-surface-cell:hover { transform: translateY(-1px); }
.run-surface-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: 5px;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
}
.run-surface-cell.is-on .run-surface-dot {
  background: #6ee7b7;
  box-shadow:
    0 0 0 3px color-mix(in srgb, #6ee7b7 22%, transparent),
    0 0 12px color-mix(in srgb, #6ee7b7 55%, transparent);
}
.run-surface-name {
  color: var(--text, #eef3ff);
  font: 600 13px/1.25 "Manrope", system-ui, sans-serif;
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}
.run-surface-cell .metric-label {
  font-size: 11px;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text, #eef3ff) 50%, transparent);
}

/* Events table inside modal */
.admin-runs-events {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.admin-runs-events th, .admin-runs-events td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.admin-runs-events thead th {
  font: 600 10.5px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
}
.admin-runs-events tbody tr:last-child td { border-bottom: none; }

@media (max-width: 720px) {
  .admin-runs-filters { grid-template-columns: 1fr 1fr; padding: 14px; }
  .admin-runs-actions { grid-column: span 2; }
  .admin-run-modal { padding: 12px; }
  .admin-run-modal__card { max-height: 92vh; border-radius: 18px; }
  .admin-runs-table { min-width: 720px; font-size: 12px; }
}
/* ============================================================
   Run History sub-tabs (Runs / Errors / Security) + chips
   ============================================================ */
.admin-runs-subtabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 6px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15,18,28,0.55), rgba(8,11,20,0.55));
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 10%, rgba(255,255,255,0.05));
  width: max-content; max-width: 100%;
}
.admin-runs-subtab {
  appearance: none; cursor: pointer;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: color-mix(in srgb, var(--text, #eef3ff) 70%, transparent);
  font: 600 12px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.admin-runs-subtab:hover {
  color: var(--text, #eef3ff);
  background: rgba(255,255,255,0.04);
}
.admin-runs-subtab.is-active {
  color: color-mix(in srgb, var(--accent, #7bdcff) 96%, white);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent, #7bdcff) 22%, transparent),
    color-mix(in srgb, var(--accent-2, #9b8cff) 18%, transparent));
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 38%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-runs-subpanel] { display: none; }
[data-runs-subpanel].is-active { display: block; }

/* Stage chip (errors) */
.err-stage {
  display: inline-flex; align-items: center;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 8px;
  font: 700 10.5px/1.2 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.err-stage--startup  { color: #fda4af; background: color-mix(in srgb, #f43f5e 16%, transparent); border-color: color-mix(in srgb, #f43f5e 40%, transparent); }
.err-stage--runtime  { color: #fcd34d; background: color-mix(in srgb, #f59e0b 16%, transparent); border-color: color-mix(in srgb, #f59e0b 38%, transparent); }
.err-stage--shutdown { color: #a5b4fc; background: color-mix(in srgb, #818cf8 16%, transparent); border-color: color-mix(in srgb, #818cf8 38%, transparent); }
.err-stage--unknown  { color: color-mix(in srgb, var(--text,#eef3ff) 65%, transparent); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.10); }

.err-msg {
  min-width: 260px;
  max-width: 460px;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: color-mix(in srgb, var(--text, #eef3ff) 80%, transparent);
  font: 500 12.5px/1.45 "Manrope", system-ui, sans-serif;
}
.err-runid {
  color: color-mix(in srgb, var(--text, #eef3ff) 55%, transparent);
}

/* Security: severity / action / kind chips */
.sec-sev {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  padding: 3px 10px 3px 8px;
  border-radius: 8px;
  font: 700 10.5px/1.2 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.sec-sev::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.sec-sev--critical {
  color: #fda4af;
  background: color-mix(in srgb, #f43f5e 18%, transparent);
  border-color: color-mix(in srgb, #f43f5e 48%, transparent);
}
.sec-sev--warn {
  color: #fcd34d;
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  border-color: color-mix(in srgb, #f59e0b 40%, transparent);
}
.sec-action {
  display: inline-block;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  font: 700 10.5px/1.2 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sec-action--banned {
  color: #fecaca;
  background: linear-gradient(135deg,
    color-mix(in srgb, #f43f5e 26%, transparent),
    color-mix(in srgb, #f43f5e 12%, transparent));
  border: 1px solid color-mix(in srgb, #f43f5e 50%, transparent);
}
.sec-action--logged {
  color: color-mix(in srgb, var(--text, #eef3ff) 70%, transparent);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}
.sec-kind {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text, #eef3ff);
  font: 600 11.5px/1.2 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Security drill-in modal — evidence lists */
.sec-detail {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid color-mix(in srgb, #f43f5e 22%, rgba(255,255,255,0.06));
  font: 500 13px/1.5 "Manrope", system-ui, sans-serif;
  color: color-mix(in srgb, var(--text, #eef3ff) 92%, transparent);
  margin-bottom: 4px;
}
.sec-evidence-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid; gap: 6px;
}
.sec-evidence-list li {
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: color-mix(in srgb, var(--text, #eef3ff) 85%, transparent);
  word-break: break-all;
}

@media (max-width: 720px) {
  .admin-runs-subtabs { width: 100%; justify-content: space-between; }
  .admin-runs-subtab { flex: 1; text-align: center; padding: 8px 10px; }
  .err-msg { max-width: none; }
}

/* Ensure wide admin data-tables (Bundles, Gifts) scroll horizontally instead of
   overflowing the panel on mid-width screens. */
.admin-tab-panel .data-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* ── Binding Overview — luxury HWID stat cards ─────────────────────────── */
.hwid-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.hwid-stat-card {
  position: relative;
  padding: 20px 18px;
  border-radius: var(--radius-md, 14px);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background:
    radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong) 80%, transparent), color-mix(in srgb, var(--glass-bg) 55%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(2, 6, 12, 0.35);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
/* accent rail on the left edge */
.hwid-stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 14%; bottom: 14%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
  opacity: 0.85;
}
.hwid-stat-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(2, 6, 12, 0.5),
    0 0 30px color-mix(in srgb, var(--accent) 14%, transparent);
}
.hwid-stat-value {
  font-family: var(--font-display, "Sora"), sans-serif;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hwid-stat-label {
  margin-top: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
/* Subtle emphasis for the risk metrics (shared HWIDs, active bans). */
.hwid-stat-card:nth-child(4) .hwid-stat-value,
.hwid-stat-card:nth-child(6) .hwid-stat-value {
  background: linear-gradient(135deg, var(--text) 30%, #f3b6c2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hwid-stat-card:nth-child(4)::before,
.hwid-stat-card:nth-child(6)::before {
  background: linear-gradient(180deg, #f09cb0, #f2c98f);
  box-shadow: 0 0 10px rgba(240, 156, 176, 0.5);
}

/* HWID Lookup / HWID Change History search bars — the input and Search/Lookup
   button had no gap and touched. Give them a proper flex row with spacing. */
.hwid-search-bar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}
.hwid-search-bar .thread-search { flex: 1 1 auto; min-width: 0; margin: 0; }
.hwid-search-bar .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 560px) {
  .hwid-search-bar { flex-direction: column; }
}

/* In the product catalog list the row is a fixed-height pill, but it carries 3
   status tags (status · risk · tier). The old wrap+fixed-height combo let the
   tags overflow and overlap each other. Keep them in a single compact column,
   centered, and let the row grow to fit so nothing stacks on top. */
.admin-product-list .admin-row { min-height: 64px; align-items: center; }
.admin-product-list .admin-row-tags {
  flex: 0 0 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 4px;
}
.admin-product-list .admin-row-tags .pill,
.admin-product-list .admin-row-tags .status-pill {
  font-size: 10px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* ============================================================
   Admin upgrade — row + table readability polish (CSS-only)
   ============================================================ */

/* Selectable rows: gentle hover lift + accent left-rail on the active one. */
.admin-row {
  position: relative;
  /* Keep the accent rail clipped to the rounded corners, but never crop the
     content — the row must grow to fit the title + 2-line meta (was clipping
     the product name off the top). */
  overflow: visible;
  align-items: center;
  min-height: 56px;
}
.admin-row.is-active::before { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.admin-row:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.45),
    0 0 22px color-mix(in srgb, var(--accent) 10%, transparent);
}
.admin-row.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Mini tables: sticky header + zebra + row hover for scannability. */
.admin-mini-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--glass-bg-strong) 92%, transparent),
    color-mix(in srgb, var(--glass-bg) 80%, transparent));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.admin-mini-table tbody tr {
  transition: background-color 0.18s ease;
}
.admin-mini-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--glass-bg) 22%, transparent);
}
.admin-mini-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text);
}
.admin-mini-table tbody tr:last-child td { border-bottom: none; }

/* Section headings inside content panels read a touch more premium. */
.admin-tab-content .panel-body > h2 {
  letter-spacing: -0.01em;
}

/* === messages.css === */
/* ============================================================
   Cyno.gg Messages — Luxury Glass Chat
   Styles target the exact markup produced by initMessages() in
   app.js. List items: .message-item > .message-title-wrap +
   .message-preview (+ .pill). Header: .eyebrow + h2 + .thread-meta.
   Chat rows: .message-row[.is-mine] > .message-row-avatar +
   .message-bubble(.message-author/.message-text/.message-time).
   ============================================================ */

:root {
  --msg-primary: var(--accent, #7bdcff);
  --msg-secondary: var(--accent-2, #8de6d6);
  --msg-bg: var(--bg-0, #06080f);
  --msg-glass: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 60%, transparent);
  --msg-border: var(--glass-border, rgba(160, 190, 230, 0.22));
  --msg-text: var(--text, #eef3ff);
  --msg-muted: var(--text-muted, #a8b9d4);
  --msg-online: var(--status-success, #6ee3b2);
  --msg-rail: rgba(7, 12, 22, 0.42);
  --msg-transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    background-color 0.25s ease,
                    border-color 0.25s ease,
                    box-shadow 0.25s ease;
}

/* ── Page shell ─────────────────────────────────────────────── */
.messages-shell {
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ── Hero ───────────────────────────────────────────────────── */
.messages-hero {
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.messages-hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 4px 0 6px;
}

.messages-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── Two-pane chat surface ──────────────────────────────────────
   The list and thread live inside two .glass-panel children of
   .messages-grid. We collapse the gap and round only the outer
   corners so the pair reads as a single luxury chat surface. */
.messages-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 0;
  height: min(72vh, 760px);
  min-height: 520px;
  border-radius: var(--radius-lg, 24px);
  overflow: hidden;
  border: 1px solid var(--msg-border);
  box-shadow: var(--glass-shadow, 0 18px 50px rgba(3, 8, 18, 0.5));
}

/* Neutralise the individual panel chrome — the grid owns the frame now. */
.messages-grid .messages-list-panel,
.messages-grid .messages-thread-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  min-width: 0;
  height: 100%;
}

.messages-grid .messages-list-panel { border-right: 1px solid var(--msg-border); }

.messages-grid .messages-list-panel .panel-body,
.messages-grid .messages-thread-panel .panel-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
  gap: 12px;
}

/* ── List column ────────────────────────────────────────────── */
.messages-list-panel { background: var(--msg-rail); }

.messages-list-top {
  display: flex;
  gap: 8px;
  align-items: center;
}
.messages-list-top .thread-search { flex: 1 1 auto; margin: 0; }
.messages-list-top [data-message-new] { flex: 0 0 auto; white-space: nowrap; }

.thread-search {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--msg-border);
  background: color-mix(in srgb, var(--msg-glass) 80%, transparent);
  color: var(--msg-text);
  font: inherit;
  font-size: 0.9rem;
  transition: var(--msg-transition);
}
.thread-search::placeholder { color: var(--msg-muted); }
.thread-search:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--msg-primary) 60%, var(--msg-border));
  box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.16);
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.catalog-filters .btn-chip { padding: 6px 12px; font-size: 0.8rem; }

.messages-sort {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--msg-border);
  background: color-mix(in srgb, var(--msg-glass) 80%, transparent);
  color: var(--msg-text);
  font: inherit;
  font-size: 0.85rem;
}

/* Scrollable conversation list fills the rest of the column. */
.message-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 2px;
  margin: 0 -2px;
}

/* ── Conversation item (button) ─────────────────────────────── */
.message-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  background: transparent;
  transition: var(--msg-transition);
  font: inherit;
  color: inherit;
}
/* Lettered gradient avatar (real element rendered by renderList). */
.message-item-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #04111c;
  background: linear-gradient(135deg, var(--msg-primary), var(--msg-secondary));
  border: 1px solid color-mix(in srgb, var(--msg-primary) 45%, transparent);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 8px rgba(3, 8, 18, 0.35);
}
.message-item.is-active .message-item-avatar {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 0 14px color-mix(in srgb, var(--msg-primary) 45%, transparent);
}
.message-item:hover { background: rgba(123, 220, 255, 0.06); }
.message-item.is-active {
  background: linear-gradient(135deg, rgba(123, 220, 255, 0.12), rgba(141, 230, 214, 0.05));
  border-color: color-mix(in srgb, var(--msg-primary) 45%, var(--msg-border));
  box-shadow: inset 3px 0 0 var(--msg-primary), 0 6px 18px rgba(123, 220, 255, 0.12);
}

.message-item > div:not(.message-item-avatar) {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.message-title {
  font-weight: 600;
  color: var(--msg-text);
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-pin-icon,
.message-muted-icon { font-size: 11px; opacity: 0.75; flex: 0 0 auto; }

.message-preview {
  font-size: 0.82rem;
  color: var(--msg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Unread badge (rendered as .pill by the JS). */
.message-item > .pill {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--msg-primary), var(--msg-secondary));
  color: #04111c;
  border: 0;
}

/* ── Thread column ──────────────────────────────────────────── */
.messages-thread-panel { background: transparent; }

.thread-header {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--msg-border);
}
.thread-header .eyebrow { margin: 0; }
.thread-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--msg-text);
}
.thread-meta {
  font-size: 0.85rem;
  color: var(--msg-muted);
}

.thread-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.thread-toolbar .pill {
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--msg-primary) 30%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-primary) 10%, transparent);
  color: color-mix(in srgb, var(--msg-primary) 85%, var(--msg-text));
}

/* Scrollable message stream. */
.thread-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 6px;
}

/* ── Chat rows ──────────────────────────────────────────────── */
.message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 78%;
}
.message-row.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-row-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #04111c;
  background: linear-gradient(135deg, var(--msg-primary), var(--msg-secondary));
}
.message-row.is-mine .message-row-avatar {
  background: linear-gradient(135deg, color-mix(in srgb, var(--msg-secondary) 70%, white), var(--msg-primary));
}

.message-bubble {
  min-width: 0;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--msg-border);
  background: color-mix(in srgb, var(--msg-glass) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(3, 8, 18, 0.25);
}
.message-row:not(.is-mine) .message-bubble { border-bottom-left-radius: 5px; }
.message-row.is-mine .message-bubble {
  border-bottom-right-radius: 5px;
  background: linear-gradient(135deg, rgba(123, 220, 255, 0.18), rgba(141, 230, 214, 0.1));
  border-color: color-mix(in srgb, var(--msg-primary) 35%, transparent);
}

.message-author {
  font-size: 0.72rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--msg-primary) 80%, var(--msg-text));
  margin-bottom: 3px;
}
.message-row.is-mine .message-author { display: none; }
.message-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--msg-text);
  overflow-wrap: anywhere;
}
.message-time {
  font-size: 0.66rem;
  color: var(--msg-muted);
  margin-top: 5px;
  text-align: right;
}

/* Empty / placeholder row (rendered when a thread has no messages). */
.thread-body > .message-row:only-child:not(.is-mine) {
  max-width: 100%;
  align-self: stretch;
  justify-content: center;
}
.thread-body > .message-row:only-child .message-row-avatar { display: none; }
.thread-body > .message-row:only-child .message-bubble {
  background: transparent;
  border: 1px dashed var(--msg-border);
  box-shadow: none;
  color: var(--msg-muted);
  text-align: center;
}

/* ── Attachments + composer ─────────────────────────────────── */
.thread-attachments {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.thread-attachments .btn-chip { font-size: 0.8rem; }

.thread-input {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--msg-border);
}
.thread-input textarea {
  flex: 1 1 auto;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--msg-border);
  background: color-mix(in srgb, var(--msg-glass) 80%, transparent);
  color: var(--msg-text);
  font: inherit;
  font-size: 0.92rem;
  resize: none;
  min-height: 46px;
  max-height: 130px;
  transition: var(--msg-transition);
}
.thread-input textarea::placeholder { color: var(--msg-muted); }
.thread-input textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--msg-primary) 60%, var(--msg-border));
  box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.16);
}
.thread-input [data-message-send] {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--msg-primary), var(--msg-secondary));
  color: #04111c;
  border: 0;
  cursor: pointer;
  transition: var(--msg-transition);
}
.thread-input [data-message-send]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(123, 220, 255, 0.3);
}
.thread-input [data-message-send]:disabled { opacity: 0.55; cursor: progress; transform: none; }

/* ── Online pulse (decorative dots) ─────────────────────────── */
@keyframes onlinePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(110, 227, 178, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(110, 227, 178, 0); }
}
.online-indicator {
  background: var(--msg-online);
  animation: onlinePulse 2.5s ease-in-out infinite;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .messages-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .messages-grid .messages-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--msg-border);
  }
  .message-list { max-height: 280px; }
  .messages-thread-panel { min-height: 460px; }
  .message-row { max-width: 90%; }
}

@media (max-width: 768px) {
  .messages-shell { padding-top: 80px; padding-bottom: 40px; }
}


/* === tickets.css === */
.tickets-shell {
  display: grid;
  gap: 24px;
}

.tickets-hero {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.tickets-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tickets-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 16px;
}

.ticket-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.ticket-item {
  width: 100%;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  transition: border-color 0.35s ease,
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              background 0.35s ease;
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
}

.ticket-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-highlight);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.ticket-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-bg) 88%);
  box-shadow:
    0 16px 30px rgba(2, 6, 12, 0.5),
    inset 0 0 0 1px var(--border-inner),
    0 0 30px rgba(123, 220, 255, 0.06);
}

.ticket-item.is-active::before {
  opacity: 1;
}

.ticket-item:hover:not(.is-active) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 18px 36px rgba(2, 6, 12, 0.45),
    0 0 24px rgba(123, 220, 255, 0.05);
}

.ticket-item:hover::before {
  opacity: 0.7;
}

/* Thread panel enhancements */
.tickets-thread-panel .thread-body {
  position: relative;
}

.tickets-thread-panel .thread-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-caustic);
  opacity: 0.3;
  pointer-events: none;
  border-radius: var(--radius-md);
}

.tickets-thread-panel .thread-toolbar .pill {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.tickets-thread-panel .thread-toolbar .pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(123, 220, 255, 0.1);
}

@media (max-width: 720px) {
  .ticket-list {
    max-height: 240px;
  }
}

.tickets-thread-panel .thread-input textarea {
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.tickets-thread-panel .thread-input textarea:focus {
  outline: none;
}

.tickets-thread-panel .thread-input textarea:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent),
              0 0 25px rgba(123, 220, 255, 0.08);
}

/* Ticket Modal */
.ticket-modal-overlay[hidden] {
  display: none !important;
}

.ticket-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg-0) 70%, transparent);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  animation: modalOverlayIn 0.2s ease;
}


.ticket-modal {
  width: min(560px, 90vw);
  max-height: 85vh;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 76%, transparent));
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  box-shadow: var(--shadow-3), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  position: relative;
}

.ticket-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 30% 20%, rgba(123, 220, 255, 0.08), transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}


.ticket-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  position: relative;
  z-index: 1;
}

.ticket-modal-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ticket-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ticket-modal-close:hover {
  background: color-mix(in srgb, var(--glass-bg-strong) 55%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border));
  transform: translateY(-2px);
}

.ticket-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.ticket-form-field {
  display: grid;
  gap: 8px;
}

.ticket-form-field label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.ticket-form-field input,
.ticket-form-field select,
.ticket-form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.ticket-form-field input:focus,
.ticket-form-field select:focus,
.ticket-form-field textarea:focus {
  outline: none;
}

.ticket-form-field input:focus-visible,
.ticket-form-field select:focus-visible,
.ticket-form-field textarea:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 0 0 1px var(--border-inner);
}

.ticket-form-field textarea {
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 100px;
}

.ticket-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 24px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .ticket-modal {
    width: 95vw;
    max-height: 90vh;
  }
}


/* === profile.css === */
.profile-shell {
  display: grid;
  gap: 24px;
}

.profile-hero {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-grid > .glass-panel {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-grid > .glass-panel:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 20px 40px rgba(2, 6, 12, 0.45),
    0 0 30px rgba(123, 220, 255, 0.05);
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-soft);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease,
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              background 0.35s ease;
}

.profile-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-highlight);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.profile-row:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 16px 30px rgba(2, 6, 12, 0.45),
    0 0 20px rgba(123, 220, 255, 0.05);
}

.profile-row:hover::before {
  opacity: 0.8;
}

.profile-avatar-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--surface-1, #161a24);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.profile-avatar-btn:hover {
  border-color: var(--accent);
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
}
.profile-avatar-btn:hover .profile-avatar-overlay {
  opacity: 1;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, rgba(123, 220, 255, 0.15), rgba(123, 220, 255, 0.05));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: 0 0 12px rgba(123, 220, 255, 0.15);
}

.tier-badge[data-tier="prime"] {
  background: linear-gradient(135deg, rgba(168, 130, 255, 0.15), rgba(168, 130, 255, 0.05));
  color: #a882ff;
  border-color: color-mix(in srgb, #a882ff 30%, transparent);
  box-shadow: 0 0 12px rgba(168, 130, 255, 0.15);
}

.tier-badge[data-tier="elite"] {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.15), rgba(255, 183, 77, 0.05));
  color: #ffb74d;
  border-color: color-mix(in srgb, #ffb74d 30%, transparent);
  box-shadow: 0 0 12px rgba(255, 183, 77, 0.15);
}

.license-history {
  display: grid;
  gap: 10px;
}

.license-history .empty-state {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  border: 1px dashed color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
}

.license-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 8px 16px rgba(2, 6, 12, 0.3);
  backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.license-card:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--glass-border));
  transform: translateY(-1px);
}

.license-card__info {
  display: grid;
  gap: 4px;
}

.license-card__product {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.license-card__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.license-card__status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.license-card__status--active {
  background: rgba(76, 175, 80, 0.12);
  color: var(--status-success);
  border: 1px solid rgba(76, 175, 80, 0.25);
}

.license-card__status--expired {
  background: rgba(255, 152, 0, 0.12);
  color: var(--status-warning);
  border: 1px solid rgba(255, 152, 0, 0.25);
}

.license-card__status--cancelled {
  background: rgba(244, 67, 54, 0.12);
  color: var(--status-danger);
  border: 1px solid rgba(244, 67, 54, 0.25);
}

@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* HWID Binding — give the status row breathing room from the detail rows below
   (was touching "Bound HWID / Bound at / Cooldown" with no gap). */
.hwid-binding-section .hwid-status-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border, rgba(160,190,230,0.22)) 45%, transparent);
}
.hwid-binding-section .profile-row { padding: 7px 0; }
.hwid-binding-section .hwid-status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--status-warning, #f2c98f);
  box-shadow: 0 0 8px var(--status-warning, #f2c98f);
  flex: 0 0 auto;
}


/* === captcha.css === */
/* ═══════════════════════════════════════════════════════════
   CYNO.GG — Custom reCaptcha System Styles
   Matches: --glass-bg, --accent (#7bdcff), liquid glass
   ═══════════════════════════════════════════════════════════ */

/* Captcha overlay -- full-screen glass overlay on auth pages */
.captcha-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-captcha);
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 50%,
    rgba(8, 14, 26, 0.85),
    rgba(6, 8, 15, 0.95)
  );
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  animation: modalOverlayIn 0.3s ease forwards;
}

.captcha-overlay[hidden] {
  display: none !important;
}

.captcha-panel {
  width: min(420px, calc(100% - 40px));
  padding: 36px 32px;
  display: grid;
  gap: 24px;
  text-align: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 88%, transparent),
    color-mix(in srgb, var(--glass-bg) 72%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  box-shadow: var(--shadow-3), var(--glass-glow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  position: relative;
  overflow: hidden;
}

/* Liquid glass caustic layer */
.captcha-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-caustic);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.captcha-panel > * {
  position: relative;
  z-index: 1;
}

.captcha-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(130deg,
    color-mix(in srgb, var(--accent) 68%, #0d1a2a),
    color-mix(in srgb, var(--accent-2) 72%, #0d1a2a)
  );
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(123, 220, 255, 0.3);
  animation: breathe 2s ease-in-out infinite;
}

.captcha-icon svg {
  width: 28px;
  height: 28px;
  stroke: #041018;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.captcha-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.captcha-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* --- Challenge 1: Hold to Verify --- */
.captcha-hold-zone {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.captcha-hold-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.captcha-hold-ring.is-holding {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 20px rgba(123, 220, 255, 0.25);
}

.captcha-hold-ring.is-complete {
  border-color: var(--status-success);
  box-shadow: 0 0 30px rgba(110, 227, 178, 0.4);
}

/* SVG progress ring */
.captcha-hold-progress {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  transform: rotate(-90deg);
}

.captcha-hold-progress circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 364;
  stroke-dashoffset: 364;
  transition: stroke-dashoffset 0.05s linear;
  filter: drop-shadow(0 0 6px rgba(123, 220, 255, 0.5));
}

.captcha-hold-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

/* --- Challenge 2: Slide to Verify --- */
.captcha-slider-track {
  width: 100%;
  height: 56px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.captcha-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 30%, transparent),
    color-mix(in srgb, var(--accent) 15%, transparent)
  );
  border-radius: 999px;
  transition: width 0.05s linear;
}

/* Shimmer effect on the fill */
.captcha-slider-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: holoShimmer 2s ease-in-out infinite;
}

.captcha-slider-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(130deg,
    color-mix(in srgb, var(--accent) 68%, #0d1a2a),
    color-mix(in srgb, var(--accent-2) 72%, #0d1a2a)
  );
  box-shadow: 0 4px 16px rgba(2, 6, 12, 0.4), 0 0 12px rgba(123, 220, 255, 0.2);
  display: grid;
  place-items: center;
  cursor: grab;
  transition: box-shadow 0.2s ease;
  z-index: 2;
}

.captcha-slider-thumb:active {
  cursor: grabbing;
  box-shadow: 0 6px 24px rgba(2, 6, 12, 0.5), 0 0 20px rgba(123, 220, 255, 0.35);
}

.captcha-slider-thumb svg {
  width: 20px;
  height: 20px;
  stroke: #041018;
  fill: none;
  stroke-width: 2;
}

.captcha-slider-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  pointer-events: none;
  font-weight: 600;
}

.captcha-slider-track.is-complete .captcha-slider-fill {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--status-success) 40%, transparent),
    color-mix(in srgb, var(--status-success) 20%, transparent)
  );
}

.captcha-slider-track.is-complete .captcha-slider-thumb {
  background: linear-gradient(130deg, var(--status-success), #5cc9a0);
  box-shadow: 0 0 20px rgba(110, 227, 178, 0.4);
}

/* --- Challenge 3: Pattern Match --- */
.captcha-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(3, 64px);
  gap: 12px;
  justify-content: center;
  margin: 0 auto;
}

.captcha-pattern-node {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
}

.captcha-pattern-node::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.captcha-pattern-node.is-active {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 16px rgba(123, 220, 255, 0.3);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.captcha-pattern-node.is-active::after {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(123, 220, 255, 0.6);
}

.captcha-pattern-node.is-correct {
  border-color: var(--status-success);
  box-shadow: 0 0 16px rgba(110, 227, 178, 0.3);
}

.captcha-pattern-node.is-correct::after {
  background: var(--status-success);
  box-shadow: 0 0 10px rgba(110, 227, 178, 0.6);
}

.captcha-pattern-node.is-wrong {
  border-color: var(--status-danger);
  box-shadow: 0 0 16px rgba(240, 156, 176, 0.3);
  animation: captchaShake 0.4s ease;
}

@keyframes captchaShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* --- Success state --- */
.captcha-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(130deg, var(--status-success), #5cc9a0);
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(110, 227, 178, 0.4);
  animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.captcha-success-icon svg {
  width: 32px;
  height: 32px;
  stroke: #041018;
  fill: none;
  stroke-width: 2.5;
}

/* Form disabled state when captcha pending */
.auth-form-disabled {
  pointer-events: none;
  opacity: 0.5;
  filter: blur(2px);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Firewall blocked page variant */
.firewall-block-reason {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--status-danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-danger) 30%, transparent);
  font-size: 12px;
  color: var(--status-danger);
}

@media (prefers-reduced-motion: reduce) {
  .captcha-panel,
  .captcha-icon,
  .captcha-success-icon {
    animation: none !important;
  }
  .captcha-slider-fill::after {
    animation: none !important;
  }
  .captcha-hold-ring {
    transition: none !important;
  }
  .captcha-pattern-node {
    transition: none !important;
  }
}


/* === games.css === */
/* Casino Games Styles for cyno.gg */

/* Games Page Layout */
.games-shell {
  display: grid;
  gap: 24px;
}

.games-balance-bar {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.games-balance-display h1 {
  margin: 8px 0 4px;
}

/* Games Hub Grid */
/* The native [hidden] attribute is what showGame()/hideGame() in games.js
   toggle. The component rules below set display:grid/block which would
   normally beat the browser's default `[hidden] { display: none }`. Without
   these overrides, clicking a hub card opens the game panel BELOW the still-
   visible hub (2000px down the page), so the user never sees the game. */
.games-hub-grid[hidden],
.game-panel[hidden] { display: none !important; }

.games-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.games-hub-card {
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
}

.games-hub-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 60px rgba(123, 220, 255, 0.2);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
}

.games-hub-card:active {
  transform: translateY(-2px) scale(0.98);
}

.games-hub-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;            /* center the icon tile horizontally */
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: color-mix(in srgb, var(--accent) 90%, white 10%);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, transparent), rgba(255,255,255,0.02));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow:
    0 10px 24px rgba(2,6,16,0.45),
    inset 0 1px 0 rgba(255,255,255,0.08);
  filter: drop-shadow(0 4px 12px rgba(123, 220, 255, 0.22));
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, background 0.3s ease;
}
.games-hub-card:hover .games-hub-icon {
  transform: translateY(-2px) scale(1.06);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 26%, transparent), rgba(255,255,255,0.03));
  box-shadow: 0 16px 32px rgba(2,6,16,0.55), 0 0 28px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 1px 0 rgba(255,255,255,0.1);
}

.games-hub-icon svg {
  width: 38px;
  height: 38px;
}

.games-hub-card h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.games-hub-card .metric-label {
  margin-bottom: 12px;
  font-size: 13px;
}

.games-hub-cost {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Shared Game Panel Styles */
.game-panel {
  padding: 32px;
}

.game-panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.game-panel-header h2 {
  flex: 1;
  margin: 0;
}

.game-back-btn {
  padding: 8px 16px;
}

.game-cost-badge {
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  color: var(--bg-0);
  font-weight: 700;
  font-size: 14px;
}

.game-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Slots Machine */
.slots-machine {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  position: relative;
}

.slots-reels {
  display: flex;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 90%, transparent),
    color-mix(in srgb, var(--glass-bg) 70%, transparent));
  border: 2px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

.slots-reel {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg-2) 85%, transparent),
    color-mix(in srgb, var(--bg-1) 95%, transparent));
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slots-reel.spinning {
  animation: slotSpin 0.1s linear infinite;
  filter: blur(2px);
}

.slots-reel.stopped {
  animation: slotStop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.slots-reel.winner {
  border-color: var(--accent-3);
  box-shadow: 0 0 30px rgba(217, 183, 122, 0.4), inset 0 0 20px rgba(217, 183, 122, 0.2);
  animation: slotWinPulse 1s ease-in-out infinite;
}

.slots-paylines {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.payline {
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.payline.active {
  opacity: 1;
  animation: paylineGlow 0.6s ease-in-out infinite;
}

.slots-result-display {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

.slots-result-text {
  display: block;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.slots-result-amount {
  display: block;
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slots-payout-table {
  margin-top: 28px;
  padding: 20px;
}

.slots-payout-table h4 {
  margin-bottom: 12px;
  text-align: center;
}

.payout-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.payout-row:last-child {
  border-bottom: none;
}

/* Coin Flip */
.coinflip-coin {
  width: 160px;
  height: 160px;
  margin: 40px auto;
  perspective: 1000px;
  position: relative;
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-3), color-mix(in srgb, var(--accent-3) 70%, #c09020));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
              inset 0 2px 8px rgba(255, 255, 255, 0.4),
              0 0 40px color-mix(in srgb, var(--accent-3) 30%, transparent);
  backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.coin-tails {
  transform: rotateY(180deg);
}

.coinflip-coin.flipping .coin-heads,
.coinflip-coin.flipping .coin-tails {
  animation: coinFlip 1.5s ease-out;
}

.coinflip-controls {
  max-width: 500px;
  margin: 0 auto;
}

.coinflip-choice-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.coinflip-choice {
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
}

.coinflip-choice.active {
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  color: var(--bg-0);
  border-color: var(--accent);
}

.coinflip-result {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

/* Dice Roll */
.dice-display {
  text-align: center;
  padding: 40px 0;
}

.dice-cube {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--bg-2), var(--bg-1));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
              inset 0 2px 8px rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease;
}

.dice-cube.rolling {
  animation: diceRoll 1s ease-out;
}

.dice-result-number {
  font-size: 64px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dice-controls {
  max-width: 500px;
  margin: 0 auto;
}

.dice-mode-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.dice-mode-btn {
  padding: 14px;
  font-weight: 600;
}

.dice-mode-btn.active {
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  color: var(--bg-0);
  border-color: var(--accent);
}

.game-range {
  width: 100%;
  margin: 12px 0;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  outline: none;
}

.game-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(123, 220, 255, 0.5);
  border: 3px solid var(--bg-0);
}

.game-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(123, 220, 255, 0.5);
  border: 3px solid var(--bg-0);
}

.dice-payout-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  font-size: 14px;
}

.dice-result {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

/* Mines Game */
.mines-setup {
  max-width: 500px;
  margin: 0 auto;
}

.mines-game {
  margin-top: 24px;
}

.mines-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-badge {
  padding: 16px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.mines-tile {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 85%, transparent),
    color-mix(in srgb, var(--glass-bg) 65%, transparent));
  border: 2px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-1);
}

.mines-tile:hover:not(.revealed) {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(123, 220, 255, 0.2);
}

.mines-tile:active:not(.revealed) {
  transform: scale(0.95);
}

.mines-tile.revealed {
  cursor: default;
  animation: tileReveal 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mines-tile.safe {
  border-color: var(--status-success);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--status-success) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--status-success) 10%, var(--glass-bg)));
  box-shadow: 0 0 20px rgba(110, 227, 178, 0.3);
}

.mines-tile.mine {
  border-color: var(--status-danger);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--status-danger) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--status-danger) 10%, var(--glass-bg)));
  box-shadow: 0 0 20px rgba(240, 153, 176, 0.3);
  animation: mineExplode 0.5s ease-out;
}

.mines-actions {
  margin-top: 24px;
  text-align: center;
}

.mines-result {
  text-align: center;
  padding: 24px;
  margin-top: 20px;
}

/* Animations */
@keyframes slotSpin {
  0% { transform: translateY(-10px); }
  50% { transform: translateY(10px); }
  100% { transform: translateY(-10px); }
}

@keyframes slotStop {
  0% { transform: scale(1.1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes slotWinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes paylineGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes coinFlip {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(1800deg); }
}

@keyframes diceRoll {
  0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
  25% { transform: rotateX(720deg) rotateY(180deg) rotateZ(90deg); }
  50% { transform: rotateX(1440deg) rotateY(360deg) rotateZ(180deg); }
  75% { transform: rotateX(1800deg) rotateY(540deg) rotateZ(270deg); }
  100% { transform: rotateX(2160deg) rotateY(720deg) rotateZ(360deg); }
}

@keyframes tileReveal {
  0% { transform: scale(0) rotateY(180deg); }
  50% { transform: scale(1.2) rotateY(90deg); }
  100% { transform: scale(1) rotateY(0); }
}

@keyframes mineExplode {
  0% { transform: scale(1); }
  20% { transform: scale(1.3); }
  40% { transform: scale(0.9); }
  60% { transform: scale(1.1); }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Mobile Responsiveness */
@media (max-width: 980px) {
  .games-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .slots-reel {
    width: 100px;
    height: 100px;
    font-size: 60px;
  }
}

@media (max-width: 720px) {
  .games-hub-grid {
    grid-template-columns: 1fr;
  }
  
  .game-panel {
    padding: 24px;
  }
  
  .slots-reels {
    gap: 12px;
    padding: 16px;
  }
  
  .slots-reel {
    width: 80px;
    height: 80px;
    font-size: 48px;
  }
  
  .coinflip-coin {
    width: 120px;
    height: 120px;
  }
  
  .coin-face {
    font-size: 90px;
  }
  
  .dice-cube {
    width: 100px;
    height: 100px;
    font-size: 64px;
  }
  
  .mines-grid {
    gap: 6px;
  }
  
  .mines-tile {
    font-size: 24px;
  }
}

/* ============================================
   Advanced Casino Games Styles
   ============================================ */

/* Progressive Jackpot Modal */
.jackpot-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: modalFadeIn 0.3s ease;
}

.jackpot-modal-overlay[hidden] {
  display: none;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.jackpot-modal {
  position: relative;
  max-width: 400px;
  width: 100%;
  padding: 48px 32px 32px;
  text-align: center;
  border-radius: var(--radius-xl);
  border: 2px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--glass-bg-strong) 85%, transparent),
    color-mix(in srgb, var(--glass-bg) 70%, transparent));
  box-shadow:
    0 0 80px color-mix(in srgb, var(--accent) 15%, transparent),
    0 24px 60px rgba(2, 6, 12, 0.6),
    inset 0 0 0 1px var(--border-inner);
  animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.jackpot-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.jackpot-modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.jackpot-modal-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent));
  border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 20%, transparent);
  animation: iconPulse 2s ease-in-out infinite;
}

.jackpot-modal-icon svg {
  width: 40px;
  height: 40px;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 20%, transparent); }
  50% { transform: scale(1.05); box-shadow: 0 0 45px color-mix(in srgb, var(--accent) 30%, transparent); }
}

.jackpot-amount-display {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: jackpotShimmer 3s ease-in-out infinite;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 30%, transparent));
  margin: 0.5rem 0;
}

@keyframes jackpotShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.jackpot-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* Chicken Cross */
.chickencross-setup {
  max-width: 500px;
  margin: 0 auto;
}

.chickencross-game {
  margin-top: 32px;
}

.chickencross-road {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.chickencross-lane {
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bg-2) 80%, transparent),
    color-mix(in srgb, var(--bg-1) 90%, transparent));
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.chickencross-lane::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0px,
    var(--accent) 20px,
    transparent 20px,
    transparent 40px
  );
  opacity: 0.3;
}

.chickencross-lane.safe {
  border-color: var(--status-success);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--status-success) 15%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--status-success) 5%, var(--glass-bg)));
}

.chickencross-lane.hit {
  border-color: var(--status-danger);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--status-danger) 15%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--status-danger) 5%, var(--glass-bg)));
  animation: laneHit 0.5s ease-out;
}

.chickencross-lane.car {
  font-size: 32px;
}

.chickencross-chicken {
  font-size: 48px;
  text-align: center;
  margin: 24px auto;
  animation: chickenBounce 0.6s ease-in-out infinite;
}

.chickencross-chicken.crossing {
  animation: chickenCross 1s ease-in-out;
}

.chickencross-chicken.hit {
  animation: chickenHit 0.5s ease-out;
}

.chickencross-result {
  text-align: center;
  padding: 24px;
  margin-top: 20px;
}

@keyframes laneHit {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes chickenBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes chickenCross {
  0% { transform: translateX(-100px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes chickenHit {
  0% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.2) rotate(-10deg); }
  50% { transform: scale(0.9) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Tower Game */
.tower-setup {
  max-width: 500px;
  margin: 0 auto;
}

.tower-game {
  margin-top: 24px;
}

.tower-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.tower-visual {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto 24px;
}

.tower-floor {
  height: 50px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 85%, transparent),
    color-mix(in srgb, var(--glass-bg) 65%, transparent));
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  transition: transform 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              background-color 0.3s ease;
}

.tower-floor.current {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(123, 220, 255, 0.3);
  animation: towerPulse 1s ease-in-out infinite;
}

.tower-floor.climbed {
  border-color: var(--status-success);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--status-success) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--status-success) 10%, var(--glass-bg)));
}

.tower-floor.crashed {
  border-color: var(--status-danger);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--status-danger) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--status-danger) 10%, var(--glass-bg)));
  animation: towerCrash 0.5s ease-out;
}

.tower-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.tower-result {
  text-align: center;
  padding: 24px;
  margin-top: 20px;
}

@keyframes towerPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(123, 220, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(123, 220, 255, 0.5); }
}

@keyframes towerCrash {
  0% { transform: scale(1); }
  20% { transform: scale(1.1); }
  40% { transform: scale(0.9); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Limbo Game */
.limbo-controls {
  max-width: 500px;
  margin: 0 auto;
}

.limbo-payout-preview {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  font-size: 14px;
}

.limbo-result-display {
  text-align: center;
  padding: 40px 0;
}

.limbo-result-multiplier {
  font-size: 96px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: limboReveal 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.limbo-result-multiplier.won {
  background: linear-gradient(135deg, var(--status-success), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.limbo-result-multiplier.lost {
  background: linear-gradient(135deg, var(--status-danger), var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.limbo-result-multiplier.near-miss {
  animation: limboNearMiss 0.8s ease-in-out;
}

.limbo-result-target {
  font-size: 18px;
  color: var(--text-muted);
  margin-top: 12px;
}

.limbo-result {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

@keyframes limboReveal {
  0% { transform: scale(0) rotateY(180deg); opacity: 0; }
  100% { transform: scale(1) rotateY(0); opacity: 1; }
}

@keyframes limboNearMiss {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1) translateX(-5px); }
  50% { transform: scale(1.15) translateX(5px); }
  75% { transform: scale(1.1) translateX(-5px); }
}

/* Crash Game */
.crash-setup {
  max-width: 500px;
  margin: 0 auto;
}

.crash-game {
  margin-top: 24px;
}

.crash-graph {
  position: relative;
  height: 300px;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 90%, transparent),
    color-mix(in srgb, var(--glass-bg) 70%, transparent));
  border-radius: var(--radius-lg);
  border: 2px solid var(--glass-border);
  overflow: hidden;
}

.crash-multiplier-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 72px;
  font-weight: 900;
  z-index: 10;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(123, 220, 255, 0.4));
}

.crash-multiplier-display.crashed {
  background: linear-gradient(135deg, var(--status-danger), #ff4444);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: crashShake 0.5s ease-out;
}

#crashCanvas {
  width: 100%;
  height: 100%;
}

.crash-actions {
  margin-top: 24px;
  text-align: center;
}

.crash-result {
  text-align: center;
  padding: 24px;
  margin-top: 20px;
}

.btn-danger {
  background: linear-gradient(135deg, var(--status-danger), #ff4444);
  border-color: var(--status-danger);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff4444, var(--status-danger));
}

@keyframes crashShake {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  20% { transform: translate(-48%, -52%) scale(1.1); }
  40% { transform: translate(-52%, -48%) scale(0.9); }
  60% { transform: translate(-49%, -51%) scale(1.05); }
  80% { transform: translate(-51%, -49%) scale(0.95); }
}

/* Plinko Game */
.plinko-controls {
  max-width: 500px;
  margin: 0 auto 24px;
}

.plinko-board {
  position: relative;
  height: 400px;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 90%, transparent),
    color-mix(in srgb, var(--glass-bg) 70%, transparent));
  border-radius: var(--radius-lg);
  border: 2px solid var(--glass-border);
  overflow: hidden;
}

#plinkoCanvas {
  width: 100%;
  height: 100%;
}

.plinko-result {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

/* Diamonds Game */
.diamonds-setup {
  max-width: 500px;
  margin: 0 auto;
}

.diamonds-game {
  margin-top: 24px;
}

.diamonds-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.diamonds-grid {
  display: grid;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.diamonds-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 85%, transparent),
    color-mix(in srgb, var(--glass-bg) 65%, transparent));
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: transform 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              background-color 0.3s ease;
}

.diamonds-cell:hover:not(.revealed) {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(123, 220, 255, 0.3);
}

.diamonds-cell:active:not(.revealed) {
  transform: scale(0.95);
}

.diamonds-cell.revealed {
  cursor: default;
  animation: diamondReveal 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.diamonds-cell.diamond {
  border-color: var(--accent);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--accent) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--accent) 10%, var(--glass-bg)));
  box-shadow: 0 0 30px rgba(123, 220, 255, 0.4);
}

.diamonds-cell.empty {
  border-color: var(--status-danger);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--status-danger) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--status-danger) 10%, var(--glass-bg)));
  box-shadow: 0 0 20px rgba(240, 153, 176, 0.3);
}

.diamonds-result {
  text-align: center;
  padding: 24px;
  margin-top: 20px;
}

@keyframes diamondReveal {
  0% { transform: scale(0) rotateY(180deg); }
  50% { transform: scale(1.2) rotateY(90deg); }
  100% { transform: scale(1) rotateY(0); }
}

/* Big Win Celebration Overlay */
.big-win-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bigWinFadeIn 0.3s ease-out;
}

.big-win-overlay[hidden] {
  display: none;
}

.big-win-content {
  text-align: center;
  z-index: 10;
  animation: bigWinBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.big-win-title {
  font-size: 64px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-3), var(--accent), var(--accent-3));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: bigWinShimmer 1s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(217, 183, 122, 0.6));
  margin-bottom: 24px;
}

.big-win-amount {
  font-size: 96px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--status-success), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(110, 227, 178, 0.6));
  margin-bottom: 16px;
}

.big-win-subtitle {
  font-size: 24px;
  color: var(--accent-3);
  font-weight: 600;
}

#bigWinCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes bigWinFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bigWinBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bigWinShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Streak Bonus Display */
.streak-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--accent-3), var(--accent));
  color: var(--bg-0);
  font-weight: 700;
  font-size: 14px;
  animation: streakPulse 1s ease-in-out infinite;
}

@keyframes streakPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(217, 183, 122, 0.3); }
  50% { box-shadow: 0 0 30px rgba(217, 183, 122, 0.6); }
}

/* Rare Bonus Indicator */
.rare-bonus-indicator {
  position: absolute;
  top: -10px;
  right: -10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--accent-3), var(--status-danger));
  color: var(--bg-0);
  font-weight: 800;
  font-size: 12px;
  animation: rareBonusFlash 0.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(217, 183, 122, 0.5);
}

@keyframes rareBonusFlash {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  /* Slot machine */
  .slots-reel,
  .slots-reel.spinning,
  .slots-reel.winner,
  .payline-glow,
  .slot-win-pulse {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Coin flip */
  .coinflip-coin.flipping {
    animation-duration: 0.01ms !important;
  }

  /* Dice */
  .dice-cube.rolling {
    animation-duration: 0.01ms !important;
  }

  /* Mines */
  .mines-tile.revealed,
  .mines-tile.mine {
    animation-duration: 0.01ms !important;
  }

  /* Chicken road */
  .chicken-bounce,
  .chicken-cross,
  .chicken-hit {
    animation-duration: 0.01ms !important;
  }

  /* Tower */
  .tower-pulse,
  .tower-crash {
    animation-duration: 0.01ms !important;
  }

  /* Limbo */
  .limbo-reveal,
  .limbo-near-miss {
    animation-duration: 0.01ms !important;
  }

  /* Crash */
  .crash-shake {
    animation-duration: 0.01ms !important;
  }

  /* Diamond */
  .diamond-reveal {
    animation-duration: 0.01ms !important;
  }

  /* Big win */
  .big-win-fade-in,
  .big-win-bounce,
  .big-win-shimmer {
    animation-duration: 0.01ms !important;
  }

  /* Streak */
  .streak-pulse {
    animation-duration: 0.01ms !important;
  }

  /* Jackpot */
  .jackpot-shimmer {
    animation-duration: 0.01ms !important;
  }

  /* Lane hit */
  .lane-hit {
    animation-duration: 0.01ms !important;
  }

  /* Rare bonus */
  .rare-bonus-indicator,
  .rare-bonus-flash {
    animation-duration: 0.01ms !important;
  }
}

/* --- Luxury Casino Enhancements --- */

/* Neon glow on game cards */
.game-card {
  position: relative;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(123, 220, 255, 0.15), rgba(217, 183, 122, 0.1), rgba(141, 230, 214, 0.08));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(8px);
}

.game-card:hover::after {
  opacity: 0.6;
}

/* Jackpot counter shimmer */
@keyframes jackpotShimmerText {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.jackpot-amount {
  background: linear-gradient(90deg, #d9b77a, #f0e68c, #d9b77a, #f0e68c, #d9b77a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: jackpotShimmerText 3s linear infinite;
}

/* Win sparkle effect */
@keyframes sparkle {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
  100% { opacity: 0; transform: scale(0) rotate(360deg); }
}

.game-result.win::after {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #d9b77a;
  animation: sparkle 0.8s ease-out;
  pointer-events: none;
}


/* === mobile-first.css === */
/* ============================================================
   CYNO.GG — Mobile-First Base Styles
   ============================================================
   This file sets mobile (<=720px) as the baseline.
   Desktop enhancements are applied via min-width queries.
   Works alongside responsive.css (max-width queries) as fallback.
   ============================================================ */

/* ── Mobile baseline (applies to all screens by default) ── */

.page-shell {
  padding: 24px 16px 48px;
}

.glass-panel {
  padding: 16px;
}

.panel-body {
  padding: 16px;
}

.catalog-hero,
.dashboard-hero,
.messages-hero,
.profile-hero,
.product-hero,
.status-hero {
  padding: 22px 18px;
}

/* Stack all grids on mobile */
.catalog-grid,
.pricing-grid,
.showcase-screen-grid {
  grid-template-columns: 1fr;
}

.dashboard-metrics,
.dashboard-split {
  grid-template-columns: 1fr;
}

.dashboard-grid,
.landing-grid,
.admin-grid,
.messages-grid,
.tickets-grid,
.profile-grid {
  grid-template-columns: 1fr;
}

.product-grid,
.specs-grid,
.sync-grid,
.status-board,
.purchase-grid {
  grid-template-columns: 1fr;
}

/* Full-width inputs and buttons on mobile */
.dashboard-chat-input {
  flex-wrap: wrap;
  border-radius: var(--radius-md);
  padding: 10px;
}

.dashboard-chat-input .btn {
  width: 100%;
  justify-content: center;
}

.catalog-search {
  flex-direction: column;
  align-items: stretch;
}

.catalog-search input,
.catalog-search .btn {
  width: 100%;
}

.status-row {
  grid-template-columns: 1fr;
  align-items: flex-start;
}

.message-item,
.ticket-item,
.profile-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Hide particles on mobile for performance */
.landing-particles {
  display: none;
}

/* Reduce blur on mobile */
:root {
  --blur-xl: 20px;
}

/* Catalog cards don't need minimum height on mobile */
.catalog-card {
  min-height: auto;
}

/* 3D preview smaller on mobile */
.landing-preview-3d {
  padding: 16px;
}

.preview-3d-box {
  max-width: 180px;
}

/* Summary items on mobile */
.summary-item {
  min-width: calc(50% - 9px);
  flex: 1 1 140px;
}

/* ── Tablet and up (>=721px) ── */
@media (min-width: 721px) {
  .page-shell {
    padding: 32px 24px 64px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Pricing tiers should sit side-by-side on tablet+. The mobile-first base
     rule stacked them at 1fr; without this restore, the pricing page rendered
     each tier as a full-width card on desktop too. */
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .landing-particles {
    display: block;
  }

  :root {
    --blur-xl: 40px;
  }
}

/* ── Desktop and up (>=981px) ── */
@media (min-width: 981px) {
  .page-shell {
    padding: 40px 32px 80px;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .landing-grid,
  .admin-grid,
  .messages-grid,
  .tickets-grid,
  .profile-grid {
    /* Let page-specific CSS control grid columns on desktop */
  }

  .catalog-hero,
  .dashboard-hero,
  .messages-hero,
  .profile-hero,
  .product-hero,
  .status-hero {
    padding: 32px 28px;
  }

  .catalog-search {
    flex-direction: row;
    align-items: center;
  }

  .catalog-search input,
  .catalog-search .btn {
    width: auto;
  }

  .dashboard-chat-input {
    flex-wrap: nowrap;
    padding: 14px;
  }

  .dashboard-chat-input .btn {
    width: auto;
    justify-content: center;
  }

  .message-item,
  .ticket-item,
  .profile-row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .summary-item {
    min-width: auto;
    flex: none;
  }

  .product-grid,
  .specs-grid,
  .sync-grid,
  .status-board,
  .purchase-grid {
    /* Reset to page-specific layouts */
  }

  .catalog-card {
    /* Restore min-height from page CSS */
  }

  .landing-preview-3d {
    padding: 24px;
  }

  .preview-3d-box {
    max-width: none;
  }
}

/* ── Small desktop (>=1101px) ── */
@media (min-width: 1101px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Large desktop (>=1381px) ── */
@media (min-width: 1381px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* === responsive.css === */
@media (max-width: 1380px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-hero {
    grid-template-columns: 1fr;
  }

  .status-summary {
    justify-content: flex-start;
  }

  .dashboard-grid,
  .landing-grid,
  .admin-grid,
  .messages-grid,
  .tickets-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chat-panel {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-hero {
    grid-template-columns: 1fr;
  }

  .catalog-hero-actions {
    width: 100%;
    justify-items: stretch;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-actions,
  .messages-hero-actions,
  .profile-hero-actions,
  .catalog-filters,
  .status-summary {
    justify-content: flex-start;
  }

  .product-grid,
  .specs-grid,
  .sync-grid,
  .status-board,
  .purchase-grid {
    grid-template-columns: 1fr;
  }

  .product-hero-main {
    max-width: none;
  }

  .status-controls {
    grid-template-columns: 1fr;
  }

  .catalog-card {
    min-height: auto;
  }

  .landing-preview-3d {
    padding: 16px;
  }

  .preview-3d-box {
    max-width: 180px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 24px 16px 48px;
  }

  .catalog-grid,
  .pricing-grid,
  .showcase-screen-grid {
    grid-template-columns: 1fr;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .catalog-hero,
  .dashboard-hero,
  .messages-hero,
  .profile-hero,
  .product-hero,
  .status-hero {
    padding: 22px 18px;
  }

  .dashboard-metrics,
  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .dashboard-chat-input {
    flex-wrap: wrap;
    border-radius: var(--radius-md);
    padding: 10px;
  }

  .dashboard-chat-input .btn {
    width: 100%;
    justify-content: center;
  }

  .chat-meta .metric-label {
    margin-left: 0;
    width: 100%;
  }

  .catalog-search {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-search input,
  .catalog-search .btn {
    width: 100%;
  }

  .status-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .status-actions {
    justify-content: flex-start;
  }

  .summary-item {
    min-width: calc(50% - 9px);
    flex: 1 1 140px;
  }

  .message-item,
  .ticket-item,
  .profile-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .showcase-character {
    width: min(100%, 340px);
    margin: 0 auto;
  }

  .product-hero-card {
    width: 100%;
  }

  .landing-particles {
    display: none;
  }

  :root {
    --blur-xl: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .find-toggle.is-loading .find-icon {
    animation: none;
  }

  .find-label {
    transition: none;
  }

  .status-dot--live,
  .status-dot--warning,
  .status-dot--danger {
    animation: none !important;
  }

  .landing-feature,
  .invite-card,
  .preview-3d-box,
  .store-3d-card {
    animation: none !important;
  }

  .stagger-in > * {
    animation: none !important;
    opacity: 1;
  }
}

/* Touch-friendly tap targets for accessibility */
@media (pointer: coarse) {
  .btn,
  .btn-chip,
  .btn-ghost,
  .btn-primary,
  .topbar-menu-toggle,
  .icon-toggle-pill,
  .sound-toggle,
  .toggle,
  .toggle-slider,
  a.btn,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }

  .btn-success,
  .btn-warning,
  .btn-danger,
  .btn-luxury,
  .btn-gradient-border,
  .btn-icon-only,
  .icon-toggle-pill__btn {
    min-height: 44px;
    min-width: 44px;
  }

  .icon-toggle-pill__btn {
    padding: 4px;
  }

  .top-nav a {
    padding: 12px 16px;
  }

  .catalog-search button,
  .catalog-sort select,
  .admin-list-actions button,
  .pagination button,
  .status-pill {
    min-height: 44px;
  }

  input[type="checkbox"],
  input[type="radio"],
  input[type="range"]::-webkit-slider-thumb {
    min-width: 44px;
    min-height: 44px;
  }

  table button,
  .admin-actions button {
    min-height: 44px;
  }

  /* Mobile modals: full-screen on phones */
  .modal-overlay:not([hidden]) .modal-content,
  [data-admin-modal-overlay]:not([hidden]) [data-admin-modal],
  [data-ticket-modal-overlay]:not([hidden]) [data-ticket-modal] {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .modal-body,
  [data-admin-modal-body],
  [data-ticket-modal-body] {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Safe area insets for notched devices */
  .topbar {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  .modal-content {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================================
   ULTRAWIDE MONITOR SUPPORT (1440px+)
   ============================================================================ */

@media (min-width: 1440px) {
  /* Expand containers for ultrawide screens */
  .page-shell {
    max-width: 1440px;
    width: min(calc(100% - 80px), 1440px);
    padding: 40px 32px 80px;
  }

  .topbar {
    width: min(calc(100% - 80px), 1440px);
    padding: 16px 28px;
    gap: 28px;
  }

  /* Status page gets wider on ultrawide */
  body[data-page="status"] .topbar {
    max-width: 1600px;
  }

  /* Landing page stays constrained for readability */
  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    max-width: 1260px;
    width: min(calc(100% - 44px), 1260px);
  }

  /* Larger text on big screens */
  .gradient-title {
    font-size: clamp(36px, 2.5vw, 48px);
  }

  /* Expand grids for more space */
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================================================
   EXTRA-LARGE SCREENS (1920px+)
   ============================================================================ */

@media (min-width: 1920px) {
  .page-shell {
    max-width: 1600px;
    width: min(calc(100% - 120px), 1600px);
    padding: 48px 40px 96px;
  }

  .topbar {
    width: min(calc(100% - 120px), 1600px);
    padding: 18px 32px;
    gap: 32px;
  }

  body[data-page="status"] .topbar {
    max-width: 1800px;
  }

  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    max-width: 1400px;
    width: min(calc(100% - 80px), 1400px);
  }

  .gradient-title {
    font-size: clamp(42px, 3vw, 56px);
  }

  .catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ============================================================================
   ULTRAWIDE+ MONITORS (2560px+)
   ============================================================================ */

@media (min-width: 2560px) {
  .page-shell {
    max-width: 1920px;
    width: min(calc(100% - 200px), 1920px);
    padding: 56px 48px 120px;
  }

  .topbar {
    width: min(calc(100% - 200px), 1920px);
    padding: 20px 40px;
    gap: 40px;
  }

  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    max-width: 1600px;
    width: min(calc(100% - 120px), 1600px);
  }

  html {
    font-size: 18px; /* Scale up base font size */
  }

  .catalog-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ============================================================================
   PERFECT ALIGNMENT FIXES
   ============================================================================ */

/* Ensure topbar and page-shell always align */
@media (min-width: 1180px) and (max-width: 1439px) {
  .page-shell,
  .topbar {
    width: min(calc(100% - 36px), 1380px);
  }

  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    width: min(calc(100% - 44px), 1260px);
  }
}

/* Tablet alignment (981px - 1179px) */
@media (min-width: 981px) and (max-width: 1179px) {
  .page-shell,
  .topbar {
    width: min(calc(100% - 44px), 1260px);
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* Ensure no horizontal scroll on any screen size */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 640px) {
  .metric-label,
  .field label,
  .caption,
  .text-muted,
  .eyebrow {
    font-size: var(--fs-xs);
  }
}

@media (max-width: 480px) {
  body {
    font-size: var(--fs-base);
  }
  .glass-panel {
    padding: 12px;
  }
  .panel-body {
    padding: 12px;
  }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  h3 { font-size: var(--fs-lg); }
}

/* ============================================================================
   SLOW CONNECTION ADAPTATIONS
   Applied when navigator.connection.effectiveType is 2g or slow-2g.
   Disables expensive rendering features to improve performance on slow networks.
   ============================================================================ */

html.is-slow-connection .glass-panel,
html.is-slow-connection .glass-card,
html.is-slow-connection .glass-nav,
html.is-slow-connection .glass-modal,
html.is-slow-connection .glass-input,
html.is-slow-connection .topbar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.is-slow-connection .landing-particles {
  display: none !important;
}

html.is-slow-connection .body-bg::before,
html.is-slow-connection .body-bg::after {
  animation: none !important;
  background: var(--bg-0);
}

html.is-slow-connection .glass-panel::after,
html.is-slow-connection .catalog-card::after,
html.is-slow-connection .game-card::after {
  animation: none !important;
  display: none;
}

html.is-slow-connection .btn::before,
html.is-slow-connection .btn-primary::after {
  display: none;
}

html.is-mid-connection .glass-panel,
html.is-mid-connection .glass-card,
html.is-mid-connection .glass-nav {
  backdrop-filter: blur(12px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(120%) !important;
}

/* ── 4K / large-display tier (TV from couch distance) ── */
@media (min-width: 3840px) {
  .page-shell, .topbar { max-width: 2560px; width: min(calc(100% - 280px), 2560px); }
  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar { max-width: 2000px; width: min(calc(100% - 200px), 2000px); }
  .catalog-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* ── TV / large-screen focus: thicker, room-visible focus rings ── */
@media (min-width: 1920px) {
  :focus-visible { outline-width: 3px; outline-offset: 3px; }
  .top-nav a:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 70%, transparent); }
  button:focus-visible, a:focus-visible, [role="button"]:focus-visible,
  [tabindex]:focus-visible { box-shadow: 0 0 0 6px rgba(123, 220, 255, 0.3); }
}

/* ── Tablet: give 3-col product/spec grids a 2-col step (instead of 3->1) ── */
@media (min-width: 721px) and (max-width: 980px) {
  .specs-grid, .sync-grid, .showcase-screen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* === marketplace.css === */
/* ============================================================
   Cyno.gg Marketplace Styles
   Premium luxury glass-morphism with refined depth and motion
   ============================================================ */

/* --- Marketplace Grid --- */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  padding: 28px 0;
}

/* --- Config Card --- */
.config-card {
  position: relative;
  background: linear-gradient(160deg, rgba(18, 28, 48, 0.72), rgba(12, 18, 32, 0.58));
  border: 1px solid rgba(140, 180, 240, 0.18);
  border-radius: 18px;
  padding: 26px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}

.config-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 35%,
    rgba(255, 255, 255, 0) 50%
  );
  opacity: 0.6;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.config-card::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(123, 220, 255, 0.12),
    transparent 45%
  ), radial-gradient(
    circle at 80% 80%,
    rgba(217, 183, 122, 0.08),
    transparent 40%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.config-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-6px);
  box-shadow:
    0 16px 48px rgba(3, 8, 18, 0.55),
    0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 12%, transparent);
}

.config-card:hover::before {
  opacity: 0.85;
}

.config-card:hover::after {
  opacity: 0.5;
}

.config-card:active {
  transform: translateY(-3px) scale(0.98);
  transition-duration: 0.1s;
}

.config-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.config-card-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: #f0f5ff;
  margin: 0;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.config-card-price {
  position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, transparent), color-mix(in srgb, var(--accent) 18%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
  padding: 6px 14px;
  border-radius: 22px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  letter-spacing: 0.02em;
}

.config-card:hover .config-card-price {
  box-shadow: 0 5px 18px color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translateY(-1px);
}

.config-card-price.free {
  background: linear-gradient(135deg, color-mix(in srgb, var(--status-success) 28%, transparent), color-mix(in srgb, var(--status-success) 18%, transparent));
  border-color: color-mix(in srgb, var(--status-success) 35%, transparent);
  color: var(--status-success);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--status-success) 18%, transparent);
}

.config-card-desc {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.config-card-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.48);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.config-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.config-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.config-card-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 4px 11px;
  border-radius: 14px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  letter-spacing: 0.01em;
}

.config-card:hover .config-card-tag {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
}

/* --- Rating Stars --- */
.rating-stars {
  display: inline-flex;
  gap: 6px;
  font-size: 0.88rem;
}

.rating-stars .star {
  color: var(--status-warning);
  text-shadow: 0 0 10px color-mix(in srgb, var(--status-warning) 35%, transparent);
}

.rating-stars .star.empty {
  color: rgba(255, 255, 255, 0.14);
  text-shadow: none;
}

/* --- Badges --- */
.download-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--status-success) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-success) 28%, transparent);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--status-success);
  letter-spacing: 0.02em;
}

.owned-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--status-success) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-success) 22%, transparent);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--status-success);
  letter-spacing: 0.02em;
}

/* --- Filters Section --- */
.glass-panel:has(.marketplace-filters) {
  padding: 22px 28px !important;
}

.marketplace-filters {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 18px;
  border-radius: 22px;
  cursor: pointer;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.68);
  user-select: none;
  letter-spacing: 0.01em;
}

.filter-chip:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  color: color-mix(in srgb, var(--accent) 82%, var(--text));
  transform: translateY(-2px);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 15%, transparent);
}

.filter-chip.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, transparent), color-mix(in srgb, var(--accent) 18%, transparent));
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
  box-shadow: 0 3px 14px color-mix(in srgb, var(--accent) 22%, transparent);
  font-weight: 600;
}

.filter-chip:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}

/* --- Search --- */
.marketplace-search {
  flex: 1;
  min-width: 240px;
}

.marketplace-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 20px;
  border-radius: 14px;
  color: #f0f5ff;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  transition: border-color 0.3s ease,
              background-color 0.3s ease,
              box-shadow 0.3s ease;
  letter-spacing: 0.01em;
}

.marketplace-search input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.marketplace-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* --- Sort --- */
.marketplace-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.marketplace-sort label {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.48);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  /* Filter labels like "Sort:" / "Price:" / "Rating:" must not wrap — they were
     splitting mid-word ("SOR" / "T:") on the default filter row because the
     parent flex item had narrow content-width and let label characters wrap. */
  white-space: nowrap;
  flex-shrink: 0;
}

.marketplace-sort select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 11px 16px;
  border-radius: 12px;
  color: #f0f5ff;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.marketplace-sort select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.marketplace-sort select option {
  background: var(--bg-2);
  color: var(--text);
}

/* --- Points Balance --- */
.points-balance {
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  padding: 11px 20px;
  border-radius: 26px;
  font-size: 0.92rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
  box-shadow: 0 5px 18px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  letter-spacing: -0.01em;
}

.points-balance:hover {
  box-shadow: 0 7px 26px color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translateY(-2px);
}

.points-balance .points-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 45%, transparent));
}

.points-balance .points-value {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

.points-balance.updating {
  animation: pulse-balance 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pulse-balance {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.modal-overlay.visible {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: linear-gradient(160deg, rgba(18, 28, 52, 0.92), rgba(14, 22, 40, 0.85));
  border: 1px solid rgba(140, 180, 240, 0.22);
  border-radius: 22px;
  padding: 0;
  max-width: 680px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 36px 90px rgba(2, 6, 16, 0.65), 0 0 50px rgba(118, 224, 255, 0.12);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.visible .modal-content {
  transform: scale(1) translateY(0);
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(123, 220, 255, 0.25);
  border-radius: 3px;
}

.modal-content h2 {
  margin: 0;
  color: #f0f5ff;
  font-size: 1.45rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 18px;
  border-radius: 12px;
  color: #f0f5ff;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  transition: border-color 0.3s ease,
              background-color 0.3s ease,
              box-shadow 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group select option {
  background: var(--bg-2);
  color: var(--text);
}

/* --- Config Detail --- */
.config-detail {
  padding: 8px 0;
}

.config-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.config-detail-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: #f0f5ff;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.config-detail-price {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, var(--text)), color-mix(in srgb, var(--accent) 65%, var(--text)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.config-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  margin: 28px 0;
  padding: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.meta-item {
  text-align: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 10px;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.meta-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.meta-item .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f0f5ff;
}

.meta-item .label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Reviews --- */
.reviews-section {
  margin-top: 32px;
}

.reviews-section h3 {
  color: #f0f5ff;
  margin: 0 0 18px;
  font-size: 1.18rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.review-item {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.25s ease;
  border-radius: 8px;
}

.review-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.review-rating {
  display: flex;
  gap: 6px;
}

.review-comment {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  line-height: 1.65;
}

.review-date {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.32);
  margin-top: 10px;
}

/* --- Status Badges --- */
.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.status-badge.pending_review {
  background: color-mix(in srgb, var(--status-warning) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-warning) 28%, transparent);
  color: var(--status-warning);
}

.status-badge.active {
  background: color-mix(in srgb, var(--status-success) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-success) 28%, transparent);
  color: var(--status-success);
}

.status-badge.rejected {
  background: color-mix(in srgb, var(--status-danger) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-danger) 28%, transparent);
  color: var(--status-danger);
}

.status-badge.archived {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.48);
}

/* --- Marketplace Hero --- */
.marketplace-hero {
  padding: 36px;
}

.marketplace-hero-content {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
}

.marketplace-hero-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--accent) 18%, transparent), 0 6px 20px rgba(0, 0, 0, 0.25);
}

.marketplace-hero-icon svg {
  width: 36px;
  height: 36px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 6px;
}

.gradient-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f0f5ff, color-mix(in srgb, var(--accent) 75%, #f0f5ff));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.metric-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.5;
}

.marketplace-hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Loading State --- */
.marketplace-loading {
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 70px 24px;
  text-align: center;
  grid-column: 1 / -1;
}

.marketplace-load-more {
  text-align: center;
  padding: 24px;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 90px 24px;
  color: rgba(255, 255, 255, 0.48);
}

.empty-state h3 {
  color: rgba(255, 255, 255, 0.68);
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.empty-state p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.22);
}

.empty-state-icon svg {
  width: 36px;
  height: 36px;
}

/* --- Modal Layout --- */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
}

.modal-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.modal-close:hover {
  background: color-mix(in srgb, var(--glass-bg-strong) 55%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
  transform: rotate(90deg);
}

.modal-body {
  padding: 28px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 18px 28px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: rgba(255, 255, 255, 0.015);
}

.modal-lg {
  max-width: 780px;
}

.modal-xl {
  max-width: 940px;
}

/* --- Form Rows --- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Category Filters --- */
.marketplace-categories {
  padding-top: 12px;
  padding-bottom: 10px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent);
}

/* --- Card Shimmer Effect --- */
.config-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.config-card:hover::after {
  animation: shimmerSweep 0.9s ease forwards;
}

@keyframes shimmerSweep {
  to {
    left: 100%;
  }
}

/* --- Card Glow on Hover --- */
.config-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-6px);
  box-shadow:
    0 16px 48px rgba(3, 8, 18, 0.55),
    0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 12%, transparent);
}

/* --- Responsive Hero --- */
@media (max-width: 768px) {
  .marketplace-hero {
    padding: 28px;
  }

  .marketplace-hero-content {
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }

  .marketplace-hero-icon {
    width: 64px;
    height: 64px;
  }

  .marketplace-hero-actions {
    justify-content: center;
  }

  .gradient-title {
    font-size: 1.65rem;
  }
}

@media (max-width: 480px) {
  .marketplace-hero {
    padding: 24px;
  }

  .marketplace-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .points-balance {
    justify-content: center;
  }

  .gradient-title {
    font-size: 1.45rem;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  outline: none;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn:active {
  transform: scale(0.96);
}

.marketplace-shell .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.marketplace-shell .btn-ghost {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text);
}
.marketplace-shell .btn-ghost:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: var(--accent);
}

.btn-success {
  background: linear-gradient(135deg, color-mix(in srgb, var(--status-success) 75%, var(--bg-1)), color-mix(in srgb, var(--status-success) 65%, var(--bg-1)));
  color: var(--bg-0);
  box-shadow: 0 5px 18px color-mix(in srgb, var(--status-success) 32%, transparent);
}

.btn-success:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--status-success) 85%, var(--bg-1)), color-mix(in srgb, var(--status-success) 75%, var(--bg-1)));
  box-shadow: 0 7px 26px color-mix(in srgb, var(--status-success) 42%, transparent);
  transform: translateY(-2px);
}

/* --- Loading Spinner --- */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 70px;
}

.loading-spinner::after {
  content: "";
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s cubic-bezier(0.6, 0.15, 0.35, 0.85) infinite;
}

/* --- Notification Toast --- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: linear-gradient(160deg, rgba(18, 28, 52, 0.96), rgba(14, 22, 40, 0.9));
  border: 1px solid rgba(140, 180, 240, 0.22);
  border-radius: 16px;
  padding: 18px 26px;
  color: #f0f5ff;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 14px 44px rgba(3, 8, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  transform: translateY(110px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 420px;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: color-mix(in srgb, var(--status-success) 35%, transparent);
}

.toast.error {
  border-color: color-mix(in srgb, var(--status-danger) 35%, transparent);
}

.toast.info {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .marketplace-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .marketplace-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .marketplace-search {
    min-width: 100%;
  }

  .marketplace-sort {
    justify-content: flex-start;
  }

  .config-detail-header {
    flex-direction: column;
  }

  .config-detail-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-content {
    padding: 0;
    width: 96%;
  }
}

@media (max-width: 480px) {
  .config-card {
    padding: 20px;
  }

  .config-card-header {
    flex-direction: column;
    gap: 10px;
  }

  .config-detail-meta {
    grid-template-columns: 1fr;
  }

  .points-balance {
    padding: 9px 16px;
    font-size: 0.82rem;
  }
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .config-card,
  .config-card::before,
  .config-card::after,
  .config-card-price,
  .filter-chip,
  .points-balance,
  .btn,
  .modal-overlay,
  .modal-content,
  .toast,
  .loading-spinner::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .points-balance.updating {
    animation: none;
  }
}

/* --- Focus States --- */
.filter-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.btn-success:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================================
   Marketplace — view toggle (grid/list) + rating filter (added)
   ============================================================ */
.marketplace-view-toggle {
  display: inline-flex; gap: 4px; padding: 3px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 85%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border, rgba(120,150,200,0.25)) 55%, transparent);
  margin-left: auto;
}
.mp-view-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-muted, #9fb1cc);
  cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.mp-view-btn svg { width: 18px; height: 18px; }
.mp-view-btn:hover { color: var(--text, #eef3ff); }
.mp-view-btn.is-active {
  color: #04141a;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #06121a), color-mix(in srgb, var(--accent) 65%, #06121a));
}

/* List view: single column, cards become horizontal rows. */
.marketplace-grid.is-list-view {
  grid-template-columns: 1fr !important;
}
.marketplace-grid.is-list-view .config-card,
.marketplace-grid.is-list-view .marketplace-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
}
.marketplace-grid.is-list-view .config-card .config-thumb,
.marketplace-grid.is-list-view .marketplace-card img,
.marketplace-grid.is-list-view .marketplace-card .config-thumb {
  height: 80px;
}
/* ============================================================
   Marketplace — luxury polish to match admin.html glass panels
   ============================================================ */

/* Filter bar: lift the plain glass-panel that wraps the filters into an
   elevated, layered-glass control bar (admin tile depth). The filters panel
   is the 2nd glass-panel inside the product shell. */
.product-shell > .glass-panel:nth-of-type(2) {
  background:
    radial-gradient(130% 60% at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 62%),
    linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong, rgba(16,24,40,0.66)) 90%, transparent), color-mix(in srgb, var(--glass-bg, rgba(16,24,40,0.44)) 72%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 22px 48px rgba(2,6,12,0.42);
  border-color: color-mix(in srgb, var(--glass-border) 75%, transparent);
}

/* Breathing room between the filter row and the category chip row so nothing
   reads as touching. */
.marketplace-filters { row-gap: 16px; }
.marketplace-categories { margin-top: 16px; }

/* Search field: a hair more presence to anchor the bar. */
.marketplace-search input {
  background: color-mix(in srgb, var(--glass-bg, rgba(16,24,40,0.5)) 62%, transparent);
}

/* Hero icon: gentle accent glow to match admin's accent-badge language. */
.marketplace-hero-icon {
  box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 16%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Card titles pick up the gradient-title sheen on hover (admin row feel). */
.config-card:hover .config-card-name {
  background: linear-gradient(135deg, #f0f5ff 35%, var(--accent) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}


/* === pending-approval.css === */
/* ============================================================
   Pending Approval Page
   For users awaiting admin approval after registration.
   Luxury glass-morphism design with status indicators.
   ============================================================ */

.pending-shell {
  display: grid;
  gap: 24px;
  max-width: 620px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  animation: fadeInUp 0.6s ease;
  position: relative;
  z-index: 1;
}

/* Ambient halo behind card */
body[data-page="pending-approval"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(780px 600px at 50% 30%,
      color-mix(in srgb, var(--status-warning) 10%, transparent) 0%,
      transparent 60%),
    radial-gradient(420px 320px at 88% 110%,
      color-mix(in srgb, var(--accent) 8%, transparent) 0%,
      transparent 70%);
}

body[data-page="pending-approval"]::after {
  content: "";
  position: fixed;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 36vw, 480px);
  height: clamp(280px, 36vw, 480px);
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(closest-side,
      color-mix(in srgb, var(--status-warning) 14%, transparent),
      transparent 70%);
  filter: blur(40px);
  opacity: 0.5;
  animation: authHaloDrift 14s ease-in-out infinite;
}

.pending-card {
  padding: 36px;
  display: grid;
  gap: 20px;
  position: relative;
  overflow: hidden;
  animation: authCardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease,
    border-color 0.5s ease;
}

.pending-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 32px 60px rgba(2, 8, 18, 0.55),
    0 0 0 1px color-mix(in srgb, var(--status-warning) 20%, transparent),
    0 0 60px color-mix(in srgb, var(--status-warning) 8%, transparent);
}

.pending-card > * {
  position: relative;
  z-index: 1;
}

/* Status icon with animated ring */
.pending-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--status-warning) 40%, var(--glass-border));
  background: radial-gradient(circle at 35% 30%,
    color-mix(in srgb, var(--status-warning) 20%, transparent),
    transparent 65%);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 22px rgba(2, 6, 12, 0.4),
    0 0 28px color-mix(in srgb, var(--status-warning) 18%, transparent);
  position: relative;
  color: var(--status-warning);
}

.pending-icon::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--status-warning) 30%, transparent);
  animation: pendingRingSpin 8s linear infinite;
  pointer-events: none;
}

.pending-icon svg {
  width: 36px;
  height: 36px;
}

@keyframes pendingRingSpin {
  to { transform: rotate(360deg); }
}

/* Header cluster */
.pending-head {
  display: grid;
  justify-items: center;
  gap: 12px;
}

/* Live auto-updating badge */
.pending-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--status-warning) 88%, #f7efe2 12%);
  background: color-mix(in srgb, var(--status-warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-warning) 30%, transparent);
}

.pending-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-warning);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-warning) 60%, transparent);
  animation: pendingLivePulse 2s ease-in-out infinite;
}

@keyframes pendingLivePulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-warning) 55%, transparent); opacity: 1; }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--status-warning) 0%, transparent); opacity: 0.6; }
}

/* Heading and message */
.pending-card h1 {
  margin: 0;
  text-align: center;
}

.pending-card .eyebrow {
  text-align: center;
}

/* ── Review progress timeline ─────────────────────────────── */
.pending-timeline {
  list-style: none;
  margin: 0;
  padding: 18px 18px 14px;
  display: grid;
  gap: 0;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.pending-tl-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding-bottom: 18px;
}
.pending-tl-step:last-child { padding-bottom: 0; }

/* connecting line */
.pending-tl-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--glass-border) 70%, transparent);
}
.pending-tl-step.is-done:not(:last-child)::before {
  background: color-mix(in srgb, var(--status-success) 55%, transparent);
}

.pending-tl-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: #04121c;
  z-index: 1;
}
.pending-tl-marker svg { width: 13px; height: 13px; }

.pending-tl-step.is-done .pending-tl-marker {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--status-success) 80%, #0d1a2a),
    color-mix(in srgb, var(--status-success) 60%, #0d1a2a));
  border-color: color-mix(in srgb, var(--status-success) 55%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--status-success) 35%, transparent);
}

.pending-tl-step.is-active .pending-tl-marker {
  border-color: color-mix(in srgb, var(--status-warning) 60%, transparent);
  background: color-mix(in srgb, var(--status-warning) 16%, transparent);
}
.pending-tl-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status-warning);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-warning) 55%, transparent);
  animation: pendingLivePulse 1.8s ease-in-out infinite;
}

.pending-tl-step.is-rejected .pending-tl-marker {
  background: color-mix(in srgb, var(--status-danger, #ff6b6b) 20%, transparent);
  border-color: color-mix(in srgb, var(--status-danger, #ff6b6b) 55%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--status-danger, #ff6b6b) 30%, transparent);
}
.pending-tl-step.is-rejected .pending-tl-name { color: var(--text); }

.pending-tl-text {
  display: grid;
  gap: 2px;
  padding-top: 1px;
}
.pending-tl-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
}
.pending-tl-step.is-done .pending-tl-name { color: var(--text); }
.pending-tl-step.is-active .pending-tl-name { color: var(--text); }
.pending-tl-sub {
  font-size: 12px;
  color: var(--text-dim, #9fb1cc);
}

/* ── What happens next ────────────────────────────────────── */
.pending-next {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
}
.pending-next .eyebrow { text-align: left; }
.pending-next-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.pending-next-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}
.pending-next-list svg {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--accent);
  opacity: 0.9;
}

.pending-verified {
  color: color-mix(in srgb, var(--status-success) 85%, #e8f6f1 15%);
  font-weight: 600;
}

/* ── Trust Authenticator (HWID verification) ──────────────── */
.pending-trust-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pending-trust-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.pending-trust-icon svg { width: 22px; height: 22px; }
.pending-trust-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--status-warning);
}
.pending-trust-state::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--status-warning);
  box-shadow: 0 0 8px color-mix(in srgb, var(--status-warning) 55%, transparent);
}
.pending-trust-state.is-verified {
  color: color-mix(in srgb, var(--status-success) 85%, #e8f6f1 15%);
}
.pending-trust-state.is-verified::before {
  background: var(--status-success);
  box-shadow: 0 0 8px color-mix(in srgb, var(--status-success) 55%, transparent);
}

/* When verified, recolor the section accent to success */
.pending-download-section.is-verified {
  border-color: color-mix(in srgb, var(--status-success) 35%, var(--glass-border));
  background: color-mix(in srgb, var(--status-success) 6%, var(--glass-bg) 50%);
}
.pending-download-section.is-verified .pending-trust-icon {
  color: var(--status-success);
  background: color-mix(in srgb, var(--status-success) 12%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 30%, transparent);
}
.pending-download-btn.is-downloaded {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--status-success) 50%, #0d1a2a),
    color-mix(in srgb, var(--accent-2) 55%, #0d1a2a));
  border-color: color-mix(in srgb, var(--status-success) 50%, transparent);
}

.pending-trust-privacy {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim, #9fb1cc);
  display: flex;
  gap: 6px;
}

.pending-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
  text-align: center;
}

.pending-message strong {
  color: var(--text);
}

/* Carousel dots */
.pending-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: -8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--status-warning) 25%, transparent);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.carousel-dot.is-active {
  background: var(--status-warning);
  transform: scale(1.3);
  box-shadow: 0 0 8px color-mix(in srgb, var(--status-warning) 50%, transparent);
}

.carousel-dot:hover {
  background: color-mix(in srgb, var(--status-warning) 55%, transparent);
}

/* Details rows */
.pending-details {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.pending-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.pending-detail-row:not(:last-child) {
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent);
}

.pending-code {
  font-family: "Sora", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.pending-date {
  font-size: 13px;
  color: var(--text-soft);
}

/* Download section */
.pending-download-section {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 5%, var(--glass-bg) 50%);
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.pending-download-title {
  margin: 0;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

.pending-download-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.pending-download-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.pending-download-btn:hover::after {
  transform: translateX(120%);
}

.pending-download-btn.is-downloaded {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--status-success) 50%, #0d1a2a),
    color-mix(in srgb, var(--accent-2) 55%, #0d1a2a));
  border-color: color-mix(in srgb, var(--status-success) 50%, transparent);
}

.pending-download-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.pending-download-meta {
  text-align: center;
}

/* Support link */
.pending-support {
  text-align: center;
  margin-top: 4px;
}

.pending-support a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pending-support a:hover {
  color: color-mix(in srgb, var(--accent) 80%, white);
  border-color: var(--accent);
}

/* Status pill overrides for this page */
#pendingStatus.status-pill--monitoring {
  background: color-mix(in srgb, var(--status-warning) 16%, transparent);
  border-color: color-mix(in srgb, var(--status-warning) 40%, transparent);
  color: color-mix(in srgb, var(--status-warning) 85%, #f7efe2 15%);
}

#pendingStatus.status-pill--operational {
  background: color-mix(in srgb, var(--status-success) 16%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 40%, transparent);
  color: color-mix(in srgb, var(--status-success) 85%, #e8f6f1 15%);
}

/* Topbar z-index above halo */
body[data-page="pending-approval"] .topbar {
  z-index: 21;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pending-card,
  .pending-icon::before,
  .pending-live-dot,
  .pending-tl-pulse,
  body[data-page="pending-approval"]::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Small screens */
@media (max-width: 540px) {
  body[data-page="pending-approval"]::after {
    width: 80vw;
    height: 80vw;
    filter: blur(34px);
    opacity: 0.4;
  }

  .pending-shell {
    padding: 28px 14px 60px;
    gap: 18px;
  }

  .pending-card {
    padding: 24px 20px;
  }

  .pending-detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}


/* === steam-booster.css === */
/* ============================================================
   Steam Hour Booster Page
   Premium Steam hour boosting with dark blue Steam-inspired
   luxury design.
   ============================================================ */

.steam-booster-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  position: relative;
  z-index: 1;
}

/* Steam-inspired ambient background */
body[data-page="steam-booster"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 700px at 20% 15%,
      color-mix(in srgb, #1b2838 60%, transparent) 0%,
      transparent 60%),
    radial-gradient(600px 500px at 85% 80%,
      color-mix(in srgb, #171a21 50%, transparent) 0%,
      transparent 65%),
    radial-gradient(400px 300px at 60% 40%,
      color-mix(in srgb, #66c0f4 8%, transparent) 0%,
      transparent 55%);
}

body[data-page="steam-booster"]::after {
  content: "";
  position: fixed;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(400px, 50vw, 700px);
  height: clamp(400px, 50vw, 700px);
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(closest-side,
      color-mix(in srgb, #66c0f4 12%, transparent),
      transparent 70%);
  filter: blur(60px);
  opacity: 0.35;
  animation: steamHaloDrift 18s ease-in-out infinite;
}

@keyframes steamHaloDrift {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-48%, -52%) scale(1.04); }
}

/* Topbar above halo */
body[data-page="steam-booster"] .topbar {
  z-index: 21;
}

/* Eligibility card */
.eligibility-card {
  max-width: 560px;
  margin: 60px auto 0;
  padding: 40px 36px;
  display: grid;
  gap: 20px;
  text-align: center;
  animation: authCardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eligibility-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent-purple) 40%, var(--glass-border));
  background: radial-gradient(circle at 35% 30%,
    color-mix(in srgb, var(--accent-purple) 20%, transparent),
    transparent 65%);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 22px rgba(2, 6, 12, 0.4),
    0 0 28px color-mix(in srgb, var(--accent-purple) 18%, transparent);
  color: var(--accent-purple);
}

.eligibility-icon svg {
  width: 36px;
  height: 36px;
}

.eligibility-card .eyebrow,
.eligibility-card h1 {
  text-align: center;
}

.eligibility-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}

.eligibility-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* The [hidden] attribute must win over display:grid, otherwise the booster
   interface stays visible even when JS hides it (e.g. for non-premium users,
   who would then see both the upgrade prompt AND the tool). */
.steam-booster-grid[hidden] { display: none !important; }

/* Main grid layout */
.steam-booster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.steam-booster-grid .booster-controls-panel,
.steam-booster-grid .booster-stats-panel {
  grid-column: 1 / -1;
}

.steam-booster-grid .session-history-panel {
  grid-column: 1 / -1;
}

/* Steam connection panel */
.steam-connection-panel .panel-header {
  align-items: center;
}

.steam-connected-info {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--status-success) 30%, var(--glass-border));
  background: color-mix(in srgb, var(--status-success) 6%, var(--glass-bg) 40%);
}

.steam-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.steam-avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  border: 1px solid color-mix(in srgb, #66c0f4 30%, transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.steam-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steam-username {
  font-size: 14px;
  font-weight: 600;
  color: #66c0f4;
  font-family: var(--font-display);
}

/* ── Game Banner Carousel ── */

/* Game Search */
.game-search-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.game-search-input {
  width: 100%;
  padding: 12px 42px 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--border-inner);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.game-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.game-search-input:focus {
  outline: none;
  border-color: color-mix(in srgb, #66c0f4 50%, var(--glass-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, #66c0f4 15%, transparent), inset 0 0 0 1px var(--border-inner);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
}

.game-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.game-search-clear:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--glass-bg-strong) 100%, transparent);
}

.game-search-no-results {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.game-banner-carousel__track.is-filtered .game-banner-card {
  opacity: 0.2;
  pointer-events: none;
  filter: grayscale(0.5);
}

.game-banner-carousel__track.is-filtered .game-banner-card.is-matching {
  opacity: 1;
  pointer-events: auto;
  filter: none;
}

/* Game Banner Carousel Container */
.game-banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 4px 0;
}

.game-banner-carousel__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.game-banner-carousel__track::-webkit-scrollbar {
  display: none;
}

.game-banner-carousel__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* Individual Game Banner Card */
.game-banner-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  box-shadow: 0 8px 24px rgba(2, 6, 12, 0.35), inset 0 0 0 1px var(--border-inner);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
}

.game-banner-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: color-mix(in srgb, #66c0f4 40%, var(--glass-border));
  box-shadow: 0 12px 36px rgba(2, 6, 12, 0.5),
              0 0 24px color-mix(in srgb, #66c0f4 18%, transparent),
              inset 0 0 0 1px var(--border-inner);
}

.game-banner-card.is-selected {
  border-color: #66c0f4;
  box-shadow: 0 0 0 2px color-mix(in srgb, #66c0f4 30%, transparent),
              0 16px 40px rgba(2, 6, 12, 0.5),
              0 0 32px color-mix(in srgb, #66c0f4 22%, transparent);
  transform: translateY(-4px) scale(1.03);
}

/* Banner Image (16:9 aspect ratio) */
.game-banner-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.game-banner-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease;
}

.game-banner-card:hover .game-banner-card__image {
  transform: scale(1.08);
  filter: saturate(1.1) brightness(1.05);
}

/* Gradient overlay on image bottom */
.game-banner-card__image-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(6, 10, 20, 0.95) 0%, transparent 100%);
  pointer-events: none;
}

/* Status Badge on Banner */
.game-banner-card__status {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.game-banner-card__status .status-pill {
  font-size: 9px;
  padding: 3px 8px;
  letter-spacing: 0.1em;
}

/* Card Content Below Image */
.game-banner-card__content {
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.game-banner-card__name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-banner-card__meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* Navigation Arrows */
.game-banner-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 12px rgba(2, 6, 12, 0.3);
}

.game-banner-carousel:hover .game-banner-carousel__nav {
  opacity: 1;
}

.game-banner-carousel__nav--prev { left: 4px; }
.game-banner-carousel__nav--next { right: 4px; }

.game-banner-carousel__nav:hover {
  border-color: color-mix(in srgb, #66c0f4 40%, var(--glass-border));
  transform: translateY(-50%) scale(1.08);
}

.game-banner-carousel__nav:active {
  transform: translateY(-50%) scale(0.96);
}

/* Selected Game Summary (replaces old selected-game-info) */
.selected-game-summary {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, #66c0f4 30%, var(--glass-border));
  background: color-mix(in srgb, #66c0f4 6%, var(--glass-bg) 40%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.selected-game-summary__thumb {
  width: 140px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  border: 1px solid color-mix(in srgb, #66c0f4 25%, transparent);
}

.selected-game-summary__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selected-game-summary__details {
  display: grid;
  gap: 2px;
}

.selected-game-summary__name {
  font-size: 15px;
  font-weight: 700;
  color: #66c0f4;
  font-family: var(--font-display);
}

/* Steam connection panel (keep existing) */
.booster-controls-panel .panel-header {
  align-items: center;
}

.hours-counter {
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, #66c0f4 25%, var(--glass-border));
  background: linear-gradient(145deg,
    color-mix(in srgb, #1b2838 40%, var(--glass-bg-strong)),
    color-mix(in srgb, #171a21 30%, var(--glass-bg)));
  box-shadow: inset 0 0 0 1px var(--border-inner);
  margin-bottom: 16px;
}

.hours-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hours-display {
  font-family: "Sora", ui-monospace, monospace;
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(135deg, #66c0f4, #1a9fff, #66c0f4);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hoursGradientShift 4s ease-in-out infinite;
  font-variant-numeric: tabular-nums;
}

@keyframes hoursGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hours-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Booster buttons */
.booster-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.booster-btn {
  min-width: 130px;
}

.booster-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-item:hover {
  border-color: color-mix(in srgb, #66c0f4 30%, var(--glass-border));
  transform: translateY(-2px);
}

.stat-value {
  font-family: "Sora", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 700;
  color: #66c0f4;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Session history table */
.session-history-table {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#sessionHistoryTable tbody tr {
  transition: background-color 0.2s ease;
}

#sessionHistoryTable tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

/* Session status pills in table */
.session-status-completed {
  color: var(--status-success);
}

.session-status-paused {
  color: var(--status-warning);
}

.session-status-stopped {
  color: var(--status-danger);
}

/* Steam status pill overrides */
#steamConnectionStatus.status-pill--operational {
  background: color-mix(in srgb, #66c0f4 16%, transparent);
  border-color: color-mix(in srgb, #66c0f4 40%, transparent);
  color: color-mix(in srgb, #66c0f4 85%, #e8f6f1 15%);
}

#sessionStatus.status-pill--operational {
  background: color-mix(in srgb, var(--status-success) 16%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 40%, transparent);
  color: color-mix(in srgb, var(--status-success) 85%, #e8f6f1 15%);
}

#sessionStatus.status-pill--monitoring {
  background: color-mix(in srgb, var(--status-warning) 16%, transparent);
  border-color: color-mix(in srgb, var(--status-warning) 40%, transparent);
  color: color-mix(in srgb, var(--status-warning) 85%, #f7efe2 15%);
}

/* Running animation for active session */
.session-running-pulse {
  animation: sessionPulse 2s ease-in-out infinite;
}

@keyframes sessionPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hours-display,
  body[data-page="steam-booster"]::after {
    animation: none !important;
  }

  .stat-item,
  .booster-btn {
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .steam-booster-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .booster-buttons {
    flex-direction: column;
  }

  .booster-btn {
    width: 100%;
  }

  .game-banner-card {
    flex: 0 0 180px;
  }

  .game-banner-carousel__nav {
    display: none;
  }

  .selected-game-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .selected-game-summary__thumb {
    width: 100%;
    height: 60px;
  }
}

@media (max-width: 540px) {
  body[data-page="steam-booster"]::after {
    width: 80vw;
    height: 80vw;
    filter: blur(40px);
    opacity: 0.25;
  }

  .steam-booster-shell {
    padding: 24px 14px 60px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-value {
    font-size: 18px;
  }

  .hours-display {
    font-size: 36px;
  }
}

/* ============================================================
   Luxury hero + features + how-it-works (added)
   ============================================================ */
.sb-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 36px 38px;
  margin-bottom: 22px;
}
.sb-hero__glow {
  position: absolute;
  inset: -40% 40% auto -10%;
  height: 360px;
  background: radial-gradient(60% 60% at 30% 30%, rgba(123,220,255,0.18), transparent 70%);
  pointer-events: none;
  filter: blur(8px);
}
.sb-hero__content { position: relative; z-index: 1; }
.sb-hero__title { margin: 6px 0 10px; font-size: clamp(28px, 4vw, 44px); }
.sb-hero__sub { color: var(--text-muted, #a8b9d4); max-width: 56ch; line-height: 1.6; margin: 0 0 18px; }
.sb-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 0;
  color: #cfe2ff;
  background: none;
  border: none;
}
.sb-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: #7bdcff; box-shadow: 0 0 8px #7bdcff; }
.sb-hero__stats {
  position: relative; z-index: 1;
  display: grid; gap: 14px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(16,24,40,0.4);
  border: 1px solid rgba(160,190,230,0.12);
}
.sb-hero-stat__val { font-family: var(--font-display, sans-serif); font-size: 28px; font-weight: 700; color: #eef3ff; line-height: 1; }
.sb-hero-stat__key { font-size: 12px; color: var(--text-muted, #a8b9d4); margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }

.sb-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.sb-feature { padding: 20px; display: grid; gap: 8px; align-content: start; }
.sb-feature__icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-grid; place-items: center;
  color: #7bdcff;
  background: rgba(123,220,255,0.08);
  border: 1px solid rgba(123,220,255,0.2);
}
.sb-feature__icon svg { width: 22px; height: 22px; }
.sb-feature h4 { margin: 4px 0 0; font-size: 15px; color: #eef3ff; }
.sb-feature p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted, #a8b9d4); }

.sb-howto { padding: 28px 30px; margin-bottom: 26px; }
.sb-howto__head { margin-bottom: 16px; }
.sb-howto__head h3 { margin: 4px 0 0; }
.sb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sb-step { display: flex; gap: 12px; align-items: flex-start; }
.sb-step__num {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #04121c;
  background: linear-gradient(135deg, #7bdcff, #9b8cff);
}
.sb-step strong { display: block; color: #eef3ff; font-size: 14px; margin-bottom: 2px; }
.sb-step span { font-size: 13px; line-height: 1.45; color: var(--text-muted, #a8b9d4); }

@media (max-width: 900px) {
  .sb-hero { grid-template-columns: 1fr; }
  .sb-features { grid-template-columns: repeat(2, 1fr); }
  .sb-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .sb-features { grid-template-columns: 1fr; }
  .sb-hero { padding: 24px 20px; }
}

/* === gifts.css === */
/* ============================================================
   Gift Redemption Page
   Luxury gift code redemption matching the site design system.
   ============================================================ */

.gifts-shell {
  display: grid;
  gap: 24px;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  animation: fadeInUp 0.6s ease;
  position: relative;
  z-index: 1;
}

/* The redeem + history cards were stacking flush — give them the same gap so
   the group boxes never touch. */
.gifts-grid {
  display: grid;
  gap: 24px;
}

/* Ambient halo with warm gold accent */
body[data-page="gifts"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(780px 600px at 50% 30%,
      color-mix(in srgb, var(--accent-3) 12%, transparent) 0%,
      transparent 60%),
    radial-gradient(420px 320px at 88% 110%,
      color-mix(in srgb, var(--accent) 10%, transparent) 0%,
      transparent 70%);
}

body[data-page="gifts"]::after {
  content: "";
  position: fixed;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 36vw, 480px);
  height: clamp(280px, 36vw, 480px);
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(closest-side,
      color-mix(in srgb, var(--accent-3) 16%, transparent),
      transparent 70%);
  filter: blur(40px);
  opacity: 0.5;
  animation: giftHaloDrift 14s ease-in-out infinite;
}

@keyframes giftHaloDrift {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -52%) scale(1.06); }
}

/* Topbar above halo */
body[data-page="gifts"] .topbar {
  z-index: 21;
}

.gifts-card {
  padding: 36px;
  display: grid;
  gap: 20px;
  position: relative;
  overflow: hidden;
  animation: authCardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease,
    border-color 0.5s ease;
}

.gifts-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 32px 60px rgba(2, 8, 18, 0.55),
    0 0 0 1px color-mix(in srgb, var(--accent-3) 20%, transparent),
    0 0 60px color-mix(in srgb, var(--accent-3) 8%, transparent);
}

.gifts-card > * {
  position: relative;
  z-index: 1;
}

/* Gift icon */
.gift-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent-3) 40%, var(--glass-border));
  background: radial-gradient(circle at 35% 30%,
    color-mix(in srgb, var(--accent-3) 20%, transparent),
    transparent 65%);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 22px rgba(2, 6, 12, 0.4),
    0 0 28px color-mix(in srgb, var(--accent-3) 18%, transparent);
  color: var(--accent-3);
  position: relative;
}

.gift-icon::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent-3) 30%, transparent);
  animation: giftRingSpin 10s linear infinite;
  pointer-events: none;
}

@keyframes giftRingSpin {
  to { transform: rotate(360deg); }
}

.gift-icon svg {
  width: 36px;
  height: 36px;
}

/* Heading and message */
.gifts-card h1,
.gifts-card .eyebrow {
  text-align: center;
}

.gifts-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
  text-align: center;
}

/* Code input section */
.gift-code-input-section {
  display: grid;
  gap: 12px;
}

.gift-code-input {
  font-size: 18px;
  letter-spacing: 0.12em;
  text-align: center;
}

.gift-check-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.gift-check-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.gift-check-btn:hover::after {
  transform: translateX(120%);
}

.gift-check-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Gift details panel */
.gift-details {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent-3) 30%, var(--glass-border));
  background: color-mix(in srgb, var(--accent-3) 5%, var(--glass-bg) 50%);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  display: grid;
  gap: 16px;
  animation: giftDetailsReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes giftDetailsReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gift-details-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gift-type-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 20%, transparent),
    color-mix(in srgb, var(--accent-2) 15%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
}

.gift-tier-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-3) 20%, transparent),
    color-mix(in srgb, #f0c75e 15%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent-3) 35%, transparent);
  color: var(--accent-3);
}

.gift-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gift-info-item {
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
}

.gift-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

/* Gift message */
.gift-message-section {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 25%, transparent);
}

.gift-message {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  font-style: italic;
  margin-top: 6px;
}

/* Redeem button */
.gift-redeem-section {
  text-align: center;
}

.gift-redeem-btn {
  width: 100%;
  max-width: 300px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-3) 60%, #1a1508),
    color-mix(in srgb, #f0c75e 55%, #1a1508));
  border-color: color-mix(in srgb, var(--accent-3) 50%, transparent);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.gift-redeem-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.gift-redeem-btn:hover::after {
  transform: translateX(120%);
}

.gift-redeem-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Status messages */
.gift-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  animation: giftStatusReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes giftStatusReveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.gift-status.is-success {
  border: 1px solid color-mix(in srgb, var(--status-success) 35%, transparent);
  background: color-mix(in srgb, var(--status-success) 8%, var(--glass-bg) 60%);
}

.gift-status.is-error {
  border: 1px solid color-mix(in srgb, var(--status-danger) 35%, transparent);
  background: color-mix(in srgb, var(--status-danger) 8%, var(--glass-bg) 60%);
}

.gift-status.is-loading {
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, var(--glass-bg) 60%);
}

.gift-status-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.gift-status-icon svg {
  width: 20px;
  height: 20px;
}

.gift-status.is-success .gift-status-icon {
  color: var(--status-success);
}

.gift-status.is-error .gift-status-icon {
  color: var(--status-danger);
}

.gift-status.is-loading .gift-status-icon {
  color: var(--accent);
}

.gift-status-text {
  font-size: 13px;
  color: var(--text-soft);
}

/* Gift history */
.gift-history-section {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent);
}

.gift-history-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.gift-history-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.gift-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gift-history-item:hover {
  border-color: color-mix(in srgb, var(--accent-3) 25%, var(--glass-border));
  transform: translateX(2px);
}

.gift-history-product {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.gift-history-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.gift-history-tier {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--accent-3) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-3) 25%, transparent);
  color: var(--accent-3);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gifts-card,
  .gift-icon::before,
  body[data-page="gifts"]::after,
  .gift-details,
  .gift-status {
    animation: none !important;
    transition: none !important;
  }
}

/* Small screens */
@media (max-width: 540px) {
  body[data-page="gifts"]::after {
    width: 80vw;
    height: 80vw;
    filter: blur(34px);
    opacity: 0.4;
  }

  .gifts-shell {
    padding: 28px 14px 60px;
    gap: 18px;
  }

  .gifts-card {
    padding: 24px 20px;
  }

  .gift-info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .gift-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}


/* === lobby.css === */
/* Multiplayer Lobby Page Styles */

.lobby-hero {
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.lobby-hero-content {
  flex: 1;
  min-width: 300px;
}

.lobby-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.lobby-hero-actions .btn {
  white-space: nowrap;
}

/* Lobby panel header — title on left, filters wrap below */
.lobby-shell .panel-header {
  flex-wrap: wrap;
  align-items: flex-start;
}

.lobby-shell .panel-header > div:first-child {
  flex: 1 1 200px;
  min-width: 0;
}

.lobby-shell .panel-header-actions {
  flex: 0 0 100%;
  /* min-width:0 so this and its children can shrink below content size —
     otherwise the wide game-filter carousel forces the whole row past the panel. */
  min-width: 0;
  max-width: 100%;
  padding-top: 8px;
}
/* The title block in the header must also be allowed to shrink. */
.lobby-shell .panel-header > div:first-child { min-width: 0; }

/* Lobby List */
.lobby-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

/* Cap the Active Lobbies browser so a long list scrolls inside the panel
   instead of stretching the whole page. The empty state still centers because
   its own min-height keeps it filling the area. */
#activeLobbiesList {
  max-height: 520px;
  overflow-y: auto;
  /* room for the scrollbar gutter so cards don't sit under it */
  padding-right: 4px;
  scrollbar-gutter: stable;
}
#activeLobbiesList .lobby-empty-state {
  min-height: 440px;
}

.lobby-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lobby-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(2, 6, 12, 0.4);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
}

.lobby-item:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.lobby-game-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 20%, var(--glass-bg));
}

.lobby-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lobby-info {
  display: grid;
  gap: 8px;
}

.lobby-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.lobby-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.lobby-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lobby-players {
  display: grid;
  gap: 8px;
  text-align: center;
}

.lobby-player-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.lobby-player-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.lobby-actions {
  display: flex;
  gap: 8px;
}

/* Lobby Status Badges */
.lobby-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.lobby-status.waiting {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.lobby-status.full {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.lobby-status.in-game {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Empty State */
.lobby-empty-state {
  /* Span the full grid width and center every child (icon, heading, text, button).
     text-align alone didn't center the block-level Create Lobby button, and in the
     multi-column grid the state sat in the first column instead of centered. */
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.lobby-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--text-muted);
  opacity: 0.5;
}

.lobby-empty-state h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.lobby-empty-state p {
  margin-bottom: 20px;
}

/* Lobby Form */
.lobby-form,
.join-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Lobby Preview Card */
.lobby-preview-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
}

.lobby-preview-header {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.lobby-preview-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

.lobby-preview-row:last-child {
  border-bottom: none;
}

.preview-label {
  color: var(--text-muted);
  font-size: 13px;
}

.preview-value {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

/* Lobby Code Display */
.lobby-code-display {
  text-align: center;
  padding: 24px;
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  border-radius: var(--radius-md);
  margin: 20px 0;
}

.lobby-code-display p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lobby-code-display code {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 12px 0;
  font-family: var(--font-mono);
}

/* Success Content */
.success-content {
  text-align: center;
  padding: 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  display: grid;
  place-items: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

.success-content h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.success-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Lobby Game Carousel (in Create Lobby Modal) ── */
.lobby-game-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 2px 0;
}

.lobby-game-carousel::before,
.lobby-game-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}

.lobby-game-carousel::before {
  left: 0;
  background: linear-gradient(to right, rgba(6, 10, 20, 0.85) 0%, transparent 100%);
}

.lobby-game-carousel::after {
  right: 0;
  background: linear-gradient(to left, rgba(6, 10, 20, 0.85) 0%, transparent 100%);
}

.lobby-game-carousel__track {
  display: flex !important;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.lobby-game-carousel__track::-webkit-scrollbar {
  display: none;
}

.lobby-game-carousel__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.lobby-game-card {
  flex: 0 0 220px !important;
  min-width: 220px;
  max-width: 220px;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  box-shadow: 0 6px 18px rgba(2, 6, 12, 0.3), inset 0 0 0 1px var(--border-inner);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
}

.lobby-game-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  box-shadow: 0 10px 28px rgba(2, 6, 12, 0.45),
              0 0 18px color-mix(in srgb, var(--accent) 14%, transparent),
              inset 0 0 0 1px var(--border-inner);
}

.lobby-game-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent),
              0 12px 30px rgba(2, 6, 12, 0.5),
              0 0 24px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateY(-3px) scale(1.03);
}

.lobby-game-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.lobby-game-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease;
}

.lobby-game-card:hover .lobby-game-card__image {
  transform: scale(1.08);
  filter: saturate(1.1) brightness(1.05);
}

.lobby-game-card__image-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(6, 10, 20, 0.9) 0%, transparent 100%);
  pointer-events: none;
}

.lobby-game-card__content {
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.lobby-game-card__name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-game-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.2s ease;
  box-shadow: 0 3px 10px rgba(2, 6, 12, 0.3);
  opacity: 1;
}

.lobby-game-carousel__nav--prev { left: 2px; }
.lobby-game-carousel__nav--next { right: 2px; }

.lobby-game-carousel__nav:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  transform: translateY(-50%) scale(1.08);
}

/* ── Lobby Game Filter Carousel (Active Lobbies filter) ── */
.lobby-game-filter-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 2px 0;
}

.lobby-game-filter-carousel::before,
.lobby-game-filter-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}

.lobby-game-filter-carousel::before {
  left: 0;
  background: linear-gradient(to right, rgba(6, 10, 20, 0.85) 0%, transparent 100%);
}

.lobby-game-filter-carousel::after {
  right: 0;
  background: linear-gradient(to left, rgba(6, 10, 20, 0.85) 0%, transparent 100%);
}

.lobby-game-filter-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.3s ease, transform 0.2s ease;
  box-shadow: 0 3px 10px rgba(2, 6, 12, 0.3);
  opacity: 1;
}

.lobby-game-filter-carousel__nav--prev { left: 2px; }
.lobby-game-filter-carousel__nav--next { right: 2px; }

.lobby-game-filter-carousel__nav:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  transform: translateY(-50%) scale(1.08);
}

.lobby-game-filter-carousel__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.lobby-game-filter-carousel__track::-webkit-scrollbar {
  display: none;
}

.lobby-game-filter-carousel__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.lobby-game-filter-card {
  flex: 0 0 160px !important;
  min-width: 160px;
  max-width: 160px;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(140%);
  box-shadow: 0 6px 18px rgba(2, 6, 12, 0.3), inset 0 0 0 1px var(--border-inner);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
  user-select: none;
}

.lobby-game-filter-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  box-shadow: 0 10px 28px rgba(2, 6, 12, 0.45),
              0 0 18px color-mix(in srgb, var(--accent) 14%, transparent),
              inset 0 0 0 1px var(--border-inner);
}

.lobby-game-filter-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent),
              0 12px 30px rgba(2, 6, 12, 0.5),
              0 0 24px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateY(-3px) scale(1.03);
}

.lobby-game-filter-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(6, 10, 20, 0.6);
}

.lobby-game-filter-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease;
}

.lobby-game-filter-card:hover .lobby-game-filter-card__image {
  transform: scale(1.08);
  filter: saturate(1.1) brightness(1.05);
}

.lobby-game-filter-card__image-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(6, 10, 20, 0.9) 0%, transparent 100%);
  pointer-events: none;
}

.lobby-game-filter-card__content {
  padding: 6px 8px;
  display: grid;
  gap: 2px;
}

.lobby-game-filter-card__name {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "All Games" special style */
.lobby-game-filter-card--all {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lobby-game-filter-card--all .lobby-game-filter-card__content {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
}

.lobby-game-filter-card--all__icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  opacity: 0.85;
}

.lobby-game-filter-card--all .lobby-game-filter-card__name {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
}

/* ─ Lobby Filter Controls ── */
.lobby-filter-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  /* Cap to the panel and let flex items shrink, so the game-filter carousel
     fills the available width and scrolls its own track instead of ballooning
     to its content width (~1900px) and getting clipped off the panel edge. */
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
/* Carousel fills remaining space; its inner __track owns the horizontal scroll. */
.lobby-filter-controls .lobby-game-filter-carousel {
  flex: 1 1 0;
  min-width: 0;
}

.lobby-filter-controls::-webkit-scrollbar {
  display: none;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Luxury Select Components */
.luxury-select {
  position: relative;
}

.luxury-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 72%, transparent);
  background: linear-gradient(155deg, color-mix(in srgb, var(--glass-bg-strong) 84%, transparent), color-mix(in srgb, var(--glass-bg) 74%, transparent));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(2, 6, 12, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  height: fit-content;
  flex-shrink: 0;
}

.luxury-select-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.luxury-select-trigger:hover::before {
  transform: translateX(100%);
}

.luxury-select-trigger:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  box-shadow: 0 20px 40px rgba(2, 6, 12, 0.5), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

.luxury-select-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent), 0 24px 48px rgba(2, 6, 12, 0.6);
}

.select-image {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.select-label {
  flex: 1;
  text-align: left;
}

.option-image {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.select-chevron {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-select-trigger[aria-expanded="true"] .select-chevron {
  transform: rotate(180deg);
}

.luxury-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1000;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 95%, transparent);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  box-shadow: 0 24px 48px rgba(2, 6, 12, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
  animation: dropdownSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.luxury-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.luxury-select-option:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  transform: translateX(4px);
}

.luxury-select-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.option-label {
  flex: 1;
}

/* Status Badges in Select */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-badge.all {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text);
}

.status-badge.waiting {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.status-badge.full {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.status-badge.in-game {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

/* Game Select Specific */
.game-select .luxury-select-trigger {
  padding-left: 14px;
}

/* Status Select Specific */
.status-select {
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .lobby-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .lobby-hero-actions {
    width: 100%;
  }

  .lobby-hero-actions .btn {
    flex: 1;
  }

  .lobby-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lobby-players {
    text-align: left;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .lobby-filter-controls {
    flex-direction: row;
  }

  .luxury-select {
    min-width: unset;
  }

  .lobby-game-filter-carousel {
    max-width: 100%;
  }
}

/* Animations */
@keyframes lobbyJoinPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.lobby-item.is-joining {
  animation: lobbyJoinPulse 0.5s ease;
}

/* Voice Chat Indicator */
.lobby-voice-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 10px;
  font-weight: 600;
}

.lobby-voice-indicator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   VOICE CHANNELS — luxury voice lobby with LoL-style speaking rings
   ============================================================ */
.voice-panel { position: relative; overflow: hidden; }
.voice-panel::before {
  content: ""; position: absolute; top: -30%; right: -8%;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  filter: blur(24px); pointer-events: none; z-index: 0;
}
.voice-panel > * { position: relative; z-index: 1; }

.voice-live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--status-success, #5fd0a8); margin-right: 6px;
  box-shadow: 0 0 8px var(--status-success, #5fd0a8);
  animation: voiceLivePulse 2s ease-in-out infinite;
}
@keyframes voiceLivePulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

/* Self controls (mute / deafen / leave) */
/* Cohesive control bar: room pill + a grouped glass pod of buttons. */
.voice-self-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px; border-radius: 14px;
  background: color-mix(in srgb, var(--glass-bg, rgba(16,24,42,0.7)) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.voice-self-room {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--accent) 85%, white 15%);
  padding: 7px 13px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.voice-self-room::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--status-success,#5fd0a8); box-shadow: 0 0 8px var(--status-success,#5fd0a8);
  animation: lobbyDot 1.8s ease-in-out infinite;
}
.voice-ctl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  width: 38px; height: 38px; justify-content: center;
  border-radius: 10px; cursor: pointer;
  color: var(--text, #eef3ff);
  background: rgba(255,255,255,0.05);
  border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.voice-ctl-btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.voice-ctl-btn svg { width: 17px; height: 17px; }
.voice-ctl-btn.is-on { color: #ffb4b4; border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.14); }
.voice-ctl-leave { width: auto; padding: 0 14px; font-size: 12.5px; font-weight: 700; color: #ffb0b0; border-color: rgba(239,68,68,0.4); }
.voice-ctl-leave:hover { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.6); }

/* ── Voice stage: member avatars with speaking rings ── */
.voice-stage {
  margin: 16px 0 20px; padding: 20px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012));
  border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
}
.voice-stage-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.voice-stage-count { font-size: 12px; color: var(--text-muted, #9fb1cc); }

.voice-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 18px 12px;
}
.voice-members-empty { grid-column: 1/-1; color: var(--text-muted,#9fb1cc); font-size: 13px; padding: 12px; text-align: center; }

.voice-member { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.voice-member__avatar {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
}
.voice-member__img, .voice-member__fallback {
  position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px);
  border-radius: 50%; object-fit: cover;
}
.voice-member__fallback {
  display: grid; place-items: center;
  font-family: "Sora","Manrope",sans-serif; font-weight: 700; font-size: 18px; color: #eaf2ff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 55%, #1a2540), #141d33);
}
.voice-member__img { z-index: 1; }
.voice-member__img + .voice-member__fallback { z-index: 0; } /* fallback behind image if it loads */

/* The animated speaking ring (LoL style). */
.voice-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 2; pointer-events: none;
}
.voice-member.is-speaking .voice-ring {
  border-color: var(--status-success, #5fd0a8);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--status-success, #5fd0a8) 30%, transparent),
    0 0 18px color-mix(in srgb, var(--status-success, #5fd0a8) 55%, transparent);
  animation: voiceSpeak 1.1s ease-in-out infinite;
}
@keyframes voiceSpeak {
  0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-success,#5fd0a8) 28%, transparent), 0 0 14px color-mix(in srgb, var(--status-success,#5fd0a8) 45%, transparent); }
  50%     { box-shadow: 0 0 0 6px color-mix(in srgb, var(--status-success,#5fd0a8) 18%, transparent), 0 0 26px color-mix(in srgb, var(--status-success,#5fd0a8) 70%, transparent); }
}
.voice-member.is-self .voice-ring { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.voice-member.is-self.is-speaking .voice-ring {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent), 0 0 20px color-mix(in srgb, var(--accent) 60%, transparent);
}
.voice-member.is-muted .voice-ring { border-color: rgba(239,68,68,0.55); }

.voice-member__mute {
  position: absolute; bottom: -2px; right: -2px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1a1020; border: 2px solid #2a1626; color: #ff8d8d;
}
.voice-member__mute svg { width: 11px; height: 11px; }

.voice-member__name {
  font-size: 12px; font-weight: 600; color: var(--text-soft, #c4d2ea);
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Channel list ── */
.voice-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
/* Art-background channel card (game hero behind glass scrim, no icons). */
.voice-channel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch;
  min-height: 116px; padding: 14px; text-align: left; cursor: pointer;
  border-radius: 16px; color: var(--text, #eef3ff);
  background: #0c1322;
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  box-shadow: 0 14px 30px rgba(2,6,16,0.45);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
/* The game art layer. */
.voice-channel__art {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), filter 0.4s ease;
  filter: saturate(1.05);
}
/* Tinted channels (no game art) get a brand-color wash instead. */
.voice-channel--tint .voice-channel__art {
  background:
    radial-gradient(120% 100% at 20% 0%, color-mix(in srgb, var(--ch-tint, var(--accent)) 45%, transparent), transparent 70%),
    linear-gradient(160deg, #1a2440, #0c1322);
}
/* Dark glass scrim so text always reads. */
.voice-channel__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,10,20,0.15) 0%, rgba(6,10,20,0.55) 55%, rgba(5,8,16,0.92) 100%);
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}
.voice-channel__info, .voice-channel__action { position: relative; z-index: 2; }

.voice-channel:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 28px 54px rgba(2,6,16,0.6), 0 0 38px color-mix(in srgb, var(--accent) 18%, transparent);
}
.voice-channel:hover .voice-channel__art { transform: scale(1.14); filter: saturate(1.2) brightness(1.06); }

.voice-channel.is-active {
  border-color: color-mix(in srgb, var(--status-success,#5fd0a8) 60%, transparent);
  box-shadow: 0 20px 44px rgba(2,6,16,0.55), 0 0 40px color-mix(in srgb, var(--status-success,#5fd0a8) 24%, transparent);
}

.voice-channel__info { display: grid; gap: 4px; min-width: 0; }
.voice-channel__name {
  font-family: "Sora","Manrope",sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  overflow: hidden; text-overflow: ellipsis;
}
.voice-channel__count {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, #cfdcf2 80%, transparent);
}
.voice-channel__live { width: 6px; height: 6px; border-radius: 50%; background: #5a6478; }
.voice-channel__live.is-on { background: var(--status-success,#5fd0a8); box-shadow: 0 0 8px var(--status-success,#5fd0a8); animation: lobbyDot 1.8s ease-in-out infinite; }

/* Join pill — floats top-right, accent glass. */
.voice-channel__action {
  position: absolute; top: 12px; right: 12px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 28%, rgba(8,14,26,0.6));
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background 0.25s ease, transform 0.25s ease;
}
.voice-channel:hover .voice-channel__action { background: var(--accent); color: #04141a; transform: translateY(-1px); }
.voice-channel.is-active .voice-channel__action {
  color: #04141a; background: var(--status-success, #5fd0a8); border-color: transparent;
}

@media (max-width: 560px) {
  .voice-members { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .voice-channels { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .voice-member.is-speaking .voice-ring, .voice-live-dot { animation: none; }
}
/* ============================================================
   LUXURY LOBBY — refined hero, cards, icons, status (added)
   ============================================================ */

/* Grid of cards instead of a single column on wide screens. */
.lobby-list {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
}
@media (max-width: 820px) { .lobby-list { grid-template-columns: 1fr; } }

/* ── The lobby card ── */
.lobby-item {
  position: relative;
  grid-template-columns: 56px 1fr auto auto;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0) 30%),
    linear-gradient(180deg, rgba(22,32,54,0.55), rgba(10,16,30,0.85));
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.08) inset, 0 16px 34px rgba(2,6,16,0.45);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
/* Ambient game-art glow bleeding from the left edge. */
.lobby-item__accent {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  opacity: 0.18;
  -webkit-mask: linear-gradient(90deg, #000 0%, transparent 55%);
  mask: linear-gradient(90deg, #000 0%, transparent 55%);
  filter: saturate(1.2);
}
.lobby-item > *:not(.lobby-item__accent) { position: relative; z-index: 1; }
.lobby-item:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.10) inset, 0 30px 56px rgba(2,6,16,0.6), 0 0 40px color-mix(in srgb, var(--accent) 16%, transparent);
}
.lobby-item:hover .lobby-item__accent { opacity: 0.3; }

/* Game icon tile — glowing, rounded, bordered. */
.lobby-game-icon {
  width: 56px; height: 56px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow: 0 8px 20px rgba(2,6,16,0.5);
}
.lobby-game-icon img { border-radius: 13px; }

/* Info column */
.lobby-info { gap: 10px; align-content: center; min-width: 0; }
.lobby-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lobby-name {
  font-family: "Sora","Manrope",sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

/* Status pill with a live dot. */
.lobby-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.lobby-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.lobby-status-pill.waiting { color: #5fd0a8; background: rgba(95,208,168,0.12); border: 1px solid rgba(95,208,168,0.35); }
.lobby-status-pill.waiting .lobby-status-dot { animation: lobbyDot 1.8s ease-in-out infinite; }
@keyframes lobbyDot { 0%,100%{opacity:1;} 50%{opacity:0.35;} }
.lobby-status-pill.full { color: #ff9d9d; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); }
.lobby-status-pill.in-game, .lobby-status-pill.in_game { color: #ffcf8a; background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35); }

/* Meta icon chips. */
.lobby-meta { gap: 8px; flex-wrap: wrap; }
.lobby-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: var(--text-soft, #c4d2ea);
  background: rgba(255,255,255,0.045); border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
}
.lobby-chip svg { width: 13px; height: 13px; opacity: 0.85; }
.lobby-chip--game { color: color-mix(in srgb, var(--accent) 82%, white 18%); background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 26%, transparent); }
.lobby-chip--voice { color: #7df0c8; background: rgba(95,208,168,0.10); border-color: rgba(95,208,168,0.3); }

/* Players column with slot pips. */
.lobby-players { gap: 8px; justify-items: center; }
.lobby-player-count { font-family: "Sora",sans-serif; font-size: 15px; color: var(--text-muted,#9fb1cc); }
.lobby-player-count strong { font-size: 22px; font-weight: 800; color: #fff; }
.lobby-slots { display: flex; gap: 4px; }
.lobby-slot { width: 7px; height: 7px; border-radius: 50%; background: rgba(160,190,230,0.2); }
.lobby-slot.is-filled { background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }

/* Join button + locked state. */
.lobby-actions { align-items: center; }
.lobby-join-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; font-weight: 700; border-radius: 12px;
}
.lobby-join-btn svg { width: 15px; height: 15px; transition: transform 0.25s ease; }
.lobby-join-btn:hover svg { transform: translateX(3px); }
.lobby-join-locked {
  font-size: 12px; font-weight: 600; color: var(--text-muted,#9fb1cc);
  padding: 8px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

@media (max-width: 520px) {
  .lobby-item { grid-template-columns: 48px 1fr; gap: 12px; }
  .lobby-players, .lobby-actions { grid-column: 1 / -1; }
  .lobby-players { flex-direction: row; justify-content: flex-start; }
}

/* ── Hero + section header polish ── */
.lobby-hero { position: relative; overflow: hidden; }
.lobby-hero::before {
  content: ""; position: absolute; top: -40%; right: -6%;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
  filter: blur(26px); pointer-events: none; z-index: 0;
}
.lobby-hero > * { position: relative; z-index: 1; }
.lobby-hero-actions .btn svg.action-icon { width: 18px; height: 18px; }

/* Status filter / panel header alignment */
.panel-header { gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .lobby-status-pill.waiting .lobby-status-dot { animation: none; }
}
/* ============================================================
   LUXURY POLISH — modals, forms, selects, filter cards (added)
   The lobby modals only had the global shell (.modal-overlay/header/body);
   .modal-panel/.modal-title/.modal-close/.modal-actions and the form
   controls were unstyled here. This makes them match the rest of the site.
   ============================================================ */

/* ── Modal panel & chrome ── */
.modal-overlay .modal-panel {
  width: min(560px, 94vw);
  max-height: 90vh; overflow-y: auto;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 24%),
    linear-gradient(180deg, rgba(20,30,52,0.96), rgba(9,14,26,0.98));
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  box-shadow: 0 40px 90px rgba(2,6,16,0.7), 0 0 0 1px rgba(255,255,255,0.04) inset;
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
}
.modal-overlay .modal-panel.modal-lg { width: min(640px, 95vw); }
.modal-overlay .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  position: relative;
}
.modal-overlay .modal-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 70px;
  background: radial-gradient(60% 120% at 18% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  pointer-events: none; border-radius: 22px 22px 0 0;
}
.modal-title {
  margin: 0; font-family: "Sora","Manrope",sans-serif; font-size: 20px; font-weight: 800; letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  position: relative; z-index: 1;
}
.modal-close {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer; font-size: 15px;
  color: var(--text-muted, #9fb1cc);
  background: rgba(255,255,255,0.05); border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease; position: relative; z-index: 1;
}
.modal-close:hover { background: rgba(239,68,68,0.14); color: #ffb0b0; border-color: rgba(239,68,68,0.4); transform: rotate(90deg); }
.modal-overlay .modal-body { padding: 20px 24px 24px; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

/* ── Lobby form controls (were native/unstyled) ── */
.lobby-form .form-group, .join-form .form-group { display: grid; gap: 7px; }
.lobby-form label, .join-form label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-soft, #c4d2ea);
}
.lobby-form input[type="text"],
.lobby-form textarea,
.lobby-form select,
.join-form input[type="text"] {
  width: 100%;
  padding: 12px 14px; font-size: 13.5px; color: var(--text, #eef3ff);
  border-radius: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong, rgba(16,24,42,0.9)) 86%, transparent), color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 72%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.lobby-form textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.lobby-form select {
  padding-right: 40px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong, rgba(16,24,42,0.9)) 86%, transparent), color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 72%, transparent)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239fb1cc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 14px center;
}
.lobby-form select option { background: #0c1426; color: #eef3ff; }
.lobby-form input[type="text"]:focus,
.lobby-form textarea:focus,
.lobby-form select:focus,
.join-form input[type="text"]:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), 0 0 18px rgba(123,220,255,0.18);
}
.lobby-form input::placeholder, .lobby-form textarea::placeholder, .join-form input::placeholder {
  color: color-mix(in srgb, var(--text-muted, #9fb1cc) 85%, transparent);
}
.join-form .text-muted { font-size: 11.5px; color: var(--text-muted, #9fb1cc); }
.join-form #joinLobbyCode {
  text-align: center; font-family: var(--font-mono, monospace); font-size: 22px;
  letter-spacing: 0.18em; font-weight: 700; text-transform: uppercase;
}

/* ── Custom luxury checkbox ── */
.lobby-form .checkbox-label {
  padding: 11px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  font-size: 13px; color: var(--text-soft, #c4d2ea); transition: border-color 0.2s ease, background 0.2s ease;
}
.lobby-form .checkbox-label:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.lobby-form .checkbox-label input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; flex: 0 0 auto; border-radius: 6px; position: relative; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lobby-form .checkbox-label input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, #8de6d6 70%, var(--accent)));
  border-color: transparent;
}
.lobby-form .checkbox-label input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #04141a; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* ── Preview + code display refinement ── */
.lobby-preview-card { border-radius: 14px; background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)); }
.lobby-code-display {
  border-radius: 16px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 8%, transparent), rgba(255,255,255,0.02));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.lobby-code-display code {
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 55%, transparent);
}
.success-icon { box-shadow: 0 0 28px rgba(16,185,129,0.35); animation: lobbyDot 2.4s ease-in-out infinite; }

/* ── Filter carousel "All Games" + cards: subtle luxury lift ── */
.lobby-game-filter-card { border-radius: 14px; }
.lobby-game-filter-card:hover { box-shadow: 0 14px 30px rgba(2,6,16,0.5), 0 0 24px color-mix(in srgb, var(--accent) 16%, transparent); }

/* ── Section rhythm ── */
/* Flex column so the section `gap` actually applies — previously the shell was a
   block container, so `gap` was ignored and the sections spaced unevenly. */
.lobby-shell { display: flex; flex-direction: column; gap: 22px; }
.lobby-shell > section { margin: 0; }
.lobby-shell .panel-header { margin-bottom: 4px; }
/* Responsive: 521-768px band — collapse the lobby card off the 4-col desktop
   grid (the non-media .lobby-item rule otherwise wins here). + 320px hero. */
@media (max-width: 768px) {
  .lobby-item { grid-template-columns: 56px 1fr; }
  .lobby-item .lobby-players, .lobby-item .lobby-actions { grid-column: 1 / -1; }
  .lobby-hero-content { min-width: 0; }
  .lobby-hero { padding: 22px 18px; }
}
/* ============================================================
   Lobby — luxury polish to match admin.html glass aesthetic
   ============================================================ */

/* Gradient titles like admin h2 / hero. */
.lobby-shell .gradient-title,
.lobby-hero h1, .lobby-hero h2 {
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Panel depth: deeper layered glass on the lobby's glass-panels. */
.lobby-shell .glass-panel {
  background:
    radial-gradient(120% 50% at 50% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong, rgba(16,24,40,0.65)) 88%, transparent), color-mix(in srgb, var(--glass-bg, rgba(16,24,40,0.42)) 70%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 24px 50px rgba(2,6,12,0.42);
}

/* Voice channel cards: stronger hover lift + accent glow (admin tile feel). */
.voice-channel {
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.voice-channel:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(2,6,12,0.55), 0 0 32px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* Active-lobby rows: accent left-rail like admin rows. */
.lobby-item {
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), border-color 0.22s ease, background 0.22s ease;
}
.lobby-item::before {
  content: "";
  position: absolute; left: 0; top: 14%; bottom: 14%;
  width: 3px; border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
  opacity: 0; transition: opacity 0.22s ease;
}
.lobby-item:hover { transform: translateY(-2px); }
.lobby-item:hover::before { opacity: 0.9; }


/* === notifications.css === */
/* ============================================
   Cyno.gg Notifications - Luxury Modern Styles
   ============================================ */

:root {
  --notif-primary: var(--accent, #7bdcff);
  --notif-secondary: var(--accent-2, #8de6d6);
  --notif-success: var(--status-success, #10b981);
  --notif-warning: var(--status-warning, #f59e0b);
  --notif-danger: var(--status-danger, #ef4444);
  --notif-info: #3b82f6;
  --notif-bg: var(--bg-0, #0f0f1a);
  --notif-glass: color-mix(in srgb, var(--glass-bg, rgba(30, 30, 50, 0.6)) 60%, transparent);
  --notif-border: var(--glass-border, rgba(255, 255, 255, 0.1));
  --notif-text: var(--text, #e2e8f0);
  --notif-muted: var(--text-muted, #94a3b8);
  --notif-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                       background-color 0.3s ease,
                       border-color 0.3s ease;
}

/* (Removed dead .notifications-shell rule — the page uses .product-shell; the
   old opaque diagonal slab here never applied and didn't match the unified bg.) */

/* Hero */
.notif-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--notif-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.notif-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--notif-text) 0%, var(--notif-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.notif-header-actions {
  display: flex;
  gap: 12px;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--notif-border);
  margin-bottom: 0;
  padding: 0 32px;
  background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
  background: none;
  border: none;
  padding: 14px 20px;
  color: var(--notif-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--notif-transition);
}

.tab-btn:hover {
  color: var(--notif-text);
}

.tab-btn.active {
  color: var(--notif-primary);
  border-bottom-color: var(--notif-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  /* breathing room so the search/toolbar doesn't touch the Inbox tab bar above */
  padding-top: 20px;
}

/* Filters */
.notif-filters {
  display: flex;
  gap: 8px;
  padding: 16px 32px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--notif-border);
}

.notif-filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--notif-border);
  background: var(--notif-glass);
  color: var(--notif-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--notif-transition);
}

.notif-filter-btn:hover {
  border-color: var(--notif-primary);
  color: var(--notif-text);
}

.notif-filter-btn.active {
  background: var(--notif-primary);
  border-color: var(--notif-primary);
  color: white;
}

/* Notification List */
.notif-list {
  padding: 0;
}

.notif-item {
  display: flex;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--notif-border);
  transition: var(--notif-transition);
  cursor: pointer;
  position: relative;
}

.notif-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--notif-primary), var(--notif-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notif-item:hover {
  background: rgba(123, 220, 255, 0.05);
}

.notif-item:hover::before {
  opacity: 1;
}

.notif-item.unread {
  background: rgba(123, 220, 255, 0.08);
}

.notif-item.unread::before {
  opacity: 1;
}

.notif-item.unread .notif-title {
  color: var(--notif-text);
  font-weight: 700;
}

/* Notification Icon */
.notif-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.notif-icon.transactional { background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.1)); }
.notif-icon.support { background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.1)); }
.notif-icon.engagement { background: linear-gradient(135deg, rgba(123, 220, 255, 0.3), rgba(141, 230, 214, 0.1)); }
.notif-icon.rewards { background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0.1)); }
.notif-icon.system { background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.1)); }
.notif-icon.account { background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(20, 184, 166, 0.1)); }
.notif-icon.social { background: linear-gradient(135deg, rgba(141, 230, 214, 0.3), rgba(141, 230, 214, 0.1)); }
.notif-icon.reminder { background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(251, 146, 60, 0.1)); }
.notif-icon.marketplace { background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.1)); }

/* Notification Content */
.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-weight: 600;
  color: var(--notif-text);
  margin-bottom: 8px;
}

.notif-message {
  color: var(--notif-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.notif-time {
  font-size: 0.75rem;
  color: var(--notif-muted);
  opacity: 0.7;
}

/* Notification Actions */
.notif-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

.notif-btn {
  background: var(--notif-glass);
  border: 1px solid var(--notif-border);
  color: var(--notif-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.8rem;
  transition: var(--notif-transition);
}

.notif-btn:hover {
  background: rgba(123, 220, 255, 0.1);
  border-color: var(--notif-primary);
  color: var(--notif-text);
}

/* Preferences Section */
.pref-section {
  padding: 24px 32px;
}

.pref-group {
  margin-bottom: 32px;
}

.pref-group h3 {
  color: var(--notif-text);
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--notif-border);
}

.pref-label {
  color: var(--notif-text);
  font-size: 0.95rem;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  cursor: pointer;
  transition: var(--notif-transition);
}

.toggle-switch.active {
  background: linear-gradient(135deg, var(--notif-primary), var(--notif-secondary));
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
  transform: translateX(22px);
}

/* Push Status */
.push-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--notif-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--notif-border);
  margin-bottom: 24px;
}

.push-status .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.push-status .status-dot.enabled {
  background: var(--notif-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.push-status .status-dot.disabled {
  background: var(--notif-danger);
}

/* Empty State */
.empty-notifs {
  text-align: center;
  padding: 60px 20px;
  color: var(--notif-muted);
}


.empty-notifs p {
  font-size: 0.9rem;
  max-width: 300px;
  margin: 0 auto;
}

/* Responsive */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .notif-header {
    padding: 16px;
  }

  .tab-nav {
    padding: 0 16px;
  }

  .notif-filters {
    padding: 12px 16px;
  }

  .notif-item {
    padding: 16px;
    gap: 12px;
  }

  .notif-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .notif-actions {
    flex-direction: column;
  }

  .pref-section {
    padding: 16px;
  }
}

/* ============================================================
   Notifications — inbox toolbar (search + type filter) and
   delivery settings (added)
   ============================================================ */
.notif-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.notif-search {
  position: relative; flex: 1 1 240px; min-width: 200px;
  display: flex; align-items: center;
}
.notif-search svg {
  position: absolute; left: 12px; width: 16px; height: 16px;
  color: var(--text-muted, #9fb1cc); pointer-events: none;
}
.notif-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  font-size: 13.5px; color: var(--text, #eef3ff);
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  border-radius: 11px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.notif-search input::placeholder { color: var(--text-muted, #9fb1cc); }
.notif-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.notif-toolbar .pref-select { min-width: 150px; }

.notif-pref-heading {
  margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--text, #eef3ff);
}
.mt-24 { margin-top: 24px; }

.notif-quiet-inputs { display: flex; align-items: center; gap: 8px; }
.notif-quiet-sep { color: var(--text-muted, #9fb1cc); }
.pref-time {
  padding: 7px 10px; font-size: 13px; color: var(--text, #eef3ff);
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  border-radius: 9px;
}
.pref-time::-webkit-calendar-picker-indicator { filter: invert(0.8); cursor: pointer; }
.pref-time:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

@media (max-width: 520px) {
  .notif-toolbar { flex-direction: column; align-items: stretch; }
  .notif-toolbar .pref-select { width: 100%; }
}

/* === error-pages.css === */
/* Error Pages - Luxury Advanced Styling */

/* Base error page body styles — cyan brand palette (matches the site) */
body[data-error-code] {
  --error-accent: #7bdcff;
  --error-accent-2: #8de6d6;
  --error-gradient: linear-gradient(135deg, #7bdcff, #8de6d6);
}
/* Critical lockouts (blocked / 429) keep a warm caution tint — defined in
   their dedicated blocks further down. Everything else uses the cyan base. */

/* Icon container — tighter, refined */
.error-icon-container {
  width: 84px;
  height: 84px;
  margin: 4px auto 14px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--error-accent) 18%, #0c1626),
    color-mix(in srgb, var(--error-accent-2) 10%, #0c1626));
  border: 1px solid color-mix(in srgb, var(--error-accent) 38%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18),
              0 0 28px color-mix(in srgb, var(--error-accent) 22%, transparent);
  animation: iconFloat 6s ease-in-out infinite;
}
/* Refined minimal line icon inside the tile */
.error-icon-container svg {
  width: 40px !important;
  height: 40px !important;
  color: var(--error-accent);
  stroke: var(--error-accent);
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--error-accent) 40%, transparent));
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.error-icon-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, color-mix(in srgb, var(--error-accent) 30%, transparent), transparent 70%);
  border-radius: 50%;
  animation: errorGlowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes errorGlowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Particle field */
.error-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* 503 page construction-bars background — without these layout rules the bars
   wrapper sat in normal document flow with the height of its tallest child
   (~650px), pushing the error card below the viewport. Make it a pinned
   decorative overlay, with each child bar positioned absolutely within it. */
.construction-bars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.construction-bar {
  position: absolute;
  width: 2px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--error-accent, #f97316) 0%, transparent),
    color-mix(in srgb, var(--error-accent, #f97316) 55%, transparent),
    color-mix(in srgb, var(--error-accent, #f97316) 0%, transparent));
  opacity: 0;
  filter: blur(0.6px);
  box-shadow: 0 0 24px color-mix(in srgb, var(--error-accent, #f97316) 32%, transparent);
  animation: constructionBarPulse var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
}
@keyframes constructionBarPulse {
  0%, 100% { opacity: 0; transform: scaleY(0.4); }
  50% { opacity: 0.7; transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .construction-bar { animation: none; opacity: 0.45; }
}

.error-particle {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--color, color-mix(in srgb, var(--error-accent) 60%, transparent));
  animation: particleFloat var(--dur, 8s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
  opacity: 0;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* Geometric shapes background */
.geo-shapes,
/* All other decorative error-page wrappers share the same fixed-overlay
   contract — without these rules they sat in normal document flow, taking up
   200-650px of vertical space and pushing the error card below the fold.
   404's link-fragments + 403's geo-shapes had their own rules; the rest
   (429/500/502/504/blocked) were missing it. One shared block fixes all. */
.speed-lines,
.circuit-traces,
.network-nodes,
.time-rings,
.alert-zones {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
/* Default child positioning so the inline top/left percentages actually work
   (without position:absolute the children would all stack at 0,0 instead of
   distributing across the viewport). Page-specific styling can override. */
.speed-lines > *,
.circuit-traces > *,
.network-nodes > *,
.time-rings > *,
.alert-zones > * {
  position: absolute;
}
.geo-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.geo-shape {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--error-accent) 15%, transparent);
  animation: geoRotate var(--dur, 20s) linear infinite;
  opacity: 0.3;
}

.geo-shape--circle {
  border-radius: 50%;
}

.geo-shape--square {
  border-radius: 4px;
}

@keyframes geoRotate {
  from { transform: rotate(0deg) translate(0, 0); }
  50% { transform: rotate(180deg) translate(20px, -20px); }
  to { transform: rotate(360deg) translate(0, 0); }
}

/* Override ghost numeral for 403 with dual gradient */
body[data-error-code="403"]::before {
  background: radial-gradient(circle at 50% 40%,
    color-mix(in srgb, var(--error-accent) 18%, transparent),
    color-mix(in srgb, var(--error-accent-2) 8%, transparent) 60%,
    transparent 80%) !important;
  -webkit-background-clip: text;
  background-clip: text;
}

/* Removed the conic-gradient ring around the card per request — keep a calm
   static caustic so the card just looks like clean glass. */
.error-card::before {
  background: var(--liquid-caustic) !important;
  opacity: 0.18 !important;
  animation: none !important;
}

/* Gradient title override */
.error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Button glow */
.error-actions .btn-primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--error-accent) 70%, #0d1a2a), color-mix(in srgb, var(--error-accent-2) 60%, #0d1a2a));
  border-color: color-mix(in srgb, var(--error-accent) 50%, transparent);
}

.error-actions .btn-primary:hover {
  box-shadow: 0 22px 44px rgba(4, 10, 20, 0.5),
    0 0 40px rgba(245, 158, 11, 0.3),
    0 0 80px rgba(245, 158, 11, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Code badge shimmer */
.error-code-badge {
  position: relative;
  overflow: hidden;
  animation: errorBadgeReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.error-code-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 45%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.3) 55%,
    transparent 100%);
  transform: translateX(-100%);
  animation: shimmerSweep 3s ease-in-out infinite;
}

@keyframes shimmerSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Error card hover lift */
.error-card {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s ease,
    border-color 0.6s ease;
}

.error-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 60px rgba(2, 6, 12, 0.65),
    0 0 0 1px color-mix(in srgb, var(--error-accent) 30%, transparent),
    0 0 60px color-mix(in srgb, var(--error-accent) 12%, transparent);
}

/* Actions divider */
.error-actions {
  position: relative;
  margin-top: 14px;
  padding-top: 18px;
}

.error-actions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 36%;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--error-accent) 40%, transparent),
    transparent);
}

/* Hint link styling */
.error-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.error-hint a {
  color: var(--error-accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s ease;
}

.error-hint a:hover {
  color: var(--error-accent-2);
}

/* Responsive */
@media (max-width: 640px) {
  .error-icon-container {
    width: 80px;
    height: 80px;
  }
  
  .error-card {
    padding: 28px 22px 24px;
  }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .error-icon-container,
  .error-icon-glow,
  .error-particle,
  .geo-shape,
  .error-code-badge::before {
    animation: none !important;
  }
  
  .error-card {
    transition: none !important;
  }
}

/* ============================================================
   404-specific styles: Compass with blue gradient
   ============================================================ */

/* per-code accent override removed — using cyan base */

/* Link fragments background for 404 */
.link-fragments {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.link-fragment {
  position: absolute;
  font-family: "Sora", monospace;
  font-size: var(--fs, 14px);
  color: rgba(59, 130, 246, 0.12);
  animation: fragmentFloat var(--dur, 15s) ease-in-out infinite;
  opacity: 0.3;
}

@keyframes fragmentFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-30px) rotate(5deg); opacity: 0.6; }
}

body[data-error-code="404"]::before {
  background: radial-gradient(circle at 50% 40%,
    color-mix(in srgb, var(--error-accent) 18%, transparent),
    color-mix(in srgb, var(--error-accent-2) 8%, transparent) 60%,
    transparent 80%) !important;
  -webkit-background-clip: text;
  background-clip: text;
}

body[data-error-code="404"] .error-card::before { background: var(--liquid-caustic) !important; opacity: 0.18 !important; animation: none !important; }

body[data-error-code="404"] .error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body[data-error-code="404"] .error-actions .btn-primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--error-accent) 70%, #0d1a2a), color-mix(in srgb, var(--error-accent-2) 60%, #0d1a2a));
  border-color: color-mix(in srgb, var(--error-accent) 50%, transparent);
}

body[data-error-code="404"] .error-actions .btn-primary:hover {
  box-shadow: 0 22px 44px rgba(4, 10, 20, 0.5),
    0 0 40px rgba(59, 130, 246, 0.3),
    0 0 80px rgba(59, 130, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ============================================================
   429-specific styles: Speedometer with orange gradient
   ============================================================ */

body[data-error-code="429"] {
  --error-accent: #7bdcff;
  --error-accent-2: #8de6d6;
  --error-gradient: linear-gradient(135deg, #7bdcff, #8de6d6);
}

body[data-error-code="429"] .error-card::before { background: var(--liquid-caustic) !important; opacity: 0.18 !important; animation: none !important; }

body[data-error-code="429"] .error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================
   500-specific styles: Spinning gears with red/purple gradient
   ============================================================ */

/* per-code accent override removed — using cyan base */

body[data-error-code="500"] .error-card::before { background: var(--liquid-caustic) !important; opacity: 0.18 !important; animation: none !important; }

body[data-error-code="500"] .error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================
   502-specific styles: Broken connection with yellow gradient
   ============================================================ */

/* per-code accent override removed — using cyan base */

body[data-error-code="502"] .error-card::before { background: var(--liquid-caustic) !important; opacity: 0.18 !important; animation: none !important; }

body[data-error-code="502"] .error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================
   503-specific styles: Warning triangle with wrench
   ============================================================ */

/* per-code accent override removed — using cyan base */

body[data-error-code="503"] .error-card::before { background: var(--liquid-caustic) !important; opacity: 0.18 !important; animation: none !important; }

body[data-error-code="503"] .error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================
   504-specific styles: Hourglass with purple gradient
   ============================================================ */

/* per-code accent override removed — using cyan base */

body[data-error-code="504"] .error-card::before { background: var(--liquid-caustic) !important; opacity: 0.18 !important; animation: none !important; }

body[data-error-code="504"] .error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================
   blocked-specific styles: Ban symbol with dark red
   ============================================================ */

body[data-error-code="blocked"] {
  --error-accent: #7bdcff;
  --error-accent-2: #8de6d6;
  --error-gradient: linear-gradient(135deg, #7bdcff, #8de6d6);
}

body[data-error-code="blocked"] .error-card::before { background: var(--liquid-caustic) !important; opacity: 0.18 !important; animation: none !important; }

body[data-error-code="blocked"] .error-card h1.gradient-title {
  background: linear-gradient(135deg, var(--text) 20%, var(--error-accent) 60%, var(--error-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================================
   Luxury detail elements (injected by error-enhance.js)
   ============================================================================ */
.error-detail {
  display: grid; gap: 1px;
  margin: 18px 0 4px;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  text-align: left;
}
.error-detail-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.015);
}
.error-detail-key {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); min-width: 84px;
}
.error-detail-val { font-size: 13px; color: var(--text, #eef3ff); }
.error-detail-val.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.error-detail-copy {
  margin-left: auto; cursor: pointer;
  font-size: 11px; font-weight: 600;
  color: color-mix(in srgb, var(--error-accent, #f59e0b) 80%, #fff);
  background: none; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; padding: 3px 9px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.error-detail-copy:hover { border-color: color-mix(in srgb, var(--error-accent, #f59e0b) 45%, transparent); }

/* Live retry indicator (5xx) */
.error-retry {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 14px auto 2px; padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--error-accent, #f59e0b) 28%, transparent);
  background: color-mix(in srgb, var(--error-accent, #f59e0b) 8%, transparent);
  font-size: 12px; color: var(--text, #eef3ff);
  width: fit-content;
}
.error-retry-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--error-accent, #f59e0b);
  box-shadow: 0 0 8px var(--error-accent, #f59e0b);
  animation: errRetryPulse 1.3s ease-in-out infinite;
}
@keyframes errRetryPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.error-retry-count { font-family: "JetBrains Mono", ui-monospace, monospace; opacity: 0.7; font-size: 11px; }
.error-retry.is-ok { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.1); }
.error-retry.is-ok .error-retry-dot { background: #34d399; box-shadow: 0 0 8px #34d399; animation: none; }

/* Quick-links strip */
.error-quicklinks {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.error-quicklinks a {
  font-size: 12px; color: var(--text-muted, #a8b9d4);
  text-decoration: none; padding: 6px 12px; border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.error-quicklinks a:hover {
  color: var(--text, #eef3ff);
  background: rgba(255,255,255,0.05);
}

/* Slightly richer card depth for the luxury pass */
.error-card {
  box-shadow:
    0 30px 70px rgba(1,4,10,0.7),
    0 0 0 1px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.10) !important;
}

@media (prefers-reduced-motion: reduce) {
  .error-retry-dot { animation: none; }
}
@media (max-width: 440px) {
  .error-detail-key { min-width: 64px; }
  .error-detail-val.mono { font-size: 11px; }
}
/* Blocked-page countdown */
.blocked-countdown {
  margin: 16px 0 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--error-accent) 25%, transparent);
  background: color-mix(in srgb, var(--error-accent) 7%, transparent);
  text-align: left;
}
.blocked-countdown-label {
  display: block;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); margin-bottom: 4px;
}
.blocked-countdown-time {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 34px; font-weight: 700; line-height: 1;
  color: var(--text, #eef3ff);
  margin-bottom: 12px;
}
.blocked-countdown-track {
  display: block; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.blocked-countdown-fill {
  display: block; height: 100%; width: var(--value, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--error-accent), var(--error-accent-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--error-accent) 50%, transparent);
  transition: width 0.6s ease;
}

/* === cloud-menu.css === */
/* ============================================================
   Cyno.gg Cloud Menu Styles
   Premium two-panel product configuration interface
   ============================================================ */

/* --- Main Layout --- */
.cm-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
  gap: 24px;
}

.cm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 28px;
  background: linear-gradient(145deg, rgba(18, 28, 48, 0.72), rgba(12, 18, 32, 0.58));
  border: 1px solid rgba(140, 180, 240, 0.18);
  border-radius: var(--radius-lg);
}
.cm-header-id { display: grid; gap: 4px; }
.cm-subtitle {
  margin: 2px 0 0;
  max-width: 60ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted, #a8b9d4);
}
.cm-global-actions { flex-shrink: 0; }

.cm-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f0f5ff, color-mix(in srgb, var(--accent) 75%, #f0f5ff));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.02em;
}

.cm-global-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cm-auto-save-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.cm-auto-save-toggle .cm-glass-toggle {
  width: 44px;
  height: 24px;
}

.cm-auto-save-toggle .cm-glass-slider {
  border-radius: 12px;
}

.cm-auto-save-toggle .cm-glass-knob {
  width: 18px;
  height: 18px;
  top: 2px;
  left: 2px;
}

.cm-auto-save-toggle .cm-glass-knob::after {
  width: 6px;
  height: 6px;
}

.cm-auto-save-toggle input:checked + .cm-glass-slider .cm-glass-knob {
  left: 24px;
}

.cm-auto-save-toggle input:checked + .cm-glass-slider .cm-glass-knob::after {
  width: 5px;
  height: 5px;
}

.cm-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  min-height: 70vh;
}

/* --- Sidebar --- */
.cm-sidebar {
  background: linear-gradient(145deg, rgba(18, 28, 48, 0.72), rgba(12, 18, 32, 0.58));
  border: 1px solid rgba(140, 180, 240, 0.18);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.cm-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 11px 16px;
  border-radius: 12px;
  color: #f0f5ff;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.cm-search input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.cm-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: rgba(255, 255, 255, 0.07);
}

.cm-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cm-filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  text-transform: capitalize;
}

.cm-filter-chip:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
}

.cm-filter-chip.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 25%, transparent), color-mix(in srgb, var(--accent) 15%, transparent));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
}

.cm-product-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.cm-product-list::-webkit-scrollbar {
  width: 4px;
}

.cm-product-list::-webkit-scrollbar-track {
  background: transparent;
}

.cm-product-list::-webkit-scrollbar-thumb {
  background: rgba(123, 220, 255, 0.2);
  border-radius: 2px;
}

.cm-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.cm-product-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.cm-product-card.selected {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 15%, transparent);
}

.cm-product-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.cm-product-card.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  pointer-events: none;
}

.cm-product-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  object-fit: cover;
  flex-shrink: 0;
}

.cm-product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cm-product-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0f5ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-product-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cm-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.cm-status-badge.operational {
  background: color-mix(in srgb, var(--status-success) 20%, transparent);
  color: var(--status-success);
}

.cm-status-badge.monitoring {
  background: color-mix(in srgb, var(--status-warning) 20%, transparent);
  color: var(--status-warning);
}

.cm-status-badge.updating {
  background: color-mix(in srgb, #3b82f6 20%, transparent);
  color: #3b82f6;
}

.cm-status-badge.offline {
  background: color-mix(in srgb, var(--status-danger) 20%, transparent);
  color: var(--status-danger);
}

.cm-feature-count {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
}

.cm-unsaved-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-warning);
  box-shadow: 0 0 8px color-mix(in srgb, var(--status-warning) 50%, transparent);
  position: absolute;
  top: 8px;
  right: 8px;
}

/* --- Main Panel --- */
.cm-main-panel {
  background: linear-gradient(145deg, rgba(18, 28, 48, 0.72), rgba(12, 18, 32, 0.58));
  border: 1px solid rgba(140, 180, 240, 0.18);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.cm-product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cm-selected-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #f0f5ff;
  margin: 0;
  letter-spacing: -0.02em;
}

.cm-selected-headline {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 4px 0 0;
}

.cm-selected-status {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cm-feature-total {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

/* --- Toolbar --- */
.cm-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cm-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
}

.cm-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f0f5ff;
}

.cm-toolbar-btn.primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 60%, transparent), color-mix(in srgb, var(--accent) 40%, transparent));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: #f0f5ff;
}

.cm-toolbar-btn.primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, transparent), color-mix(in srgb, var(--accent) 50%, transparent));
  box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 25%, transparent);
}

.cm-load-dropdown {
  position: relative;
}

.cm-load-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: linear-gradient(145deg, rgba(18, 28, 48, 0.95), rgba(12, 18, 32, 0.9));
  border: 1px solid rgba(140, 180, 240, 0.22);
  border-radius: 12px;
  padding: 8px;
  min-width: 220px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(2, 6, 16, 0.6);
  display: none;
}

.cm-load-dropdown-menu.visible {
  display: block;
}

.cm-load-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cm-load-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cm-load-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f0f5ff;
}

.cm-load-item-date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}

.cm-load-item-delete {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.cm-load-item-delete:hover {
  background: color-mix(in srgb, var(--status-danger) 20%, transparent);
  color: var(--status-danger);
}

/* --- Presets --- */
.cm-presets-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cm-preset-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  text-align: center;
}

.cm-preset-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 6, 16, 0.4);
}

.cm-preset-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.cm-preset-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0f5ff;
  margin: 0 0 4px;
}

.cm-preset-desc {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* --- Features List --- */
.cm-features-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Luxury Glassmorphism Feature Selector --- */
.cm-feature-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cm-feature-row::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(
    ellipse at 0% 50%,
    color-mix(in srgb, var(--accent) 6%, transparent),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cm-feature-row:hover {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.cm-feature-row:hover::before {
  opacity: 1;
}

.cm-feature-row.is-active {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.02)),
    color-mix(in srgb, var(--accent) 3%, rgba(255, 255, 255, 0.01))
  );
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent),
    0 4px 16px color-mix(in srgb, var(--accent) 10%, transparent);
}

.cm-feature-row.is-active::before {
  opacity: 1;
}

.cm-feature-row.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.cm-feature-row.disabled .cm-glass-toggle {
  opacity: 0.3;
  cursor: not-allowed;
}

.cm-feature-label {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  transition: color 0.3s ease;
}

.cm-feature-row.is-active .cm-feature-label {
  color: #f0f5ff;
}

.cm-feature-row.disabled .cm-feature-label {
  color: rgba(255, 255, 255, 0.35);
}

/* Glass Toggle Switch */
.cm-glass-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.cm-glass-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cm-glass-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}

.cm-glass-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(
    ellipse at 30% 50%,
    rgba(255, 255, 255, 0.15),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cm-glass-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.65)
  );
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.cm-glass-knob::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.15)
  );
  transition: background 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

/* ON state */
.cm-glass-toggle input:checked + .cm-glass-slider {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.05)),
    color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.02))
  );
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent),
    0 0 12px color-mix(in srgb, var(--accent) 15%, transparent),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.cm-glass-toggle input:checked + .cm-glass-slider::before {
  opacity: 1;
}

.cm-glass-toggle input:checked + .cm-glass-slider .cm-glass-knob {
  left: 27px;
  background: linear-gradient(
    145deg,
    #ffffff,
    color-mix(in srgb, var(--accent) 20%, #ffffff)
  );
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    0 0 12px color-mix(in srgb, var(--accent) 20%, transparent),
    inset 0 1px 3px rgba(255, 255, 255, 1);
}

.cm-glass-toggle input:checked + .cm-glass-slider .cm-glass-knob::after {
  width: 6px;
  height: 6px;
  background: color-mix(in srgb, var(--accent) 60%, #ffffff);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Hover effects */
.cm-glass-toggle:hover .cm-glass-slider {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.cm-glass-toggle input:checked + .cm-glass-slider:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent),
    0 0 16px color-mix(in srgb, var(--accent) 20%, transparent),
    inset 0 1px 3px rgba(255, 255, 255, 0.15);
}

/* Focus visible for accessibility */
.cm-glass-toggle input:focus-visible + .cm-glass-slider {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 3px;
}

/* --- Save Modal --- */
.cm-save-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cm-save-modal-overlay.visible {
  display: flex;
  opacity: 1;
}

.cm-save-modal {
  background: linear-gradient(160deg, rgba(18, 28, 52, 0.95), rgba(14, 22, 40, 0.9));
  border: 1px solid rgba(140, 180, 240, 0.22);
  border-radius: 18px;
  padding: 28px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(2, 6, 16, 0.65);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cm-save-modal-overlay.visible .cm-save-modal {
  transform: scale(1);
}

.cm-save-modal h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #f0f5ff;
  margin: 0 0 18px;
}

.cm-save-modal input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 10px;
  color: #f0f5ff;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  margin-bottom: 18px;
}

.cm-save-modal input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: rgba(255, 255, 255, 0.07);
}

.cm-save-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- Empty State --- */
.cm-empty-state {
  display: grid;
  place-items: center;
  padding: 80px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
}

.cm-empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.2);
}

.cm-empty-state h4 {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 8px;
  font-size: 1.1rem;
}

/* --- Subscribe CTA for locked products --- */
.cm-subscribe-cta {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--accent) 30%, transparent));
  color: #f0f5ff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Toast --- */
.cm-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-toast {
  background: linear-gradient(160deg, rgba(18, 28, 52, 0.96), rgba(14, 22, 40, 0.9));
  border: 1px solid rgba(140, 180, 240, 0.22);
  border-radius: 12px;
  padding: 12px 18px;
  color: #f0f5ff;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(2, 6, 16, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 320px;
}

.cm-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.cm-toast.success {
  border-color: color-mix(in srgb, var(--status-success) 35%, transparent);
}

.cm-toast.error {
  border-color: color-mix(in srgb, var(--status-danger) 35%, transparent);
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .cm-layout {
    grid-template-columns: 1fr;
  }

  .cm-sidebar {
    max-height: 280px;
  }

  .cm-presets-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cm-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .cm-global-actions {
    width: 100%;
    justify-content: space-between;
  }

  .cm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cm-product-header {
    flex-direction: column;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Cloud Menu — luxury polish to match admin.html glass aesthetic
   ============================================================ */

/* Deeper layered glass on the sidebar + main panel (matches admin sidebar). */
.cm-sidebar,
.cm-main-panel {
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--glass-bg-strong, rgba(16,24,40,0.65)) 90%, transparent), color-mix(in srgb, var(--glass-bg, rgba(16,24,40,0.42)) 72%, transparent)) !important;
  border: 1px solid color-mix(in srgb, var(--glass-border, rgba(160,190,230,0.22)) 70%, transparent) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 24px 50px rgba(2,6,12,0.45);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

/* Product list items: accent left-rail on hover + active (admin row signature). */
.cm-product-item {
  position: relative;
  border-radius: 12px;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s cubic-bezier(0.16,1,0.3,1);
}
.cm-product-item::before {
  content: "";
  position: absolute;
  left: 4px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: height 0.22s ease;
}
.cm-product-item:hover { transform: translateX(2px); }
.cm-product-item:hover::before { height: 55%; }
.cm-product-item.active::before,
.cm-product-item.is-active::before,
.cm-product-item[aria-selected="true"]::before { height: 62%; }

/* Gradient title on the selected product name (admin h2 treatment). */
.cm-selected-name {
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cm-title {
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Filter chips: cleaner active glow consistent with admin tabs. */
.cm-filter-chip.active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border)) !important;
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 14%, transparent);
}

/* Empty-state icon as an accent badge (matches the new redeem/games icons). */
.cm-empty-state-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: grid; place-items: center;
  margin: 0 auto 16px;
  color: var(--accent);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%),
    linear-gradient(150deg, color-mix(in srgb, var(--accent) 14%, #0c1626), color-mix(in srgb, var(--accent-2) 9%, #0c1626));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 0 26px color-mix(in srgb, var(--accent) 20%, transparent);
}


/* === rewards.css === */
/* ============================================
   Cyno Rewards - Luxury Glass-Morphism Styles
   ============================================ */

:root {
  --rewards-primary: var(--accent, #7bdcff);
  --rewards-primary-dark: color-mix(in srgb, var(--accent, #7bdcff) 85%, black);
  --rewards-secondary: var(--accent-2, #8de6d6);
  --rewards-accent: var(--accent-3, #f59e0b);
  --rewards-success: var(--status-success, #10b981);
  --rewards-bg-dark: var(--bg-0, #06080f);
  --rewards-bg-card: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 60%, transparent);
  --rewards-bg-glass: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 50%, transparent);
  --rewards-border: var(--glass-border, rgba(160, 190, 230, 0.22));
  --rewards-text: var(--text, #eef3ff);
  --rewards-text-muted: var(--text-muted, #a8b9d4);
  --rewards-shadow: var(--shadow-1, 0 8px 32px rgba(0, 0, 0, 0.4));
  --rewards-radius: var(--radius-lg, 16px);
  --rewards-radius-sm: var(--radius-sm, 8px);
  --rewards-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Layout */
.rewards-page {
  min-height: 100vh;
  /* No opaque background — let the unified .body-bg aurora show through, like
     .dashboard-shell. The old diagonal slab covered the aurora and made the page
     read as a flat off-palette navy that didn't match the rest of the site. */
  padding-top: 80px;
  padding-bottom: 60px;
}

/* Hero Section */
.rewards-hero {
  position: relative;
  padding: 60px 20px 50px;
  text-align: center;
  /* Faint cyan glass wash that blends with the unified .body-bg aurora — the old
     cyan→mint gradient made the hero read as a distinct greenish slab that didn't
     match the rest of the page. */
  background: linear-gradient(180deg, rgba(123, 220, 255, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--rewards-border);
  overflow: hidden;
}

.rewards-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(123, 220, 255, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(123, 220, 255, 0.05) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, 20px) rotate(5deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: none;
  color: rgba(123, 220, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-icon {
  width: 14px;
  height: 14px;
  color: var(--rewards-accent);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--rewards-text) 0%, var(--rewards-primary) 50%, var(--rewards-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(123, 220, 255, 0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--rewards-text-muted);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Rewards Grid */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Reward Card */
.reward-card {
  position: relative;
  padding: 24px;
  background: var(--rewards-bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rewards-border);
  border-radius: var(--rewards-radius);
  overflow: hidden;
  transition: var(--rewards-transition);
}

.reward-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rewards-shadow), 0 0 40px rgba(123, 220, 255, 0.15);
  border-color: var(--rewards-primary);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 24px 0;
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--rewards-radius-sm);
  background: linear-gradient(135deg, var(--rewards-primary), var(--rewards-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(123, 220, 255, 0.3);
}

.card-icon {
  width: 22px;
  height: 22px;
  color: white;
}

.card-meta {
  min-width: 0;
}

.card-meta .eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rewards-primary);
  margin-bottom: 8px;
}

.card-meta h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rewards-text);
  margin: 0;
  line-height: 1.3;
}

/* Card Body */
.card-body {
  padding: 20px 24px 24px;
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.stat-item {
  flex: 1;
  padding: 12px;
  border-radius: var(--rewards-radius-sm);
  background: var(--rewards-bg-glass);
  border: 1px solid var(--rewards-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--rewards-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rewards-text);
}

/* Redeem Tiers */
.redeem-tiers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.tier-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--rewards-radius-sm);
  background: var(--rewards-bg-glass);
  border: 1px solid var(--rewards-border);
  transition: var(--rewards-transition);
}

.tier-item:hover {
  background: rgba(123, 220, 255, 0.08);
  border-color: var(--rewards-primary);
}

.tier-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rewards-primary), var(--rewards-secondary));
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.tier-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rewards-text);
}

/* Spin Wheel */
.spin-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spin-wheel-visual {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(
    var(--rewards-primary) 0deg 51.4deg,
    var(--rewards-secondary) 51.4deg 102.8deg,
    var(--rewards-accent) 102.8deg 154.3deg,
    var(--rewards-success) 154.3deg 205.7deg,
    var(--rewards-primary) 205.7deg 257.1deg,
    var(--rewards-secondary) 257.1deg 308.6deg,
    var(--rewards-accent) 308.6deg 360deg
  );
  border: 3px solid var(--rewards-border);
  box-shadow: 0 0 30px rgba(123, 220, 255, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: var(--rewards-transition);
}

.spin-wheel-visual::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: var(--rewards-bg-dark);
  border: 2px solid var(--rewards-border);
}

.spin-wheel-visual::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 16px solid var(--rewards-accent);
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.spin-wheel-hint {
  text-align: center;
  color: var(--rewards-text-muted);
  font-size: 0.85rem;
  margin: 12px 0 0;
}

/* Transactions List */
.transactions-list {
  max-height: 240px;
  overflow-y: auto;
}

.transactions-list::-webkit-scrollbar {
  width: 6px;
}

.transactions-list::-webkit-scrollbar-track {
  background: transparent;
}

.transactions-list::-webkit-scrollbar-thumb {
  background: var(--rewards-primary);
  border-radius: 3px;
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--rewards-text-muted);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  color: var(--rewards-primary);
}

/* Card Actions */
.card-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* Button Icons */
.btn-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rewards-hero {
    padding: 40px 16px 36px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .rewards-grid {
    grid-template-columns: 1fr;
    padding: 24px 16px 40px;
    gap: 16px;
  }

  .card-header {
    padding: 18px 18px 0;
  }

  .card-body {
    padding: 16px 18px 18px;
  }

  .stats-row {
    flex-direction: column;
    gap: 10px;
  }

  .spin-wheel-visual {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .card-meta {
    text-align: center;
  }
}


/* === forums.css === */
/* ============================================
   Cyno.gg Forums - Luxury Glass-Morphism Styles
   ============================================ */

:root {
  --forums-primary: var(--accent, #7bdcff);
  --forums-secondary: var(--accent-2, #8de6d6);
  --forums-accent: var(--accent-3, #f59e0b);
  --forums-bg: var(--bg-0, #06080f);
  --forums-glass: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 60%, transparent);
  --forums-border: var(--glass-border, rgba(160, 190, 230, 0.22));
  --forums-text: var(--text, #eef3ff);
  --forums-muted: var(--text-muted, #a8b9d4);
  --forums-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Layout */
.forums-shell {
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 60px;
  /* No opaque background — let the unified .body-bg aurora show through, like
     .dashboard-shell. The old diagonal slab covered the aurora and made the page
     read as a flat off-palette navy that didn't match the rest of the site. */
}

/* Hero Section */
.forums-categories .panel-body {
  padding: 40px 32px;
}

.forums-categories .gradient-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 16px 0 32px;
  background: linear-gradient(135deg, var(--forums-text) 0%, var(--forums-primary) 50%, var(--forums-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Categories Grid */
.forums-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Category Card */
.forum-category-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--forums-border);
  background: var(--forums-glass);
  backdrop-filter: blur(12px);
  transition: var(--forums-transition);
  cursor: pointer;
  overflow: hidden;
}

.forum-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--forums-primary), var(--forums-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.forum-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(123, 220, 255, 0.2), 0 0 40px rgba(123, 220, 255, 0.1);
  border-color: var(--forums-primary);
}

.forum-category-card:hover::before {
  opacity: 1;
}

.forum-category-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm, 8px);
  background: linear-gradient(135deg, var(--forums-primary), var(--forums-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(123, 220, 255, 0.3);
}

.forum-category-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.forum-category-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--forums-text);
  margin: 0 0 12px;
}

.forum-category-card p {
  color: var(--forums-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 16px;
}

.forum-category-stats {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--forums-muted);
}

.forum-category-stats span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Posts List */
.forums-posts .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--forums-border);
  flex-wrap: wrap;
}

.forums-posts .panel-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--forums-text);
  margin: 0;
}

.forum-post-card {
  padding: 20px 32px;
  border-bottom: 1px solid var(--forums-border);
  transition: var(--forums-transition);
  cursor: pointer;
}

.forum-post-card:last-child {
  border-bottom: none;
}

.forum-post-card:hover {
  background: rgba(123, 220, 255, 0.05);
}

.forum-post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.forum-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forums-primary), var(--forums-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  color: white;
  font-size: 1rem;
}

.forum-post-meta h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--forums-text);
  margin: 0 0 8px;
}

.forum-post-meta .author {
  font-size: 0.85rem;
  color: var(--forums-primary);
}

.forum-post-excerpt {
  color: var(--forums-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 12px;
  padding-left: 52px;
}

.forum-post-footer {
  display: flex;
  gap: 16px;
  padding-left: 52px;
  font-size: 0.8rem;
  color: var(--forums-muted);
}

.forum-post-footer span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Post Detail */
.forums-post-detail .panel-body {
  padding: 32px;
}

.forum-post-detail-header {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--forums-border);
}

.forum-post-detail-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--forums-text);
  margin: 0 0 12px;
}

.forum-post-detail-body {
  color: var(--forums-text);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* Replies */
#postReplies {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.forum-reply-card {
  padding: 20px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--forums-border);
  background: var(--forums-glass);
}

.forum-reply-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.forum-reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forums-primary), var(--forums-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
}

.forum-reply-body {
  color: var(--forums-text);
  line-height: 1.7;
  padding-left: 44px;
}

/* Reply Input */
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--forums-border);
  background: var(--forums-glass);
  color: var(--forums-text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: var(--forums-transition);
}

.field textarea:focus {
  outline: none;
  border-color: var(--forums-primary);
  box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.2);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-content {
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--forums-border);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--forums-text);
  margin: 0;
}

.modal-body {
  padding: 24px 32px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 32px;
  border-top: 1px solid var(--forums-border);
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 40px;
  min-height: 200px;
  color: var(--forums-muted);
  text-align: center;
}

.loading-state::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--forums-primary);
  border-right-color: color-mix(in srgb, var(--forums-primary) 40%, transparent);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 16px color-mix(in srgb, var(--forums-primary) 25%, transparent);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Designed empty / error states — replace the bare "Couldn't load" text
   with a centered glass card carrying an icon, headline, supporting text, and
   a Try-Again CTA. Reads as intentional design rather than a broken page.
   Used by forums, billing, and any other page that needs a graceful
   page-section error/empty surface. */
.forums-empty-state,
.billing-empty-state,
.cyno-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 56px 32px;
  margin: 12px auto;
  max-width: 520px;
  /* Mirror the .glass-panel recipe from components.css so the empty-state
     card visually matches every other luxury surface on the site (same
     gradient direction, blur, border treatment, shadow stack). The previous
     "solid dark base" version killed the glass feel — this restores it. */
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--glass-bg-strong) 80%, transparent),
    color-mix(in srgb, var(--glass-bg) 65%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-radius: var(--radius-lg, 24px);
  box-shadow: var(--glass-shadow), var(--glass-glow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Liquid highlight layer to match .glass-panel::before — adds the caustic
   light + top-left highlight that makes the surface look like glass. */
.forums-empty-state::before,
.billing-empty-state::before,
.cyno-empty-state::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--liquid-highlight),
    var(--liquid-caustic);
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}
/* Ensure children render above the highlight layer. */
.forums-empty-state > *,
.billing-empty-state > *,
.cyno-empty-state > * {
  position: relative;
  z-index: 1;
}
.forums-empty-icon,
.billing-empty-icon,
.cyno-empty-icon {
  width: 64px; height: 64px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px;
  color: color-mix(in srgb, var(--accent, #7bdcff) 90%, white 10%);
  background: color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #7bdcff) 28%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--accent, #7bdcff) 18%, transparent);
}
.forums-empty-icon svg,
.billing-empty-icon svg,
.cyno-empty-icon svg { width: 30px; height: 30px; }
.forums-empty-title,
.billing-empty-title,
.cyno-empty-title {
  margin: 0;
  font: 700 18px/1.25 "Sora","Manrope",system-ui,sans-serif;
  color: var(--text, #eef3ff);
}
.forums-empty-text,
.billing-empty-text,
.cyno-empty-text {
  margin: 0;
  max-width: 380px;
  font: 500 13.5px/1.55 "Manrope",system-ui,sans-serif;
  color: color-mix(in srgb, var(--text, #eef3ff) 70%, transparent);
}
.forums-empty-state .btn,
.billing-empty-state .btn,
.cyno-empty-state .btn { margin-top: 6px; }

/* When the empty-state lands inside a CSS grid (forums categories list), auto
   margins can't center it within a single track — the card lines up in the
   first column and looks broken on wide viewports. Span all columns and
   center via justify-self so the card sits dead-center on any width. */
.forums-categories-grid > .forums-empty-state,
.forums-categories-grid > .loading-state {
  grid-column: 1 / -1;
  justify-self: center;
}

/* Responsive */
@media (max-width: 768px) {
  .forums-shell {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .forums-categories .panel-body {
    padding: 24px 16px;
  }

  .forums-categories .gradient-title {
    font-size: 1.75rem;
  }

  .forums-categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .forums-posts .panel-header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .forum-post-card {
    padding: 16px;
  }

  .forum-post-excerpt,
  .forum-post-footer {
    padding-left: 0;
  }

  .forums-post-detail .panel-body {
    padding: 16px;
  }

  .forum-reply-body {
    padding-left: 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px;
  }
}

/* --- Luxury Forum Enhancements --- */

/* Category icon glow on hover */
.forum-category-card:hover .forum-category-icon {
  filter: drop-shadow(0 0 12px rgba(123, 220, 255, 0.4));
}

/* Unread indicator pulse */
@keyframes unreadPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.forum-unread-badge {
  animation: unreadPulse 2s ease-in-out infinite;
}

/* Author avatar ring gradient */
.forum-author-avatar {
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image:
    linear-gradient(var(--card-bg), var(--card-bg)),
    linear-gradient(135deg, rgba(123, 220, 255, 0.4), rgba(217, 183, 122, 0.3));
}

/* Reply count badge gradient */
.forum-reply-count {
  background: linear-gradient(135deg, rgba(123, 220, 255, 0.2), rgba(141, 230, 214, 0.15));
  border: 1px solid rgba(123, 220, 255, 0.2);
}

/* ============================================================
   Forum moderation / role badges / actions (added)
   ============================================================ */
.forum-post-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }

.forum-role-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; vertical-align: middle;
  margin-left: 4px;
}
.forum-role-badge--owner   { color: #ffd9a0; background: rgba(255,170,60,0.14);  border: 1px solid rgba(255,170,60,0.4); }
.forum-role-badge--admin   { color: #ff9d9d; background: rgba(239,68,68,0.14);   border: 1px solid rgba(239,68,68,0.4); }
.forum-role-badge--support { color: #9fd0ff; background: rgba(65,105,225,0.16);  border: 1px solid rgba(65,105,225,0.45); }

.forum-flags { display: flex; gap: 8px; flex-wrap: wrap; }
.forum-flag {
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(160,190,230,0.18);
}
.forum-flag--pin  { color: #ffd9a0; background: rgba(255,170,60,0.10); }
.forum-flag--lock { color: #c8d5f2; background: rgba(160,190,230,0.08); }

.forum-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}
.forum-actions--reply { margin-top: 10px; padding-top: 8px; }
.forum-actions .forum-danger { color: #ff9d9d; }
.forum-actions .forum-danger:hover { border-color: rgba(239,68,68,0.45); color: #ffbcbc; }

/* === leaderboards.css === */
/* ============================================
   Cyno.gg Leaderboards - Luxury Glass-Morphism
   ============================================ */

:root {
  --lb-primary: var(--accent, #7bdcff);
  --lb-secondary: var(--accent-2, #8de6d6);
  --lb-gold: #FFD700;
  --lb-silver: #C0C0C0;
  --lb-bronze: #CD7F32;
  --lb-bg: var(--bg-0, #06080f);
  --lb-glass: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 60%, transparent);
  --lb-border: var(--glass-border, rgba(160, 190, 230, 0.22));
  --lb-text: var(--text, #eef3ff);
  --lb-muted: var(--text-muted, #a8b9d4);
  --lb-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    background-color 0.3s ease,
                    border-color 0.3s ease,
                    box-shadow 0.3s ease;
}

/* Page Layout */
.leaderboards-shell {
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  /* No opaque background — let the unified .body-bg aurora show through, exactly
     like .dashboard-shell. The old diagonal slab covered the aurora and made the
     page read as a flat, off-palette navy that didn't match the rest of the site. */
}

/* Hero Header */
.lb-header {
  text-align: center;
  margin-bottom: 40px;
}

.lb-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--lb-text) 0%, var(--lb-primary) 50%, var(--lb-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stats Bar */
.lb-stats-bar {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.lb-stat {
  background: var(--lb-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--lb-border);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
  transition: var(--lb-transition);
}

.lb-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(123, 220, 255, 0.15);
}

.lb-stat .lb-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lb-primary);
}

.lb-stat .lb-stat-label {
  font-size: 0.75rem;
  color: var(--lb-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Category Tabs */
.lb-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  scrollbar-width: thin;
}

.lb-tabs::-webkit-scrollbar {
  height: 4px;
}

.lb-tabs::-webkit-scrollbar-thumb {
  background: var(--lb-primary);
  border-radius: 2px;
}

.lb-tab {
  padding: 10px 16px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--lb-border);
  background: var(--lb-glass);
  color: var(--lb-text);
  cursor: pointer;
  transition: var(--lb-transition);
  white-space: nowrap;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lb-tab:hover {
  background: rgba(123, 220, 255, 0.1);
  border-color: var(--lb-primary);
}

.lb-tab.active {
  background: linear-gradient(135deg, var(--lb-primary), var(--lb-secondary));
  border-color: transparent;
  color: white;
}

/* Controls */
.lb-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.lb-time-filters {
  display: flex;
  gap: 10px;
}

.lb-time-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--lb-border);
  background: transparent;
  color: var(--lb-muted);
  cursor: pointer;
  transition: var(--lb-transition);
  font-size: 0.85rem;
}

.lb-time-btn:hover {
  color: var(--lb-text);
  border-color: var(--lb-primary);
}

.lb-time-btn.active {
  background: rgba(123, 220, 255, 0.2);
  border-color: var(--lb-primary);
  color: var(--lb-primary);
}

.lb-refresh-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--lb-border);
  background: var(--lb-glass);
  color: var(--lb-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--lb-transition);
}

.lb-refresh-btn:hover {
  color: var(--lb-text);
  border-color: var(--lb-primary);
}

/* Podium */
.lb-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.lb-podium-card {
  background: var(--lb-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl, 20px);
  padding: 24px 16px;
  text-align: center;
  position: relative;
  transition: var(--lb-transition);
  border: 2px solid var(--lb-border);
}

.lb-podium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(123, 220, 255, 0.2);
}

.lb-podium-card.gold {
  border-color: var(--lb-gold);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.1), var(--lb-glass));
}

.lb-podium-card.silver {
  border-color: var(--lb-silver);
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.08), var(--lb-glass));
}

.lb-podium-card.bronze {
  border-color: var(--lb-bronze);
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.08), var(--lb-glass));
}

.lb-podium-card.first { order: 2; padding-top: 32px; }
.lb-podium-card.second { order: 1; }
.lb-podium-card.third { order: 3; }

.lb-podium-rank {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.lb-podium-card.gold .lb-podium-rank { color: var(--lb-gold); }
.lb-podium-card.silver .lb-podium-rank { color: var(--lb-silver); }
.lb-podium-card.bronze .lb-podium-rank { color: var(--lb-bronze); }

.lb-podium-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--lb-primary), var(--lb-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  font-weight: 700;
  border: 3px solid var(--lb-border);
}

.lb-podium-card.first .lb-podium-avatar {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  border-color: var(--lb-gold);
}

.lb-podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-podium-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--lb-text);
}

.lb-podium-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--lb-primary);
}

.lb-podium-card.first .lb-podium-value {
  font-size: 1.8rem;
}

.lb-podium-extra {
  font-size: 0.75rem;
  color: var(--lb-muted);
  margin-top: 8px;
}

/* My Rank Card */
.lb-my-rank {
  background: rgba(123, 220, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(123, 220, 255, 0.3);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.lb-my-rank-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lb-primary), var(--lb-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(123, 220, 255, 0.3);
}

.lb-my-rank-info { flex: 1; }
.lb-my-rank-label { font-size: 0.75rem; color: var(--lb-muted); }
.lb-my-rank-value { font-weight: 700; color: var(--lb-text); }
.lb-my-rank-percentile { font-size: 0.75rem; color: var(--lb-primary); }

.lb-share-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--lb-primary);
  background: transparent;
  color: var(--lb-primary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--lb-transition);
  white-space: nowrap;
}

.lb-share-btn:hover {
  background: var(--lb-primary);
  color: white;
}

/* Leaderboard List */
.lb-list {
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid var(--lb-border);
  background: var(--lb-glass);
  backdrop-filter: blur(12px);
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lb-border);
  transition: background 0.2s;
}

.lb-entry:last-child { border-bottom: none; }

.lb-entry:hover {
  background: rgba(123, 220, 255, 0.05);
}

.lb-entry.is-me {
  background: rgba(123, 220, 255, 0.1);
  border-left: 3px solid var(--lb-primary);
}

.lb-entry-rank {
  width: 40px;
  text-align: center;
  font-weight: 700;
  color: var(--lb-muted);
  font-size: 0.9rem;
}

.lb-entry-rank.top1 { color: var(--lb-gold); }
.lb-entry-rank.top2 { color: var(--lb-silver); }
.lb-entry-rank.top3 { color: var(--lb-bronze); }

.lb-entry-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--lb-primary), var(--lb-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: white;
  font-weight: 600;
  flex-shrink: 0;
}

.lb-entry-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-entry-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lb-text);
}

.lb-entry-extra {
  font-size: 0.75rem;
  color: var(--lb-muted);
  max-width: 150px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-entry-value {
  font-weight: 700;
  color: var(--lb-primary);
  min-width: 80px;
  text-align: right;
}

/* Pagination */
.lb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.lb-page-btn {
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--lb-border);
  background: var(--lb-glass);
  color: var(--lb-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--lb-transition);
}

.lb-page-btn:hover {
  color: var(--lb-text);
  border-color: var(--lb-primary);
}

.lb-page-btn.active {
  background: var(--lb-primary);
  border-color: var(--lb-primary);
  color: white;
}

.lb-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Loading & Empty States */
.lb-loading,
.lb-empty {
  text-align: center;
  padding: 48px;
  color: var(--lb-muted);
}

/* Toast */
.lb-toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, var(--lb-primary), var(--lb-secondary));
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 8px 32px rgba(123, 220, 255, 0.3);
  z-index: 9999;
  transform: translateY(120%);
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.lb-toast.show {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .leaderboards-shell {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .lb-header h1 {
    font-size: 1.75rem;
  }

  .lb-podium {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  .lb-podium-card.first { order: 1; }
  .lb-podium-card.second { order: 2; }
  .lb-podium-card.third { order: 3; }

  .lb-entry-extra { display: none; }

  .lb-my-rank {
    flex-wrap: wrap;
  }

  .lb-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --- Luxury Leaderboard Enhancements --- */

/* Metallic podium gradients */
.lb-podium-position[data-rank="1"] {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  border-color: rgba(255, 215, 0, 0.3);
}

.lb-podium-position[data-rank="2"] {
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.12), rgba(192, 192, 192, 0.04));
  border-color: rgba(192, 192, 192, 0.25);
}

.lb-podium-position[data-rank="3"] {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.12), rgba(205, 127, 50, 0.04));
  border-color: rgba(205, 127, 50, 0.25);
}

/* Crown glow for #1 */
.lb-podium-position[data-rank="1"] .lb-podium-crown {
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

/* Rank change indicators */
.rank-change.up { color: #4ade80; }
.rank-change.down { color: #f87171; }
.rank-change.same { color: rgba(255, 255, 255, 0.3); }

/* ============================================================
   Leaderboards — player search + friends-only filter (added)
   ============================================================ */
.lb-controls { flex-wrap: wrap; gap: 10px; align-items: center; }

.lb-search { position: relative; display: flex; align-items: center; flex: 1 1 200px; min-width: 170px; }
.lb-search svg {
  position: absolute; left: 11px; width: 15px; height: 15px;
  color: var(--text-muted, #9fb1cc); pointer-events: none;
}
.lb-search input {
  width: 100%; padding: 9px 12px 9px 34px;
  font-size: 13px; color: var(--text, #eef3ff);
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  border-radius: 10px;
}
.lb-search input::placeholder { color: var(--text-muted, #9fb1cc); }
.lb-search input:focus {
  outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.lb-friends-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-soft, #c4d2ea); cursor: pointer;
  padding: 8px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  transition: border-color 0.2s ease;
}
.lb-friends-toggle:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.lb-friends-toggle input { accent-color: var(--accent); width: 15px; height: 15px; }

@media (max-width: 600px) {
  .lb-search { flex-basis: 100%; order: 3; }
}

/* === build.css === */
/* Cyno.gg Build - Luxury Modern Styles */
:root {
  --build-primary: var(--accent, #7bdcff);
  --build-glass: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 60%, transparent);
  --build-border: var(--glass-border, rgba(160, 190, 230, 0.22));
  --build-text: var(--text, #eef3ff);
  --build-muted: var(--text-muted, #a8b9d4);
}
/* No opaque background — let the unified .body-bg aurora show through, like
   .dashboard-shell. The old diagonal slab covered the aurora and made the page
   read as a flat off-palette navy that didn't match the rest of the site. */
.build-shell { min-height: 100vh; padding-top: 96px; padding-bottom: 60px; }
.build-hero { padding: 40px 32px; text-align: center; border-bottom: 1px solid var(--build-border); display: flex; flex-direction: column; align-items: center; }
.build-hero-actions { display: flex; justify-content: center; margin-top: 8px; }
.build-hero h1 { font-size: 2.5rem; font-weight: 800; background: linear-gradient(135deg, var(--build-text), var(--build-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.build-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; padding: 40px 32px; max-width: 1200px; margin: 0 auto; }
.build-step { padding: 24px; border-radius: var(--radius-lg, 16px); border: 1px solid var(--build-border); background: var(--build-glass); backdrop-filter: blur(var(--blur-sm)) saturate(150%); -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.build-step:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(123, 220, 255, 0.15); }
.build-step-number { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--build-primary), var(--accent-2, #8de6d6)); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; margin-bottom: 16px; }
.build-step h3 { font-size: 1.1rem; font-weight: 600; color: var(--build-text); margin-bottom: 8px; }
.build-step p { color: var(--build-muted); font-size: 0.9rem; line-height: 1.6; }
.build-progress { padding: 24px 32px; max-width: 800px; margin: 0 auto; }
.build-progress-bar { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.build-progress-fill { height: 100%; background: linear-gradient(90deg, var(--build-primary), var(--accent-2, #8de6d6)); border-radius: 4px; transition: width 0.5s ease; }
@media (max-width: 768px) { .build-shell { padding-top: 80px; padding-bottom: 40px; } .build-hero h1 { font-size: 1.75rem; } .build-steps { grid-template-columns: 1fr; padding: 24px 16px; } }


/* === redeem.css === */
/* Cyno.gg Redeem - Luxury Modern Styles */
:root {
  --redeem-primary: var(--accent, #8b5cf6);
  --redeem-glass: color-mix(in srgb, var(--glass-bg, rgba(30, 30, 50, 0.6)) 60%, transparent);
  --redeem-border: var(--glass-border, rgba(255, 255, 255, 0.1));
  --redeem-text: var(--text, #e2e8f0);
  --redeem-muted: var(--text-muted, #94a3b8);
}
.redeem-shell { min-height: 100vh; padding-top: 96px; padding-bottom: 60px; background: linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-2) 100%); }
.redeem-card { max-width: 600px; margin: 0 auto; padding: 40px 32px; }
.redeem-card h1 { font-size: 2rem; font-weight: 800; text-align: center; background: linear-gradient(135deg, var(--redeem-text), var(--redeem-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 32px; }
.redeem-form { display: flex; flex-direction: column; gap: 20px; }
.redeem-form .field label { display: block; margin-bottom: 8px; color: var(--redeem-text); font-weight: 500; }
.redeem-form input { width: 100%; padding: 14px 16px; border-radius: var(--radius-md, 12px); border: 1px solid var(--redeem-border); background: var(--redeem-glass); color: var(--redeem-text); font-size: 1rem; transition: border-color 0.3s ease; }
.redeem-form input:focus { outline: none; border-color: var(--redeem-primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
.redeem-form input::placeholder { color: var(--redeem-muted); }
.redeem-success { padding: 20px; border-radius: var(--radius-md, 12px); background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--status-success, #10b981); text-align: center; }
.redeem-error { padding: 20px; border-radius: var(--radius-md, 12px); background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--status-danger, #ef4444); text-align: center; }
@media (max-width: 768px) { .redeem-shell { padding-top: 80px; } .redeem-card { padding: 24px 16px; } .redeem-card h1 { font-size: 1.5rem; } }


/* === footer.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Footer Component
   ═══════════════════════════════════════════════════════════════ */

.site-footer {
  margin-top: auto;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copyright {
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
}

@media (max-width: 720px) {
  .site-footer {
    padding: 1.5rem 1rem;
  }

  .footer-links {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }
}


/* === password-strength.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Luxury Password Strength Meter
   ═══════════════════════════════════════════════════════════════ */

.password-strength {
  margin-top: 0.75rem;
  display: none;
}

.password-strength.is-visible {
  display: block;
  animation: strengthFadeIn 0.3s ease;
}

@keyframes strengthFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.password-strength-bar {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.06));
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
}

.password-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* Subtle shimmer on the fill */
.password-strength-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.password-strength-fill:not([data-score="0"])::after {
  opacity: 1;
  animation: shimmerSlide 2s ease-in-out infinite;
}

@keyframes shimmerSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Score levels */
.password-strength-fill[data-score="1"] {
  width: 20%;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.password-strength-fill[data-score="2"] {
  width: 40%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.password-strength-fill[data-score="3"] {
  width: 60%;
  background: linear-gradient(90deg, #eab308, #ca8a04);
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.3);
}

.password-strength-fill[data-score="4"] {
  width: 80%;
  background: linear-gradient(90deg, #10b981, #059669);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

.password-strength-fill[data-score="5"] {
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 40%, transparent),
              0 0 40px color-mix(in srgb, var(--accent) 15%, transparent);
}

.password-strength-text {
  font-family: "Sora", "Manrope", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
  margin-bottom: 0.5rem;
}

.password-strength-text[data-score="1"] {
  color: #ef4444;
}

.password-strength-text[data-score="2"] {
  color: #f59e0b;
}

.password-strength-text[data-score="3"] {
  color: #eab308;
}

.password-strength-text[data-score="4"] {
  color: #10b981;
}

.password-strength-text[data-score="5"] {
  color: var(--accent);
}

/* Luxury requirements panel */
.password-requirements {
  margin-top: 0.75rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg) 40%, transparent), color-mix(in srgb, var(--glass-bg-strong) 30%, transparent));
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.password-requirement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 500;
  color: var(--muted);
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.password-requirement.is-met {
  color: var(--status-success);
}

.password-requirement-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
  transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.password-requirement.is-met .password-requirement-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
  transform: scale(1.1);
}


/* === splash.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Premium Loading / Splash Screen
   ═══════════════════════════════════════════════════════════════ */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
  overflow: hidden;
  will-change: opacity, transform;
}

.splash-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Background mesh gradient — multi-point colour blobs that blend into a
   rich, premium-feeling surface.  Each radial-gradient is a "control point"
   of the mesh; their overlapping edges create the organic colour wash. */
.splash-bg {
  position: absolute;
  inset: 0;
  background:
    /* primary accent — top-left wash */
    radial-gradient(80% 70% at 8% 6%,   rgba(123, 220, 255, 0.28), transparent 55%),
    /* warm gold — top-right corner */
    radial-gradient(70% 65% at 92% 10%,  rgba(217, 183, 122, 0.22), transparent 50%),
    /* deep teal — mid-left */
    radial-gradient(60% 55% at 5% 50%,   rgba(56, 189, 195, 0.18), transparent 50%),
    /* soft violet — center-right */
    radial-gradient(65% 60% at 82% 45%,  rgba(139, 120, 220, 0.16), transparent 50%),
    /* mint — bottom-center push */
    radial-gradient(90% 70% at 45% 90%,  rgba(110, 231, 183, 0.18), transparent 55%),
    /* accent core glow — center hero area */
    radial-gradient(50% 45% at 50% 38%,  rgba(123, 220, 255, 0.16), transparent 50%),
    /* warm under-light — bottom-right */
    radial-gradient(55% 50% at 85% 80%,  rgba(230, 160, 90, 0.12), transparent 48%),
    /* deep base sweep */
    linear-gradient(168deg, var(--bg-0) 0%, var(--bg-1) 40%, #0a1628 65%, var(--bg-0) 100%);
  animation: splashMesh 16s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes splashMesh {
  0%   { transform: scale(1)    translate(0, 0);       opacity: 0.92; }
  33%  { transform: scale(1.04) translate(-0.8%, 0.6%); opacity: 1;    }
  66%  { transform: scale(1.02) translate(0.5%, -0.4%); opacity: 0.96; }
  100% { transform: scale(1.03) translate(-0.3%, 0.8%); opacity: 0.98; }
}

/* Animated cyber grid */
.splash-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(123, 220, 255, 0.05) 59px, rgba(123, 220, 255, 0.05) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(123, 220, 255, 0.05) 59px, rgba(123, 220, 255, 0.05) 60px);
  opacity: 0.6;
  mask-image: radial-gradient(ellipse at center, transparent 15%, rgba(0, 0, 0, 0.25) 65%);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 15%, rgba(0, 0, 0, 0.25) 65%);
  z-index: 1;
  pointer-events: none;
  animation: splashGridPulse 8s ease-in-out infinite;
}

@keyframes splashGridPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.7; }
}

/* Floating particles */
.splash-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.splash-particle {
  position: absolute;
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 220, 255, 0.8), transparent);
  box-shadow: 0 0 8px rgba(123, 220, 255, 0.35), 0 0 16px rgba(123, 220, 255, 0.15);
  animation: splashParticleDrift var(--dur, 10s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
  left: var(--x, 50%);
  top: var(--y, 50%);
}

@keyframes splashParticleDrift {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  15%  { opacity: 0.6; }
  85%  { opacity: 0.6; }
  100% { transform: translate(var(--dx, 30px), var(--dy, -60px)) scale(0.2); opacity: 0; }
}

/* Ambient floating orbs */
.splash-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 220, 255, 0.15), transparent 70%);
  filter: blur(20px);
  animation: splashOrbFloat var(--dur, 15s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--w, 120px);
  height: var(--h, 120px);
  pointer-events: none;
  z-index: 1;
}

@keyframes splashOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  25%      { transform: translate(20px, -15px) scale(1.1); opacity: 0.5; }
  50%      { transform: translate(-10px, 10px) scale(0.9); opacity: 0.4; }
  75%      { transform: translate(15px, 5px) scale(1.05); opacity: 0.35; }
}

/* Centered content */
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Brand text */
.splash-brand {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  margin: 0;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  text-shadow:
    0 0 8px rgba(123, 220, 255, 0.6),
    0 0 20px rgba(123, 220, 255, 0.4),
    0 0 40px rgba(123, 220, 255, 0.25),
    0 0 80px rgba(123, 220, 255, 0.12),
    0 0 120px rgba(123, 220, 255, 0.06);
}

/* ── Smooth Light Sweep (GPU-accelerated) ───────────────────
   Uses only transform and opacity for smooth 60fps animation.
   The sweep bar is a fixed-width element that translates across.
   ──────────────────────────────────────────────────────────── */

/* Primary sweep layer */
.splash-brand::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 0;
  width: 18%;
  height: 120%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 20%,
    rgba(123, 220, 255, 0.03) 30%,
    rgba(255, 255, 255, 0.2) 42%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.2) 58%,
    rgba(123, 220, 255, 0.03) 70%,
    transparent 80%,
    transparent 100%
  );
  filter: blur(2px);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-90%) skewX(-10deg);
  transform-origin: center center;
  will-change: transform, opacity;
}

.splash-brand.is-ready::before {
  animation: splashSmoothSweep 2.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

/* Opacity rises smoothly as the streak enters the text, holds across the
   letters, then fades out before it exits — no off-screen pop-in. */
@keyframes splashSmoothSweep {
  0% {
    transform: translateX(-90%) skewX(-10deg);
    opacity: 0;
  }
  18% {
    opacity: 0;
  }
  35% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
  68% {
    opacity: 0.45;
  }
  85% {
    opacity: 0;
  }
  100% {
    transform: translateX(380%) skewX(-10deg);
    opacity: 0;
  }
}

/* Secondary glow layer — softer, wider */
.splash-brand::after {
  content: "";
  position: absolute;
  top: -30%;
  left: 0;
  width: 25%;
  height: 160%;
  background: radial-gradient(
    ellipse at center,
    rgba(123, 220, 255, 0.12),
    rgba(141, 230, 214, 0.06) 35%,
    rgba(123, 220, 255, 0.02) 55%,
    transparent 75%
  );
  filter: blur(24px);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-90%);
  will-change: transform, opacity;
}

.splash-brand.is-ready::after {
  animation: splashGlowSmoothSweep 2.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

/* Soft glow halo, leads the streak slightly and fades earlier so it never
   lingers — peaks gently as it crosses the letters. */
@keyframes splashGlowSmoothSweep {
  0% {
    transform: translateX(-90%);
    opacity: 0;
  }
  18% {
    opacity: 0;
  }
  35% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.65;
  }
  68% {
    opacity: 0.25;
  }
  85% {
    opacity: 0;
  }
  100% {
    transform: translateX(380%);
    opacity: 0;
  }
}

/* Tertiary: Micro-sparkle trail */
.splash-brand .sparkle-trail {
  position: absolute;
  top: 50%;
  left: 0;
  width: 30%;
  height: 100%;
  transform: translateY(-50%) translateX(-90%);
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle 2px at 15% 40%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(circle 1.5px at 35% 55%, rgba(123, 220, 255, 0.5), transparent),
    radial-gradient(circle 2px at 55% 35%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(circle 1.5px at 75% 60%, rgba(141, 230, 214, 0.4), transparent),
    radial-gradient(circle 2px at 90% 45%, rgba(255, 255, 255, 0.6), transparent);
  will-change: transform, opacity;
}

.splash-brand.is-ready .sparkle-trail {
  animation: sparkleTrailSmooth 2.8s cubic-bezier(0.4, 0, 0.2, 1) 0.72s both;
}

/* Sparkles trail just behind the main streak — fade in with it, out before exit. */
@keyframes sparkleTrailSmooth {
  0%, 22% {
    opacity: 0;
    transform: translateY(-50%) translateX(-90%);
  }
  38% {
    opacity: 0.7;
  }
  52% {
    opacity: 1;
  }
  70% {
    opacity: 0.3;
  }
  85% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(430%);
  }
}

/* Subtitle / tagline */
.splash-tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(123, 220, 255, 0.5);
  opacity: 0;
  animation: splashTaglineIn 0.8s ease forwards;
  animation-delay: 1.8s;
}

@keyframes splashTaglineIn {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Individual letters */
.splash-letter {
  display: inline-block;
  transform: scale(0.85) translateY(8px);
  animation: splashLetterIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.splash-letter:nth-child(1) { animation-delay: 0.2s; opacity: 0; }
.splash-letter:nth-child(2) { animation-delay: 0.35s; opacity: 0; }
.splash-letter:nth-child(3) { animation-delay: 0.5s; opacity: 0; }
.splash-letter:nth-child(4) { animation-delay: 0.65s; opacity: 0; }
.splash-letter:nth-child(5) { animation-delay: 0.8s; opacity: 0; }
.splash-letter:nth-child(6) { animation-delay: 0.95s; opacity: 0; }
.splash-letter:nth-child(7) { animation-delay: 1.1s; opacity: 0; }

@keyframes splashLetterIn {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
    filter: blur(4px);
  }
  60% { filter: blur(0); }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* Breathe animation after all letters appear */
.splash-brand.is-ready {
  animation: splashBreathe 3s ease-in-out infinite;
}

@keyframes splashBreathe {
  0%, 100% {
    opacity: 1;
    text-shadow:
      0 0 8px rgba(123, 220, 255, 0.6),
      0 0 20px rgba(123, 220, 255, 0.4),
      0 0 40px rgba(123, 220, 255, 0.25),
      0 0 80px rgba(123, 220, 255, 0.12),
      0 0 120px rgba(123, 220, 255, 0.06);
  }
  50% {
    opacity: 0.92;
    text-shadow:
      0 0 12px rgba(123, 220, 255, 0.7),
      0 0 28px rgba(123, 220, 255, 0.5),
      0 0 50px rgba(123, 220, 255, 0.3),
      0 0 100px rgba(123, 220, 255, 0.15),
      0 0 140px rgba(123, 220, 255, 0.08);
  }
}

/* Progress bar */
.splash-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(123, 220, 255, 0.08);
  z-index: 3;
  overflow: hidden;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(123, 220, 255, 0.3), var(--accent), rgba(141, 230, 214, 0.5));
  box-shadow: 0 0 12px rgba(123, 220, 255, 0.4), 0 0 24px rgba(123, 220, 255, 0.2);
  animation: splashProgressFill 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.3s;
  border-radius: 0 1px 1px 0;
}

@keyframes splashProgressFill {
  0%   { width: 0%; }
  20%  { width: 25%; }
  50%  { width: 60%; }
  80%  { width: 85%; }
  100% { width: 100%; }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .splash-brand {
    font-size: clamp(2rem, 10vw, 3rem);
    padding: 12px 20px;
    letter-spacing: 0.05em;
  }

  .splash-tagline {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
  }

  .splash-grid {
    background-image:
      repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(123, 220, 255, 0.03) 39px, rgba(123, 220, 255, 0.03) 40px),
      repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(123, 220, 255, 0.03) 39px, rgba(123, 220, 255, 0.03) 40px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .splash-bg,
  .splash-particle,
  .splash-orb,
  .splash-progress-bar,
  .splash-grid {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .splash-letter {
    animation-duration: 0.01ms !important;
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }

  .splash-brand.is-ready {
    animation: none !important;
  }

  .splash-brand.is-ready::before {
    animation: none !important;
    opacity: 0;
  }

  .splash-tagline {
    animation: none !important;
    opacity: 1;
  }

  .splash-progress-bar {
    width: 100%;
  }
}

/* ============================================================
   Splash perf on phones/tablets — the blurred orbs (filter:blur 20px x3)
   are the heaviest part of the intro; drop them on small screens and on
   coarse/low-power devices so the cyno.gg reveal stays smooth.
   ============================================================ */
@media (max-width: 820px) {
  .splash-orb { display: none; }
  /* Keep only the first few particles on phones. */
  .splash-particle:nth-child(n+5) { display: none; }

  /* Freeze the heavy mesh gradient animation — still looks rich, no GPU churn */
  .splash-bg {
    animation: none;
    transform: scale(1.02);
    opacity: 0.96;
  }

  /* Kill the grid pulse — static grid is fine */
  .splash-grid {
    animation: none;
    opacity: 0.55;
  }

  /* Simplify the breathe: 2 text-shadow layers instead of 5 */
  .splash-brand.is-ready {
    animation: splashBreatheLite 3s ease-in-out infinite;
  }

  /* Remove the secondary glow sweep and sparkle trail (saves 2 composited layers) */
  .splash-brand.is-ready::after,
  .splash-brand.is-ready .sparkle-trail {
    animation: none !important;
    display: none;
  }

  /* Simplify the primary sweep — shorter, less blur */
  .splash-brand::before {
    filter: none;
  }
}

@keyframes splashBreatheLite {
  0%, 100% {
    opacity: 1;
    text-shadow:
      0 0 8px rgba(123, 220, 255, 0.5),
      0 0 30px rgba(123, 220, 255, 0.2);
  }
  50% {
    opacity: 0.94;
    text-shadow:
      0 0 12px rgba(123, 220, 255, 0.6),
      0 0 40px rgba(123, 220, 255, 0.25);
  }
}

/* Touch devices of any size: lighter splash (orbs are decorative). */
@media (hover: none) {
  .splash-orb { display: none; }
}

/* Phones: letter-in blur is expensive — skip it */
@media (max-width: 820px) {
  .splash-letter {
    filter: none !important;
  }
  @keyframes splashLetterIn {
    0% {
      opacity: 0;
      transform: scale(0.85) translateY(8px);
    }
    100% {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
}

/* Also strip the landing background orbs/particles/mesh on mobile */
@media (max-width: 820px) {
  .landing-bg-shell .splash-orb { display: none; }
  .landing-bg-shell .splash-bg {
    animation: none;
    transform: scale(1.02);
    opacity: 0.96;
  }
  .landing-bg-shell .splash-grid {
    animation: none;
    opacity: 0.55;
  }
}

/* Make sure the splash always fills the viewport incl. mobile browser chrome. */
.splash-screen { min-height: 100vh; min-height: 100dvh; }
