/* XCS Request System — Hurricane Design System v2
 * ─────────────────────────────────────────────────────────────────
 * Token-based design system with light + dark themes.
 *
 * Theme is controlled by `data-theme` attribute on <html>:
 *   <html data-theme="light">  → light mode (default)
 *   <html data-theme="dark">   → dark mode
 *
 * Set via window.toggleTheme() or follows OS preference on first visit.
 *
 * Color naming convention:
 *   --xcs-bg-{layer}    surface background (1=app, 2=card, 3=hover)
 *   --xcs-ink-{n}       text colors (1=primary, 2=secondary, 3=muted, 4=disabled)
 *   --xcs-line-{n}      borders/dividers (1=subtle, 2=strong)
 *   --xcs-accent-{n}    brand colors (navy/yellow/blue/etc)
 * ─────────────────────────────────────────────────────────────────
 */

:root, [data-theme="light"] {
  /* ── Brand (constant across themes) — BLACK / WHITE / SILVER ── */
  --xcs-navy:        #0A0A0A;    /* sidebar / primary buttons / dark surfaces */
  --xcs-navy-2:      #161616;
  --xcs-navy-3:      #222222;
  --xcs-yellow:      #C4C4C4;    /* former accent → SILVER */
  --xcs-yellow-soft: #ECECEC;
  --xcs-chrome:      linear-gradient(135deg,#F7F7F7 0%,#C9C9C9 30%,#8F8F8F 55%,#E9E9E9 100%);  /* chrome highlight */

  /* ── Surfaces (light mode) ── */
  --xcs-bg-1:        #F4F4F4;    /* app background */
  --xcs-bg-2:        #FFFFFF;    /* card / elevated surface */
  --xcs-bg-3:        #EAEAEA;    /* hover surface */
  --xcs-bg-tint:     #F7F7F7;    /* table row alt, soft fills */

  /* ── Text ── */
  --xcs-ink-1:       #0A0A0A;    /* primary text */
  --xcs-ink-2:       #3A3A3A;    /* secondary */
  --xcs-ink-3:       #6E6E6E;    /* muted */
  --xcs-ink-4:       #9A9A9A;    /* disabled */
  --xcs-ink-on-brand:#FFFFFF;    /* text on black / silver bg */

  /* ── Lines ── */
  --xcs-line-1:      #E3E3E3;    /* subtle border */
  --xcs-line-2:      #CACACA;    /* strong border */
  --xcs-line-focus:  #7A7A7A;    /* focus ring */

  /* ── Accents (semantic) ── */
  --xcs-blue:        #1A1A1A;    /* former "primary blue" → near-black */
  --xcs-blue-soft:   #E8E8E8;
  --xcs-blue-fg:     #111111;    /* on light soft bg */
  --xcs-green:       #2F9E5F;
  --xcs-green-soft:  #E6F3EB;
  --xcs-orange:      #C98A1B;
  --xcs-orange-soft: #F7EEDD;
  --xcs-red:         #D42B2B;
  --xcs-red-soft:    #F9E3E3;
  --xcs-violet:      #6E6E6E;
  --xcs-violet-soft: #EDEDED;

  /* ── Shadows (light mode — soft, layered) ── */
  --xcs-shadow-sm:   0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.04);
  --xcs-shadow-md:   0 4px 12px -2px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --xcs-shadow-lg:   0 12px 32px -8px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.04);
  --xcs-shadow-pop:  0 20px 50px -12px rgba(0,0,0,0.18), 0 8px 16px rgba(0,0,0,0.06);

  /* ── Radius ── */
  --xcs-radius-xs:   6px;
  --xcs-radius-sm:   8px;
  --xcs-radius:      12px;     /* default card radius */
  --xcs-radius-lg:   16px;     /* hero cards */
  --xcs-radius-pill: 999px;

  /* ── Spacing (4px scale) ── */
  --xcs-space-1: 4px;
  --xcs-space-2: 8px;
  --xcs-space-3: 12px;
  --xcs-space-4: 16px;
  --xcs-space-5: 20px;
  --xcs-space-6: 24px;
  --xcs-space-8: 32px;

  /* ── Motion ── */
  --xcs-ease:        cubic-bezier(0.32, 0.72, 0.32, 1);
  --xcs-ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --xcs-dur-fast:    120ms;
  --xcs-dur-base:    200ms;
  --xcs-dur-slow:    400ms;

  /* ── Legacy aliases (back-compat — DO NOT remove) ── */
  --xcs-bg:          var(--xcs-bg-1);
  --xcs-card:        var(--xcs-bg-2);
  --xcs-border:      var(--xcs-line-1);
  --xcs-border-strong: var(--xcs-line-2);
  --xcs-ink:         var(--xcs-ink-1);
  --xcs-bgsoft:      var(--xcs-bg-tint);

  color-scheme: light;
}

/* ──────────────────────────────────────────────────────────────────
 * DARK MODE
 * Semantic tokens flip; brand colors stay the same.
 * True black canvas with neutral greys — no colour cast.
 * ────────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  /* Surfaces — black stack */
  --xcs-bg-1:        #0A0A0A;
  --xcs-bg-2:        #141414;     /* card */
  --xcs-bg-3:        #1E1E1E;     /* hover */
  --xcs-bg-tint:     #171717;     /* subtle alt */

  /* Text — inverted with care for legibility */
  --xcs-ink-1:       #F2F2F2;
  --xcs-ink-2:       #CFCFCF;
  --xcs-ink-3:       #9A9A9A;
  --xcs-ink-4:       #6E6E6E;
  --xcs-ink-on-brand:#FFFFFF;

  /* Lines */
  --xcs-line-1:      #262626;
  --xcs-line-2:      #3A3A3A;
  --xcs-line-focus:  #A8A8A8;

  /* Brand — silver reads brighter on black */
  --xcs-yellow:      #C4C4C4;
  --xcs-yellow-soft: rgba(196,196,196,0.15);
  --xcs-chrome:      linear-gradient(135deg,#F7F7F7 0%,#C9C9C9 30%,#8F8F8F 55%,#E9E9E9 100%);

  /* Accents — near-white primary; status colours lifted for dark bg */
  --xcs-blue:        #E6E6E6;
  --xcs-blue-soft:   rgba(230,230,230,0.12);
  --xcs-blue-fg:     #F2F2F2;
  --xcs-green:       #4CC27B;
  --xcs-green-soft:  rgba(76,194,123,0.15);
  --xcs-orange:      #E0A33A;
  --xcs-orange-soft: rgba(224,163,58,0.15);
  --xcs-red:         #F06060;
  --xcs-red-soft:    rgba(240,96,96,0.15);
  --xcs-violet:      #A0A0A0;
  --xcs-violet-soft: rgba(160,160,160,0.15);

  /* Shadows — deeper in dark mode */
  --xcs-shadow-sm:   0 1px 2px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
  --xcs-shadow-md:   0 4px 12px -2px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
  --xcs-shadow-lg:   0 12px 32px -8px rgba(0,0,0,0.6), 0 4px 8px rgba(0,0,0,0.3);
  --xcs-shadow-pop:  0 20px 50px -12px rgba(0,0,0,0.7), 0 8px 16px rgba(0,0,0,0.4);

  /* Legacy aliases */
  --xcs-bg:          var(--xcs-bg-1);
  --xcs-card:        var(--xcs-bg-2);
  --xcs-border:      var(--xcs-line-1);
  --xcs-border-strong: var(--xcs-line-2);
  --xcs-ink:         var(--xcs-ink-1);
  --xcs-bgsoft:      var(--xcs-bg-tint);

  color-scheme: dark;
}

/* Follow OS preference if user hasn't picked yet (no data-theme set) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    /* Apply dark mode tokens by re-declaring (avoids JS flash) */
    --xcs-bg-1:        #0A0A0A;
    --xcs-bg-2:        #141414;
    --xcs-bg-3:        #1E1E1E;
    --xcs-bg-tint:     #171717;
    --xcs-ink-1:       #F2F2F2;
    --xcs-ink-2:       #CFCFCF;
    --xcs-ink-3:       #9A9A9A;
    --xcs-ink-4:       #6E6E6E;
    --xcs-line-1:      #262626;
    --xcs-line-2:      #3A3A3A;
    --xcs-line-focus:  #A8A8A8;
    --xcs-yellow:      #C4C4C4;
    --xcs-yellow-soft: rgba(196,196,196,0.15);
    --xcs-chrome:      linear-gradient(135deg,#F7F7F7 0%,#C9C9C9 30%,#8F8F8F 55%,#E9E9E9 100%);
    --xcs-blue:        #E6E6E6;
    --xcs-blue-soft:   rgba(230,230,230,0.12);
    --xcs-blue-fg:     #F2F2F2;
    --xcs-green:       #4CC27B;
    --xcs-green-soft:  rgba(76,194,123,0.15);
    --xcs-orange:      #E0A33A;
    --xcs-orange-soft: rgba(224,163,58,0.15);
    --xcs-red:         #F06060;
    --xcs-red-soft:    rgba(240,96,96,0.15);
    --xcs-violet:      #A0A0A0;
    --xcs-violet-soft: rgba(160,160,160,0.15);
    --xcs-shadow-sm:   0 1px 2px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
    --xcs-shadow-md:   0 4px 12px -2px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
    --xcs-shadow-lg:   0 12px 32px -8px rgba(0,0,0,0.6), 0 4px 8px rgba(0,0,0,0.3);
    --xcs-shadow-pop:  0 20px 50px -12px rgba(0,0,0,0.7), 0 8px 16px rgba(0,0,0,0.4);
    color-scheme: dark;
  }
}

/* Smooth color transitions when toggling theme */
html { transition: background-color var(--xcs-dur-base, 200ms) ease, color var(--xcs-dur-base, 200ms) ease; }
body, .xcs-card, .xcs-app, .xcs-sidebar, .xcs-stat, button, input, textarea, select {
  transition: background-color var(--xcs-dur-base, 200ms) ease,
              border-color var(--xcs-dur-base, 200ms) ease,
              color var(--xcs-dur-base, 200ms) ease;
}


* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--xcs-bg-1);
  color: var(--xcs-ink-1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
}
.xcs-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: -0.01em; font-weight: 500;
  color: var(--xcs-ink-3);
  font-variant-numeric: tabular-nums;
}

button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* Reduce motion for users with the OS preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Layout shell ──────────────────────────────────────────────── */
.xcs-app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}
.xcs-main {
  overflow-y: auto;
  background: var(--xcs-bg);
}
.xcs-main-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 40px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.xcs-sidebar {
  background: var(--xcs-navy);
  color: #E6E6E6;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  gap: 14px;
  position: sticky; top: 0;
  height: 100vh;
  height: 100dvh;
  border-right: 1px solid #1F1F1F;
}
.xcs-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 12px; }
.xcs-logo {
  min-height: 36px; height: auto;
  display: flex; align-items: center;
  background: transparent; border: 0; padding: 0; font-family: inherit;
  filter: none;
}
.xcs-logo svg { display: block; height: 28px; width: auto; }
/* Brand button — ensure text stays white/inherit even when button is light mode.
   Sidebar bg is always navy regardless of theme, so brand text must always be light. */
.xcs-brand-clickable,
.xcs-brand {
  color: #E6E6E6 !important;
}
.xcs-brand-name {
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 600; letter-spacing: 0.06em; font-size: 17px;
  color: #FFFFFF;
}
.xcs-brand-sub {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 11px;
  color: #C4C4C4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 1px;
}

/* Old rules below kept as fallbacks but won't override */

.xcs-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 0 10px;
  color: rgba(255,255,255,0.5);
}
.xcs-search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  padding: 9px 0; color: #FFFFFF; font-size: 13px;
}
.xcs-search input::placeholder { color: rgba(255,255,255,0.4); }
.xcs-search kbd {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px;
  color: #C4C4C4;
}

.xcs-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.xcs-nav-item {
  appearance: none; border: 0; background: transparent;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: rgba(255,255,255,0.72); font-size: 13.5px; font-weight: 500;
  text-align: left; cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.xcs-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.xcs-nav-item.is-active { background: #FFFFFF; color: #0A0A0A; box-shadow: none; }
.xcs-nav-item.is-primary, .xcs-nav-item.is-ops-primary {
  background: var(--xcs-chrome); color: #0A0A0A; border: 0; margin-top: 6px; font-weight: 700;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,0.45);
}
.xcs-nav-item.is-primary:hover, .xcs-nav-item.is-ops-primary:hover { background: var(--xcs-chrome); color: #0A0A0A; filter: brightness(1.06); }

/* Daily Request nav button — green variant */
.xcs-nav-item.is-daily {
  background: #10B981; color: #fff; font-weight: 700;
  margin-top: 4px;
  box-shadow: 0 4px 14px -4px rgba(16,185,129,0.45);
}
.xcs-nav-item.is-daily:hover { background: #059669; color: #fff; }
.xcs-nav-item.is-daily .xcs-kbd {
  background: rgba(255,255,255,0.22); color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; padding: 2px 5px; border-radius: 4px;
}

.xcs-nav-item > span:nth-child(2) { flex: 1; }
.xcs-pill {
  background: rgba(255,255,255,0.14); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.xcs-nav-item.is-primary .xcs-kbd, .xcs-nav-item.is-ops-primary .xcs-kbd {
  background: rgba(0,0,0,0.12); color: #0A0A0A; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; padding: 2px 5px; border-radius: 4px;
}

.xcs-section-title {
  padding: 14px 10px 4px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); font-weight: 700;
}
.xcs-cat-list { display: flex; flex-direction: column; gap: 10px; flex: 1; overflow-y: auto; padding: 0 4px; }
.xcs-cat-group-h { font-size: 11px; color: rgba(255,255,255,0.5); padding: 4px 6px; font-weight: 600; letter-spacing: 0.04em; }
.xcs-cat-row {
  display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 7px;
  color: rgba(255,255,255,0.75); font-size: 12.5px;
  appearance: none; border: 0; background: transparent;
  text-align: left; cursor: pointer; font-family: inherit;
}
.xcs-cat-row:hover { background: rgba(255,255,255,0.04); color: #fff; }
.xcs-cat-row.is-active { background: rgba(255,255,255,0.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.xcs-cat-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.xcs-cat-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.45); }

/* ── Theme switcher (sidebar) ─────────────────────────────────── */
.xcs-theme-switch {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  margin-top: auto;
  margin-bottom: 10px;
  padding: 3px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
}
.xcs-theme-opt {
  appearance: none; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 4px;
  border-radius: 7px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-theme-opt:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.04); }
.xcs-theme-opt.on {
  background: #FFFFFF;
  color: #0A0A0A;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.xcs-theme-opt svg { flex-shrink: 0; }

/* When userblock no longer has margin-top:auto, theme switcher takes that role */
.xcs-userblock {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  color: #C4C4C4;
  background: rgba(255,255,255,0.04); border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.08);
}
.xcs-user-meta { flex: 1; min-width: 0; }
.xcs-user-name { font-size: 13px; font-weight: 600; color: #fff; }
.xcs-user-role { font-size: 11px; color: #C4C4C4; }
.xcs-icon-btn {
  appearance: none; border: 0; background: rgba(255,255,255,0.06);
  width: 30px; height: 30px; border-radius: 8px;
  color: rgba(255,255,255,0.75); cursor: pointer; position: relative;
  display: grid; place-items: center;
}
.xcs-icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.xcs-dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; background: var(--xcs-yellow); border-radius: 999px; border: 2px solid var(--xcs-navy); box-sizing: content-box; }

/* ── Avatar ───────────────────────────────────────────────────── */
.xcs-avatar {
  width: 28px; height: 28px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--xcs-blue); color: #fff;
  font-weight: 700; font-size: 11px;
  letter-spacing: 0;
  flex-shrink: 0;
}

/* ── Page head & typography ───────────────────────────────────── */
.xcs-pagehead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 4px;
}
.xcs-pagehead h1 {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 28px; font-weight: 500; letter-spacing: 0.01em; margin: 4px 0 6px;
}
.xcs-pagehead-sub { color: var(--xcs-ink-3); font-size: 14px; margin: 0; }
.xcs-eyebrow {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--xcs-ink-3);
}
.xcs-pagehead-cta { display: flex; gap: 10px; align-items: center; }

/* ── Hall of Fame: streak chip ───────────────────────────────── */
.xcs-streak {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.xcs-streak-warm { background: var(--xcs-yellow-soft); border-color: var(--xcs-yellow-soft); color: #92400E; }
.xcs-streak-hot  { background: #FFEDD5; border-color: #FED7AA; color: #9A3412; }
.xcs-streak-fire { background: #FEE2E2; border-color: #FECACA; color: #991B1B; }
.xcs-streak-icon { font-size: 22px; line-height: 1; }
.xcs-streak-n { font-size: 14px; font-weight: 800; line-height: 1.1; }
.xcs-streak-l { font-size: 10px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Hall of Fame: MVP banner ────────────────────────────────── */
.xcs-mvp-banner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #F0F0F0 0%, var(--xcs-yellow-soft) 100%);
  border: 1px solid #F59E0B;
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px -6px rgba(245,158,11,0.35);
}
.xcs-mvp-trophy { font-size: 36px; line-height: 1; flex-shrink: 0; animation: xcs-mvp-bounce 2.5s ease-in-out infinite; }
@keyframes xcs-mvp-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.xcs-mvp-body { flex: 1; min-width: 0; }
.xcs-mvp-eyebrow {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #92400E; margin-bottom: 4px;
}
.xcs-mvp-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: #78350F; }
.xcs-mvp-line strong { color: #451A03; font-weight: 800; }
.xcs-mvp-av { flex-shrink: 0; width: 26px !important; height: 26px !important; font-size: 11px !important; }
.xcs-mvp-spark { font-size: 28px; line-height: 1; opacity: 0.7; flex-shrink: 0; }

/* ── Hall of Fame: live activity feed ────────────────────────── */
.xcs-livefeed .xcs-card-h h3 { display: flex; align-items: center; gap: 8px; }
.xcs-live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
  animation: xcs-live-pulse 2s ease-out infinite;
}
@keyframes xcs-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.xcs-feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.xcs-feed-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-top: 1px solid var(--xcs-border);
  cursor: pointer; transition: background 0.12s;
}
.xcs-feed-item:hover { background: var(--xcs-bg-tint); }
.xcs-feed-item:first-child { border-top: 0; }
.xcs-feed-body { flex: 1; min-width: 0; }
.xcs-feed-line { font-size: 13px; color: var(--xcs-ink); line-height: 1.4; }
.xcs-feed-line strong { color: var(--xcs-ink-1); font-weight: 700; }
[data-theme="light"] .xcs-feed-line strong,
:root .xcs-feed-line strong { color: var(--xcs-navy); }
.xcs-feed-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--xcs-ink-3); margin-top: 2px;
  overflow: hidden;
}
.xcs-feed-title {
  max-width: 320px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-feed-time { color: var(--xcs-ink-4); flex-shrink: 0; }

/* ── Hall of Fame: department leaderboard ────────────────────── */
.xcs-deptboard { display: flex; flex-direction: column; gap: 10px; }
.xcs-deptboard .xcs-dept-row {
  display: grid; grid-template-columns: 44px 1fr 1.4fr auto;
  align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.xcs-deptboard .xcs-dept-row:hover { transform: translateY(-1px); box-shadow: 0 4px 14px -8px rgba(0,0,0,0.15); }
.xcs-deptboard .xcs-dept-row.rank-1 {
  background: linear-gradient(135deg, #F0F0F0 0%, var(--xcs-yellow-soft) 100%);
  border-color: #F59E0B;
}
.xcs-deptboard .xcs-dept-row.rank-2 {
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  border-color: #9CA3AF;
}
.xcs-deptboard .xcs-dept-row.rank-3 {
  background: linear-gradient(135deg, #FED7AA 0%, #FDBA74 100%);
  border-color: #FB923C;
}
.xcs-deptboard .xcs-dept-rank { font-size: 22px; line-height: 1; text-align: center; font-weight: 800; }
.xcs-deptboard .xcs-dept-row:not(.rank-1):not(.rank-2):not(.rank-3) .xcs-dept-rank {
  font-size: 14px; color: var(--xcs-ink-3);
}
.xcs-deptboard .xcs-dept-info { min-width: 0; }
.xcs-deptboard .xcs-dept-name { font-weight: 800; font-size: 14px; color: var(--xcs-ink); }
.xcs-deptboard .xcs-dept-sub { font-size: 11.5px; color: var(--xcs-ink-3); margin-top: 2px; }
.xcs-deptboard .xcs-dept-bar-track {
  width: 100%; height: 8px; border-radius: 999px;
  background: rgba(0,0,0,0.08); overflow: hidden;
}
.xcs-deptboard .xcs-dept-bar-fill {
  height: 100%; background: var(--xcs-ink-2);
  border-radius: 999px; transition: width 0.5s;
}
.xcs-deptboard .xcs-dept-row.rank-1 .xcs-dept-bar-fill { background: #D97706; }
.xcs-deptboard .xcs-dept-row.rank-2 .xcs-dept-bar-fill { background: #6B7280; }
.xcs-deptboard .xcs-dept-row.rank-3 .xcs-dept-bar-fill { background: #EA580C; }
.xcs-deptboard .xcs-dept-total { font-size: 20px; font-weight: 800; color: var(--xcs-ink); min-width: 28px; text-align: right; }

/* ── Hall of Fame: PIC badges ────────────────────────────────── */
.xcs-pic-badges {
  background: var(--xcs-bg-tint); border: 1px solid var(--xcs-border);
  border-radius: 12px; padding: 14px 18px;
  margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.xcs-pic-badges-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--xcs-ink-3);
}
.xcs-pic-badges-list { display: flex; flex-wrap: wrap; gap: 8px; }
.xcs-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  border: 1px solid;
  cursor: default;
  transition: transform 0.15s;
}
.xcs-badge:hover { transform: scale(1.05); }
.xcs-badge-icon { font-size: 14px; line-height: 1; }

/* Mini badge — inline next to PIC name in performance row */
.xcs-pic-sub {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.xcs-badge-mini {
  display: inline-flex; align-items: center;
  font-size: 13px; line-height: 1;
  cursor: help;
}

@media (max-width: 720px) {
  .xcs-pagehead-cta { flex-wrap: wrap; }
  .xcs-streak { padding: 4px 10px 4px 8px; }
  .xcs-streak-icon { font-size: 18px; }
  .xcs-streak-n { font-size: 12px; }
  .xcs-streak-l { font-size: 9px; }
  .xcs-mvp-banner { padding: 12px 14px; gap: 10px; }
  .xcs-mvp-trophy { font-size: 28px; }
  .xcs-mvp-line { font-size: 13px; gap: 6px; }
  .xcs-mvp-spark { display: none; }
  .xcs-deptboard .xcs-dept-row { grid-template-columns: 32px 1fr auto; gap: 10px; }
  .xcs-deptboard .xcs-dept-bar { display: none; }
  .xcs-deptboard .xcs-dept-rank { font-size: 18px; }
  .xcs-feed-title { max-width: 180px; }
}

/* ── Buttons ──────────────────────────────────────────────────── */
.xcs-btn-primary {
  appearance: none; border: 0; cursor: pointer;
  background: #0A0A0A; color: #fff;
  font-weight: 600; font-size: 13.5px;
  padding: 10px 16px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,0.35);
  transition: transform 0.08s, background 0.12s;
}
.xcs-btn-primary:hover { background: #262626; }
.xcs-btn-primary:active { transform: translateY(1px); }
.xcs-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.xcs-btn-lg { padding: 12px 20px; font-size: 14px; border-radius: 12px; }
.xcs-btn-ghost {
  appearance: none; cursor: pointer;
  background: var(--xcs-bg-2); color: var(--xcs-ink-1);
  border: 1px solid var(--xcs-line-2);
  font-weight: 600; font-size: 13.5px;
  padding: 9px 14px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.xcs-btn-ghost:hover { border-color: var(--xcs-ink-1); background: var(--xcs-bg-2); }
.xcs-link {
  appearance: none; background: transparent; border: 0;
  color: var(--xcs-ink-1); cursor: pointer; font-weight: 600; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #9A9A9A;
}
.xcs-link:disabled { color: var(--xcs-ink-4); cursor: not-allowed; }
.xcs-link:hover:not(:disabled) { text-decoration: underline; color: var(--xcs-ink-1); text-decoration-color: var(--xcs-ink-1); }

/* ── Stat cards ───────────────────────────────────────────────── */
.xcs-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.xcs-stat {
  background: var(--xcs-card); border: 1px solid var(--xcs-border);
  border-radius: var(--xcs-radius); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.xcs-stat-label { font-size: 12px; color: var(--xcs-ink-3); font-weight: 600; letter-spacing: 0.01em; }
.xcs-stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 10px; }
.xcs-trend { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.xcs-trend.up { background: #DCFCE7; color: #166534; }
.xcs-trend.down { background: #FEE2E2; color: #991B1B; }
.xcs-stat-sub { font-size: 12.5px; color: var(--xcs-ink-3); }

/* ── Cards ────────────────────────────────────────────────────── */
.xcs-card {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: var(--xcs-radius);
  padding: 22px;
  display: flex; flex-direction: column;
  gap: 16px;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-card-soft {
  background: var(--xcs-bg-tint);
}
.xcs-card-flush { padding: 0; }
.xcs-card-h {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.xcs-card-h h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 2px; color: var(--xcs-ink-1); }
.xcs-card-h p { color: var(--xcs-ink-3); font-size: 12.5px; margin: 0; }

.xcs-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }

/* ── Request rows ─────────────────────────────────────────────── */
.xcs-rows { display: flex; flex-direction: column; }
.xcs-rows-head, .xcs-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 120px 120px 80px 44px;
  align-items: center; gap: 12px;
  padding: 10px 16px;
}
.xcs-rows-with-dept .xcs-rows-head,
.xcs-rows-with-dept .xcs-row {
  grid-template-columns: 88px minmax(0, 1.4fr) 140px 120px 120px 80px 44px;
}
.xcs-row-dept {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  font-size: 12px;
}
.xcs-row-dept-name {
  font-weight: 600; color: var(--xcs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-row-dept-role {
  font-size: 10.5px; color: var(--xcs-ink-4); text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 600;
}
.xcs-rows-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--xcs-ink-4); border-bottom: 1px solid var(--xcs-border);
  padding-top: 12px; padding-bottom: 10px;
}
.xcs-row {
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: left;
  border-bottom: 1px solid var(--xcs-border);
  font-size: 13.5px;
  transition: background 0.08s;
}
.xcs-row:last-child { border-bottom: 0; }
.xcs-row:hover { background: var(--xcs-bg-tint); }
.xcs-row-id {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
  color: var(--xcs-ink-3); font-weight: 600;
  display: flex; flex-direction: column; gap: 2px; line-height: 1.2;
}
.xcs-row-id-created {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10px; font-weight: 500;
  color: #9A9A9A; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-row-title {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0; overflow: hidden;
}
.xcs-row-title > span:first-child {
  font-weight: 600; color: var(--xcs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-row-deadline { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--xcs-ink-3); }

/* Type badge */
.xcs-type {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--xcs-ink-3);
  font-weight: 600;
}
.xcs-type-bar { width: 3px; height: 11px; border-radius: 2px; }
.xcs-type-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--xcs-bg-3); color: var(--xcs-ink-2); font-weight: 700; letter-spacing: 0.04em;
}

/* Status */
.xcs-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--xcs-ink-2);
}
.xcs-status-dot { width: 8px; height: 8px; border-radius: 999px; box-shadow: 0 0 0 3px currentColor; color: rgba(0,0,0,0.04); }

/* Priority */
.xcs-prio {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid;
}
.xcs-prio-dot { width: 6px; height: 6px; border-radius: 999px; }

.xcs-unassigned { color: var(--xcs-ink-4); }

/* ── Mine card ─────────────────────────────────────────────────── */
.xcs-mine { display: flex; flex-direction: column; gap: 10px; }
.xcs-mine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.xcs-mine-item {
  appearance: none; border: 1px solid var(--xcs-border);
  background: var(--xcs-card); border-radius: 10px;
  padding: 12px 14px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.xcs-mine-item:hover { border-color: var(--xcs-border-strong); transform: translateY(-1px); }
.xcs-mine-head { display: flex; align-items: center; justify-content: space-between; }
.xcs-mine-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.xcs-mine-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.xcs-due { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--xcs-ink-3); }
.xcs-due.urgent { color: #DC2626; font-weight: 700; }

/* ── Category bar chart ────────────────────────────────────────── */
.xcs-catbar {
  background: var(--xcs-card); border: 1px solid var(--xcs-border);
  border-radius: var(--xcs-radius); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.xcs-catbar-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; }
.xcs-catbar-total { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--xcs-ink-3); font-weight: 500; }
.xcs-catbar-rows { display: flex; flex-direction: column; gap: 10px; }
.xcs-catbar-row { display: grid; grid-template-columns: 140px 1fr 30px; gap: 12px; align-items: center; }
.xcs-catbar-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.xcs-catbar-track { height: 10px; background: var(--xcs-bg-3); border-radius: 999px; overflow: hidden; }
.xcs-catbar-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.xcs-catbar-count { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; text-align: right; }

/* ── Intake / Chat ─────────────────────────────────────────────── */
.xcs-intake { display: flex; flex-direction: column; gap: 22px; }
.xcs-chat-wrap {
  background: var(--xcs-card); border: 1px solid var(--xcs-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 580px;
}
.xcs-chat-progress {
  display: flex; gap: 4px; padding: 12px 22px; background: linear-gradient(180deg, #F7F7F7 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-chat-step {
  flex: 1; height: 4px; background: #E3E3E3; border-radius: 999px;
  transition: background 0.25s;
}
.xcs-chat-step.done { background: var(--xcs-blue); }
.xcs-chat-step.now { background: var(--xcs-yellow); }

.xcs-chat {
  flex: 1;
  padding: 28px 22px 22px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  max-height: 70vh;
}
.xcs-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  animation: xcs-fade-in 0.24s ease-out;
}
.xcs-bubble-bot {
  background: var(--xcs-bg-3); color: var(--xcs-ink);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.xcs-bubble-user {
  background: var(--xcs-navy); color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.xcs-bubble-typing {
  background: var(--xcs-bg-3); padding: 14px 16px; border-radius: 14px;
  border-bottom-left-radius: 4px; align-self: flex-start;
  display: flex; gap: 4px;
}
.xcs-bubble-typing span {
  width: 6px; height: 6px; border-radius: 999px; background: var(--xcs-ink-4);
  animation: xcs-bounce 1s infinite;
}
.xcs-bubble-typing span:nth-child(2) { animation-delay: 0.15s; }
.xcs-bubble-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes xcs-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}
@keyframes xcs-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.xcs-chat-subnote { font-size: 11.5px; color: var(--xcs-ink-3); margin-top: 4px; }

.xcs-choices {
  display: flex; flex-direction: column; gap: 8px;
  align-self: flex-start; width: 100%; max-width: 520px;
}
.xcs-choices-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  max-width: 100%;
}
.xcs-choice {
  appearance: none; border: 1.5px solid var(--xcs-border);
  background: var(--xcs-card); border-radius: 12px;
  padding: 12px 14px; cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; column-gap: 12px; row-gap: 2px;
  text-align: left;
  font-size: 14px;
  transition: border-color 0.12s, transform 0.08s, box-shadow 0.12s;
}
.xcs-choice:hover { border-color: var(--xcs-navy); transform: translateY(-1px); box-shadow: 0 8px 24px -16px rgba(0,0,0,0.4); }
.xcs-choice-ico {
  width: 36px; height: 36px; background: var(--xcs-blue-soft); color: var(--xcs-blue);
  border-radius: 9px; display: grid; place-items: center;
  grid-row: 1 / 3;
}
.xcs-choice-dot { width: 10px; height: 10px; border-radius: 999px; grid-row: 1 / 3; }
.xcs-choice-label { font-weight: 700; }
.xcs-choice-sub { grid-column: 2; font-size: 12px; color: var(--xcs-ink-3); font-weight: 500; }
.xcs-choice-arrow { color: var(--xcs-ink-4); font-weight: 700; }

.xcs-choice-cat {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px 14px 18px; min-height: 100px;
  align-items: flex-start;
}
.xcs-choice-cat-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 12px 0 0 12px; }
.xcs-choice-cat-short {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  background: var(--xcs-bg-3); padding: 2px 7px; border-radius: 4px;
  letter-spacing: 0.06em; font-weight: 700; color: var(--xcs-ink-2);
}
.xcs-choice-cat .xcs-choice-label { font-size: 15px; margin-top: 4px; }
.xcs-choice-cat .xcs-choice-sub { font-size: 12.5px; line-height: 1.4; grid-column: auto; }

/* Admin-lockable content type cards (intake step 1) */
.xcs-choice-shell { display: flex; gap: 8px; align-items: stretch; }
.xcs-choice-shell .xcs-choice { flex: 1; }
.xcs-choice-locked {
  opacity: 0.55; cursor: not-allowed;
  border-style: dashed; background: var(--xcs-bg-3);
}
.xcs-choice-locked:hover { border-color: var(--xcs-border); transform: none; box-shadow: none; }
.xcs-lock-btn {
  appearance: none; border: 1.5px solid var(--xcs-border);
  background: var(--xcs-card); border-radius: 12px;
  padding: 6px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 58px; font-size: 11px; font-weight: 700; color: var(--xcs-ink-3);
  transition: border-color 0.12s, background 0.12s;
}
.xcs-lock-btn:hover { border-color: var(--xcs-navy); color: var(--xcs-ink-2); }
.xcs-lock-btn.on { background: var(--xcs-yellow-soft); border-color: #F59E0B; color: #92400E; }
.xcs-lock-btn:disabled { opacity: 0.6; cursor: default; }
.xcs-lock-btn-ico { font-size: 15px; line-height: 1; }

.xcs-input-row {
  display: flex; gap: 8px; align-self: stretch;
  align-items: flex-end;
}
.xcs-input-row-tall { align-items: stretch; }
.xcs-text-input {
  flex: 1; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--xcs-border);
  font-size: 14px; outline: none;
  background: var(--xcs-bg-2);
  transition: border-color 0.12s;
}
.xcs-text-input:focus { border-color: var(--xcs-navy); }
.xcs-text-area { resize: vertical; min-height: 100px; font-family: inherit; }

.xcs-date { display: flex; flex-direction: column; gap: 12px; align-self: stretch; }
.xcs-date-quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.xcs-date-quick-btn {
  appearance: none; border: 1.5px solid var(--xcs-border); background: var(--xcs-card);
  border-radius: 10px; padding: 10px 14px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; font-weight: 500;
}
.xcs-date-quick-btn:hover { border-color: var(--xcs-navy); }
.xcs-date-quick-btn .xcs-mono { color: var(--xcs-ink); font-weight: 700; }

/* ── Auto-deadline lock card (urgent / high priority) ─────────── */
.xcs-auto-deadline {
  border: 1.5px solid #D6D6D6;
  background: linear-gradient(135deg, #F7F7F7 0%, var(--xcs-yellow-soft) 100%);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.xcs-auto-deadline-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #78350F;
}
.xcs-auto-deadline-head strong { color: #92400E; font-weight: 700; }
.xcs-auto-deadline-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: #FBBF24;
  border-radius: 999px;
  font-size: 16px;
  flex-shrink: 0;
}
.xcs-auto-deadline-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--xcs-ink);
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-yellow-soft);
  border-radius: 10px;
  padding: 12px 14px;
}
.xcs-auto-deadline-note {
  font-size: 12.5px;
  color: #78350F;
  line-height: 1.5;
}
.xcs-auto-deadline-note em { font-style: normal; font-weight: 600; }

.xcs-multi { display: flex; flex-direction: column; gap: 12px; align-self: stretch; }
.xcs-multi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xcs-multi-chip {
  appearance: none; border: 1.5px solid var(--xcs-border); background: var(--xcs-card);
  padding: 10px 14px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 13.5px;
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.xcs-multi-chip:hover { border-color: var(--xcs-navy); }
.xcs-multi-chip.on { background: var(--xcs-navy); color: #fff; border-color: var(--xcs-navy); }
.xcs-check {
  width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid var(--xcs-border-strong);
  display: grid; place-items: center; font-size: 10px; color: var(--xcs-navy); font-weight: 800;
}
.xcs-multi-chip.on .xcs-check { background: var(--xcs-yellow); border-color: var(--xcs-yellow); color: var(--xcs-navy); }

.xcs-chat-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-top: 1px solid var(--xcs-border);
  background: #F7F7F7;
  font-size: 12.5px; color: var(--xcs-ink-3);
}
.xcs-chat-counter { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }

/* Review card */
.xcs-review {
  align-self: stretch;
  background: var(--xcs-card); border: 1.5px solid var(--xcs-navy);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px -20px rgba(0,0,0,0.3);
}
.xcs-review-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: var(--xcs-navy); color: #fff;
}
.xcs-review-head .xcs-mono { color: rgba(255,255,255,0.9); }
.xcs-review-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--xcs-yellow); }
.xcs-review-rows { display: flex; flex-direction: column; }
.xcs-review-row {
  display: grid; grid-template-columns: 140px 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-review-row:last-child { border-bottom: 0; }
.xcs-review-row.wide { grid-template-columns: 140px 1fr auto; }
.xcs-review-row.wide .xcs-review-v {
  white-space: pre-wrap;
  max-height: 100px; overflow: auto;
  font-size: 13px; color: var(--xcs-ink-2);
}
.xcs-review-l { font-size: 12px; color: var(--xcs-ink-3); font-weight: 600; }
.xcs-review-v { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.xcs-review-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: #F7F7F7; gap: 16px;
}
.xcs-review-hint { font-size: 12.5px; color: var(--xcs-ink-3); }

/* ── Detail screen ─────────────────────────────────────────────── */
.xcs-detail { display: flex; flex-direction: column; gap: 18px; }
.xcs-detail-head { display: flex; align-items: center; justify-content: space-between; }
.xcs-detail-meta { display: flex; gap: 8px; align-items: center; color: var(--xcs-ink-3); font-size: 12.5px; }
.xcs-detail-meta .xcs-mono { color: var(--xcs-ink-2); font-weight: 700; }
.xcs-dot-sep { color: var(--xcs-ink-4); }
.xcs-detail-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.xcs-detail-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0; max-width: 720px; }
.xcs-detail-tags { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.xcs-detail-actions { display: flex; gap: 10px; }

/* Stepper */
.xcs-detail-stepper-wrap {
  background: var(--xcs-card); border: 1px solid var(--xcs-border);
  border-radius: var(--xcs-radius); padding: 22px 28px;
}
.xcs-stepper { display: flex; align-items: center; }
.xcs-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.xcs-step-dot {
  width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--xcs-bg-3); color: var(--xcs-ink-3);
  font-weight: 700; font-size: 12.5px;
  border: 2px solid #F4F4F4;
}
.xcs-step.done .xcs-step-dot { background: var(--xcs-blue); color: #fff; border-color: var(--xcs-blue); }
.xcs-step.active .xcs-step-dot { background: var(--xcs-yellow); color: var(--xcs-navy); border-color: var(--xcs-yellow); box-shadow: 0 0 0 4px rgba(196,196,196,0.18); }
.xcs-step.warn .xcs-step-dot { background: #EF4444; color: #fff; border-color: #EF4444; box-shadow: 0 0 0 4px rgba(239,68,68,0.16); }
.xcs-step-label { font-size: 12px; font-weight: 600; color: var(--xcs-ink-2); }
.xcs-step.done .xcs-step-label, .xcs-step.active .xcs-step-label { color: var(--xcs-ink); }
.xcs-step-bar { flex: 1; height: 2px; background: #E3E3E3; margin: 0 8px; margin-bottom: 24px; }
.xcs-step-bar.done { background: var(--xcs-blue); }

/* Detail grid */
.xcs-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: flex-start; }
.xcs-detail-grid main { display: flex; flex-direction: column; gap: 16px; }
.xcs-detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }

.xcs-brief p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--xcs-ink-2); }
.xcs-brief p:last-child { margin-bottom: 0; }
.xcs-brief strong { color: var(--xcs-ink); font-weight: 700; }

/* ── Category filter bar ───────────────────────────────────────── */
.xcs-catfilter-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid;
}
.xcs-catfilter-bar-dot { width: 10px; height: 10px; border-radius: 999px; }
.xcs-catfilter-bar-label { flex: 1; font-size: 13.5px; color: var(--xcs-ink-2); display: inline-flex; align-items: center; gap: 8px; }
.xcs-catfilter-bar-label .xcs-mono {
  font-size: 10.5px; padding: 2px 7px; border-radius: 4px;
  background: rgba(0,0,0,0.06); font-weight: 700; letter-spacing: 0.06em;
}

/* ── File preview tiles & references ───────────────────────────── */
.xcs-ref-head { display: flex; justify-content: space-between; align-items: center; }
.xcs-ref-tile-btn {
  appearance: none; border: 1px solid var(--xcs-border); background: var(--xcs-card);
  border-radius: 12px; padding: 0; cursor: pointer; text-align: left; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.1s, border-color 0.12s, box-shadow 0.12s;
}
.xcs-ref-tile-btn:hover { transform: translateY(-2px); border-color: var(--xcs-border-strong); box-shadow: 0 10px 24px -16px rgba(0,0,0,0.3); }
.xcs-ref-tile-meta { padding: 8px 10px 10px; }
.xcs-ref-tile-name {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace;
}
.xcs-ref-tile-sub { font-size: 11px; color: var(--xcs-ink-3); display: flex; gap: 6px; margin-top: 2px; }

/* FilePreview component */
.xcs-fp { aspect-ratio: 4/3; position: relative; overflow: hidden; }
.xcs-fp.large { aspect-ratio: 16/10; max-height: 60vh; }

/* Image preview */
.xcs-fp-image { background: var(--xcs-navy); }
.xcs-fp-img-art {
  position: absolute; inset: 0;
  display: grid; place-items: end start;
}
.xcs-fp-img-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}
.xcs-fp-img-label {
  position: relative;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  background: rgba(0,0,0,0.7); color: var(--xcs-yellow);
  padding: 4px 8px; border-radius: 4px;
  margin: 10px; font-weight: 700; letter-spacing: 0.08em;
}
.xcs-fp.large .xcs-fp-img-label { font-size: 13px; margin: 20px; padding: 6px 12px; }

/* Video preview */
.xcs-fp-video { background: var(--xcs-navy); }
.xcs-fp-vid-thumb { position: absolute; inset: 0; }
.xcs-fp-vid-grid {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,0.04) 28px 29px),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,0.04) 28px 29px);
}
.xcs-fp-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  appearance: none; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 999px;
  background: rgba(255,255,255,0.95); color: var(--xcs-navy);
  display: grid; place-items: center; font-size: 16px; font-weight: 900;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.xcs-fp.large .xcs-fp-play { width: 72px; height: 72px; font-size: 22px; }
.xcs-fp-play span { margin-left: 2px; }
.xcs-fp-vid-bar {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; color: #fff;
}
.xcs-fp.large .xcs-fp-vid-bar { left: 20px; right: 20px; bottom: 20px; font-size: 12px; }
.xcs-fp-vid-time { color: rgba(255,255,255,0.9); font-weight: 600; }
.xcs-fp-vid-track { flex: 1; height: 3px; background: rgba(255,255,255,0.25); border-radius: 999px; overflow: hidden; }
.xcs-fp-vid-fill { height: 100%; background: var(--xcs-yellow); }

/* PDF preview */
.xcs-fp-pdf { background: var(--xcs-bg-3); position: relative; height: 100%; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.xcs-fp.large .xcs-fp-pdf { padding: 40px 60px; gap: 8px; }
.xcs-fp-pdf-page { background: var(--xcs-bg-2); box-shadow: 0 4px 18px rgba(0,0,0,0.08); flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 4px; border-radius: 2px; overflow: hidden; }
.xcs-fp.large .xcs-fp-pdf-page { padding: 36px 44px; gap: 8px; }
.xcs-fp-pdf-h { height: 8px; background: var(--xcs-navy); border-radius: 2px; width: 40%; margin-bottom: 6px; }
.xcs-fp.large .xcs-fp-pdf-h { height: 14px; margin-bottom: 16px; }
.xcs-fp-pdf-l { height: 3px; background: #CACACA; border-radius: 2px; }
.xcs-fp.large .xcs-fp-pdf-l { height: 6px; }
.xcs-fp-pdf-block { height: 26px; background: linear-gradient(135deg, #C4C4C430, #1A1A1A30); border-radius: 4px; margin: 6px 0; }
.xcs-fp.large .xcs-fp-pdf-block { height: 70px; margin: 12px 0; }
.xcs-fp-pdf-tag {
  position: absolute; top: 8px; right: 8px;
  background: #EF4444; color: #fff;
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
}

/* Audio preview */
.xcs-fp-audio { background: linear-gradient(135deg, var(--xcs-navy) 0%, var(--xcs-navy-2) 100%); position: absolute; inset: 0; }
.xcs-fp-audio {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
}
.xcs-fp.large .xcs-fp-audio { padding: 30px 40px; gap: 20px; }
.xcs-fp-audio .xcs-fp-play {
  position: static; transform: none;
  width: 36px; height: 36px; font-size: 12px; flex-shrink: 0;
}
.xcs-fp.large .xcs-fp-audio .xcs-fp-play { width: 60px; height: 60px; font-size: 18px; }
.xcs-fp-wave {
  flex: 1; display: flex; align-items: center; gap: 2px; height: 60%;
}
.xcs-fp-wave span { flex: 1; border-radius: 1px; min-height: 6px; }
.xcs-fp-audio-time {
  color: rgba(255,255,255,0.85); font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.xcs-fp.large .xcs-fp-audio-time { font-size: 14px; }

/* ── Lightbox ──────────────────────────────────────────────────── */
.xcs-lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 32px;
  animation: xcs-fade-in 0.2s ease-out;
}
.xcs-lb-shell {
  width: 100%; max-width: 980px;
  background: var(--xcs-card); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5);
}
.xcs-lb-head, .xcs-lb-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--xcs-navy); color: #fff;
}
.xcs-lb-foot { background: #F7F7F7; color: var(--xcs-ink); border-top: 1px solid var(--xcs-border); }
.xcs-lb-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.85); }
.xcs-lb-meta .xcs-mono { color: #fff; font-weight: 600; font-size: 13px; }
.xcs-lb-actions { display: flex; align-items: center; gap: 10px; }
.xcs-lb-counter { font-size: 12px; color: rgba(255,255,255,0.7); margin-right: 4px; }
.xcs-lb-x {
  appearance: none; border: 0; background: rgba(255,255,255,0.1);
  color: #fff; width: 32px; height: 32px; border-radius: 8px;
  cursor: pointer; font-size: 14px;
}
.xcs-lb-x:hover { background: rgba(255,255,255,0.2); }
.xcs-lb-stage {
  position: relative;
  background: var(--xcs-navy);
  display: grid; place-items: center;
  min-height: 320px;
}
.xcs-lb-stage > .xcs-fp { width: 100%; }
.xcs-lb-nav {
  appearance: none; border: 0; background: rgba(255,255,255,0.1);
  color: #fff; width: 38px; height: 38px; border-radius: 999px;
  cursor: pointer; font-size: 22px; line-height: 1;
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
}
.xcs-lb-nav:hover { background: rgba(255,255,255,0.22); }
.xcs-lb-nav.prev { left: 14px; }
.xcs-lb-nav.next { right: 14px; }
.xcs-lb-title { font-weight: 700; font-size: 14px; }
.xcs-lb-sub { font-size: 12px; color: var(--xcs-ink-3); margin-top: 2px; }
.xcs-lb-time { color: var(--xcs-ink-4); font-size: 11.5px; }
.xcs-ref-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--xcs-ink-4); }
.xcs-ref-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.xcs-ref-tile {
  aspect-ratio: 4/3;
  border-radius: 10px;
  border: 1px solid var(--xcs-border);
  position: relative; overflow: hidden;
}
.xcs-placeholder {
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,0.04) 8px 9px),
    linear-gradient(180deg, #F7F7F7 0%, #F4F4F4 100%);
}
.xcs-placeholder::after {
  content: attr(data-label);
  position: absolute; inset: auto 8px 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  background: rgba(255,255,255,0.85);
  padding: 3px 6px; border-radius: 4px;
  color: var(--xcs-ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Activity */
.xcs-activity { display: flex; flex-direction: column; gap: 14px; }
.xcs-activity-item { display: flex; gap: 12px; align-items: flex-start; }
.xcs-activity-body { flex: 1; min-width: 0; }
.xcs-activity-head { display: flex; align-items: baseline; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.xcs-activity-head strong { font-weight: 700; }
.xcs-activity-kind { color: var(--xcs-ink-3); font-size: 12.5px; }
.xcs-activity-time { color: var(--xcs-ink-4); font-family: 'JetBrains Mono', monospace; font-size: 11px; margin-left: auto; }
.xcs-activity-text { font-size: 13.5px; color: var(--xcs-ink-2); padding: 2px 0; }
.xcs-activity-text.comment {
  background: var(--xcs-bg-tint); padding: 10px 12px; border-radius: 10px; margin-top: 4px;
  border: 1px solid var(--xcs-border); line-height: 1.5;
}

.xcs-comment-box {
  display: flex; gap: 10px; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--xcs-border);
}
.xcs-comment-input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--xcs-border); border-radius: 10px;
  font-size: 13.5px; outline: none;
}
.xcs-comment-input:focus { border-color: var(--xcs-navy); }

.xcs-detail-meta-list { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.xcs-detail-meta-list > div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; }
.xcs-detail-meta-list dt { font-size: 11.5px; color: var(--xcs-ink-3); font-weight: 600; letter-spacing: 0.02em; }
.xcs-detail-meta-list dd { margin: 0; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.xcs-detail-meta-list dd em { color: var(--xcs-ink-4); font-style: normal; font-weight: 500; }
.xcs-detail-relative {
  color: var(--xcs-ink-3); font-size: 12px; font-weight: 500;
}

.xcs-related { display: flex; flex-direction: column; gap: 6px; }
.xcs-related-row {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: center;
  padding: 8px; border-radius: 8px; text-align: left;
}
.xcs-related-row:hover { background: var(--xcs-bg-tint); }
.xcs-related-row > span:nth-child(2) {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Queue ─────────────────────────────────────────────────────── */
.xcs-tabs { display: flex; gap: 4px; align-items: center; }
.xcs-tab {
  appearance: none; background: transparent; border: 0;
  padding: 8px 14px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  color: var(--xcs-ink-3);
  display: inline-flex; align-items: center; gap: 6px;
}
.xcs-tab.on { background: var(--xcs-navy); color: #fff; }
.xcs-tab:hover:not(.on) { background: var(--xcs-bg-3); color: var(--xcs-ink); }
.xcs-tab-n {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  background: rgba(255,255,255,0.15); padding: 1px 6px; border-radius: 999px;
}
.xcs-tab:not(.on) .xcs-tab-n { background: #E3E3E3; color: var(--xcs-ink-3); }
.xcs-tabs-sp { flex: 1; }
.xcs-typefilter { display: flex; background: var(--xcs-card); border: 1px solid var(--xcs-border); border-radius: 999px; padding: 3px; gap: 2px; }
.xcs-typefilter-btn {
  appearance: none; border: 0; background: transparent;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--xcs-ink-3);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.xcs-typefilter-btn:hover { background: rgba(0,0,0,0.04); }
.xcs-typefilter-btn .xcs-tab-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: rgba(0,0,0,0.06); color: inherit;
  border-radius: 999px; font-size: 10.5px; font-weight: 700;
}
.xcs-typefilter-btn.on { background: var(--xcs-navy); color: #fff; }
.xcs-typefilter-btn.on .xcs-tab-n { background: rgba(255,255,255,0.18); color: #fff; }

/* ── Reports ───────────────────────────────────────────────────── */
.xcs-reports { display: flex; flex-direction: column; gap: 18px; }
.xcs-rangeswitch { display: flex; gap: 4px; align-items: center; background: var(--xcs-card); border: 1px solid var(--xcs-border); border-radius: 10px; padding: 4px; }
.xcs-rangebtn {
  appearance: none; border: 0; background: transparent;
  padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 12.5px;
  cursor: pointer; color: var(--xcs-ink-3);
}
.xcs-rangebtn.on { background: var(--xcs-navy); color: #fff; }
.xcs-rangeswitch + .xcs-btn-ghost { margin-left: 8px; }

.xcs-chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--xcs-ink-3); }
.xcs-chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.xcs-chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.xcs-monthly {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
  height: 220px; padding: 8px 0 0;
  align-items: flex-end;
}
.xcs-monthly-col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.xcs-monthly-bar {
  width: 100%; max-width: 56px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 8px 8px 0 0;
  overflow: hidden; position: relative;
  background: var(--xcs-bg-3);
}
.xcs-monthly-img { background: var(--xcs-blue); }
.xcs-monthly-vid { background: var(--xcs-yellow); }
.xcs-monthly-val {
  position: absolute; top: -22px; left: 0; right: 0;
  text-align: center; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 12px; color: var(--xcs-ink-2);
}
.xcs-monthly-lbl { font-size: 12px; color: var(--xcs-ink-3); font-weight: 600; }

/* Donut */
.xcs-donut-row { display: flex; gap: 22px; align-items: center; }
.xcs-donut svg { display: block; }
.xcs-donut-num { font-size: 24px; font-weight: 800; fill: var(--xcs-ink); font-family: 'Plus Jakarta Sans', sans-serif; }
.xcs-donut-sub { font-size: 9px; fill: var(--xcs-ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-family: 'Plus Jakarta Sans', sans-serif; }
.xcs-donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.xcs-donut-legend li {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center;
  padding: 5px 0; border-bottom: 1px dashed var(--xcs-border);
  font-size: 13px;
}
.xcs-donut-legend li:last-child { border-bottom: 0; }
.xcs-donut-l { font-weight: 500; }
.xcs-donut-n { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px; }
.xcs-donut-p { font-size: 11.5px; color: var(--xcs-ink-3); font-family: 'JetBrains Mono', monospace; }

/* Top requesters */
.xcs-toplist { display: flex; flex-direction: column; }

/* Per-department list — like top requesters but no avatar column */
.xcs-dept-list { display: flex; flex-direction: column; }
.xcs-dept-row {
  display: grid;
  grid-template-columns: 28px minmax(140px, 1fr) 1.4fr 48px;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-dept-row:last-child { border-bottom: 0; }
.xcs-dept-meta { min-width: 0; }
.xcs-dept-name {
  font-weight: 700; font-size: 13.5px; color: var(--xcs-ink-1);
  letter-spacing: 0.01em; text-transform: uppercase;
}
.xcs-dept-sub { font-size: 11.5px; color: var(--xcs-ink-4); margin-top: 2px; }
.xcs-dept-approved i { background: #22C55E; }
@media (max-width: 720px) {
  .xcs-dept-row {
    grid-template-columns: 28px 1fr 48px !important;
    grid-template-areas: "rank name total" "rank bars bars" !important;
    gap: 8px 10px !important;
  }
  .xcs-dept-row > .xcs-top-rank { grid-area: rank; }
  .xcs-dept-meta { grid-area: name; }
  .xcs-dept-row > .xcs-top-bars { grid-area: bars; }
  .xcs-dept-row > .xcs-top-total { grid-area: total; text-align: right; }
}

/* Clickable variant — used when dept row is a <button> with onClick to open dept page */
.xcs-dept-row-btn {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--xcs-border);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
  font-family: inherit;
}
.xcs-dept-row-btn:hover:not(:disabled) {
  background: var(--xcs-bg-tint);
}
.xcs-dept-row-btn:focus-visible {
  outline: 2px solid var(--xcs-blue);
  outline-offset: -2px;
}
.xcs-dept-row-btn:disabled,
.xcs-dept-row-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.xcs-dept-ext {
  /* external-link icon next to dept name */
  flex-shrink: 0;
}

/* Department members grid — shown on DepartmentPage */
.xcs-dept-members {
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.xcs-dept-members-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--xcs-ink-3);
  margin-bottom: 10px;
}
.xcs-dept-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.xcs-dept-member {
  appearance: none; border: 1px solid var(--xcs-border);
  background: var(--xcs-bg-2); border-radius: 10px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; text-align: left;
  transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
  font-family: inherit;
}
.xcs-dept-member:hover:not(:disabled) {
  background: var(--xcs-bg-3);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.12);
}
.xcs-dept-member:disabled,
.xcs-dept-member.is-disabled {
  cursor: not-allowed; opacity: 0.55;
}
.xcs-dept-member-info { flex: 1; min-width: 0; }
.xcs-dept-member-name {
  font-weight: 700; font-size: 13px; color: var(--xcs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-dept-member-sub {
  font-size: 11px; color: var(--xcs-ink-3); margin-top: 2px;
}
.xcs-modal-row-by {
  font-size: 11px; color: var(--xcs-ink-3); font-weight: 500;
  margin-left: 4px;
}

@media (max-width: 720px) {
  .xcs-dept-members { padding: 12px; }
  .xcs-dept-members-grid { grid-template-columns: 1fr; }
}

.xcs-top-row {
  display: grid;
  grid-template-columns: 28px 32px 1fr 1.4fr 36px;
  gap: 14px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-top-row:last-child { border-bottom: 0; }
/* Clickable variant — used when row is a <button> with onClick to open user modal */
.xcs-top-row-btn {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--xcs-border);
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s ease, transform 0.1s ease;
  padding-left: 8px; padding-right: 8px;
  margin-left: -8px; margin-right: -8px;
  border-radius: 8px;
}
.xcs-top-row-btn:hover:not(.is-disabled) {
  background: var(--xcs-bg-soft, #F7F7F7);
}
.xcs-top-row-btn:hover:not(.is-disabled) .xcs-top-name {
  color: var(--xcs-blue);
}
.xcs-top-row-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.xcs-top-rank { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--xcs-ink-4); font-size: 12px; }
.xcs-top-meta { min-width: 0; }
.xcs-top-name { font-weight: 600; font-size: 13.5px; }
.xcs-top-role { font-size: 11.5px; color: var(--xcs-ink-3); }
.xcs-top-bars { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.xcs-top-track { display: flex; height: 8px; background: var(--xcs-bg-3); border-radius: 999px; overflow: hidden; }
.xcs-top-img { background: var(--xcs-blue); border-radius: 999px 0 0 999px; }
.xcs-top-vid { background: var(--xcs-yellow); border-radius: 0 999px 999px 0; }
.xcs-top-counts { display: flex; gap: 10px; font-size: 11px; color: var(--xcs-ink-3); font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.xcs-top-counts span { display: inline-flex; align-items: center; gap: 4px; }
.xcs-top-counts i { width: 7px; height: 7px; border-radius: 999px; display: inline-block; }
.xcs-top-total { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px; text-align: right; }


/* ── Mobile top bar (hidden on desktop) ────────────────────────── */
.xcs-mobile-bar { display: none; }
.xcs-nav-scrim { display: none; }

/* ── Login screen ──────────────────────────────────────────────── */
.xcs-login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 55%), #0A0A0A;
  padding: 24px; position: relative; overflow: hidden;
}
.xcs-login-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 55%);
}
.xcs-login-card {
  position: relative;
  width: 100%; max-width: 440px;
  background: #FFFFFF; color: #0A0A0A; border: 1px solid #E3E3E3; border-radius: 20px;
  padding: 32px; box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5);
}
.xcs-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.xcs-login-brand .xcs-logo {
  height: 48px; width: auto;
  background: transparent; border-radius: 0;
  display: grid; place-items: center;
  filter: none;
}
.xcs-login-brand .xcs-logo svg { height: 40px; width: auto; display: block; }
.xcs-login-name { font-family: 'Jost', system-ui, sans-serif; font-size: 20px; font-weight: 600; letter-spacing: 0.06em; }
.xcs-login-sub { font-size: 11.5px; color: var(--xcs-ink-3); }
.xcs-login-h1 { font-family: 'Jost', system-ui, sans-serif; font-size: 26px; font-weight: 500; margin: 0 0 6px; letter-spacing: 0.02em; }
.xcs-login-p { font-size: 13.5px; color: var(--xcs-ink-2); margin: 0 0 24px; line-height: 1.55; }
.xcs-login-form { display: flex; flex-direction: column; gap: 16px; }
.xcs-login-field { display: flex; flex-direction: column; gap: 6px; }
.xcs-login-field > span { font-size: 12px; font-weight: 600; color: var(--xcs-ink-2); }
.xcs-login-field input {
  appearance: none; border: 1px solid var(--xcs-border-strong);
  border-radius: 10px; padding: 11px 14px; font-size: 14px;
  background: var(--xcs-bg-2); color: var(--xcs-ink); transition: border-color 0.12s, box-shadow 0.12s;
}
.xcs-login-field input:focus { outline: none; border-color: var(--xcs-blue); box-shadow: 0 0 0 3px rgba(0,0,0,0.12); }
.xcs-login-err {
  display: block;
  padding: 10px 12px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  color: #B91C1C;
  font-size: 12.5px;
  line-height: 1.5;
}
.xcs-login-err-inline { color: #EF4444; font-size: 11.5px; }
.xcs-login-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.xcs-login-rolechip {
  appearance: none; border: 1px solid var(--xcs-border-strong);
  background: var(--xcs-bg-2); padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; cursor: pointer; color: var(--xcs-ink-2);
  transition: all 0.12s;
}
.xcs-login-rolechip:hover { border-color: var(--xcs-blue); color: var(--xcs-blue); }
.xcs-login-rolechip.on { background: #0A0A0A; color: #fff; border-color: #0A0A0A; }
.xcs-login-submit { margin-top: 8px; justify-content: center; }
.xcs-login-foot {
  display: flex; flex-direction: column; gap: 4px;
  text-align: center; font-size: 11px; color: var(--xcs-ink-4);
  margin-top: 4px;
}
.xcs-login-foot a { color: var(--xcs-blue); font-weight: 600; text-decoration: none; }
.xcs-login-foot a:hover { text-decoration: underline; }

/* ── Auth tabs (Masuk / Daftar) ────────────────────────────────── */
.xcs-auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--xcs-bg-3); border-radius: 10px; padding: 4px;
  gap: 4px; margin: 6px 0 4px;
}
.xcs-auth-tab {
  appearance: none; border: 0; background: transparent;
  padding: 9px 12px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--xcs-ink-3);
  cursor: pointer; transition: all 0.15s;
}
.xcs-auth-tab:hover { color: #0A0A0A; }
.xcs-auth-tab.on {
  background: #0A0A0A; color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Password input with toggle */
.xcs-pass-wrap { position: relative; }
.xcs-pass-wrap input { width: 100%; box-sizing: border-box; padding-right: 90px !important; }
.xcs-pass-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  appearance: none; border: 0; background: transparent;
  font-size: 11.5px; font-weight: 600; color: var(--xcs-blue);
  cursor: pointer; padding: 6px 8px; border-radius: 6px;
}
.xcs-pass-toggle:hover { background: rgba(0,0,0,0.08); }
/* Terukur 27px dan 35px — di bawah ambang 44px yang dipakai kontrol lain.
   Tombol password sudah terpusat vertikal secara absolut, jadi menaikkan
   min-height tidak menambah tinggi barisnya. */
@media (max-width: 860px) {
  .xcs-pass-toggle { min-height: 44px; display: inline-flex; align-items: center; }
  .xcs-auth-tab { min-height: 44px; }
}

/* Remember me */
.xcs-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--xcs-ink-2);
  cursor: pointer; user-select: none;
  padding: 4px 0;
}
.xcs-remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--xcs-blue);
  cursor: pointer; margin: 0;
}

/* ── Requester modal (clicked from Top Requester list) ────────── */
.xcs-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  animation: xcs-modal-fade 0.18s ease-out;
}
@keyframes xcs-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.xcs-modal-lg {
  background: var(--xcs-bg-2);
  border-radius: 18px;
  box-shadow: 0 32px 80px -20px rgba(0,0,0, 0.4);
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: xcs-modal-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes xcs-modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.xcs-modal-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--xcs-border);
  gap: 16px;
}
.xcs-modal-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.xcs-modal-name {
  font-size: 17px; font-weight: 700; color: var(--xcs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-modal-sub {
  font-size: 12.5px; color: var(--xcs-ink-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-modal-x {
  appearance: none; border: 0; background: var(--xcs-bg-soft, #F4F4F4);
  width: 34px; height: 34px; border-radius: 999px;
  font-size: 14px; color: var(--xcs-ink-2);
  cursor: pointer; transition: background 0.15s;
  flex-shrink: 0;
}
.xcs-modal-x:hover { background: #E3E3E3; color: var(--xcs-ink); }

/* Stats strip — use border-right instead of gap-as-divider to avoid tile gaps */
.xcs-modal-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-modal-stat {
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid var(--xcs-border);
}
.xcs-modal-stat:last-child { border-right: 0; }
.xcs-modal-stat-n { font-size: 20px; font-weight: 800; color: var(--xcs-ink); line-height: 1.1; }
.xcs-modal-stat-l {
  font-size: 10.5px; color: var(--xcs-ink-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 4px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Tabs row — horizontal scroll fallback, no clipping */
.xcs-modal-tabs {
  display: flex; gap: 4px;
  padding: 10px 14px 0;
  overflow-x: auto;
  background: #FAFBFC;
  border-bottom: 1px solid var(--xcs-border);
  scrollbar-width: thin;
}
.xcs-modal-tabs::-webkit-scrollbar { height: 4px; }
.xcs-modal-tabs::-webkit-scrollbar-thumb { background: #CACACA; border-radius: 4px; }
.xcs-modal-tab {
  appearance: none; border: 0; background: transparent;
  padding: 8px 12px 10px; border-radius: 8px 8px 0 0;
  font-size: 12.5px; font-weight: 600; color: var(--xcs-ink-3);
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.xcs-modal-tab:hover { color: var(--xcs-ink); background: rgba(0,0,0,0.03); }
.xcs-modal-tab.on { color: var(--xcs-navy); border-bottom-color: var(--xcs-blue); }
.xcs-modal-tab .xcs-tab-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px; font-size: 10.5px; font-weight: 700;
}
.xcs-modal-tab.on .xcs-tab-n { background: var(--xcs-blue); color: #fff; }

/* Body */
.xcs-modal-body {
  flex: 1; overflow-y: auto;
  padding: 14px 18px 18px;
  background: #FAFBFC;
}

/* Row = stacked card (3 lines) — no grid, no overlap */
.xcs-modal-rows { display: flex; flex-direction: column; gap: 8px; }
.xcs-modal-row {
  appearance: none;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
  text-align: left; font: inherit; color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.xcs-modal-row:hover {
  border-color: var(--xcs-blue);
  box-shadow: 0 4px 12px -2px rgba(0,0,0, 0.15);
}

/* Row line 1: ID — Priority chip — Deadline (right) */
.xcs-modal-row-top {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.xcs-modal-row-id {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  background: var(--xcs-bg-3);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.xcs-modal-row-date {
  margin-left: auto;
  color: var(--xcs-ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  white-space: nowrap;
}

/* Row line 2: Title — full width, ellipsis on overflow */
.xcs-modal-row-title {
  font-weight: 600; font-size: 14px; color: var(--xcs-ink);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* Row line 3: Type badge — Status (right) */
.xcs-modal-row-bottom {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.xcs-modal-row-bottom .xcs-status { margin-left: auto; }

/* Type badge inside modal — prevent it from stretching */
.xcs-modal-row .xcs-type {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .xcs-modal-lg { max-height: 92vh; border-radius: 14px; }
  .xcs-modal-h { padding: 14px 16px 12px; }
  .xcs-modal-name { font-size: 15.5px; }
  .xcs-modal-stats { grid-template-columns: repeat(2, 1fr); }
  .xcs-modal-stat:nth-child(2) { border-right: 0; }
  .xcs-modal-stat:nth-child(1),
  .xcs-modal-stat:nth-child(2) { border-bottom: 1px solid var(--xcs-border); }
  .xcs-modal-tabs { padding: 8px 10px 0; }
  .xcs-modal-tab { padding: 7px 10px 9px; font-size: 11.5px; }
  .xcs-modal-body { padding: 12px 12px 14px; }
  .xcs-modal-row { padding: 10px 12px; }
  .xcs-modal-row-title { font-size: 13.5px; }
}

/* ── Requester standalone page (opened in new tab) ──────────────── */
.xcs-app.xcs-app-standalone {
  display: block;
  background: var(--xcs-bg-tint);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 24px 60px;
}
.xcs-app.xcs-app-standalone .xcs-sidebar,
.xcs-app.xcs-app-standalone .xcs-mobile-bar,
.xcs-app.xcs-app-standalone .xcs-fab-wa,
.xcs-app.xcs-app-standalone .xcs-notif-bell { display: none !important; }

.xcs-reqpage {
  max-width: 880px;
  margin: 0 auto;
  background: var(--xcs-bg-2);
  border-radius: 16px;
  border: 1px solid var(--xcs-border);
  overflow: hidden;
  box-shadow: 0 4px 20px -8px rgba(0,0,0, 0.1);
}
.xcs-reqpage-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-reqpage-user { display: flex; align-items: center; gap: 14px; min-width: 0; }
.xcs-reqpage-name {
  font-size: 20px; font-weight: 800; color: var(--xcs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-reqpage-sub {
  font-size: 13px; color: var(--xcs-ink-3); margin-top: 2px;
}

.xcs-reqpage-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-reqpage-stat {
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--xcs-border);
}
.xcs-reqpage-stat:last-child { border-right: 0; }
.xcs-reqpage-stat-n { font-size: 24px; font-weight: 800; color: var(--xcs-ink); line-height: 1.1; }
.xcs-reqpage-stat-l {
  font-size: 11px; color: var(--xcs-ink-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 4px; font-weight: 600;
}

.xcs-reqpage-tabs {
  display: flex; gap: 4px;
  padding: 12px 18px 0;
  overflow-x: auto;
  background: #FAFBFC;
  border-bottom: 1px solid var(--xcs-border);
  scrollbar-width: thin;
}
.xcs-reqpage-tabs::-webkit-scrollbar { height: 4px; }
.xcs-reqpage-tabs::-webkit-scrollbar-thumb { background: #CACACA; border-radius: 4px; }
.xcs-reqpage-tab {
  appearance: none; border: 0; background: transparent;
  padding: 9px 14px 11px; border-radius: 8px 8px 0 0;
  font-size: 13px; font-weight: 600; color: var(--xcs-ink-3);
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.xcs-reqpage-tab:hover { color: var(--xcs-ink); background: rgba(0,0,0,0.03); }
.xcs-reqpage-tab.on { color: var(--xcs-navy); border-bottom-color: var(--xcs-blue); }
.xcs-reqpage-tab .xcs-tab-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px; font-size: 10.5px; font-weight: 700;
}
.xcs-reqpage-tab.on .xcs-tab-n { background: var(--xcs-blue); color: #fff; }

.xcs-reqpage-body {
  padding: 16px 20px 22px;
  background: #FAFBFC;
  min-height: 200px;
}
.xcs-reqpage-rows { display: flex; flex-direction: column; gap: 8px; }

.xcs-reqpage-empty {
  max-width: 480px;
  margin: 80px auto;
  background: var(--xcs-bg-2);
  border-radius: 16px;
  border: 1px solid var(--xcs-border);
  padding: 40px 32px;
  text-align: center;
}
.xcs-reqpage-empty h2 { margin: 0 0 8px; color: var(--xcs-ink); }
.xcs-reqpage-empty p { color: var(--xcs-ink-3); margin: 0 0 20px; }
.xcs-reqpage-empty code {
  background: var(--xcs-bg-3); padding: 2px 8px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
}

@media (max-width: 720px) {
  .xcs-app.xcs-app-standalone { padding: 12px 8px 40px; }
  .xcs-reqpage { border-radius: 12px; }
  .xcs-reqpage-head { padding: 14px 16px 12px; gap: 10px; }
  .xcs-reqpage-name { font-size: 17px; }
  .xcs-reqpage-stats { grid-template-columns: repeat(2, 1fr); }
  .xcs-reqpage-stat:nth-child(2) { border-right: 0; }
  .xcs-reqpage-stat:nth-child(1),
  .xcs-reqpage-stat:nth-child(2) { border-bottom: 1px solid var(--xcs-border); }
  .xcs-reqpage-stat-n { font-size: 20px; }
  .xcs-reqpage-tabs { padding: 10px 12px 0; }
  .xcs-reqpage-tab { padding: 8px 11px 10px; font-size: 12px; }
  .xcs-reqpage-body { padding: 12px 12px 16px; }
}

/* ── Help screen ───────────────────────────────────────────────── */
.xcs-help { display: flex; flex-direction: column; gap: 20px; }
.xcs-help-step {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--xcs-border);
}
.xcs-help-step:first-of-type { border-top: 0; padding-top: 0; }
.xcs-help-step-n {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--xcs-yellow); color: var(--xcs-navy);
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}
.xcs-help-step-body h4 { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; }
.xcs-help-step-body p { margin: 0 0 10px; font-size: 13.5px; color: var(--xcs-ink-2); line-height: 1.6; }
.xcs-help-step-body ul, .xcs-help-step-body ol { margin: 0 0 10px; padding-left: 20px; font-size: 13.5px; color: var(--xcs-ink-2); line-height: 1.7; }
.xcs-help-step-body code {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  background: var(--xcs-bg-3); padding: 1px 6px; border-radius: 4px;
}
.xcs-help-step-body strong { color: var(--xcs-ink); }
.xcs-help-callout {
  background: linear-gradient(135deg, var(--xcs-yellow-soft) 0%, #FED7AA 100%);
  padding: 14px 16px; border-radius: 10px;
  font-size: 13px; color: #92400E;
  margin-top: 8px;
  border-left: 3px solid #F59E0B;
}

/* ── Dropzone / file upload ────────────────────────────────────── */
.xcs-files { display: flex; flex-direction: column; gap: 12px; }
.xcs-drop {
  border: 2px dashed var(--xcs-border-strong);
  border-radius: 14px; padding: 28px 20px;
  text-align: center; cursor: pointer;
  background: #F7F7F7; transition: all 0.15s;
}
.xcs-drop:hover, .xcs-drop.over {
  border-color: var(--xcs-blue);
  background: rgba(0,0,0,0.04);
}
.xcs-drop-ico {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--xcs-bg-2); color: var(--xcs-blue);
  margin: 0 auto 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.xcs-drop-title { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.xcs-drop-sub { font-size: 11.5px; color: var(--xcs-ink-3); }
.xcs-files-err {
  background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA;
  padding: 8px 12px; border-radius: 8px; font-size: 12.5px;
}
.xcs-files-list { display: flex; flex-direction: column; gap: 6px; }
.xcs-file-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px;
  padding: 8px 12px; background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-border); border-radius: 10px;
  align-items: center;
}
.xcs-file-ico {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--xcs-bg-3); display: grid; place-items: center;
  font-size: 16px;
}
.xcs-file-ico.xcs-file-image { background: var(--xcs-bg-tint); }
.xcs-file-ico.xcs-file-video { background: var(--xcs-yellow-soft); color: #92400E; }
.xcs-file-ico.xcs-file-audio { background: #F3E8FF; color: #6B21A8; }
.xcs-file-ico.xcs-file-pdf { background: #FEE2E2; color: #991B1B; }
.xcs-file-meta { min-width: 0; }
.xcs-file-name { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xcs-file-sub { font-size: 11px; color: var(--xcs-ink-3); }
.xcs-file-x {
  appearance: none; border: 0; background: transparent;
  color: var(--xcs-ink-3); cursor: pointer; font-size: 14px;
  width: 28px; height: 28px; border-radius: 6px;
}
.xcs-file-x:hover { background: #FEE2E2; color: #EF4444; }
.xcs-files-link {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11.5px; color: var(--xcs-ink-3);
  padding-top: 8px;
}
.xcs-files-cta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
}
.xcs-files-wrap { display: flex; flex-direction: column; gap: 12px; }

/* ── Attachment adder (Detail page "+ Tambah link") ─────────────── */
.xcs-attach-adder {
  background: var(--xcs-bg-tint);
  border: 1px dashed #CACACA;
  border-radius: 12px;
  padding: 16px;
}
.xcs-attach-adder-head { margin-bottom: 8px; }
.xcs-attach-adder-head strong {
  display: block;
  font-size: 14px;
  color: var(--xcs-ink);
  margin-bottom: 2px;
}
.xcs-attach-adder-sub {
  font-size: 12px;
  color: #6E6E6E;
}
.xcs-attach-adder-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}
.xcs-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #3A3A3A;
  background: var(--xcs-bg-2);
  border: 1px solid #E3E3E3;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ── File tiles in detail view ─────────────────────────────────── */
.xcs-filetiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.xcs-filetile-wrap { position: relative; }
.xcs-filetile {
  appearance: none; border: 1px solid var(--xcs-border); background: var(--xcs-bg-2);
  border-radius: 12px; padding: 0; cursor: pointer; text-align: left;
  width: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.1s, border-color 0.12s, box-shadow 0.12s;
}
.xcs-filetile:hover { transform: translateY(-2px); border-color: var(--xcs-border-strong); box-shadow: 0 10px 24px -16px rgba(0,0,0,0.3); }
.xcs-filetile-thumb {
  aspect-ratio: 4/3; background: var(--xcs-bg-3);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.xcs-filetile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xcs-ft-play, .xcs-ft-icon {
  font-size: 32px;
}
.xcs-ft-video { background: linear-gradient(135deg, var(--xcs-navy), var(--xcs-blue)); color: var(--xcs-yellow); }
.xcs-ft-audio { background: linear-gradient(135deg, var(--xcs-blue), var(--xcs-violet)); color: #fff; }
.xcs-ft-pdf { background: #FEE2E2; }
.xcs-ft-link { background: linear-gradient(135deg, var(--xcs-ink-3), var(--xcs-blue)); color: #fff; }
.xcs-filetile-meta { padding: 8px 10px 10px; }
.xcs-filetile-name {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-filetile-sub { font-size: 10.5px; color: var(--xcs-ink-3); margin-top: 2px; }
.xcs-filetile-x {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  appearance: none; border: 0; background: rgba(0,0,0,0.7); color: #fff;
  width: 22px; height: 22px; border-radius: 999px; cursor: pointer;
  font-size: 11px; display: grid; place-items: center;
}
.xcs-filetile-x:hover { background: #EF4444; }

/* ── Status select + danger button ─────────────────────────────── */
.xcs-detail-status-readonly {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border: 1px solid var(--xcs-border);
  background: var(--xcs-bg-tint); border-radius: 10px;
  color: var(--xcs-ink-2); font-size: 13px;
}
.xcs-readonly-lock { font-weight: 500; }
.xcs-statussel {
  appearance: none;
  border: 1px solid var(--xcs-border-strong); background: var(--xcs-bg-2);
  padding: 8px 32px 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.xcs-btn-danger { color: #EF4444; }
.xcs-btn-danger:hover { background: #FEE2E2 !important; }
.xcs-btn-danger-solid {
  background: #EF4444 !important;
  color: #fff !important;
  border-color: #EF4444 !important;
}
.xcs-btn-danger-solid:hover { background: #DC2626 !important; }
.xcs-empty-mini { color: var(--xcs-ink-3); font-size: 13px; padding: 16px 0; }

/* ── Confirm modal ─────────────────────────────────────────────── */
.xcs-modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: xcsModalFade 140ms ease;
}
@keyframes xcsModalFade { from { opacity: 0 } to { opacity: 1 } }
.xcs-modal {
  background: var(--xcs-bg-2); border-radius: 16px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: xcsModalPop 180ms cubic-bezier(.2,.9,.3,1.2);
}
@keyframes xcsModalPop {
  from { opacity: 0; transform: translateY(8px) scale(0.96) }
  to   { opacity: 1; transform: translateY(0)   scale(1) }
}
.xcs-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 22px 4px; gap: 12px;
}
.xcs-modal-head h3 {
  margin: 0; font-size: 17px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--xcs-ink-1);
  line-height: 1.35;
}
.xcs-modal-x {
  background: none; border: 0; cursor: pointer; color: var(--xcs-ink-4);
  font-size: 16px; padding: 4px 8px; border-radius: 6px; line-height: 1;
}
.xcs-modal-x:hover { background: var(--xcs-bg-soft); color: var(--xcs-ink-1); }
.xcs-modal-body {
  padding: 8px 22px 18px;
  color: var(--xcs-ink-2);
  font-size: 13.5px; line-height: 1.55;
}
.xcs-modal-body p { margin: 0 0 8px; }
.xcs-modal-body p:last-child { margin: 0; }
.xcs-modal-body strong { color: var(--xcs-ink-1); font-weight: 600; }
.xcs-modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 18px; background: var(--xcs-bg-tint);
  border-top: 1px solid var(--xcs-border);
}
.xcs-confirm-filelist {
  list-style: none; padding: 0; margin: 6px 0 0;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 200px; overflow: auto;
}
.xcs-confirm-filelist li {
  font-size: 13px; padding: 8px 10px; background: var(--xcs-bg-soft);
  border-radius: 6px; color: var(--xcs-ink-1);
  display: flex; gap: 8px; align-items: center;
}
.xcs-confirm-sub {
  margin-left: auto; font-size: 11.5px; color: var(--xcs-ink-4);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Toast notification ────────────────────────────────────────── */
.xcs-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #0A0A0A; color: #fff;
  padding: 12px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 1100;
  display: flex; align-items: center; gap: 10px;
  animation: xcsToastIn 200ms ease;
}
@keyframes xcsToastIn {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.xcs-toast-success .xcs-toast-icon {
  background: #22C55E; color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.xcs-toast-error { background: #DC2626; }
.xcs-toast-ico {
  background: var(--xcs-chrome); color: #0A0A0A;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* ── Logout icon button in sidebar ─────────────────────────────── */
.xcs-icon-btn-lg {
  appearance: none; border: 0; background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  width: 40px; height: 40px; border-radius: 10px;
  cursor: pointer; display: grid; place-items: center;
}
.xcs-icon-btn-lg:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ─────────────────────────────────────────────────────────────── */
/* RESPONSIVE — mobile + tablet                                     */
/* ─────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .xcs-app { grid-template-columns: 240px 1fr; }
  .xcs-main-inner { padding: 28px 24px 60px; }
  .xcs-detail-grid { grid-template-columns: 1fr !important; }
  .xcs-grid-2 { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .xcs-app { grid-template-columns: 1fr; }

  /* Mobile top bar */
  .xcs-mobile-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: #0A0A0A; color: #fff;
    position: sticky; top: 0; z-index: 60;
    border-bottom: 1px solid #1F1F1F;
  }
  .xcs-mobile-brand {
    display: flex; align-items: center; gap: 8px;
    font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
  }
  .xcs-mobile-new {
    appearance: none; border: 0;
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--xcs-yellow); color: var(--xcs-navy);
    font-size: 22px; font-weight: 900; cursor: pointer;
    display: grid; place-items: center;
  }
  .xcs-icon-btn-lg {
    background: transparent; color: #fff;
    width: 38px; height: 38px;
  }

  /* Sidebar drawer */
  .xcs-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 86vw;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 80;
    overflow-y: auto;
  }
  .xcs-app.nav-open .xcs-sidebar { transform: translateX(0); }
  .xcs-app.nav-open .xcs-nav-scrim {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 70;
    backdrop-filter: blur(2px);
  }

  /* Main content */
  .xcs-main-inner { padding: 16px 14px 100px; gap: 16px; }

  /* Page headers */
  .xcs-pagehead {
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .xcs-pagehead h1 { font-size: 22px !important; }
  .xcs-pagehead-cta { width: 100%; }
  .xcs-pagehead-cta .xcs-btn-primary,
  .xcs-pagehead-cta .xcs-btn-ghost { flex: 1; justify-content: center; }

  /* Cards & spacing */
  .xcs-card { padding: 16px !important; border-radius: 12px; }
  .xcs-card-h { flex-direction: column; align-items: flex-start; gap: 8px; }
  .xcs-card-h h3 { font-size: 15px; }

  /* Stats grid 2x2 */
  .xcs-stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .xcs-stat { padding: 14px !important; }
  .xcs-stat-value { font-size: 22px !important; }
  .xcs-stat-label { font-size: 11px !important; }
  .xcs-stat-sub { font-size: 11px !important; }

  .xcs-rows-head { display: none !important; }
  /* Hide dept column on mobile (shown in card body instead) */
  .xcs-rows-with-dept .xcs-row { grid-template-columns: 1fr !important; }
  .xcs-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "id status"
      "title title"
      "prio deadline"
      "pic pic" !important;
    gap: 6px 10px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--xcs-border);
  }
  .xcs-row-id {
    grid-area: id;
    display: flex !important; flex-direction: column !important; gap: 2px !important;
    font-size: 11px;
  }
  .xcs-row-id-created {
    font-size: 10px !important; color: #9A9A9A !important;
    font-weight: 500 !important; letter-spacing: 0 !important;
    text-transform: none !important;
  }
  .xcs-row-title { grid-area: title; }
  .xcs-row-title > span:first-child { font-size: 14px; font-weight: 600; }
  .xcs-row .xcs-status { grid-area: status; justify-self: end; }
  .xcs-row .xcs-prio { grid-area: prio; justify-self: start; }
  .xcs-row-deadline { grid-area: deadline; justify-self: end; font-size: 12px; color: var(--xcs-ink-3); }
  .xcs-row-assignee { grid-area: pic; justify-self: end; }

  /* Detail view */
  .xcs-detail-title { font-size: 20px !important; }
  .xcs-detail-title-row { flex-direction: column; align-items: flex-start !important; gap: 12px; }
  .xcs-detail-actions { width: 100%; display: flex; gap: 8px; }
  .xcs-detail-actions .xcs-statussel { flex: 1; }
  .xcs-detail-stepper-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .xcs-stepper { min-width: 540px; }
  .xcs-comment-box { flex-wrap: wrap; }
  .xcs-comment-input { min-width: 100%; }

  /* Tabs */
  .xcs-tabs { flex-wrap: wrap; gap: 6px !important; }
  .xcs-tabs-sp { display: none; }
  .xcs-typefilter { width: 100%; overflow-x: auto; }
  .xcs-typefilter-btn { flex: 1 1 0; justify-content: center; padding: 6px 8px !important; font-size: 12px; white-space: nowrap; }
  .xcs-typefilter-btn .xcs-tab-n { min-width: 16px; height: 16px; font-size: 10px; }

  /* Intake chat */
  .xcs-chat { padding: 16px !important; }
  .xcs-choices-grid { grid-template-columns: 1fr !important; }
  .xcs-multi-grid { grid-template-columns: 1fr 1fr !important; }
  .xcs-date-quick { grid-template-columns: 1fr 1fr !important; }
  .xcs-input-row { flex-direction: column; align-items: stretch !important; }
  .xcs-input-row .xcs-btn-primary { width: 100%; justify-content: center; }
  .xcs-review-row { grid-template-columns: 1fr !important; gap: 4px !important; }
  .xcs-review-l { font-size: 11px !important; color: var(--xcs-ink-3); }

  /* Mine grid → single column */
  .xcs-mine-grid { grid-template-columns: 1fr !important; }

  /* Reports range switch */
  .xcs-rangeswitch { flex-wrap: wrap; width: 100%; }

  /* Hide ⌘K kbd hint, density toggles in tweaks */
  .xcs-search kbd, .xcs-nav-item .xcs-kbd { display: none; }
  .xcs-empty { padding: 30px 16px !important; }
  .xcs-empty h2 { font-size: 20px !important; }

  /* Catfilter bar */
  .xcs-catfilter-bar { flex-wrap: wrap; }

  /* Login on mobile */
  .xcs-login-card { padding: 24px 20px; border-radius: 16px; }
  .xcs-login-h1 { font-size: 22px; }
  .xcs-login-roles { gap: 4px; }
  .xcs-login-rolechip { padding: 6px 10px; font-size: 11.5px; }

  /* Help on mobile */
  .xcs-help-step { grid-template-columns: 28px 1fr; gap: 10px; }
  .xcs-help-step-n { width: 28px; height: 28px; font-size: 12px; }

  /* Toast — full width safe */
  .xcs-toast { left: 14px; right: 14px; transform: none; bottom: 14px; max-width: none; }
  @keyframes xcs-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

  /* File tiles smaller */
  .xcs-filetiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }

  /* Top requesters list */
  .xcs-top-row {
    grid-template-columns: 28px 32px 1fr auto !important;
    grid-template-areas: "rank av name total" "rank av bars bars" !important;
    gap: 8px 10px !important;
  }
  .xcs-top-rank { grid-area: rank; }
  .xcs-top-row > .xcs-avatar { grid-area: av; }
  .xcs-top-meta { grid-area: name; min-width: 0; }
  .xcs-top-bars { grid-area: bars; }
  .xcs-top-total { grid-area: total; }
}

@media (max-width: 420px) {
  .xcs-stats-grid { grid-template-columns: 1fr !important; }
  .xcs-multi-grid { grid-template-columns: 1fr !important; }
  .xcs-date-quick { grid-template-columns: 1fr !important; }
}


/* ── Empty state (base) ────────────────────────────────────────── */
.xcs-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px;
  padding: 72px 32px 80px;
  background: var(--xcs-card);
  border: 1px solid var(--xcs-border);
  border-radius: 18px;
  max-width: 560px; margin: 24px auto;
}
.xcs-empty-art {
  display: grid; place-items: center;
  width: 88px; height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--xcs-yellow-soft) 0%, var(--xcs-yellow-soft) 100%);
  margin-bottom: 4px;
}
.xcs-empty-art svg { display: block; max-width: 58px; height: auto; }
.xcs-empty h2 {
  margin: 0; font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--xcs-ink);
}
.xcs-empty p {
  margin: 0; max-width: 380px;
  font-size: 14px; color: var(--xcs-ink-2);
  line-height: 1.6;
}
.xcs-empty-cta {
  margin-top: 8px;
  display: flex; gap: 10px;
}
.xcs-empty-hint {
  font-size: 12px; color: var(--xcs-ink-3);
  margin-top: 4px;
}
.xcs-empty-hint kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 4px;
  background: var(--xcs-bg-3); border: 1px solid var(--xcs-border-strong);
  color: var(--xcs-ink-2);
}

/* Mobile-tuned overrides */
@media (max-width: 768px) {
  /* Empty state: tighter, no horizontal card */
  .xcs-empty {
    padding: 48px 20px 56px !important;
    margin: 8px auto;
    border-radius: 14px;
    gap: 12px;
  }
  .xcs-empty-art {
    width: 72px; height: 72px;
  }
  .xcs-empty-art svg { max-width: 48px; }
  .xcs-empty h2 { font-size: 20px !important; letter-spacing: -0.02em; }
  .xcs-empty p { font-size: 13.5px; line-height: 1.55; }
  .xcs-empty-cta { width: 100%; }
  .xcs-empty-cta .xcs-btn-primary { width: 100%; justify-content: center; padding: 12px 18px; }

  /* Mobile bar refinement */
  .xcs-mobile-bar {
    padding: 8px 12px !important;
    min-height: 56px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04);
  }
  .xcs-mobile-brand {
    gap: 6px !important;
  }
  .xcs-mobile-brand svg { height: 22px !important; width: auto !important; }
  .xcs-mobile-brand span {
    font-family: 'Jost', system-ui, sans-serif; color: #FFFFFF;
    font-size: 14px !important; letter-spacing: 0.06em;
    font-weight: 600;
  }
  .xcs-mobile-new {
    width: 36px !important; height: 36px !important;
    font-size: 20px !important; border-radius: 10px !important;
    box-shadow: 0 4px 10px rgba(196,196,196,0.3);
  }
  .xcs-mobile-bar .xcs-icon-btn-lg {
    width: 36px !important; height: 36px !important;
  }

  /* Sidebar drawer — adapt brand text now reads "HURRICANE XCS" */
  .xcs-sidebar .xcs-brand-name { font-size: 14px !important; letter-spacing: 0.03em; }
  .xcs-sidebar .xcs-brand-sub { font-size: 10px !important; }

  /* Page head: warmer typographic rhythm */
  .xcs-pagehead {
    gap: 14px !important;
    padding-bottom: 4px;
  }
  .xcs-pagehead .xcs-eyebrow {
    font-size: 10.5px; letter-spacing: 0.08em;
  }
  .xcs-pagehead h1 { font-size: 24px !important; line-height: 1.15; }
  .xcs-pagehead-sub {
    font-size: 13.5px; line-height: 1.5; color: var(--xcs-ink-2);
  }

  /* Stats cards — sharper compact treatment */
  .xcs-stats-grid { gap: 8px !important; }
  .xcs-stat {
    padding: 14px !important; border-radius: 12px !important;
  }
  .xcs-stat-label {
    font-size: 10.5px !important; letter-spacing: 0.06em;
    text-transform: uppercase; font-weight: 600;
    color: var(--xcs-ink-3);
  }
  .xcs-stat-value {
    font-size: 24px !important; gap: 6px;
    font-weight: 800; letter-spacing: -0.02em;
  }
  .xcs-stat-value .xcs-trend { font-size: 10.5px !important; }
  .xcs-stat-sub { font-size: 11px !important; margin-top: 2px; }

  /* Cards — softer rhythm */
  .xcs-card { padding: 16px !important; border-radius: 14px !important; }
  .xcs-card-h { padding-bottom: 4px; }
  .xcs-card-h h3 { font-size: 15px !important; }
  .xcs-card-h p { font-size: 12px !important; color: var(--xcs-ink-3); }

  /* Row spacing */
  .xcs-row { padding: 14px 12px !important; }
  .xcs-row-id {
    font-size: 10.5px !important; letter-spacing: 0.04em; opacity: 0.85;
    display: flex !important; flex-direction: column !important; gap: 2px !important;
  }
  .xcs-row-id-created {
    font-size: 9.5px !important; letter-spacing: 0 !important;
    text-transform: none !important; opacity: 1 !important;
    color: #9A9A9A !important;
  }
  .xcs-row-title > span:first-child {
    font-size: 14px !important; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .xcs-row .xcs-type {
    font-size: 10px !important; margin-top: 4px;
  }
  .xcs-row .xcs-prio {
    font-size: 10.5px !important; padding: 2px 8px !important;
  }
  .xcs-row .xcs-status {
    font-size: 10.5px !important;
  }
  .xcs-row-deadline {
    font-size: 11.5px !important; color: var(--xcs-ink-3);
  }

  /* Mine grid */
  .xcs-mine-item { padding: 14px !important; }
  .xcs-mine-head { font-size: 11px; }
  .xcs-mine-title { font-size: 14px !important; }

  /* Catbar / category breakdown */
  .xcs-catbar { padding: 14px !important; }
  .xcs-catbar-head { font-size: 13px !important; }
  .xcs-catbar-row { gap: 8px !important; }
  .xcs-catbar-label { font-size: 12px; }

  /* Buttons — touch targets */
  .xcs-btn-primary, .xcs-btn-ghost {
    min-height: 42px;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
  }
  .xcs-btn-lg { min-height: 46px; padding: 12px 20px !important; }

  /* Safe-area bottom padding (iPhone home indicator) */
  .xcs-main-inner {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* When no data, hide the desktop CTA cluster in pagehead */
  .xcs-pagehead-cta { gap: 8px !important; }
}

@media (max-width: 420px) {
  .xcs-pagehead h1 { font-size: 22px !important; }
  .xcs-stat-value { font-size: 22px !important; }
  .xcs-empty { padding: 40px 16px 48px !important; }
  .xcs-empty-art { width: 64px; height: 64px; }
  .xcs-empty-art svg { max-width: 42px; }
  .xcs-empty h2 { font-size: 18px !important; }
}

/* Safe-area for mobile bar top (notch) */
@media (max-width: 768px) {
  .xcs-mobile-bar { padding-top: calc(8px + env(safe-area-inset-top, 0px)) !important; }
}


/* Review foot — mobile stack so submit is never cut off */
@media (max-width: 768px) {
  .xcs-review-foot {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px !important;
    gap: 10px !important;
  }
  .xcs-review-hint {
    font-size: 12px !important;
    order: 2;
    text-align: center;
  }
  .xcs-review-foot .xcs-btn-primary {
    order: 1;
    width: 100%;
    justify-content: center;
    padding: 14px 18px !important;
    font-size: 14.5px !important;
    min-height: 48px;
  }
  /* Files step CTAs also stack */
  .xcs-files-cta {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .xcs-files-cta .xcs-btn-primary {
    width: 100%; justify-content: center; min-height: 44px;
  }
  .xcs-files-cta .xcs-link {
    text-align: center; padding: 8px;
  }
}


/* When the chat contains the ReviewCard, drop the max-height so the submit button is reachable */
.xcs-chat:has(.xcs-review) { max-height: none; overflow-y: visible; }
@supports not selector(:has(*)) {
  /* fallback for older browsers — just remove constraint at narrow viewports */
  @media (max-width: 900px) { .xcs-chat { max-height: none; overflow-y: visible; } }
}

/* ── Editor / Designer Rooms (kanban) ───────────────────────────── */
.xcs-rooms { display: flex; flex-direction: column; gap: 22px; position: relative; }
.xcs-rooms-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.xcs-rooms-done {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--xcs-ink-3); font-weight: 600; cursor: pointer;
}
.xcs-rooms-done input { accent-color: var(--xcs-blue); }
.xcs-rooms-note {
  background: #F0F0F0; border: 1px solid var(--xcs-yellow-soft); color: #222222;
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
}
.xcs-rooms-note em { font-style: normal; font-weight: 700; }

.xcs-room {
  background: var(--xcs-bg-2); border: 1px solid var(--xcs-border);
  border-radius: 14px; padding: 12px; display: flex; flex-direction: column;
  min-height: 200px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.xcs-room.is-drop-target {
  background: var(--xcs-blue-soft) !important; border-color: var(--xcs-blue) !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.18);
}
.xcs-room-head {
  display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px;
  border-bottom: 1px dashed var(--xcs-border); margin-bottom: 10px;
}
.xcs-room-avatar { width: 32px !important; height: 32px !important; font-size: 12px !important; flex-shrink: 0; }
.xcs-room-meta { min-width: 0; flex: 1; }
.xcs-room-name {
  font-weight: 700; font-size: 13.5px; color: var(--xcs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-room-sub { font-size: 11px; color: var(--xcs-ink-4); }
.xcs-room-count {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 12px; padding: 4px 8px; border-radius: 999px;
  background: var(--xcs-bg-3); border: 1px solid var(--xcs-border); color: var(--xcs-ink-3);
}
.xcs-room-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.xcs-room-empty {
  font-size: 12px; color: var(--xcs-ink-4); text-align: center;
  padding: 20px 8px; font-style: italic;
}

.xcs-room-card {
  background: var(--xcs-bg-2); border: 1px solid var(--xcs-border);
  border-radius: 10px; display: flex; overflow: hidden;
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.1s;
  position: relative;
}
.xcs-room-card.is-draggable { cursor: grab; }
.xcs-room-card.is-draggable:active { cursor: grabbing; }
.xcs-room-card.is-dragging { opacity: 0.4; transform: scale(0.97); }
.xcs-room-card:hover { box-shadow: 0 4px 12px -2px rgba(0,0,0,0.08); }
.xcs-room-card-bar { width: 4px; flex-shrink: 0; }
.xcs-room-card-body {
  flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.xcs-room-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.xcs-room-card-id { font-size: 10.5px; color: var(--xcs-ink-4); font-weight: 600; cursor: pointer; }
.xcs-room-card-id:hover { color: var(--xcs-blue); text-decoration: underline; }
.xcs-prio-sm { font-size: 10px !important; padding: 2px 6px !important; border-radius: 4px !important; }
.xcs-room-card-title {
  font-size: 13px; font-weight: 600; color: var(--xcs-ink); margin: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; cursor: pointer;
}
.xcs-room-card-title:hover { color: var(--xcs-blue); }
.xcs-room-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px; }
.xcs-room-card-cat { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.xcs-room-card-cat-dot { width: 6px; height: 6px; border-radius: 999px; }
.xcs-room-card-status { display: inline-flex; align-items: center; gap: 4px; color: var(--xcs-ink-3); }
.xcs-room-card-status .xcs-status-dot { width: 6px; height: 6px; }
.xcs-room-card-dot { color: var(--xcs-ink-4); }
.xcs-room-card-created {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--xcs-ink-3); font-weight: 500;
  white-space: nowrap;
}
.xcs-room-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding-top: 4px; border-top: 1px dashed var(--xcs-border);
}
.xcs-room-card-requester {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--xcs-ink-3); min-width: 0;
}
.xcs-room-card-dept {
  font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 140px;
}
.xcs-room-card-move {
  appearance: none; border: 1px solid var(--xcs-border); background: var(--xcs-bg-2);
  width: 24px; height: 24px; border-radius: 6px;
  font-size: 14px; cursor: pointer; color: var(--xcs-ink-3);
  display: grid; place-items: center; flex-shrink: 0;
  transition: all 0.1s;
}
.xcs-room-card-move:hover { background: var(--xcs-blue); border-color: var(--xcs-blue); color: #fff; }

/* Move menu */
.xcs-movemenu-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: grid; place-items: center; z-index: 200;
  animation: xcs-fade-in 0.15s;
}
@keyframes xcs-fade-in { from { opacity: 0; } to { opacity: 1; } }
.xcs-movemenu {
  background: var(--xcs-bg-2); border-radius: 14px; padding: 10px;
  width: min(340px, 90vw); max-height: 80vh; overflow-y: auto;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; gap: 2px;
}
.xcs-movemenu header {
  font-size: 11px; font-weight: 800; color: var(--xcs-ink-4);
  text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 12px 6px;
}
.xcs-movemenu-item {
  appearance: none; border: 0; background: transparent;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--xcs-ink);
  cursor: pointer; text-align: left; width: 100%;
  transition: background 0.1s;
}
.xcs-movemenu-item:hover { background: var(--xcs-bg-3); }
.xcs-movemenu-item.on { background: var(--xcs-blue-soft); color: var(--xcs-blue); }
.xcs-movemenu-item.xcs-movemenu-demote {
  background: var(--xcs-yellow-soft); color: #92400E;
  border: 1px dashed #F59E0B;
  margin-bottom: 6px;
}
.xcs-movemenu-item.xcs-movemenu-demote:hover {
  background: var(--xcs-yellow-soft); color: #78350F;
}
.xcs-movemenu-item.xcs-movemenu-demote small {
  font-size: 11px; font-weight: 500;
}
.xcs-movemenu-cancel {
  appearance: none; border: 1px solid var(--xcs-border); background: var(--xcs-bg-2);
  margin-top: 6px; padding: 9px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--xcs-ink-3); cursor: pointer;
}
.xcs-rooms-flash {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--xcs-navy); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; z-index: 150;
  box-shadow: 0 12px 30px -6px rgba(0,0,0,0.4);
  animation: xcs-toast-in 0.25s;
}


/* ── Bank (unassigned pool, sits above PIC rooms) ───────────────── */
.xcs-bank {
  background: #F7F7F7; border: 2px dashed #D6D6D6; border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 12px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.xcs-bank.is-drop-target {
  background: var(--xcs-yellow-soft) !important; border-color: #F59E0B !important;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.15);
}
.xcs-bank-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 10px; border-bottom: 1px dashed #D6D6D6;
}
.xcs-bank-title { display: flex; align-items: center; gap: 12px; flex: 1; }
.xcs-bank-ico { font-size: 22px; }
.xcs-bank-name {
  font-weight: 800; font-size: 14px; color: #222222;
  letter-spacing: 0.04em;
}
.xcs-bank-sub { font-size: 11.5px; color: #92400E; }
.xcs-bank-count {
  font-family: 'JetBrains Mono', monospace; font-weight: 800;
  font-size: 14px; padding: 6px 12px; border-radius: 999px;
  background: var(--xcs-yellow); color: #222222;
}
.xcs-bank-body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.xcs-bank-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 24px;
  color: #92400E; font-weight: 600; font-size: 13px;
}

/* ── DAILY DESIGN bank — green theme override ──────────────────── */
.xcs-bank.xcs-bank-daily {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px dashed #10B981;
}
.xcs-bank-daily.is-drop-target {
  background: #A7F3D0 !important; border-color: #059669 !important;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.18);
}
.xcs-bank-daily .xcs-bank-head { border-bottom-color: #6EE7B7; }
.xcs-bank-daily .xcs-bank-name { color: #065F46; }
.xcs-bank-daily .xcs-bank-sub  { color: #047857; }
.xcs-bank-daily .xcs-bank-count {
  background: #10B981; color: #fff;
}
.xcs-bank-daily .xcs-bank-empty { color: #047857; }

/* Daily card — green tint applied wherever it appears (DAILY DESIGN bank + PIC columns) */
.xcs-room-card.is-daily {
  background: linear-gradient(180deg, #ECFDF5 0%, #fff 60%);
  border-color: #6EE7B7;
}
.xcs-room-card.is-daily:hover { border-color: #10B981; }
.xcs-room-card.is-daily .xcs-room-card-bar { background: #10B981 !important; }

/* Daily badge in priority pill — make it stand out subtly */
.xcs-prio[style*="#10B981"] { font-weight: 700; }

/* Intake header — green when daily mode */
.xcs-intake.xcs-intake-daily .xcs-eyebrow { color: #059669; }
.xcs-intake.xcs-intake-daily .xcs-chat-step.now { background: #10B981; }
.xcs-intake.xcs-intake-daily .xcs-chat-step.done { background: #6EE7B7; }

/* Review card "locked" indicator for daily mode */
.xcs-review-locked {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: #ECFDF5; color: #059669;
  border-radius: 6px; font-size: 13px;
  cursor: help;
}

/* ── PIC section (grouped Video / Image) ─────────────────────────── */
.xcs-picsection {
  display: flex; flex-direction: column; gap: 10px;
}
.xcs-picsection-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 4px 2px; border-bottom: 2px solid var(--xcs-navy);
  padding-bottom: 8px;
}
.xcs-picsection-head h3 {
  margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--xcs-navy);
}
.xcs-picsection-sub { font-size: 11.5px; color: var(--xcs-ink-4); font-weight: 600; }

/* ── PIC management (admin adds/removes people on the board) ── */
.xcs-pic-add {
  margin-left: auto; appearance: none; cursor: pointer;
  border: 1.5px dashed var(--xcs-border); background: transparent;
  border-radius: 8px; padding: 4px 12px;
  font-size: 12px; font-weight: 700; color: var(--xcs-ink-3);
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.xcs-pic-add:hover { border-color: var(--xcs-blue); color: var(--xcs-blue); background: var(--xcs-blue-soft); }
.xcs-picsection-empty {
  font-size: 12.5px; color: var(--xcs-ink-4); font-style: italic;
  padding: 18px 12px; text-align: center;
  border: 1.5px dashed var(--xcs-border); border-radius: 12px;
}
.xcs-room-remove {
  appearance: none; border: none; background: transparent; cursor: pointer;
  width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0;
  font-size: 12px; line-height: 1; color: var(--xcs-ink-4);
  display: grid; place-items: center;
  transition: background 0.12s, color 0.12s;
}
.xcs-room-remove:hover { background: #FEE2E2; color: #DC2626; }

.xcs-picmanage {
  background: var(--xcs-card); border: 1px solid var(--xcs-border);
  border-radius: 16px; width: min(420px, calc(100vw - 32px));
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 64px -24px rgba(0,0,0,0.45);
}
.xcs-picmanage-head { display: flex; align-items: center; gap: 12px; }
.xcs-picmanage-title { font-size: 16px; font-weight: 800; color: var(--xcs-ink); }
.xcs-picmanage-sub { font-size: 12px; color: var(--xcs-ink-3); }
.xcs-picmanage-tabs { display: flex; gap: 6px; }
.xcs-picmanage-tabs button {
  appearance: none; cursor: pointer; flex: 1;
  border: 1.5px solid var(--xcs-border); background: transparent;
  border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; font-weight: 700; color: var(--xcs-ink-3);
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.xcs-picmanage-tabs button.on {
  /* --xcs-blue (not navy): navy is re-pointed to near-black in dark theme */
  border-color: var(--xcs-blue); color: var(--xcs-blue); background: var(--xcs-blue-soft);
}
.xcs-picmanage-body { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--xcs-ink-2); }
.xcs-picmanage-body p { margin: 0; }
.xcs-picmanage-note {
  font-size: 12px; color: var(--xcs-ink-3); line-height: 1.5;
  background: var(--xcs-bg-3); border-radius: 8px; padding: 10px 12px;
}
.xcs-picmanage-foot { display: flex; justify-content: flex-end; gap: 8px; }
.xcs-picsection-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(var(--cols, 5), minmax(220px, 1fr));
}
@media (max-width: 1200px) {
  .xcs-picsection-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .xcs-picsection-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .xcs-picsection-grid { grid-template-columns: 1fr; }
}

.xcs-room-more {
  appearance: none; border: 1px dashed var(--xcs-border);
  background: transparent; padding: 8px;
  font-size: 11.5px; font-weight: 600; color: var(--xcs-blue);
  border-radius: 8px; cursor: pointer;
}
.xcs-room-more:hover { background: var(--xcs-blue-soft); border-color: var(--xcs-blue); }

/* ── PIC Focus modal (queue-style detail of one PIC's work) ───── */
.xcs-focus-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: grid; place-items: center; z-index: 200; padding: 20px;
  animation: xcs-fade-in 0.15s;
}
.xcs-focus {
  background: var(--xcs-bg-2); border-radius: 16px; width: min(1100px, 100%);
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
  overflow: hidden;
}
.xcs-focus-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px; border-top: 4px solid;
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-focus-name { font-weight: 800; font-size: 18px; color: var(--xcs-ink); }
.xcs-focus-sub { font-size: 12px; color: var(--xcs-ink-4); font-weight: 600; }
.xcs-focus-close {
  margin-left: auto; appearance: none; border: 0; background: transparent;
  font-size: 28px; line-height: 1; color: var(--xcs-ink-4); cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
}
.xcs-focus-close:hover { background: var(--xcs-bg-3); color: var(--xcs-ink); }
.xcs-focus-body { overflow-y: auto; padding: 0 6px 6px; }
.xcs-focus-body .xcs-row { background: var(--xcs-bg-2); border-radius: 0; }

/* Move menu group headers */
.xcs-movemenu-grouph {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--xcs-ink-4); padding: 10px 12px 4px;
  text-transform: uppercase;
}

.xcs-room-card-kind {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 4px;
  margin-right: auto;
}
.xcs-room-card-kind.kind-image { background: var(--xcs-blue-soft); color: var(--xcs-blue); }
.xcs-room-card-kind.kind-video { background: var(--xcs-yellow-soft); color: #92400E; }
.xcs-room-card-kind.kind-thumbnail { background: #FCE7F3; color: #9D174D; }

.xcs-room-card-rname {
  font-weight: 700; color: var(--xcs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 90px;
}
.xcs-room-card-dept {
  padding: 1px 6px; border-radius: 4px;
  background: var(--xcs-bg-3); color: var(--xcs-ink-3);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
}

.xcs-row-dept-rname {
  font-weight: 700; color: var(--xcs-ink); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Floating WhatsApp button ───────────────────────────────────────── */
.xcs-fab-wa {
  position: fixed; right: 24px; bottom: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 2px 8px rgba(0,0,0,0.15);
  z-index: 40; transition: transform 0.18s ease, box-shadow 0.18s ease;
  color: #fff;
}
.xcs-fab-wa:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5), 0 4px 12px rgba(0,0,0,0.18);
}
.xcs-fab-wa:active { transform: scale(0.96); }
.xcs-fab-wa::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.35);
  animation: xcs-fab-pulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes xcs-fab-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (max-width: 720px) {
  .xcs-fab-wa { right: 16px; bottom: 88px; width: 52px; height: 52px; }
}

/* ── PIC Performance card (Reports) ─────────────────────────────────── */
.xcs-pic-perf {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 16px 20px 8px;
}
@media (max-width: 900px) {
  .xcs-pic-perf { grid-template-columns: 1fr; gap: 16px; }
}
.xcs-pic-group-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--xcs-ink-3); text-transform: uppercase;
  padding-bottom: 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--xcs-border);
}
.xcs-pic-group-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.xcs-pic-group-c {
  margin-left: auto; font-weight: 600; color: var(--xcs-ink-4);
  font-size: 10.5px;
}
.xcs-pic-row {
  display: grid; grid-template-columns: 36px 1fr auto auto;
  align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--xcs-border);
}
.xcs-pic-row:last-child { border-bottom: 0; }
/* Button variant — clickable PIC row that opens detail in new tab */
.xcs-pic-row-btn {
  appearance: none; border: 0; background: transparent;
  width: 100%; text-align: left; cursor: pointer;
  border-radius: 10px;
  margin: 0 -8px; padding: 12px 8px;
  transition: background 0.12s, box-shadow 0.12s;
}
.xcs-pic-row-btn:hover:not(:disabled) {
  background: var(--xcs-bg-tint);
  box-shadow: inset 0 0 0 1px var(--xcs-border);
}
.xcs-pic-row-btn:disabled,
.xcs-pic-row-btn.is-disabled {
  cursor: not-allowed; opacity: 0.55;
}
.xcs-pic-row-btn:focus-visible {
  outline: 2px solid var(--xcs-blue); outline-offset: 1px;
}
.xcs-pic-meta { min-width: 0; }
.xcs-pic-name { font-weight: 700; color: var(--xcs-ink); font-size: 13.5px; }
.xcs-pic-sub { font-size: 11px; color: var(--xcs-ink-4); margin-top: 2px; }
.xcs-pic-stats {
  display: flex; gap: 18px; align-items: center;
  padding: 0 8px;
}
.xcs-pic-stat { display: flex; flex-direction: column; align-items: center; }
.xcs-pic-stat-n {
  font-size: 18px; font-weight: 800; color: #22C55E;
  font-variant-numeric: tabular-nums;
}
.xcs-pic-stat-l {
  font-size: 9.5px; color: var(--xcs-ink-4);
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px;
}
.xcs-pic-bar {
  width: 160px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.xcs-pic-bar-track {
  width: 100%; height: 8px; background: var(--xcs-bg-3); border-radius: 4px;
  display: flex; overflow: hidden;
}
.xcs-pic-bar-done { background: #22C55E; height: 100%; border-radius: 4px 0 0 4px; }
.xcs-pic-bar-active { background: #F59E0B; height: 100%; border-radius: 0 4px 4px 0; }
.xcs-pic-rate {
  font-size: 10.5px; color: var(--xcs-ink-4); font-weight: 600;
}
.xcs-pic-legend {
  display: flex; gap: 18px; padding: 12px 20px 18px;
  font-size: 11px; color: var(--xcs-ink-3);
}
.xcs-pic-legend span { display: inline-flex; align-items: center; gap: 6px; }
.xcs-pic-legend i {
  width: 10px; height: 10px; border-radius: 2px; display: inline-block;
}
@media (max-width: 720px) {
  .xcs-pic-row {
    grid-template-columns: 36px 1fr;
    grid-template-areas: "av meta" "stats stats" "bar bar";
    row-gap: 8px;
  }
  .xcs-pic-row > .xcs-avatar { grid-area: av; }
  .xcs-pic-meta { grid-area: meta; }
  .xcs-pic-stats { grid-area: stats; justify-content: flex-start; padding: 0; }
  .xcs-pic-bar { grid-area: bar; width: 100%; }
}

/* ── Activity item: delete-comment button ──────────────────────────── */
.xcs-activity-del {
  margin-left: auto; opacity: 0; transition: opacity 0.15s ease, background 0.15s;
  background: transparent; border: none; cursor: pointer;
  color: var(--xcs-ink-4); font-size: 14px; line-height: 1;
  width: 22px; height: 22px; border-radius: 4px;
  display: grid; place-items: center;
}
.xcs-activity-item:hover .xcs-activity-del { opacity: 1; }
.xcs-activity-del:hover { background: #FEE2E2; color: #DC2626; }


/* ── Notification bell + panel ──────────────────────────────────── */
.xcs-notif-bell {
  position: relative;
  appearance: none; border: 1px solid #CACACA; background: #FFFFFF;
  width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer;
  color: #0A0A0A;
}
.xcs-notif-bell:hover { background: #F4F4F4; }
.xcs-notif-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #EF4444; color: #fff;
  border-radius: 999px; font-size: 9.5px; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid var(--xcs-navy);
}
.xcs-notif-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  z-index: 199;
}
.xcs-notif-panel {
  position: fixed; top: 70px; right: 16px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  background: var(--xcs-bg-2); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.1);
  z-index: 200; display: flex; flex-direction: column;
  animation: xcs-notif-in 0.22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes xcs-notif-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.xcs-notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--xcs-border);
}
.xcs-notif-title { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.xcs-notif-sub { font-size: 11px; color: var(--xcs-ink-4); margin-top: 2px; }
.xcs-notif-clear {
  appearance: none; border: 0; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--xcs-blue);
  cursor: pointer; padding: 6px 10px; border-radius: 6px;
}
.xcs-notif-clear:hover:not(:disabled) { background: rgba(0,0,0,0.08); }
.xcs-notif-clear:disabled { opacity: 0.4; cursor: default; }
.xcs-notif-list {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px;
}
.xcs-notif-empty {
  text-align: center; padding: 40px 20px;
  color: var(--xcs-ink-4); font-size: 13.5px;
}
.xcs-notif-empty-emoji { font-size: 32px; margin-bottom: 10px; }
.xcs-notif-empty small {
  display: block; margin-top: 8px; font-size: 11.5px;
  color: var(--xcs-ink-4);
}
.xcs-notif-card {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--xcs-bg-tint); border: 1px solid var(--xcs-border);
  cursor: grab; user-select: none; touch-action: pan-y;
  position: relative;
}
.xcs-notif-card:active { cursor: grabbing; }
.xcs-notif-card.unread { background: var(--xcs-bg-tint); border-color: var(--xcs-blue-soft); }
.xcs-notif-card.kind-new.unread     { background: var(--xcs-yellow-soft); border-color: #D6D6D6; }
.xcs-notif-card.kind-assign.unread  { background: var(--xcs-blue-soft); border-color: var(--xcs-blue-fg); }
.xcs-notif-card.kind-done.unread    { background: #DCFCE7; border-color: #86EFAC; }
.xcs-notif-card.kind-status.unread  { background: var(--xcs-bg-3); border-color: #CACACA; }
.xcs-notif-body { flex: 1; min-width: 0; }
.xcs-notif-card-title {
  font-weight: 700; font-size: 13px; color: var(--xcs-ink);
  letter-spacing: -0.01em;
}
.xcs-notif-card-body {
  font-size: 12px; color: var(--xcs-ink-2);
  margin-top: 3px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.xcs-notif-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; font-size: 11px; color: var(--xcs-ink-4);
}
.xcs-notif-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--xcs-blue);
}
.xcs-notif-x {
  appearance: none; border: 0; background: transparent;
  font-size: 18px; line-height: 1; color: var(--xcs-ink-4);
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.xcs-notif-x:hover { background: #FEE2E2; color: #DC2626; }

/* Make sure notification bell visible & well-spaced in the mobile bar */
@media (max-width: 768px) {
  .xcs-mobile-bar .xcs-notif-bell {
    width: 40px; height: 40px; background: transparent; color: #fff;
  }
  .xcs-mobile-bar { gap: 8px; }
  .xcs-mobile-bar .xcs-mobile-brand { flex: 1; }
  .xcs-notif-panel {
    top: 60px; right: 8px; left: 8px; width: auto; max-width: none;
  }
}

/* Desktop: bell sits on top-right of main */
@media (min-width: 769px) {
  .xcs-notif-bell {
    position: fixed; top: 16px; right: 20px;
    z-index: 60; background: #FFFFFF;
    border: 1px solid #CACACA;
    color: #0A0A0A;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  .xcs-notif-bell:hover { background: var(--xcs-bg-tint); }
  .xcs-notif-badge { border-color: #fff; }
}

/* ── Fix: floating WhatsApp button — ensure visible on Chrome mobile ── */
.xcs-fab-wa {
  position: fixed !important; right: 18px; bottom: 18px;
  z-index: 198;
  background: #25D366; color: #fff;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(37,211,102,0.45), 0 4px 12px rgba(0,0,0,0.18);
  text-decoration: none;
}
.xcs-fab-wa:hover { transform: scale(1.06); transition: transform 0.15s; }
@media (max-width: 768px) {
  .xcs-fab-wa { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Fix: mobile sidebar must allow scroll so logout/userblock reachable ── */
@media (max-width: 768px) {
  .xcs-sidebar {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 90px !important;
  }
  .xcs-sidebar .xcs-userblock {
    position: sticky; bottom: 0; background: var(--xcs-navy);
    margin: 12px -12px -12px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 5;
  }
}


/* Notification bell positioning: one for desktop (fixed top-right),
   one inside mobile-bar (handled by xcs-mobile-bell-wrap). */
.xcs-mobile-bell-wrap { display: none; }
.xcs-mobile-bell-wrap .xcs-notif-bell {
  background: transparent; color: #fff;
  width: 36px; height: 36px;
}
@media (max-width: 768px) {
  .xcs-mobile-bell-wrap { display: inline-block; order: 4; }
  /* Note: previously had a rule here to hide the desktop-fixed bell on mobile,
     but the bell is now rendered as a fixed floating element on ALL viewports
     and styled below for mobile via .xcs-notif-bell rule. */
}
@media (min-width: 769px) {
  .xcs-mobile-bell-wrap { display: none; }
}


/* ── Mobile header refinement + account menu + footer ───────────── */
@media (max-width: 768px) {
  .xcs-mobile-bar {
    padding: 8px 12px !important;
    gap: 10px !important;
    background: var(--xcs-navy);
    min-height: 56px;
  }
  .xcs-mobile-bar .xcs-icon-btn-lg {
    width: 36px; height: 36px;
    background: transparent; color: #fff;
  }
  .xcs-mobile-brand {
    flex: 1; display: flex; align-items: center; gap: 8px;
    overflow: hidden;
  }
  .xcs-mobile-brand span {
    font-weight: 800; font-size: 13.5px; letter-spacing: 0.04em;
    color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* Floating bell on mobile too — same as desktop */
  .xcs-notif-bell {
    display: grid !important;
    place-items: center;
    position: fixed !important;
    top: calc(60px + env(safe-area-inset-top, 0px)) !important;
    right: 12px !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--xcs-bg-2) !important;
    color: var(--xcs-ink-2) !important;
    border: 1px solid var(--xcs-line-1);
    box-shadow: var(--xcs-shadow-md);
    z-index: 60;
  }
  .xcs-notif-badge { border-color: #fff; }
  .xcs-notif-panel {
    top: 110px !important;
    right: 8px !important; left: 8px !important;
    width: auto !important; max-width: none !important;
    /* top naik jadi 110px; tanpa ini max-height masih dihitung dari top 70px
       sehingga panelnya melewati tepi bawah layar dan kartu terakhir hilang. */
    max-height: calc(100vh - 130px) !important;
    max-height: calc(100dvh - 130px) !important;
  }
}

/* Account button + menu (Gmail-style) */
.xcs-acct-btn {
  appearance: none; border: 0; background: transparent;
  padding: 0; cursor: pointer; border-radius: 50%;
  transition: transform 0.12s;
}
.xcs-acct-btn:hover { transform: scale(1.04); }
.xcs-acct-btn:focus-visible { outline: 2px solid var(--xcs-yellow); outline-offset: 2px; border-radius: 50%; }

.xcs-acctmenu {
  position: fixed; top: 64px; right: 12px;
  width: min(320px, calc(100vw - 24px));
  background: var(--xcs-bg-2); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.1);
  z-index: 201;
  animation: xcs-notif-in 0.2s cubic-bezier(.2,.9,.3,1.2);
  overflow: hidden;
}
.xcs-acctmenu-head {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 18px;
  background: linear-gradient(135deg, var(--xcs-navy) 0%, var(--xcs-blue) 100%);
  color: #fff;
}
.xcs-acctmenu-info { flex: 1; min-width: 0; }
.xcs-acctmenu-name {
  font-weight: 800; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-acctmenu-email {
  font-size: 12px; opacity: 0.85; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-acctmenu-role {
  font-size: 10.5px; opacity: 0.75; margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.xcs-acctmenu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; width: 100%; border: 0; background: transparent;
  font-size: 13.5px; font-weight: 600; color: var(--xcs-ink); cursor: pointer;
  text-align: left;
}
.xcs-acctmenu-item:hover { background: var(--xcs-bg-tint); }
.xcs-acctmenu-logout { color: #DC2626; }
.xcs-acctmenu-logout:hover { background: #FEE2E2; }
.xcs-acctmenu-foot {
  padding: 10px 18px; border-top: 1px solid var(--xcs-border);
  font-size: 10.5px; color: var(--xcs-ink-4); text-align: center;
}

/* Hide mobile + button (replaced by floating WA + account menu) */
.xcs-mobile-new { display: none !important; }

/* Footer */
.xcs-footer {
  text-align: center; padding: 24px 16px;
  font-size: 11.5px; color: var(--xcs-ink-4);
  border-top: 1px solid var(--xcs-border);
  margin-top: 32px;
  letter-spacing: 0.01em;
}
@media (max-width: 768px) {
  .xcs-footer { padding: 18px 14px calc(70px + env(safe-area-inset-bottom, 0px)); font-size: 11px; }
}

/* ══════════════════════════════════════════════════════════════════
 * MEET US — Trading card collection
 * Card aspect ratio approx 2.5:3.5 (baseball card-like)
 * Layout: top stripe → avatar → name → mood → status → stats
 * ══════════════════════════════════════════════════════════════════ */

.xcs-meetus-page {
  display: flex; flex-direction: column;
  gap: 24px;
}

.xcs-meetus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

/* Trading card */
.xcs-tcard {
  position: relative;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: var(--xcs-radius-lg);
  box-shadow: var(--xcs-shadow-sm);
  transition: transform var(--xcs-dur-base) var(--xcs-ease-out),
              box-shadow var(--xcs-dur-base) var(--xcs-ease-out),
              border-color var(--xcs-dur-base) var(--xcs-ease-out);
  overflow: hidden;
  min-height: 360px;
}
.xcs-tcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--xcs-shadow-lg);
  border-color: var(--xcs-line-2);
}

/* "Me" card — special highlight with subtle yellow accent ring */
.xcs-tcard.is-me {
  border-color: var(--xcs-yellow);
  box-shadow: 0 0 0 1px var(--xcs-yellow), var(--xcs-shadow-md);
}
.xcs-tcard.is-me:hover {
  box-shadow: 0 0 0 1px var(--xcs-yellow), var(--xcs-shadow-lg);
}

/* Subtle glow behind own card */
.xcs-tcard-me-glow {
  position: absolute;
  top: -40%; right: -40%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(196,196,196,0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Cards with mood get a subtle colored top border accent */
.xcs-tcard.has-mood::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-mood-color);
  opacity: 0.7;
  border-radius: var(--xcs-radius-lg) var(--xcs-radius-lg) 0 0;
}

/* Top stripe — role label + edit button */
.xcs-tcard-top {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.xcs-tcard-role {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--xcs-ink-3);
}
.xcs-tcard-edit {
  appearance: none; border: 0;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px;
  background: var(--xcs-yellow-soft);
  color: #92400E;
  font-size: 11px; font-weight: 700; cursor: pointer;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-tcard-edit:hover {
  background: var(--xcs-yellow);
  color: var(--xcs-navy);
  transform: translateY(-1px);
}
[data-theme="dark"] .xcs-tcard-edit {
  background: rgba(196,196,196,0.15);
  color: var(--xcs-yellow);
}
[data-theme="dark"] .xcs-tcard-edit:hover {
  background: rgba(196,196,196,0.25);
  color: var(--xcs-yellow);
}

/* Avatar wrap — large initials in colored circle */
.xcs-tcard-avatar-wrap {
  display: flex; justify-content: center;
  padding: 6px 0 2px;
  position: relative; z-index: 1;
}
.xcs-tcard-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 14px -3px rgba(0,0,0,0.18);
}

/* Name + dept */
.xcs-tcard-name {
  text-align: center;
  font-size: 16px; font-weight: 800;
  color: var(--xcs-ink-1);
  margin-top: 2px;
  position: relative; z-index: 1;
}
.xcs-tcard-dept {
  text-align: center;
  font-size: 11px; font-weight: 600;
  color: var(--xcs-ink-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative; z-index: 1;
}

/* Mood badge */
.xcs-tcard-mood {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  position: relative; z-index: 1;
}
.xcs-tcard-mood.is-empty {
  border-color: var(--xcs-line-1);
  background: var(--xcs-bg-tint);
  color: var(--xcs-ink-4);
  font-style: italic;
  font-weight: 600;
}
.xcs-tcard-mood-emoji { font-size: 14px; line-height: 1; }
.xcs-tcard-mood.is-empty .xcs-tcard-mood-emoji { opacity: 0.4; }

/* Status quote */
.xcs-tcard-status {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  position: relative;
  min-height: 50px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 4px;
  z-index: 1;
}
.xcs-tcard-quote {
  position: absolute;
  top: -2px; left: 0;
  font-size: 32px;
  color: var(--xcs-line-2);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.45;
}
.xcs-tcard-status-text {
  font-size: 13px;
  font-style: italic;
  color: var(--xcs-ink-2);
  line-height: 1.4;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.xcs-tcard-status-time {
  font-size: 10px;
  color: var(--xcs-ink-4);
  font-weight: 600;
}
.xcs-tcard-status-empty {
  font-size: 11.5px;
  color: var(--xcs-ink-4);
  font-style: italic;
  opacity: 0.7;
}

/* Stats footer */
.xcs-tcard-stats {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--xcs-line-1);
  position: relative; z-index: 1;
}
.xcs-tcard-stat {
  flex: 1;
  text-align: center;
}
.xcs-tcard-stat-n {
  font-size: 16px; font-weight: 800;
  color: var(--xcs-ink-1);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.xcs-tcard-stat-l {
  font-size: 11px;
  color: var(--xcs-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
  font-weight: 700;
}

/* ─── Edit profile modal ─────────────────────────────────────────── */
.xcs-profile-modal {
  max-width: 480px;
  width: 100%;
}
.xcs-profile-section {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.xcs-profile-section:last-child { margin-bottom: 0; }
.xcs-profile-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--xcs-ink-2);
}
.xcs-profile-label-sub {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--xcs-ink-3);
  font-size: 11px;
}
.xcs-profile-hint {
  font-size: 11px;
  color: var(--xcs-ink-3);
  font-style: italic;
  margin-top: 2px;
}

/* Mood picker grid */
.xcs-mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}
.xcs-mood-opt {
  appearance: none; border: 1.5px solid var(--xcs-line-1);
  background: var(--xcs-bg-2);
  padding: 10px 6px;
  border-radius: 12px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  font-family: inherit;
}
.xcs-mood-opt:hover:not(:disabled) {
  border-color: var(--xcs-line-2);
  background: var(--xcs-bg-3);
  transform: translateY(-1px);
}
.xcs-mood-opt:disabled { opacity: 0.5; cursor: not-allowed; }
.xcs-mood-opt.on {
  border-width: 2px;
  font-weight: 800;
}
.xcs-mood-opt-emoji {
  font-size: 22px;
  line-height: 1;
}
.xcs-mood-opt-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--xcs-ink-2);
  text-align: center;
  line-height: 1.15;
}

/* Status text input */
.xcs-profile-status-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--xcs-bg-2);
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--xcs-ink-1);
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
  transition: border-color var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-profile-status-input:focus {
  outline: none;
  border-color: var(--xcs-line-focus);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
.xcs-profile-status-input::placeholder {
  color: var(--xcs-ink-4);
}
.xcs-profile-counter {
  font-size: 11px;
  font-weight: 600;
  color: var(--xcs-ink-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.xcs-profile-counter.is-warn { color: var(--xcs-orange); }
.xcs-profile-counter.is-error { color: var(--xcs-red); font-weight: 800; }
.xcs-profile-error {
  padding: 8px 12px;
  background: var(--xcs-red-soft);
  color: var(--xcs-red);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

/* Sidebar nav: Meet Us special styling — subtle accent */
.xcs-nav-item.is-meetus {
  position: relative;
}
.xcs-nav-item.is-meetus.is-active {
  background: linear-gradient(90deg, rgba(196,196,196,0.18), rgba(196,196,196,0.05));
  color: var(--xcs-yellow);
  border-color: rgba(196,196,196,0.4);
}

/* Mobile tweaks */
@media (max-width: 720px) {
  .xcs-meetus-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
  .xcs-tcard {
    padding: 14px 14px 12px;
    min-height: 320px;
  }
  .xcs-tcard-avatar { width: 56px; height: 56px; font-size: 20px; }
  .xcs-tcard-name { font-size: 14px; }
  .xcs-tcard-stat-n { font-size: 14px; }
  .xcs-mood-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }
  .xcs-mood-opt-emoji { font-size: 19px; }
  .xcs-mood-opt-label { font-size: 9px; }
}

/* ══════════════════════════════════════════════════════════════════
 * SHOP — Avatar Decorator Marketplace
 * ══════════════════════════════════════════════════════════════════ */

.xcs-shop-page {
  display: flex; flex-direction: column;
  gap: 22px;
}

/* Hero balance display next to page heading */
.xcs-shop-balance-hero {
  background: linear-gradient(135deg, var(--xcs-yellow-soft) 0%, var(--xcs-yellow-soft) 100%);
  border: 1.5px solid #F59E0B;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px;
  min-width: 140px;
  box-shadow: 0 4px 14px -6px rgba(245,158,11,0.4);
}
[data-theme="dark"] .xcs-shop-balance-hero {
  background: linear-gradient(135deg, rgba(196,196,196,0.15) 0%, rgba(245,158,11,0.1) 100%);
  border-color: rgba(245,158,11,0.4);
}
.xcs-shop-balance-label {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #92400E;
}
[data-theme="dark"] .xcs-shop-balance-label { color: var(--xcs-yellow); }
.xcs-shop-balance-value {
  display: flex; align-items: center; gap: 6px;
  font-size: 22px; font-weight: 800;
  color: #78350F;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .xcs-shop-balance-value { color: var(--xcs-yellow); }
.xcs-coin-icon { font-size: 20px; line-height: 1; }
.xcs-coin-amount { letter-spacing: -0.01em; }

/* Tabs */
.xcs-shop-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding: 4px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 12px;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-shop-tab {
  appearance: none; border: 0;
  background: transparent; color: var(--xcs-ink-2);
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  font-family: inherit;
}
.xcs-shop-tab:hover { background: var(--xcs-bg-3); color: var(--xcs-ink-1); }
.xcs-shop-tab.on {
  background: var(--xcs-navy);
  color: #fff;
  box-shadow: 0 2px 6px -1px rgba(0,0,0,0.3);
}
[data-theme="dark"] .xcs-shop-tab.on { background: var(--xcs-blue); }
.xcs-shop-tab-count {
  font-size: 11px;
  padding: 1px 8px; border-radius: 999px;
  background: var(--xcs-bg-3); color: var(--xcs-ink-3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.xcs-shop-tab.on .xcs-shop-tab-count {
  background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.9);
}
.xcs-shop-tabs-divider {
  flex: 1;
}

/* Grid */
.xcs-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Empty / error states */
.xcs-shop-empty {
  padding: 60px 20px; text-align: center;
  color: var(--xcs-ink-3); font-size: 14px;
  background: var(--xcs-bg-2);
  border: 1px dashed var(--xcs-line-1);
  border-radius: 14px;
}
.xcs-shop-error {
  padding: 16px 20px;
  background: var(--xcs-red-soft);
  color: var(--xcs-red);
  border: 1px solid var(--xcs-red);
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
}

/* Item card */
.xcs-shop-card {
  position: relative;
  background: var(--xcs-bg-2);
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 18px 16px 14px;
  display: flex; flex-direction: column;
  gap: 10px;
  transition: transform var(--xcs-dur-base) var(--xcs-ease-out),
              box-shadow var(--xcs-dur-base) var(--xcs-ease-out);
}
.xcs-shop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--xcs-shadow-md);
}

/* Tier ribbons */
.xcs-shop-card-tier {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid;
  background: var(--xcs-bg-2);
  z-index: 2;
}
.xcs-shop-card.is-owned::after {
  content: '✓ DIMILIKI';
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--xcs-green-soft);
  color: var(--xcs-green);
  border: 1.5px solid var(--xcs-green);
}
.xcs-shop-card.is-equipped::after {
  content: '✓ DIPAKAI';
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--xcs-yellow-soft);
  color: #92400E;
  border: 1.5px solid var(--xcs-yellow);
}
[data-theme="dark"] .xcs-shop-card.is-equipped::after {
  background: rgba(196,196,196,0.18); color: var(--xcs-yellow);
}

/* Tier-specific borders & accents */
.xcs-shop-card.tier-common    { border-color: var(--xcs-line-1); }
.xcs-shop-card.tier-uncommon  { border-color: rgba(34,197,94,0.45); }
.xcs-shop-card.tier-rare      { border-color: rgba(0,0,0,0.5); }
.xcs-shop-card.tier-epic      {
  border-color: rgba(110,110,110,0.55);
  background: linear-gradient(180deg, rgba(110,110,110,0.04) 0%, var(--xcs-bg-2) 60%);
}
.xcs-shop-card.tier-legendary {
  border-color: #F59E0B;
  background: linear-gradient(180deg, rgba(245,158,11,0.06) 0%, var(--xcs-bg-2) 60%);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.2), var(--xcs-shadow-sm);
}
.xcs-shop-card.tier-legendary:hover {
  box-shadow: 0 0 0 1px rgba(245,158,11,0.3), var(--xcs-shadow-lg);
}

/* Preview area */
.xcs-shop-card-preview {
  display: flex; justify-content: center; align-items: center;
  padding: 14px 0 4px;
  min-height: 100px;
}

/* Item info */
.xcs-shop-card-body {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 4px; text-align: center;
  min-height: 50px;
}
.xcs-shop-card-name {
  font-size: 14px; font-weight: 800;
  color: var(--xcs-ink-1);
  margin: 0;
}
.xcs-shop-card-desc {
  font-size: 11.5px; color: var(--xcs-ink-3);
  margin: 0;
  line-height: 1.4;
}

/* Footer (price + action) */
.xcs-shop-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--xcs-line-1);
  gap: 8px;
}
.xcs-shop-card-price {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 800;
  color: var(--xcs-ink-1);
  font-variant-numeric: tabular-nums;
}
.xcs-shop-card-price .xcs-coin-icon { font-size: 14px; }

.xcs-shop-btn-buy {
  appearance: none; border: 0;
  background: var(--xcs-navy); color: #fff;
  padding: 7px 16px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-shop-btn-buy:hover:not(:disabled) {
  background: var(--xcs-navy-2);
  transform: translateY(-1px);
}
[data-theme="dark"] .xcs-shop-btn-buy {
  background: var(--xcs-blue); color: #fff;
}
.xcs-shop-btn-buy.is-cant-afford,
.xcs-shop-btn-buy:disabled {
  background: var(--xcs-bg-3);
  color: var(--xcs-ink-4);
  cursor: not-allowed;
}
[data-theme="dark"] .xcs-shop-btn-buy.is-cant-afford,
[data-theme="dark"] .xcs-shop-btn-buy:disabled {
  background: rgba(255,255,255,0.05);
  color: var(--xcs-ink-4);
}
.xcs-shop-btn-owned {
  appearance: none; border: 1.5px solid var(--xcs-green);
  background: var(--xcs-green-soft);
  color: var(--xcs-green);
  padding: 5px 14px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700;
  cursor: default;
  font-family: inherit;
}
.xcs-shop-btn-equip {
  appearance: none; border: 1.5px solid var(--xcs-line-2);
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
  padding: 6px 14px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-shop-btn-equip:hover:not(:disabled) {
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
}
.xcs-shop-btn-equip.is-active {
  background: var(--xcs-yellow); border-color: var(--xcs-yellow);
  color: var(--xcs-navy);
}
.xcs-shop-btn-equip.is-active:hover:not(:disabled) {
  background: #E9E9E9; border-color: #E9E9E9;
}
.xcs-shop-card-equipped-label {
  font-size: 11px; font-weight: 700;
  color: var(--xcs-yellow);
  letter-spacing: 0.04em;
}
[data-theme="light"] .xcs-shop-card-equipped-label,
:root .xcs-shop-card-equipped-label { color: #92400E; }

/* Success toast on purchase */
.xcs-shop-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--xcs-green);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.3);
  z-index: 100;
  animation: xcs-toast-up 0.35s var(--xcs-ease-out);
}
@keyframes xcs-toast-up {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.xcs-shop-toast-icon {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  font-weight: 900; font-size: 14px;
}
.xcs-shop-toast-sub {
  display: block;
  font-size: 11.5px;
  opacity: 0.85;
  margin-top: 2px;
}

/* Buy confirmation modal */
.xcs-buy-modal { max-width: 440px; }
.xcs-buy-preview-wrap {
  display: flex; justify-content: center;
  padding: 18px 0 14px;
}
.xcs-buy-info {
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--xcs-line-1);
  margin-bottom: 14px;
}
.xcs-buy-name {
  font-size: 18px; font-weight: 800;
  color: var(--xcs-ink-1);
  margin-bottom: 4px;
}
.xcs-buy-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-size: 11.5px; font-weight: 700;
  color: var(--xcs-ink-3);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 6px;
}
.xcs-buy-desc {
  font-size: 12.5px; color: var(--xcs-ink-3);
  margin-top: 6px;
  line-height: 1.45;
}
.xcs-buy-summary {
  background: var(--xcs-bg-tint);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.xcs-buy-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--xcs-ink-2);
}
.xcs-buy-row strong {
  color: var(--xcs-ink-1);
  font-variant-numeric: tabular-nums;
}
.xcs-buy-row-total {
  padding-top: 8px;
  border-top: 1px dashed var(--xcs-line-1);
  font-weight: 700;
}
.xcs-buy-row-total.is-error strong {
  color: var(--xcs-red);
}
.xcs-buy-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--xcs-red-soft);
  color: var(--xcs-red);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
 * DECORATOR PREVIEWS — actual visual rendering of each decorator
 * Used in: shop card, buy modal, and (Turn 5) trading card avatar
 * ══════════════════════════════════════════════════════════════════ */

.xcs-preview {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.xcs-preview-inner {
  position: absolute;
  background: var(--xcs-chrome);
  border-radius: 50%;
  display: grid; place-items: center;
  z-index: 2;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.xcs-preview-circle { border-radius: 50%; }

/* === FRAMES === */
.xcs-preview-frame {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.xcs-preview-frame.frame-basic {
  background: var(--xcs-bg-3);
  border: 3px solid var(--xcs-line-2);
}
.xcs-preview-frame.frame-bronze {
  background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
  box-shadow: 0 0 0 3px rgba(205,127,50,0.3);
}
.xcs-preview-frame.frame-silver {
  background: linear-gradient(135deg, #E5E7EB 0%, #9CA3AF 100%);
  box-shadow: 0 0 0 3px rgba(156,163,175,0.4);
}
.xcs-preview-frame.frame-gold {
  background: linear-gradient(135deg, #E9E9E9 0%, #8F8F8F 100%);
  box-shadow: 0 0 0 3px rgba(217,119,6,0.4), 0 0 20px rgba(252,211,77,0.5);
}
.xcs-preview-frame.frame-sparkle {
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 33%, #DC2626 66%, var(--xcs-blue) 100%);
  background-size: 200% 200%;
  animation: xcs-sparkle-bg 4s ease infinite;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.5), 0 0 30px rgba(252,211,77,0.6);
}
@keyframes xcs-sparkle-bg {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* === PATTERNS === */
.xcs-preview-pattern {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.xcs-preview-pattern.pattern-dots {
  background: radial-gradient(circle, var(--xcs-blue) 1.5px, transparent 1.5px);
  background-size: 8px 8px;
  background-color: var(--xcs-blue-soft);
}
.xcs-preview-pattern.pattern-stripes {
  background: repeating-linear-gradient(45deg, var(--xcs-yellow), var(--xcs-yellow) 4px, #E9E9E9 4px, #E9E9E9 8px);
}
.xcs-preview-pattern.pattern-gradient {
  background: linear-gradient(135deg, var(--xcs-violet) 0%, #EC4899 50%, #F59E0B 100%);
}
.xcs-preview-pattern.pattern-galaxy {
  background:
    radial-gradient(circle at 20% 30%, #fff 0.5px, transparent 1px),
    radial-gradient(circle at 70% 60%, #fff 0.7px, transparent 1.2px),
    radial-gradient(circle at 40% 80%, #fff 0.6px, transparent 1px),
    linear-gradient(135deg, #1E1B4B 0%, #581C87 50%, #BE185D 100%);
}
.xcs-preview-pattern.pattern-aurora {
  background:
    linear-gradient(135deg, rgba(34,211,238,0.6) 0%, rgba(168,85,247,0.6) 50%, rgba(236,72,153,0.6) 100%),
    linear-gradient(45deg, #0A0A0A 0%, #222222 100%);
  background-size: 200% 200%;
  animation: xcs-aurora-bg 6s ease infinite;
}
@keyframes xcs-aurora-bg {
  0%, 100% { background-position: 0% 50%, 0 0; }
  50% { background-position: 100% 50%, 0 0; }
}

/* === ACCESSORIES === */
.xcs-preview-accessory {
  position: relative;
}
.xcs-preview-emoji {
  position: absolute;
  top: -6px; right: -4px;
  z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════
 * SIDEBAR — Balance chip + Shop menu styling
 * ══════════════════════════════════════════════════════════════════ */

.xcs-balance-chip {
  appearance: none; border: 0;
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  margin-top: auto;
  margin-bottom: 8px;
  padding: 10px 12px;
  background: var(--xcs-chrome);
  border: 0;
  border-radius: 10px;
  color: #0A0A0A;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-balance-chip:hover {
  background: var(--xcs-chrome);
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.xcs-balance-icon {
  font-size: 22px; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.xcs-balance-info {
  flex: 1; min-width: 0;
}
.xcs-balance-amount {
  font-size: 14px; font-weight: 800;
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.xcs-balance-label {
  font-size: 9.5px;
  color: rgba(0,0,0,0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.xcs-balance-arrow {
  font-size: 14px;
  color: rgba(0,0,0,0.55);
  font-weight: 800;
}

/* Shop menu accent in sidebar (subtle yellow tint) */
.xcs-nav-item.is-shop.is-active {
  background: linear-gradient(90deg, rgba(196,196,196,0.18), rgba(196,196,196,0.05));
  color: var(--xcs-yellow);
  border-color: rgba(196,196,196,0.4);
}

/* Mobile */
@media (max-width: 720px) {
  .xcs-shop-balance-hero {
    align-self: stretch;
    align-items: flex-start;
    padding: 10px 14px;
  }
  .xcs-shop-balance-value { font-size: 18px; }
  .xcs-shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
  }
  .xcs-shop-card { padding: 16px 12px 12px; }
  .xcs-shop-card-name { font-size: 13px; }
  .xcs-shop-tabs { gap: 4px; padding: 3px; }
  .xcs-shop-tab { padding: 6px 10px; font-size: 12px; }
  .xcs-shop-tabs-divider { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
 * WALLET — Transaction history page
 * ══════════════════════════════════════════════════════════════════ */

.xcs-wallet-page {
  display: flex; flex-direction: column;
  gap: 22px;
}

/* Top stats grid */
.xcs-wallet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.xcs-wallet-stat {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--xcs-shadow-sm);
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-wallet-stat:hover { transform: translateY(-2px); box-shadow: var(--xcs-shadow-md); }
.xcs-wallet-stat-label {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--xcs-ink-3);
}
.xcs-wallet-stat-value {
  display: flex; align-items: center; gap: 6px;
  font-size: 22px; font-weight: 800;
  color: var(--xcs-ink-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.xcs-wallet-stat.is-balance {
  background: linear-gradient(135deg, var(--xcs-yellow-soft) 0%, var(--xcs-yellow-soft) 100%);
  border-color: #F59E0B;
}
[data-theme="dark"] .xcs-wallet-stat.is-balance {
  background: linear-gradient(135deg, rgba(196,196,196,0.12) 0%, rgba(245,158,11,0.08) 100%);
  border-color: rgba(245,158,11,0.3);
}
.xcs-wallet-stat.is-balance .xcs-wallet-stat-label { color: #92400E; }
.xcs-wallet-stat.is-balance .xcs-wallet-stat-value { color: #78350F; }
[data-theme="dark"] .xcs-wallet-stat.is-balance .xcs-wallet-stat-label,
[data-theme="dark"] .xcs-wallet-stat.is-balance .xcs-wallet-stat-value { color: var(--xcs-yellow); }
.xcs-wallet-stat.is-received .xcs-wallet-stat-value { color: var(--xcs-green); }
.xcs-wallet-stat.is-spent .xcs-wallet-stat-value { color: var(--xcs-red); }

/* Filter chips */
.xcs-wallet-filters {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 4px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 12px;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-wallet-filter {
  appearance: none; border: 0;
  background: transparent; color: var(--xcs-ink-2);
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  font-family: inherit;
}
.xcs-wallet-filter:hover { background: var(--xcs-bg-3); color: var(--xcs-ink-1); }
.xcs-wallet-filter.on {
  background: var(--xcs-navy);
  color: #fff;
}
[data-theme="dark"] .xcs-wallet-filter.on { background: var(--xcs-blue); }
.xcs-wallet-filter-count {
  font-size: 11px;
  padding: 1px 8px; border-radius: 999px;
  background: var(--xcs-bg-3); color: var(--xcs-ink-3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.xcs-wallet-filter.on .xcs-wallet-filter-count {
  background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.9);
}

/* Transaction list */
.xcs-tx-list {
  display: flex; flex-direction: column;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-tx-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--xcs-line-1);
  transition: background var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-tx-row:last-child { border-bottom: 0; }
.xcs-tx-row:hover { background: var(--xcs-bg-tint); }

.xcs-tx-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.xcs-tx-body {
  flex: 1; min-width: 0;
}
.xcs-tx-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--xcs-ink-1);
  margin-bottom: 3px;
}
.xcs-tx-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--xcs-ink-3);
}
.xcs-tx-kind {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.xcs-tx-note {
  font-size: 12px;
  color: var(--xcs-ink-2);
  font-style: italic;
  margin-top: 4px;
  max-width: 460px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xcs-tx-amount-wrap {
  text-align: right;
  flex-shrink: 0;
}
.xcs-tx-amount {
  font-size: 16px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.xcs-tx-amount.is-credit { color: var(--xcs-green); }
.xcs-tx-amount.is-debit { color: var(--xcs-red); }
.xcs-tx-balance {
  font-size: 11px;
  color: var(--xcs-ink-3);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════════
 * MEET US — Gift button on cards + actions row
 * ══════════════════════════════════════════════════════════════════ */

.xcs-tcard-actions {
  display: flex; align-items: center; gap: 6px;
}

.xcs-tcard-gift {
  appearance: none; border: 0;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px;
  background: linear-gradient(135deg, var(--xcs-blue-soft) 0%, var(--xcs-blue-soft) 100%);
  color: var(--xcs-blue);
  font-size: 11px; font-weight: 700; cursor: pointer;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  font-family: inherit;
}
.xcs-tcard-gift:hover {
  background: linear-gradient(135deg, var(--xcs-blue-soft) 0%, var(--xcs-blue-fg) 100%);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.4);
}
[data-theme="dark"] .xcs-tcard-gift {
  background: rgba(0,0,0,0.15);
  color: var(--xcs-blue);
}
[data-theme="dark"] .xcs-tcard-gift:hover {
  background: rgba(0,0,0,0.25);
}

/* ══════════════════════════════════════════════════════════════════
 * ADMIN GIFT MODAL
 * ══════════════════════════════════════════════════════════════════ */

.xcs-gift-modal {
  max-width: 460px;
}

/* Target user preview at top */
.xcs-gift-target {
  margin-bottom: 16px;
}
.xcs-gift-target-label {
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--xcs-ink-3);
  margin-bottom: 6px;
}
.xcs-gift-target-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  border-radius: 10px;
}
.xcs-gift-target-info { flex: 1; min-width: 0; }
.xcs-gift-target-name {
  font-size: 14px; font-weight: 800;
  color: var(--xcs-ink-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-gift-target-sub {
  font-size: 11.5px; color: var(--xcs-ink-3);
  margin-top: 2px;
}

.xcs-gift-section {
  margin-bottom: 16px;
}
.xcs-gift-label {
  display: block;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--xcs-ink-3);
  margin-bottom: 8px;
}
.xcs-gift-label-sub {
  font-weight: 500;
  text-transform: none; letter-spacing: normal;
  color: var(--xcs-ink-4); font-size: 11px;
}

/* Amount input */
.xcs-gift-amount-input {
  display: flex; align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--xcs-bg-2);
  border: 2px solid var(--xcs-line-1);
  border-radius: 12px;
  transition: border-color var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-gift-amount-input:focus-within {
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
.xcs-gift-amount-input .xcs-coin-icon {
  font-size: 22px;
}
.xcs-gift-amount-input input {
  flex: 1;
  appearance: none; border: 0; background: transparent;
  font-size: 22px; font-weight: 800;
  color: var(--xcs-ink-1);
  font-variant-numeric: tabular-nums;
  outline: none;
  /* Hide number spinners */
  -moz-appearance: textfield;
}
.xcs-gift-amount-input input::-webkit-outer-spin-button,
.xcs-gift-amount-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.xcs-gift-amount-unit {
  font-size: 12px; font-weight: 700;
  color: var(--xcs-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Preset chips */
.xcs-gift-presets {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 10px;
}
.xcs-gift-preset {
  appearance: none; border: 1.5px solid var(--xcs-line-1);
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-2);
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.xcs-gift-preset:hover:not(:disabled) {
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
}
.xcs-gift-preset.on {
  background: var(--xcs-blue);
  border-color: var(--xcs-blue);
  color: #fff;
}
.xcs-gift-preset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Success state */
.xcs-gift-success {
  padding: 30px 24px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.xcs-gift-success-icon {
  font-size: 52px;
  line-height: 1;
  animation: xcs-gift-bounce 0.6s var(--xcs-ease-out);
}
@keyframes xcs-gift-bounce {
  0%   { transform: scale(0.4); opacity: 0; }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.xcs-gift-success h4 {
  font-size: 20px; font-weight: 800;
  color: var(--xcs-ink-1);
  margin: 0;
}
.xcs-gift-success p {
  font-size: 14px;
  color: var(--xcs-ink-2);
  margin: 0;
  line-height: 1.5;
}
.xcs-gift-success-sub {
  font-size: 12.5px !important;
  color: var(--xcs-ink-3) !important;
  margin-top: 4px !important;
}

/* Mobile */
@media (max-width: 720px) {
  .xcs-wallet-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .xcs-wallet-stat { padding: 12px 14px; }
  .xcs-wallet-stat-value { font-size: 18px; }
  .xcs-wallet-filters { gap: 4px; padding: 3px; }
  .xcs-wallet-filter { padding: 6px 10px; font-size: 12px; }
  .xcs-tx-row { padding: 12px 14px; gap: 10px; }
  .xcs-tx-icon { width: 34px; height: 34px; font-size: 15px; }
  .xcs-tx-amount { font-size: 14px; }
  .xcs-tcard-gift { padding: 3px 7px; font-size: 10px; }
}

/* ══════════════════════════════════════════════════════════════════
 * SHOP ADMIN — Item CRUD interface
 * ══════════════════════════════════════════════════════════════════ */

.xcs-shopadmin-page {
  display: flex; flex-direction: column;
  gap: 18px;
}

/* Filters bar */
.xcs-admin-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-admin-search {
  flex: 1; min-width: 260px;
  position: relative;
  display: flex; align-items: center;
}
.xcs-admin-search-icon {
  position: absolute; left: 12px;
  pointer-events: none;
}
.xcs-admin-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--xcs-line-1);
  border-radius: 8px;
  background: var(--xcs-bg-1);
  color: var(--xcs-ink-1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-admin-search input:focus {
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
.xcs-admin-filter-chips { display: flex; gap: 4px; }
.xcs-admin-chip {
  appearance: none; border: 1px solid var(--xcs-line-1);
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-2);
  padding: 7px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  font-family: inherit;
}
.xcs-admin-chip:hover {
  border-color: var(--xcs-line-2);
  color: var(--xcs-ink-1);
}
.xcs-admin-chip.on {
  background: var(--xcs-navy);
  border-color: var(--xcs-navy);
  color: #fff;
}
[data-theme="dark"] .xcs-admin-chip.on {
  background: var(--xcs-blue); border-color: var(--xcs-blue);
}
.xcs-admin-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--xcs-ink-2);
  cursor: pointer;
  user-select: none;
}
.xcs-admin-toggle input { cursor: pointer; }

/* Table */
.xcs-admin-table-wrap {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  overflow: hidden;
  overflow-x: auto;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.xcs-admin-table thead {
  background: var(--xcs-bg-tint);
}
.xcs-admin-table th {
  text-align: left;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--xcs-ink-3);
  padding: 12px 14px;
  border-bottom: 1px solid var(--xcs-line-1);
}
.xcs-admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--xcs-line-1);
  vertical-align: middle;
}
.xcs-admin-table tbody tr:last-child td { border-bottom: 0; }
.xcs-admin-table tbody tr {
  transition: background var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-admin-table tbody tr:hover { background: var(--xcs-bg-tint); }
.xcs-admin-table tbody tr.is-disabled {
  opacity: 0.55;
}
.xcs-admin-table tbody tr.is-disabled .xcs-admin-name {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.col-preview { width: 60px; }
.col-id { width: 130px; }
.col-name { min-width: 200px; }
.col-type { width: 100px; }
.col-tier { width: 110px; }
.col-price { width: 110px; text-align: right; }
.col-order { width: 70px; text-align: center; }
.col-status { width: 90px; }
.col-actions { width: 100px; text-align: right; }

.xcs-admin-preview-mini {
  display: flex; justify-content: center;
}
.xcs-admin-name { font-weight: 700; color: var(--xcs-ink-1); }
.xcs-admin-desc {
  font-size: 11.5px; color: var(--xcs-ink-3);
  margin-top: 2px;
  max-width: 280px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.xcs-admin-type-pill {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid;
}
.xcs-admin-type-frame     { background: rgba(245,158,11,0.1);  border-color: rgba(245,158,11,0.3); color: #B45309; }
.xcs-admin-type-pattern   { background: rgba(110,110,110,0.1);  border-color: rgba(110,110,110,0.3); color: #6D28D9; }
.xcs-admin-type-accessory { background: rgba(236,72,153,0.1);  border-color: rgba(236,72,153,0.3); color: #BE185D; }
[data-theme="dark"] .xcs-admin-type-frame     { color: #FBBF24; }
[data-theme="dark"] .xcs-admin-type-pattern   { color: var(--xcs-violet); }
[data-theme="dark"] .xcs-admin-type-accessory { color: #F472B6; }

.xcs-tier-badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1.5px solid;
}

.xcs-admin-status {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.04em;
}
.xcs-admin-status.is-on  { color: var(--xcs-green); }
.xcs-admin-status.is-off { color: var(--xcs-ink-4); }

.xcs-admin-act-edit,
.xcs-admin-act-delete {
  appearance: none; border: 1px solid var(--xcs-line-1);
  background: var(--xcs-bg-2);
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 4px;
  font-size: 13px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-admin-act-edit:hover  { border-color: var(--xcs-blue); transform: translateY(-1px); }
.xcs-admin-act-delete:hover { border-color: var(--xcs-red); transform: translateY(-1px); }

/* ─── Shop Item Form Modal ─────────────────────────────────────── */

.xcs-itemform-modal {
  max-width: 600px;
}
.xcs-itemform-preview {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--xcs-bg-tint);
  border-radius: 12px;
  border: 1px dashed var(--xcs-line-1);
}
.xcs-itemform-preview-label {
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--xcs-ink-3);
}
.xcs-itemform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.xcs-itemform-field {
  display: flex; flex-direction: column;
  gap: 5px;
}
.xcs-itemform-fullrow {
  grid-column: 1 / -1;
}
.xcs-itemform-field label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--xcs-ink-3);
}
.xcs-required { color: var(--xcs-red); }
.xcs-itemform-field input[type="text"],
.xcs-itemform-field input[type="number"],
.xcs-itemform-field textarea,
.xcs-itemform-field select {
  padding: 8px 12px;
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 8px;
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-itemform-field input:focus,
.xcs-itemform-field textarea:focus,
.xcs-itemform-field select:focus {
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
.xcs-itemform-field input.has-error,
.xcs-itemform-field textarea.has-error {
  border-color: var(--xcs-red);
}
.xcs-itemform-field input:disabled,
.xcs-itemform-field textarea:disabled,
.xcs-itemform-field select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.xcs-itemform-hint {
  font-size: 11px;
  color: var(--xcs-ink-3);
  font-style: italic;
}
.xcs-itemform-hint code {
  background: var(--xcs-bg-tint);
  padding: 1px 5px; border-radius: 4px;
  font-size: 10.5px;
  font-style: normal;
  color: var(--xcs-ink-2);
}
.xcs-itemform-err {
  font-size: 11px;
  color: var(--xcs-red);
  font-weight: 600;
}
.xcs-itemform-checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--xcs-ink-1);
  cursor: pointer;
}
.xcs-itemform-checkbox input { cursor: pointer; transform: scale(1.15); }

/* ══════════════════════════════════════════════════════════════════
 * DECORATED AVATAR — used in MeetUs trading cards (Turn 5)
 * Combines frame + pattern + accessory into a single visual.
 * ══════════════════════════════════════════════════════════════════ */

.xcs-davatar {
  position: relative;
  display: inline-flex;
  border-radius: 50%;
}
.xcs-davatar-inner {
  position: absolute;
  border-radius: 50%;
  display: grid; place-items: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  overflow: hidden;
}
.xcs-davatar-initials {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  z-index: 3;
  position: relative;
}
.xcs-davatar-accessory {
  position: absolute;
  top: -8px; right: -6px;
  z-index: 4;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  line-height: 1;
  pointer-events: none;
}

/* Frame styles — wraps the avatar in a colored ring */
.xcs-davatar-frame {
  background: var(--xcs-bg-3);
  border: 0;
}
.xcs-davatar-frame.frame-basic {
  background: var(--xcs-line-2);
}
.xcs-davatar-frame.frame-bronze {
  background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
  box-shadow: 0 0 0 1px rgba(205,127,50,0.4), 0 4px 12px -2px rgba(205,127,50,0.4);
}
.xcs-davatar-frame.frame-silver {
  background: linear-gradient(135deg, #E5E7EB 0%, #9CA3AF 100%);
  box-shadow: 0 0 0 1px rgba(156,163,175,0.5), 0 4px 12px -2px rgba(156,163,175,0.4);
}
.xcs-davatar-frame.frame-gold {
  background: linear-gradient(135deg, #E9E9E9 0%, #8F8F8F 100%);
  box-shadow: 0 0 0 1px rgba(217,119,6,0.5), 0 4px 16px -2px rgba(252,211,77,0.6);
}
.xcs-davatar-frame.frame-sparkle {
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 33%, #DC2626 66%, var(--xcs-blue) 100%);
  background-size: 200% 200%;
  animation: xcs-sparkle-bg 4s ease infinite;
  box-shadow: 0 0 0 1px rgba(245,158,11,0.6), 0 4px 20px -2px rgba(252,211,77,0.7);
}

/* Pattern styles — replaces solid color background of inner avatar circle */
.xcs-davatar-pattern.pattern-dots {
  background: radial-gradient(circle, var(--xcs-blue) 1.5px, transparent 1.5px);
  background-size: 7px 7px;
  background-color: var(--xcs-blue-soft);
}
.xcs-davatar-pattern.pattern-stripes {
  background: repeating-linear-gradient(45deg, var(--xcs-yellow), var(--xcs-yellow) 3px, #E9E9E9 3px, #E9E9E9 7px);
}
.xcs-davatar-pattern.pattern-gradient {
  background: linear-gradient(135deg, var(--xcs-violet) 0%, #EC4899 50%, #F59E0B 100%);
}
.xcs-davatar-pattern.pattern-galaxy {
  background:
    radial-gradient(circle at 25% 30%, #fff 0.4px, transparent 1px),
    radial-gradient(circle at 65% 60%, #fff 0.6px, transparent 1.2px),
    radial-gradient(circle at 40% 80%, #fff 0.5px, transparent 1px),
    radial-gradient(circle at 80% 25%, #fff 0.5px, transparent 1px),
    linear-gradient(135deg, #1E1B4B 0%, #581C87 50%, #BE185D 100%);
}
.xcs-davatar-pattern.pattern-aurora {
  background:
    linear-gradient(135deg, rgba(34,211,238,0.7) 0%, rgba(168,85,247,0.7) 50%, rgba(236,72,153,0.7) 100%),
    linear-gradient(45deg, #0A0A0A 0%, #222222 100%);
  background-size: 200% 200%;
  animation: xcs-aurora-bg 6s ease infinite;
}

/* When avatar has BOTH frame and pattern, pattern is on inner circle, frame outside */
/* When user has NO decorator equipped at all, fall back to simple colored circle */
.xcs-davatar:not(.xcs-davatar-frame) .xcs-davatar-inner {
  /* The inner takes full size when no frame */
  border: 2px solid rgba(255,255,255,0.15);
}

/* Mobile */
@media (max-width: 720px) {
  .xcs-admin-table { font-size: 11.5px; }
  .xcs-admin-table th, .xcs-admin-table td { padding: 8px 10px; }
  .col-id, .col-type, .col-order, .col-status { display: none; }
  .xcs-itemform-grid { grid-template-columns: 1fr; }
  .xcs-admin-table .xcs-davatar-accessory { font-size: 18px !important; top: -4px; right: -2px; }
}

/* ══════════════════════════════════════════════════════════════════
 * MOBILE HEADER POLISH — Center logo + glow + subtle pulse
 * Makes the top bar feel more premium on mobile.
 * ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .xcs-mobile-bar {
    /* CSS Grid lets us anchor the logo perfectly centered regardless of
       sibling widths (burger left, bell+new right) */
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    padding: 10px 12px !important;
    /* Subtle gradient instead of flat navy for premium feel */
    background: linear-gradient(180deg, var(--xcs-navy) 0%, #0A0A0A 100%) !important;
  }
  .xcs-mobile-bar > :first-child {
    justify-self: start;
  }
  .xcs-mobile-bar > .xcs-mobile-brand {
    justify-self: center;
    /* Center column gets just enough room for itself */
    grid-column: 2;
    /* Subtle scale pulse so the logo feels alive */
    animation: xcs-mobile-brand-pulse 6s ease-in-out infinite;
    padding: 4px 12px;
    border-radius: 999px;
    /* Soft yellow inner glow ring */
    background: radial-gradient(ellipse at center, rgba(196,196,196,0.10) 0%, transparent 70%);
  }
  .xcs-mobile-bar > .xcs-mobile-brand svg {
    height: 24px !important;
    width: auto !important;
    /* Drop shadow makes the swoop pop on dark navy */
    filter: drop-shadow(0 2px 6px rgba(196,196,196,0.4));
  }
  .xcs-mobile-bar > .xcs-mobile-brand span {
    font-size: 13.5px !important;
    letter-spacing: 0.05em;
    font-weight: 800 !important;
    /* Faint glow on text */
    text-shadow: 0 0 12px rgba(196,196,196,0.25);
  }
  .xcs-mobile-bar > :last-child:not(.xcs-acctmenu),
  .xcs-mobile-bar > .xcs-acct-btn {
    justify-self: end;
    display: flex; align-items: center; gap: 6px;
  }
  /* Menu akun adalah lapisan mengambang (position:fixed), bukan bagian dari
     grid bilah — ia menata isinya sendiri dari atas ke bawah. */
  .xcs-mobile-bar > .xcs-acctmenu { display: block; justify-self: auto; }

  /* The right-side cluster: bell + new request button */
  .xcs-mobile-bar .xcs-mobile-bell-wrap {
    display: flex; align-items: center;
  }
}

/* Pulse animation — very gentle so it doesn't feel jittery */
@keyframes xcs-mobile-brand-pulse {
  0%, 100% {
    transform: scale(1);
    background: radial-gradient(ellipse at center, rgba(196,196,196,0.08) 0%, transparent 70%);
  }
  50% {
    transform: scale(1.03);
    background: radial-gradient(ellipse at center, rgba(196,196,196,0.16) 0%, transparent 75%);
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .xcs-mobile-bar > .xcs-mobile-brand {
    animation: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * MODAL ALIASES — Turn 1-5 jsx files use shorter class names
 * (xcs-modal-f, xcs-modal-close). Map them to the same look as the
 * older xcs-modal-foot / xcs-modal-x equivalents.
 * ══════════════════════════════════════════════════════════════════ */

.xcs-modal-f {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 18px;
  background: var(--xcs-bg-tint);
  border-top: 1px solid var(--xcs-line-1);
  flex-wrap: wrap;
}

.xcs-modal-close {
  appearance: none; border: 0;
  background: var(--xcs-bg-3);
  width: 32px; height: 32px;
  border-radius: 999px;
  font-size: 18px; font-weight: 700;
  color: var(--xcs-ink-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  flex-shrink: 0;
  line-height: 1;
}
.xcs-modal-close:hover:not(:disabled) {
  background: var(--xcs-line-2);
  color: var(--xcs-ink-1);
}
.xcs-modal-close:disabled {
  opacity: 0.4; cursor: not-allowed;
}

/* Mobile: stack vertical so buttons don't overlap */
@media (max-width: 520px) {
  .xcs-modal-f {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }
  .xcs-modal-f > button {
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * PROFILE MODAL — Decorator picker section
 * ══════════════════════════════════════════════════════════════════ */

.xcs-profile-deco-hint {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  font-style: italic;
  margin: 4px 0 12px;
}

.xcs-profile-deco-row {
  margin-bottom: 14px;
}
.xcs-profile-deco-row:last-child {
  margin-bottom: 0;
}

.xcs-profile-deco-row-label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--xcs-ink-2);
  margin-bottom: 8px;
}

.xcs-profile-deco-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.xcs-profile-deco-opt {
  appearance: none;
  background: var(--xcs-bg-2);
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 10px;
  padding: 10px 8px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  gap: 5px;
  position: relative;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  font-family: inherit;
}
.xcs-profile-deco-opt:hover:not(:disabled) {
  border-color: var(--xcs-blue);
  transform: translateY(-2px);
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-profile-deco-opt.on {
  background: linear-gradient(180deg, rgba(196,196,196,0.15) 0%, rgba(196,196,196,0.05) 100%);
  border-color: var(--xcs-yellow);
  box-shadow: 0 0 0 1px var(--xcs-yellow), 0 4px 12px -4px rgba(196,196,196,0.4);
}
.xcs-profile-deco-opt:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.xcs-profile-deco-opt-name {
  font-size: 11px; font-weight: 700;
  color: var(--xcs-ink-2);
  text-align: center;
  line-height: 1.2;
}
.xcs-profile-deco-opt.on .xcs-profile-deco-opt-name {
  color: var(--xcs-ink-1);
}
.xcs-profile-deco-opt-check {
  position: absolute;
  top: 4px; right: 6px;
  width: 18px; height: 18px;
  background: var(--xcs-yellow);
  color: var(--xcs-navy);
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 900;
  box-shadow: 0 2px 6px rgba(196,196,196,0.5);
}

/* Empty state — no decorators owned */
.xcs-profile-deco-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--xcs-bg-tint);
  border: 1px dashed var(--xcs-line-1);
  border-radius: 10px;
}
.xcs-profile-deco-empty > span {
  font-size: 28px;
  line-height: 1;
}
.xcs-profile-deco-empty strong {
  display: block;
  font-size: 13.5px;
  color: var(--xcs-ink-1);
  margin-bottom: 2px;
}
.xcs-profile-deco-empty p {
  margin: 0;
  font-size: 12px;
  color: var(--xcs-ink-3);
}

/* ════════════════════════════════════════════════════════════════════════
 *
 *   GAMIFICATION POLISH LAYER
 *   Adds gradients, soft shadows, micro-interactions, and animated accents
 *   to make the gamification surface feel alive without being overwhelming.
 *
 *   All effects respect prefers-reduced-motion via @media query at end.
 *
 * ════════════════════════════════════════════════════════════════════════ */

/* ─── 1. SHOP — Premium card treatment ─────────────────────────────── */

/* Card lifts on hover with subtle 3D tilt (very small angle, not gimmicky) */
.xcs-shop-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
}
.xcs-shop-card:hover {
  transform: translateY(-4px) rotateX(2deg) rotateY(-1deg);
  box-shadow: var(--xcs-shadow-lg), 0 12px 32px -8px rgba(0,0,0,0.18);
}

/* Tier ribbons — slightly chunkier with inner highlight */
.xcs-shop-card-tier {
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 2px 5px -1px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .xcs-shop-card-tier {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.2));
  box-shadow:
    0 1px 0 rgba(255,255,255,0.1) inset,
    0 2px 5px -1px rgba(0,0,0,0.3);
}

/* Buy button — premium gradient + ripple effect on click */
.xcs-shop-btn-buy {
  background: linear-gradient(180deg, #222222 0%, #0A0A0A 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 2px 4px -1px rgba(0,0,0,0.15),
    0 0 0 0 transparent;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}
.xcs-shop-btn-buy:hover:not(:disabled) {
  background: linear-gradient(180deg, #2A2A2A 0%, #161616 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 6px 16px -4px rgba(0,0,0,0.5),
    0 0 0 4px rgba(0,0,0,0.1);
  transform: translateY(-1px) scale(1.02);
}
.xcs-shop-btn-buy:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 1px 2px rgba(0,0,0,0.2);
}
[data-theme="dark"] .xcs-shop-btn-buy {
  background: linear-gradient(180deg, var(--xcs-navy-3) 0%, var(--xcs-blue) 100%);
}
[data-theme="dark"] .xcs-shop-btn-buy:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--xcs-blue-fg) 0%, var(--xcs-blue) 100%);
}

/* Ripple effect on buy button (CSS-only via pseudo-element) */
.xcs-shop-btn-buy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 50%);
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s, opacity 0.4s;
}
.xcs-shop-btn-buy:active:not(:disabled)::before {
  transform: scale(2);
  opacity: 1;
  transition: transform 0s, opacity 0s;
}

/* Legendary cards — even more dramatic shimmer */
.xcs-shop-card.tier-legendary {
  position: relative;
  overflow: hidden;
}
.xcs-shop-card.tier-legendary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(252, 211, 77, 0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: xcs-legendary-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes xcs-legendary-shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* Epic cards — subtle glow pulse */
.xcs-shop-card.tier-epic {
  animation: xcs-epic-pulse 3s ease-in-out infinite;
}
@keyframes xcs-epic-pulse {
  0%, 100% { box-shadow: var(--xcs-shadow-sm); }
  50% { box-shadow: var(--xcs-shadow-sm), 0 0 24px -8px rgba(110,110,110,0.4); }
}

/* Price tag — embossed gold */
.xcs-shop-card-price {
  background: linear-gradient(180deg, var(--xcs-yellow-soft) 0%, var(--xcs-yellow-soft) 100%);
  padding: 4px 12px;
  border-radius: 999px;
  color: #78350F;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 1px 3px rgba(245,158,11,0.2);
  border: 1px solid rgba(245,158,11,0.25);
}
[data-theme="dark"] .xcs-shop-card-price {
  background: linear-gradient(180deg, rgba(252,211,77,0.18) 0%, rgba(245,158,11,0.12) 100%);
  color: var(--xcs-yellow);
  border-color: rgba(252,211,77,0.3);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 1px 3px rgba(0,0,0,0.2);
}

/* Shop balance hero — animated gradient like a slow sunset */
.xcs-shop-balance-hero {
  background: linear-gradient(
    135deg,
    var(--xcs-yellow-soft) 0%,
    var(--xcs-yellow-soft) 35%,
    #D6D6D6 70%,
    var(--xcs-yellow-soft) 100%
  );
  background-size: 300% 300%;
  animation: xcs-balance-shimmer 12s ease infinite;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 4px 16px -6px rgba(245,158,11,0.5),
    0 8px 24px -10px rgba(217,119,6,0.3);
  border: 1.5px solid rgba(245,158,11,0.4);
}
@keyframes xcs-balance-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
[data-theme="dark"] .xcs-shop-balance-hero {
  background: linear-gradient(
    135deg,
    rgba(252,211,77,0.12) 0%,
    rgba(245,158,11,0.18) 35%,
    rgba(252,211,77,0.10) 70%,
    rgba(245,158,11,0.15) 100%
  );
  background-size: 300% 300%;
  animation: xcs-balance-shimmer 12s ease infinite;
}

/* Coin icon — gentle floating bounce */
.xcs-coin-icon {
  display: inline-block;
  animation: xcs-coin-float 3s ease-in-out infinite;
  transform-origin: center;
}
@keyframes xcs-coin-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-2px) rotate(-3deg); }
}

/* ─── 2. WALLET — Stats card polish ──────────────────────────────────── */

.xcs-wallet-stat {
  position: relative;
  overflow: hidden;
}
.xcs-wallet-stat::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 100%; height: 100%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.04;
  pointer-events: none;
}
.xcs-wallet-stat.is-balance::before { color: #F59E0B; opacity: 0.12; }
.xcs-wallet-stat.is-received::before { color: #10B981; opacity: 0.08; }
.xcs-wallet-stat.is-spent::before { color: #EF4444; opacity: 0.08; }

.xcs-wallet-stat:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--xcs-shadow-lg);
}

/* Transaction row — slide right on hover with colored accent bar */
.xcs-tx-row {
  position: relative;
  cursor: default;
}
.xcs-tx-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(180deg, transparent, currentColor, transparent);
  transition: width var(--xcs-dur-fast) var(--xcs-ease);
  pointer-events: none;
}
.xcs-tx-row.is-credit::before { color: var(--xcs-green); }
.xcs-tx-row.is-debit::before { color: var(--xcs-red); }
.xcs-tx-row:hover {
  padding-left: 24px;
  transition: padding-left var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-tx-row:hover::before {
  width: 3px;
}

/* Transaction icon — gentle hover bounce */
.xcs-tx-icon {
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-tx-row:hover .xcs-tx-icon {
  transform: scale(1.1) rotate(-5deg);
}

/* ─── 3. MEET US — Trading card real feel ────────────────────────────── */

/* Card hover — 3D tilt + glow ring */
.xcs-tcard {
  transform-style: preserve-3d;
  perspective: 1200px;
  will-change: transform;
}
.xcs-tcard:hover {
  transform: translateY(-6px) rotateX(2deg) rotateY(-2deg);
  box-shadow:
    0 16px 40px -12px rgba(0,0,0,0.18),
    0 0 0 1px rgba(0,0,0,0.1);
}

/* Me-card glow — premium animated ring */
.xcs-tcard.is-me::after {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(
    135deg,
    var(--xcs-yellow) 0%,
    #E9E9E9 25%,
    #F59E0B 50%,
    #E9E9E9 75%,
    var(--xcs-yellow) 100%
  );
  background-size: 200% 200%;
  border-radius: inherit;
  z-index: -1;
  animation: xcs-me-card-glow 8s linear infinite;
  filter: blur(0.5px);
  opacity: 0.7;
}
@keyframes xcs-me-card-glow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Mood badge — gentle pulse */
.xcs-tcard-mood:not(.is-empty) {
  animation: xcs-mood-pulse 4s ease-in-out infinite;
}
@keyframes xcs-mood-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Stat numbers — bigger, bolder, with subtle shadow */
.xcs-tcard-stat-num {
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Avatar wrap hover — gentle scale */
.xcs-tcard:hover .xcs-davatar {
  transform: scale(1.05);
  transition: transform 0.3s var(--xcs-ease-out);
}

/* Gift button — more playful with bounce */
.xcs-tcard-gift {
  position: relative;
  overflow: hidden;
}
.xcs-tcard-gift::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.xcs-tcard-gift:hover::before { opacity: 1; }
.xcs-tcard-gift:active {
  transform: translateY(0) scale(0.95);
}

/* ─── 4. HALL OF FAME BANNER — Spotlight treatment ──────────────────── */

.xcs-hof-banner {
  background: linear-gradient(
    135deg,
    var(--xcs-yellow-soft) 0%,
    var(--xcs-yellow-soft) 50%,
    #D6D6D6 100%
  );
  background-size: 200% 200%;
  animation: xcs-hof-shimmer 10s ease infinite;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 8px 24px -6px rgba(245,158,11,0.3);
}
@keyframes xcs-hof-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Sparkle particles inside banner */
.xcs-hof-banner::before,
.xcs-hof-banner::after {
  content: '✨';
  position: absolute;
  font-size: 18px;
  opacity: 0.5;
  pointer-events: none;
  animation: xcs-sparkle-drift 6s ease-in-out infinite;
}
.xcs-hof-banner::before {
  top: 15%; left: 10%;
  animation-delay: 0s;
}
.xcs-hof-banner::after {
  bottom: 20%; right: 12%;
  animation-delay: 3s;
  font-size: 14px;
}
@keyframes xcs-sparkle-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  25% { transform: translate(8px, -4px) scale(1.15); opacity: 0.7; }
  50% { transform: translate(0, -8px) scale(1); opacity: 0.5; }
  75% { transform: translate(-6px, -4px) scale(1.1); opacity: 0.6; }
}

/* Trophy emoji bounce */
.xcs-hof-banner svg,
.xcs-hof-banner .xcs-hof-trophy {
  animation: xcs-trophy-bounce 3s ease-in-out infinite;
  display: inline-block;
  transform-origin: bottom center;
}
@keyframes xcs-trophy-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
}

/* MVP avatar in banner — gold rotating ring */
.xcs-hof-banner .xcs-avatar-sm,
.xcs-hof-banner .xcs-avatar {
  position: relative;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #F59E0B, 0 4px 12px -2px rgba(245,158,11,0.4);
}

/* ─── 5. SIDEBAR — Alive nav items ──────────────────────────────────── */

.xcs-nav-item {
  position: relative;
  overflow: hidden;
}
/* Sliding indicator bar on active */
.xcs-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: linear-gradient(180deg, var(--xcs-yellow), #F59E0B);
  border-radius: 0 3px 3px 0;
  animation: xcs-nav-indicator-in 0.3s var(--xcs-ease-out);
  box-shadow: 0 0 12px rgba(196,196,196,0.6);
}
@keyframes xcs-nav-indicator-in {
  from { transform: translateY(-50%) scaleY(0); opacity: 0; }
  to { transform: translateY(-50%) scaleY(1); opacity: 1; }
}

/* Hover highlight */
.xcs-nav-item:not(.is-active):not(.is-primary):not(.is-daily):hover::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 50%;
  background: var(--xcs-line-2);
  border-radius: 0 2px 2px 0;
  animation: xcs-nav-indicator-in 0.2s var(--xcs-ease-out);
}

/* Balance chip — coin spins gently on hover */
.xcs-balance-chip:hover .xcs-balance-icon {
  animation: xcs-coin-spin 0.5s ease-out;
}
@keyframes xcs-coin-spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

/* Balance chip — soft inner glow that breathes */
.xcs-balance-chip {
  position: relative;
  overflow: hidden;
}
.xcs-balance-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(196,196,196,0.15) 0%,
    transparent 70%
  );
  animation: xcs-balance-breathe 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes xcs-balance-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ─── 6. BUTTONS EVERYWHERE — Premium polish ─────────────────────────── */

/* Primary button — gradient + inner highlight */
.xcs-btn-primary {
  background: linear-gradient(180deg, #222222 0%, #0A0A0A 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 2px 4px -1px rgba(0,0,0,0.15);
}
.xcs-btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #2A2A2A 0%, #161616 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 6px 16px -4px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
[data-theme="dark"] .xcs-btn-primary {
  background: linear-gradient(180deg, var(--xcs-navy-3) 0%, var(--xcs-blue) 100%);
}

/* Yellow CTA button (Buat Permintaan) — golden gradient with shine */
.xcs-nav-item.is-primary {
  background: linear-gradient(180deg, #E9E9E9 0%, var(--xcs-yellow) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 2px 6px -2px rgba(245,158,11,0.4);
  position: relative;
  overflow: hidden;
}
.xcs-nav-item.is-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent 30%,
    rgba(255,255,255,0.5) 50%,
    transparent 70%
  );
  transition: left 0.5s ease;
  pointer-events: none;
}
.xcs-nav-item.is-primary:hover::after {
  left: 100%;
}
.xcs-nav-item.is-primary:hover {
  background: linear-gradient(180deg, #FEF08A 0%, #D6D6D6 100%);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.55) inset,
    0 6px 14px -3px rgba(245,158,11,0.5);
}

/* Daily (green) menu — similar treatment */
.xcs-nav-item.is-daily {
  background: linear-gradient(180deg, #34D399 0%, var(--xcs-green) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 2px 6px -2px rgba(16,185,129,0.4);
  position: relative;
  overflow: hidden;
}
.xcs-nav-item.is-daily::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent 30%,
    rgba(255,255,255,0.4) 50%,
    transparent 70%
  );
  transition: left 0.5s ease;
  pointer-events: none;
}
.xcs-nav-item.is-daily:hover::after {
  left: 100%;
}

/* ─── 7. INPUT FOCUS — Animated breathe ring ─────────────────────────── */

.xcs-itemform-field input:focus,
.xcs-itemform-field textarea:focus,
.xcs-itemform-field select:focus,
.xcs-profile-status-input:focus,
.xcs-gift-amount-input:focus-within {
  animation: xcs-focus-breathe 2s ease-in-out infinite;
}
@keyframes xcs-focus-breathe {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,0,0,0.12); }
  50% { box-shadow: 0 0 0 5px rgba(0,0,0,0.18); }
}

/* Validation error shake (use class for trigger) */
.xcs-shake {
  animation: xcs-shake-x 0.4s ease-in-out;
}
@keyframes xcs-shake-x {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ─── 8. MODAL ANIMATIONS — Spring entry ─────────────────────────────── */

.xcs-modal-backdrop {
  animation: xcs-backdrop-blur 0.3s var(--xcs-ease-out);
}
@keyframes xcs-backdrop-blur {
  /* PERF (XCS): backdrop-filter blur removed — animate only the dim background (cheap). */
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,0.5); }
}

.xcs-modal {
  animation: xcs-modal-spring 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes xcs-modal-spring {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Decorator preview in buy modal — entry flip animation */
.xcs-buy-preview-wrap .xcs-preview,
.xcs-buy-preview-wrap .xcs-davatar {
  animation: xcs-preview-flip 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}
@keyframes xcs-preview-flip {
  from {
    opacity: 0;
    transform: rotateY(180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotateY(0) scale(1);
  }
}

/* Success toast — slide up + bounce */
.xcs-shop-toast {
  animation: xcs-toast-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes xcs-toast-bounce {
  0% { transform: translate(-50%, 40px); opacity: 0; }
  60% { transform: translate(-50%, -6px); opacity: 1; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

/* ─── 9. ADMIN TABLE — Less sterile ──────────────────────────────────── */

.xcs-admin-table thead {
  background: linear-gradient(180deg, var(--xcs-bg-tint) 0%, var(--xcs-bg-2) 100%);
}
[data-theme="dark"] .xcs-admin-table thead {
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
}

.xcs-admin-table tbody tr {
  position: relative;
}
.xcs-admin-table tbody tr::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(180deg, var(--xcs-blue), var(--xcs-blue-2, var(--xcs-blue)));
  transition: width 0.2s var(--xcs-ease);
}
.xcs-admin-table tbody tr:hover {
  background: linear-gradient(90deg, var(--xcs-blue-soft) 0%, transparent 30%) !important;
}
.xcs-admin-table tbody tr:hover::before {
  width: 3px;
}

/* Tier badge — gradient depth */
.xcs-tier-badge {
  background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent);
  backdrop-filter: blur(4px);
}
[data-theme="dark"] .xcs-tier-badge {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent);
}

/* Type pills — depth */
.xcs-admin-type-pill {
  background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent) !important,
              var(--bg, transparent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ─── 10. CARDS GENERAL — Soft shadows + hover ───────────────────────── */

.xcs-stats-card,
.xcs-stat-card,
.xcs-card {
  transition:
    transform var(--xcs-dur-fast) var(--xcs-ease-out),
    box-shadow var(--xcs-dur-fast) var(--xcs-ease-out);
}
.xcs-stats-card:hover,
.xcs-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--xcs-shadow-lg);
}

/* ─── 11. NUMBER COUNTERS — Tabular numerics consistent ──────────────── */
.xcs-wallet-stat-value,
.xcs-shop-balance-value,
.xcs-tx-amount,
.xcs-tx-balance,
.xcs-balance-amount,
.xcs-coin-amount {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ─── 12. SOFT-DELETE STRIKETHROUGH STYLE ────────────────────────────── */
.xcs-admin-table tr.is-disabled {
  position: relative;
}
.xcs-admin-table tr.is-disabled td {
  color: var(--xcs-ink-4);
}

/* ─── REDUCED MOTION — disable all animations ────────────────────────── */
@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;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * CONTENT BANK — Dedicated page for browsing by category
 * ══════════════════════════════════════════════════════════════════ */

.xcs-cbank-page {
  display: flex; flex-direction: column;
  gap: 24px;
}

/* Top totals — 3 type quick-filter cards */
.xcs-cbank-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.xcs-cbank-total-card {
  appearance: none; border: 1.5px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-cbank-total-card:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--xcs-shadow-lg);
}
.xcs-cbank-total-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
[data-theme="dark"] .xcs-cbank-total-card {
  background: var(--dark-bg) !important;
}
.xcs-cbank-total-emoji {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  animation: xcs-cbank-emoji-float 4s ease-in-out infinite;
}
@keyframes xcs-cbank-emoji-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-4deg); }
}
.xcs-cbank-total-card:nth-child(2) .xcs-cbank-total-emoji {
  animation-delay: 1.3s;
}
.xcs-cbank-total-card:nth-child(3) .xcs-cbank-total-emoji {
  animation-delay: 2.6s;
}
.xcs-cbank-total-text {
  flex: 1; min-width: 0;
}
.xcs-cbank-total-num {
  font-size: 30px; font-weight: 800;
  color: var(--xcs-ink-1);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.xcs-cbank-total-label {
  font-size: 12px; font-weight: 700;
  color: var(--xcs-ink-2);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Section — group of categories */
.xcs-cbank-section {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-cbank-section-h {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--xcs-line-1);
}
.xcs-cbank-section-emoji {
  font-size: 24px; line-height: 1;
  flex-shrink: 0;
  align-self: center;
}
.xcs-cbank-section-h h2 {
  font-size: 18px; font-weight: 800;
  color: var(--xcs-ink-1);
  margin: 0;
  flex: 1;
}
.xcs-cbank-section-count {
  font-size: 12px; font-weight: 700;
  color: var(--xcs-ink-3);
  background: var(--xcs-bg-tint);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Chip grid */
.xcs-cbank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.xcs-cbank-chip {
  appearance: none;
  background: var(--xcs-bg-1);
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  position: relative;
  overflow: hidden;
}
.xcs-cbank-chip::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cat-color, var(--xcs-blue));
  opacity: 0.6;
  transition: opacity var(--xcs-dur-fast) var(--xcs-ease),
              width var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-cbank-chip:hover:not(:disabled) {
  transform: translateY(-2px) translateX(2px);
  border-color: var(--cat-color, var(--xcs-blue));
  box-shadow: 0 6px 16px -6px var(--cat-color, rgba(0,0,0,0.3));
}
.xcs-cbank-chip:hover:not(:disabled)::before {
  width: 6px;
  opacity: 1;
}
.xcs-cbank-chip.is-empty {
  opacity: 0.55;
  cursor: not-allowed;
}
.xcs-cbank-chip.is-empty::before {
  opacity: 0.2;
}
.xcs-cbank-chip-dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--xcs-bg-1), 0 0 0 3px var(--cat-color);
}
.xcs-cbank-chip-label {
  flex: 1;
  font-size: 13px; font-weight: 700;
  color: var(--xcs-ink-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcs-cbank-chip-count {
  font-size: 12px; font-weight: 800;
  color: var(--xcs-ink-2);
  background: var(--xcs-bg-tint);
  padding: 3px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  min-width: 24px;
  text-align: center;
}
.xcs-cbank-chip:hover:not(:disabled) .xcs-cbank-chip-count {
  background: var(--cat-color);
  color: #fff;
}

/* Empty state — no content at all */
.xcs-cbank-empty {
  padding: 60px 24px;
  text-align: center;
  background: var(--xcs-bg-2);
  border: 1px dashed var(--xcs-line-1);
  border-radius: 14px;
}
.xcs-cbank-empty > span {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}
.xcs-cbank-empty h3 {
  font-size: 18px; font-weight: 800;
  color: var(--xcs-ink-1);
  margin: 0 0 8px;
}
.xcs-cbank-empty p {
  font-size: 14px;
  color: var(--xcs-ink-3);
  margin: 0;
}

/* ─── Clickable brand/logo ─────────────────────────────────────────── */

.xcs-brand-clickable {
  appearance: none; border: 0;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 0;
  margin: 0;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: opacity var(--xcs-dur-fast) var(--xcs-ease),
              transform var(--xcs-dur-fast) var(--xcs-ease);
  border-radius: 8px;
}
.xcs-brand-clickable:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.xcs-brand-clickable:active {
  transform: translateY(0);
}
.xcs-brand-clickable:focus-visible {
  outline: 2px solid var(--xcs-yellow);
  outline-offset: 4px;
}

/* Mobile: chip grid tighter columns */
@media (max-width: 720px) {
  .xcs-cbank-totals {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .xcs-cbank-total-card { padding: 14px 16px; gap: 12px; }
  .xcs-cbank-total-emoji { font-size: 28px; }
  .xcs-cbank-total-num { font-size: 22px; }

  .xcs-cbank-section { padding: 14px; }
  .xcs-cbank-section-h h2 { font-size: 16px; }
  .xcs-cbank-section-emoji { font-size: 20px; }

  .xcs-cbank-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .xcs-cbank-chip { padding: 10px 12px; }
}

/* ══════════════════════════════════════════════════════════════════
 * MOBILE BRAND BUTTON — Clickable logo in mobile header, goes to Dashboard
 * Keeps the existing centered + pulse styling, just makes it interactive.
 * ══════════════════════════════════════════════════════════════════ */
.xcs-mobile-brand-clickable {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  /* Inherit existing xcs-mobile-brand styles for layout/colors */
  background: transparent;
  /* Subtle interactive feedback */
  transition: opacity var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-mobile-brand-clickable:active {
  opacity: 0.7;
  transform: scale(0.97);
}
.xcs-mobile-brand-clickable:focus-visible {
  outline: 2px solid var(--xcs-yellow);
  outline-offset: 4px;
  border-radius: 999px;
}
/* On tablet+ (where mobile bar might still show on smaller laptops) */
@media (hover: hover) {
  .xcs-mobile-brand-clickable:hover {
    opacity: 0.85;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * READABILITY HOTFIX — Force user names to be readable in dark mode.
 * Placed at end of file with high specificity to override any prior rules.
 * ══════════════════════════════════════════════════════════════════ */

/* Dashboard activity feed — user names in dark mode */
[data-theme="dark"] .xcs-feed-line strong,
[data-theme="dark"] .xcs-feed-item strong {
  color: #FFFFFF !important;
}

/* Light mode keeps the navy color for that legacy on-brand look */
[data-theme="light"] .xcs-feed-line strong,
[data-theme="light"] .xcs-feed-item strong,
:root:not([data-theme="dark"]) .xcs-feed-line strong,
:root:not([data-theme="dark"]) .xcs-feed-item strong {
  color: var(--xcs-navy) !important;
}

/* OS-level dark mode (when user hasn't picked a theme manually) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .xcs-feed-line strong,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .xcs-feed-item strong {
    color: #FFFFFF !important;
  }
}

/* Also: feed body text should be readable */
[data-theme="dark"] .xcs-feed-line {
  color: var(--xcs-ink-2) !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .xcs-feed-line {
    color: var(--xcs-ink-2) !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * APRESIASI GROUP — Collapsible parent in sidebar
 * ══════════════════════════════════════════════════════════════════ */

.xcs-nav-group {
  margin-top: 6px;
  margin-bottom: 6px;
}

.xcs-nav-group-header {
  appearance: none; border: 0;
  background: transparent;
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 10.5px; font-weight: 800;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-nav-group-header:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.03);
}

.xcs-nav-group.has-active-child .xcs-nav-group-header {
  color: var(--xcs-yellow);
  background: rgba(196,196,196,0.08);
}

.xcs-nav-group-emoji {
  font-size: 13px;
  line-height: 1;
}

.xcs-nav-group-label {
  flex: 1;
  text-align: left;
}

.xcs-nav-group-chevron {
  flex-shrink: 0;
  transition: transform 0.25s var(--xcs-ease-out);
  opacity: 0.7;
}
.xcs-nav-group.is-open .xcs-nav-group-chevron {
  transform: rotate(0deg);
}
.xcs-nav-group:not(.is-open) .xcs-nav-group-chevron {
  transform: rotate(-90deg);
}

.xcs-nav-group-body {
  display: flex; flex-direction: column;
  gap: 2px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(196,196,196,0.15);
  animation: xcs-group-expand 0.22s var(--xcs-ease-out);
}
@keyframes xcs-group-expand {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Child nav items — slightly smaller, indented */
.xcs-nav-child {
  font-size: 13px !important;
  padding: 7px 12px !important;
  gap: 10px !important;
}
.xcs-nav-child svg {
  width: 16px !important; height: 16px !important;
}

/* Special accent for shop child */
.xcs-nav-child.is-shop.is-active {
  background: linear-gradient(90deg, rgba(196,196,196,0.18), rgba(196,196,196,0.05));
  color: var(--xcs-yellow);
}
.xcs-nav-child.is-wallet.is-active {
  background: linear-gradient(90deg, rgba(0,0,0,0.18), rgba(0,0,0,0.05));
  color: var(--xcs-blue);
}
.xcs-nav-child.is-shopadmin.is-active {
  background: linear-gradient(90deg, rgba(110,110,110,0.18), rgba(110,110,110,0.05));
  color: var(--xcs-violet);
}

/* ══════════════════════════════════════════════════════════════════
 * EXPORT PDF MODAL — Date range picker
 * ══════════════════════════════════════════════════════════════════ */

.xcs-export-modal {
  max-width: 500px;
}

.xcs-export-presets {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.xcs-export-presets button {
  appearance: none; border: 1.5px solid var(--xcs-line-1);
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-2);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-export-presets button:hover {
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
  background: var(--xcs-blue-soft);
}

.xcs-export-dates {
  display: flex; align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.xcs-export-date-field {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 6px;
}
.xcs-export-date-field label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--xcs-ink-3);
}
.xcs-export-date-field input {
  padding: 10px 12px;
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 8px;
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-export-date-field input:focus {
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
.xcs-export-date-arrow {
  padding-bottom: 12px;
  color: var(--xcs-ink-3);
  font-size: 18px;
  font-weight: 700;
}

.xcs-export-preview {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--xcs-bg-tint);
  border-radius: 10px;
  border: 1px dashed var(--xcs-line-1);
  margin-top: 12px;
  font-size: 13px;
  color: var(--xcs-ink-2);
}
.xcs-export-preview-num {
  font-size: 22px; font-weight: 800;
  color: var(--xcs-blue);
  font-variant-numeric: tabular-nums;
}

/* Mobile */
@media (max-width: 520px) {
  .xcs-export-dates {
    flex-direction: column;
    align-items: stretch;
  }
  .xcs-export-date-arrow {
    text-align: center;
    padding: 0;
    transform: rotate(90deg);
  }
}

/* ══════════════════════════════════════════════════════════════════
 * WHATSAPP — Button on trading card + input hint in profile modal
 * ══════════════════════════════════════════════════════════════════ */

/* WhatsApp button at bottom of trading card */
.xcs-tcard-wa {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  margin: 10px 12px 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #25D366 0%, #1FAD55 100%);
  color: #fff;
  font-size: 12px; font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 4px 12px -2px rgba(37,211,102,0.4);
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  letter-spacing: 0.02em;
}
.xcs-tcard-wa:hover {
  background: linear-gradient(180deg, #2EDF73 0%, #25C260 100%);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 8px 20px -4px rgba(37,211,102,0.55);
}
.xcs-tcard-wa:active {
  transform: translateY(0);
}
.xcs-tcard-wa svg {
  flex-shrink: 0;
}

/* Subtle pulse to draw attention */
.xcs-tcard-wa::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(37,211,102,0.4), transparent 70%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
}
.xcs-tcard:hover .xcs-tcard-wa::before {
  opacity: 1;
}

/* Position relative on card so the ::before can position absolute */
.xcs-tcard-wa {
  position: relative;
}

/* ─── WhatsApp input section in EditProfileModal ────────────────── */

.xcs-profile-wa-hint {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  margin-top: 6px;
  line-height: 1.5;
}

.xcs-profile-wa-preview {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(37,211,102,0.08);
  border: 1px dashed rgba(37,211,102,0.3);
  border-radius: 8px;
  font-size: 11.5px;
}

.xcs-profile-wa-test {
  color: #1FAD55 !important;
  font-weight: 700;
  text-decoration: none;
}
.xcs-profile-wa-test:hover {
  text-decoration: underline;
}
[data-theme="dark"] .xcs-profile-wa-preview {
  background: rgba(37,211,102,0.15);
  border-color: rgba(37,211,102,0.4);
}
[data-theme="dark"] .xcs-profile-wa-test {
  color: #4ADE80 !important;
}

/* Make tel input non-resizable (override textarea default) */
input.xcs-profile-status-input[type="tel"] {
  min-height: 0;
  resize: none;
  height: auto;
}

/* Mobile — button stays comfortable size */
@media (max-width: 720px) {
  .xcs-tcard-wa {
    margin: 8px 10px 0;
    padding: 8px 12px;
    font-size: 11.5px;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * MEET US — Search bar + Empty state
 * ══════════════════════════════════════════════════════════════════ */

.xcs-meetus-search {
  margin-bottom: 16px;
  display: flex; flex-direction: column;
  gap: 8px;
}

.xcs-meetus-search-input {
  position: relative;
  display: flex; align-items: center;
  background: var(--xcs-bg-2);
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 0 14px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  box-shadow: var(--xcs-shadow-sm);
}

.xcs-meetus-search-input:focus-within {
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.12);
}

.xcs-meetus-search-input svg {
  color: var(--xcs-ink-3);
  flex-shrink: 0;
}

.xcs-meetus-search-input input {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 12px 12px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--xcs-ink-1);
  outline: none;
}

.xcs-meetus-search-input input::placeholder {
  color: var(--xcs-ink-3);
}

/* Hide native search clear button (use our own) */
.xcs-meetus-search-input input::-webkit-search-cancel-button,
.xcs-meetus-search-input input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.xcs-meetus-search-clear {
  appearance: none;
  border: 0;
  background: var(--xcs-bg-3);
  color: var(--xcs-ink-2);
  width: 24px; height: 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px; font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  display: grid; place-items: center;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-meetus-search-clear:hover {
  background: var(--xcs-red);
  color: #fff;
  transform: scale(1.05);
}

.xcs-meetus-search-result {
  font-size: 12.5px;
  color: var(--xcs-ink-3);
  padding-left: 14px;
}

.xcs-meetus-search-result strong {
  color: var(--xcs-ink-1);
  font-weight: 700;
}

/* Empty state — when search has no results */
.xcs-meetus-empty {
  padding: 60px 24px;
  text-align: center;
  background: var(--xcs-bg-2);
  border: 1px dashed var(--xcs-line-1);
  border-radius: 14px;
  margin-top: 16px;
}

.xcs-meetus-empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.6;
  animation: xcs-search-bounce 2s ease-in-out infinite;
}

@keyframes xcs-search-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.xcs-meetus-empty h3 {
  font-size: 16px; font-weight: 800;
  color: var(--xcs-ink-1);
  margin: 0 0 8px;
}

.xcs-meetus-empty p {
  font-size: 13px;
  color: var(--xcs-ink-3);
  margin: 0 auto 16px;
  max-width: 360px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════
 * MEET US — 3-column mobile layout (roomy compact)
 * Replaces older 2-column rule. Cards stay readable.
 * ══════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .xcs-meetus-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .xcs-tcard {
    padding: 10px 8px 10px !important;
    min-height: auto !important;
    gap: 6px;
    border-radius: 12px;
  }
  .xcs-tcard-top { margin-bottom: 2px; }
  .xcs-tcard-role {
    font-size: 11px;
    padding: 2px 5px;
    letter-spacing: 0.04em;
  }
  .xcs-tcard-actions { gap: 3px; }
  /* Hide gift/edit text labels — icon only */
  .xcs-tcard-gift span:last-child,
  .xcs-tcard-edit span:last-child {
    display: none;
  }
  .xcs-tcard-gift,
  .xcs-tcard-edit {
    padding: 4px 6px;
    font-size: 11px;
    gap: 0;
    border-radius: 8px;
  }
  .xcs-tcard-avatar-wrap { padding: 6px 0 4px; }
  .xcs-tcard .xcs-davatar,
  .xcs-tcard-avatar {
    width: 60px !important;
    height: 60px !important;
  }
  .xcs-tcard .xcs-davatar-accessory {
    font-size: 18px !important;
    top: -5px; right: -3px;
  }
  .xcs-tcard .xcs-davatar-initials {
    font-size: 22px !important;
  }
  .xcs-tcard-name {
    font-size: 12.5px !important;
    line-height: 1.2;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }
  .xcs-tcard-dept {
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Mood — emoji + tiny label */
  .xcs-tcard-mood {
    padding: 3px 8px;
    gap: 4px;
    border-radius: 999px;
  }
  .xcs-tcard-mood-emoji { font-size: 13px; }
  .xcs-tcard-mood-label {
    font-size: 11px;
    letter-spacing: 0.02em;
  }
  .xcs-tcard-status {
    font-size: 10.5px;
    line-height: 1.35;
    margin: 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .xcs-tcard-stats {
    gap: 6px;
    padding-top: 6px;
    margin-top: 2px;
  }
  .xcs-tcard-stat-n {
    font-size: 13.5px !important;
    line-height: 1.1;
  }
  .xcs-tcard-stat-l {
    font-size: 11px;
    letter-spacing: 0.03em;
  }
  /* WhatsApp button — icon + small text */
  .xcs-tcard-wa {
    margin: 6px 4px 0 !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    gap: 4px;
    font-size: 10.5px !important;
    justify-content: center;
  }
  .xcs-tcard-wa svg {
    width: 14px; height: 14px;
  }
  /* Keep "Chat" text but shorten via wrapping */
  .xcs-tcard-wa span {
    font-size: 10px;
    letter-spacing: 0;
  }
}

/* Very small phones (< 360px) — fall back to 2 columns for breathing room */
@media (max-width: 359px) {
  .xcs-meetus-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .xcs-davatar,
  .xcs-tcard-avatar {
    width: 70px !important;
    height: 70px !important;
  }
  .xcs-tcard-name { font-size: 14px !important; }
  .xcs-tcard-mood-label { display: inline; }
}

/* ══════════════════════════════════════════════════════════════════
 * AVATAR PHOTO — DecoratedAvatar with photo support
 * ══════════════════════════════════════════════════════════════════ */

.xcs-davatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.xcs-davatar.has-photo .xcs-davatar-inner {
  overflow: hidden;
}

/* Hide pattern overlay when photo is loaded */
.xcs-davatar.has-photo .xcs-davatar-pattern::before,
.xcs-davatar.has-photo .xcs-davatar-pattern::after {
  display: none;
}

/* ══════════════════════════════════════════════════════════════════
 * EDIT MODAL — Avatar URL section
 * ══════════════════════════════════════════════════════════════════ */

.xcs-avatar-edit-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 6px;
}

.xcs-avatar-edit-preview {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--xcs-line-1);
  box-shadow: var(--xcs-shadow-sm);
  background: var(--xcs-bg-3);
}

.xcs-avatar-edit-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xcs-avatar-edit-fallback {
  display: grid; place-items: center;
  width: 100%;
  height: 100%;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}

.xcs-avatar-edit-error-badge {
  position: absolute;
  bottom: 0; right: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--xcs-red);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: grid; place-items: center;
  border: 2px solid var(--xcs-bg-2);
}

.xcs-avatar-edit-input-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xcs-avatar-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.xcs-avatar-edit-help-btn,
.xcs-avatar-edit-clear-btn {
  appearance: none;
  background: var(--xcs-bg-3);
  border: 1px solid var(--xcs-line-1);
  color: var(--xcs-ink-2);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-avatar-edit-help-btn:hover {
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
}

.xcs-avatar-edit-clear-btn:hover {
  border-color: var(--xcs-red);
  color: var(--xcs-red);
}

.xcs-avatar-edit-warning {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--xcs-red);
  line-height: 1.4;
}

.xcs-avatar-edit-tutorial {
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--xcs-ink-2);
  line-height: 1.55;
  animation: xcs-tutorial-slide 0.25s var(--xcs-ease-out);
}

@keyframes xcs-tutorial-slide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.xcs-avatar-edit-tutorial strong {
  display: block;
  font-size: 13px;
  color: var(--xcs-ink-1);
  margin-bottom: 8px;
}

.xcs-avatar-edit-tutorial ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.xcs-avatar-edit-tutorial ol li {
  margin-bottom: 4px;
}

.xcs-avatar-edit-tutorial code {
  background: var(--xcs-bg-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  color: var(--xcs-blue-fg);
}

.xcs-avatar-edit-tutorial a {
  color: var(--xcs-blue);
  font-weight: 600;
}

.xcs-avatar-edit-tutorial-alt {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--xcs-line-1);
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════
 * WHATSAPP BUTTON — "Belum ada nomor" variant (red)
 * ══════════════════════════════════════════════════════════════════ */

.xcs-tcard-wa-empty {
  appearance: none;
  border: 0;
  font-family: inherit;
  background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%) !important;
  color: #fff !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 4px 12px -2px rgba(239,68,68,0.35) !important;
}

.xcs-tcard-wa-empty:hover {
  background: linear-gradient(180deg, #F87171 0%, #EF4444 100%) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 8px 20px -4px rgba(239,68,68,0.5) !important;
}

/* For own card: red button = call-to-action to fill in number */
.xcs-tcard-wa-empty[title*="Klik"] {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 4px 12px -2px rgba(245,158,11,0.35) !important;
}

.xcs-tcard-wa-empty[title*="Klik"]:hover {
  background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 100%) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 8px 20px -4px rgba(245,158,11,0.5) !important;
}

/* ══════════════════════════════════════════════════════════════════
 * TOAST — Floating notification when clicking "Belum ada nomor"
 * ══════════════════════════════════════════════════════════════════ */

.xcs-wa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 14px 14px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-left: 4px solid var(--xcs-red);
  border-radius: 12px;
  box-shadow: var(--xcs-shadow-pop);
  max-width: 90vw;
  min-width: 280px;
  animation: xcs-toast-slide 0.3s var(--xcs-ease-out);
  cursor: pointer;
}

@keyframes xcs-toast-slide {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.xcs-wa-toast-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(239,68,68,0.12);
  color: var(--xcs-red);
  display: grid;
  place-items: center;
}

.xcs-wa-toast-body {
  flex: 1;
  font-size: 13px;
  color: var(--xcs-ink-1);
  line-height: 1.4;
}

.xcs-wa-toast-body strong {
  font-weight: 700;
  color: var(--xcs-ink-1);
}

.xcs-wa-toast-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--xcs-ink-3);
}

/* ══════════════════════════════════════════════════════════════════
 * MOBILE TEXT OVERLAP FIX — 3 column stats overflow
 * ══════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
  /* Stats container — allow proper shrinking, no overflow */
  .xcs-tcard-stats {
    overflow: hidden;
    flex-wrap: nowrap;
  }
  .xcs-tcard-stat {
    min-width: 0;
    overflow: hidden;
  }
  .xcs-tcard-stat-n {
    font-size: 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }
  /* 7,5px tidak terbaca siapa pun. Label dinaikkan ke ambang terkecil yang
     masih sah (11px) dan yang kepanjangan dipotong dengan elipsis, bukan
     dikecilkan sampai hilang. */
  .xcs-tcard-stat-l {
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Hide "Rate" stat completely on mobile 3-column (too tight) */
  .xcs-tcard-stat:nth-child(3) {
    display: none;
  }
}

/* Avatar must respect card boundaries — no overflow outside */
@media (max-width: 720px) {
  .xcs-tcard {
    overflow: hidden;
  }
  .xcs-tcard-avatar-wrap,
  .xcs-davatar-wrap {
    max-width: 100%;
  }
  /* Name wrapping — break-word for long names like "Cecilia margareta" */
  .xcs-tcard-name {
    word-break: break-word;
    hyphens: auto;
  }
}

/* Avatar edit row stacks vertically on small screens */
@media (max-width: 520px) {
  .xcs-avatar-edit-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .xcs-avatar-edit-input-col {
    width: 100%;
  }
  .xcs-avatar-edit-actions {
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * IMGUR TUTORIAL — Enhanced guided onboarding
 * ══════════════════════════════════════════════════════════════════ */

/* Header with emoji */
.xcs-tutorial-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--xcs-ink-1);
  margin-bottom: 12px;
}

.xcs-tutorial-h-emoji {
  font-size: 22px;
  line-height: 1;
}

.xcs-tutorial-h strong {
  display: inline;
  font-size: 13.5px;
  margin: 0;
}

/* Prominent CTA button */
.xcs-tutorial-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #84CF1F 0%, #5BAA08 100%);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 14px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 4px 12px -2px rgba(91,170,8,0.4);
}

.xcs-tutorial-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 8px 20px -4px rgba(91,170,8,0.55);
}

.xcs-tutorial-cta:active {
  transform: translateY(0);
}

.xcs-tutorial-cta svg {
  flex-shrink: 0;
}

/* Numbered steps */
.xcs-tutorial-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xcs-tutorial-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--xcs-ink-2);
}

.xcs-tutorial-step-n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--xcs-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.xcs-tutorial-steps strong {
  color: var(--xcs-ink-1);
  font-weight: 700;
  display: inline;
  margin: 0;
}

.xcs-tutorial-steps code {
  background: var(--xcs-bg-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  color: var(--xcs-blue-fg);
  word-break: break-all;
}

/* Dark mode adjustments */
[data-theme="dark"] .xcs-tutorial-cta {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 4px 12px -2px rgba(91,170,8,0.5);
}

[data-theme="dark"] .xcs-tutorial-steps code {
  color: var(--xcs-blue-fg);
}

/* ══════════════════════════════════════════════════════════════════
 * MODAL OVERFLOW FIX — Footer always visible, body scrollable
 * ══════════════════════════════════════════════════════════════════ */

/* Backdrop allows scroll when modal exceeds viewport (mobile safety) */
.xcs-modal-backdrop {
  overflow-y: auto !important;
  align-items: flex-start !important;
  padding: 20px !important;
}

/* Modal constrained to viewport height, content scrolls internally */
.xcs-modal {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex !important;
  flex-direction: column;
  overflow: visible !important;  /* allow shadow/footer to render */
  margin: auto;  /* center within scrollable backdrop */
}

/* Modal header stays at top, doesn't shrink */
.xcs-modal-h,
.xcs-modal-head {
  flex-shrink: 0;
}

/* Modal body scrolls if content too tall */
.xcs-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;  /* allow flex child to actually shrink */
  -webkit-overflow-scrolling: touch;  /* smooth scroll on iOS */
}

/* Modal footer always pinned at bottom, with shadow indicator that
   there's scrollable content above */
.xcs-modal-f,
.xcs-modal-foot {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 -8px 16px -8px rgba(0,0,0,0.1);
}

[data-theme="dark"] .xcs-modal-f,
[data-theme="dark"] .xcs-modal-foot {
  box-shadow: 0 -8px 16px -8px rgba(0,0,0,0.3);
}

/* Custom scrollbar in modal body for desktop */
.xcs-modal-body::-webkit-scrollbar {
  width: 8px;
}
.xcs-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.xcs-modal-body::-webkit-scrollbar-thumb {
  background: var(--xcs-line-1);
  border-radius: 999px;
}
.xcs-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--xcs-line-2);
}

/* Mobile: smaller padding so modal fits better */
@media (max-width: 520px) {
  .xcs-modal-backdrop {
    padding: 10px !important;
  }
  .xcs-modal {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
}

/* ══════════════════════════════════════════════════════════════════
 * TUTORIAL HIGHLIGHT — Emphasize correct button name
 * ══════════════════════════════════════════════════════════════════ */

.xcs-tutorial-highlight {
  background: linear-gradient(180deg, transparent 60%, var(--xcs-yellow) 60%);
  padding: 0 4px;
  font-weight: 800 !important;
  color: var(--xcs-ink-1) !important;
  display: inline;
  border-radius: 2px;
}

[data-theme="dark"] .xcs-tutorial-highlight {
  background: linear-gradient(180deg, transparent 60%, rgba(196,196,196,0.5) 60%);
  color: var(--xcs-yellow) !important;
}

/* Warning box — red variant (existing) + info variant (yellow/blue) */
.xcs-tutorial-warning {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-left: 3px solid var(--xcs-red);
  border-radius: 8px;
  font-size: 12px;
  color: var(--xcs-ink-2);
  line-height: 1.5;
}

.xcs-tutorial-warning strong {
  color: var(--xcs-red);
  font-weight: 700;
}

[data-theme="dark"] .xcs-tutorial-warning {
  background: rgba(239,68,68,0.12);
}

[data-theme="dark"] .xcs-tutorial-warning strong {
  color: #FCA5A5;
}

/* Info variant — for "this is an album URL" hint */
.xcs-warning-info {
  background: rgba(0,0,0,0.08) !important;
  border-color: rgba(0,0,0,0.25) !important;
  border-left-color: var(--xcs-blue) !important;
  color: var(--xcs-ink-2) !important;
}

.xcs-warning-info strong {
  color: var(--xcs-blue) !important;
}

[data-theme="dark"] .xcs-warning-info {
  background: rgba(0,0,0,0.15) !important;
}

[data-theme="dark"] .xcs-warning-info strong {
  color: var(--xcs-blue-fg) !important;
}

/* ══════════════════════════════════════════════════════════════════
 * AVATAR MOBILE FIX — Inner element overrides inline React size styles
 * Without this, inline width/height from JSX (84px) win over CSS (60px),
 * causing inner photo/initials to overflow card.
 * ══════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
  /* Force inner to match outer size in mobile — JSX inline styles must lose */
  .xcs-tcard .xcs-davatar-inner {
    width: 60px !important;
    height: 60px !important;
    top: 0 !important;
    left: 0 !important;
    /* Center the inner element absolutely */
    position: absolute !important;
    inset: 0 !important;
    margin: auto !important;
  }
  /* When frame is present, leave 4px gap for the frame ring */
  .xcs-tcard .xcs-davatar-frame .xcs-davatar-inner {
    width: 52px !important;
    height: 52px !important;
    top: 4px !important;
    left: 4px !important;
    inset: 4px !important;
  }
  /* Initials font scales with the smaller inner — inline 0.36×size = 30px would
     leak; force to 22px which matches the visual hierarchy of card-mini */
  .xcs-tcard .xcs-davatar-initials {
    font-size: 22px !important;
    line-height: 1 !important;
  }
  /* Make sure outer keeps its size and the wrap is properly centered */
  .xcs-tcard-avatar-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }
  /* Ensure photo img fits perfectly inside */
  .xcs-tcard .xcs-davatar-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
  }
}

/* Very small phones — 2 columns, larger avatar */
@media (max-width: 359px) {
  .xcs-tcard .xcs-davatar-inner {
    width: 70px !important;
    height: 70px !important;
  }
  .xcs-tcard .xcs-davatar-frame .xcs-davatar-inner {
    width: 62px !important;
    height: 62px !important;
  }
  .xcs-tcard .xcs-davatar-initials {
    font-size: 26px !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * MOBILE CARD FIX — Avatar centering + name spacing
 * Targets the actual variables now set inline via React.
 * ══════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
  /* Override the CSS variable that DecoratedAvatar uses for sizing */
  .xcs-tcard .xcs-davatar {
    --davatar-size: 60px !important;
    width: 60px !important;
    height: 60px !important;
    /* Ensure no extra margin pushing it off-center */
    margin: 0 auto !important;
  }

  /* Force avatar wrapper to fully center horizontally */
  .xcs-tcard-avatar-wrap {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 0 6px !important;
  }

  /* Add breathing room between avatar and name */
  .xcs-tcard-name {
    margin-top: 10px !important;
    padding: 0 4px;
    text-align: center !important;
  }

  /* Dept text — same alignment */
  .xcs-tcard-dept {
    margin-top: 2px;
    text-align: center !important;
  }

  /* Make sure mood badge centers */
  .xcs-tcard-mood {
    align-self: center;
    margin: 6px auto 2px;
  }

  /* Status text also center */
  .xcs-tcard-status {
    text-align: center;
    margin: 4px 0 2px;
  }
}

/* Very small phones — adjust the CSS var too */
@media (max-width: 359px) {
  .xcs-tcard .xcs-davatar {
    --davatar-size: 70px !important;
    width: 70px !important;
    height: 70px !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 *
 *  ★ EXPANDED SHOP CATALOG ITEMS ★
 *  Frames, Patterns, Accessories, and Backgrounds.
 *
 * ════════════════════════════════════════════════════════════════════════ */

/* ─── NEW FRAMES ──────────────────────────────────────────────────────── */

.xcs-davatar-frame.frame-copper,
.xcs-preview-frame.frame-copper {
  background: linear-gradient(135deg, #B87333 0%, #884E16 50%, #B87333 100%);
  box-shadow:
    0 0 0 1px rgba(184,115,51,0.5),
    inset 0 1px 0 rgba(255,200,150,0.4),
    0 4px 10px -2px rgba(184,115,51,0.45);
}

.xcs-davatar-frame.frame-diamond,
.xcs-preview-frame.frame-diamond {
  background: linear-gradient(135deg, var(--xcs-bg-tint) 0%, var(--xcs-blue-soft) 25%, #FFFFFF 50%, var(--xcs-blue-soft) 75%, var(--xcs-bg-tint) 100%);
  background-size: 200% 200%;
  animation: xcs-diamond-shimmer 3s ease infinite;
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.8),
    0 4px 14px -2px rgba(255,255,255,0.5);
}
@keyframes xcs-diamond-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.xcs-davatar-frame.frame-rainbow,
.xcs-preview-frame.frame-rainbow {
  background: linear-gradient(135deg,
    #FF6B6B 0%, #FFD93D 20%, #6BCB77 40%,
    #4D96FF 60%, #9B72CF 80%, #FF6B6B 100%);
  background-size: 200% 200%;
  animation: xcs-rainbow-flow 4s linear infinite;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.1),
    inset 0 0 0 1px rgba(255,255,255,0.5),
    0 4px 14px -2px rgba(155,114,207,0.45);
}
@keyframes xcs-rainbow-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.xcs-davatar-frame.frame-royal,
.xcs-preview-frame.frame-royal {
  background:
    radial-gradient(circle at 30% 30%, var(--xcs-yellow-soft) 0%, transparent 30%),
    linear-gradient(135deg, #8B4513 0%, #DAA520 25%, #FFD700 50%, #DAA520 75%, #8B4513 100%);
  background-size: 200% 200%, 100% 100%;
  animation: xcs-royal-shine 5s ease infinite;
  box-shadow:
    0 0 0 1.5px #8B4513,
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 0 16px rgba(255,215,0,0.4),
    0 4px 14px -2px rgba(139,69,19,0.5);
}
.xcs-davatar-frame.frame-royal::before,
.xcs-preview-frame.frame-royal::before {
  content: '👑';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  z-index: 10;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
@keyframes xcs-royal-shine {
  0%, 100% { background-position: 0% 50%, 0 0; }
  50% { background-position: 100% 50%, 0 0; }
}

/* ─── NEW PATTERNS ────────────────────────────────────────────────────── */

.xcs-davatar-pattern.pattern-music,
.xcs-preview-pattern.pattern-music {
  background:
    radial-gradient(circle 2px at 20% 30%, #fff 0, #fff 100%, transparent 0),
    radial-gradient(circle 2px at 70% 60%, #fff 0, #fff 100%, transparent 0),
    radial-gradient(circle 2px at 40% 80%, #fff 0, #fff 100%, transparent 0),
    linear-gradient(135deg, var(--xcs-blue) 0%, var(--xcs-violet) 100%);
}
.xcs-davatar-pattern.pattern-music::before,
.xcs-preview-pattern.pattern-music::before {
  content: '♪ ♫ ♪';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  letter-spacing: 4px;
  pointer-events: none;
}

.xcs-davatar-pattern.pattern-checker,
.xcs-preview-pattern.pattern-checker {
  background:
    repeating-conic-gradient(var(--xcs-navy) 0deg 90deg, var(--xcs-yellow) 90deg 180deg) 0 0 / 16px 16px;
}

/* ─── BACKGROUND THEMES (full card) ───────────────────────────────────── */

/* Base — all backgrounds share these layout rules */
.xcs-tcard.xcs-tcard-bg,
.xcs-tcard.xcs-tcard-bg-image {
  color: #fff;
  position: relative;
  isolation: isolate;
  border: 0;
}

/* Add a subtle dark overlay on bg cards so text stays legible */
.xcs-tcard.xcs-tcard-bg::after,
.xcs-tcard.xcs-tcard-bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

/* Text on themed cards — white-on-bg with shadow */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-name,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-name,
.xcs-tcard.xcs-tcard-bg .xcs-tcard-stat-n,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stat-n {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5), 0 0 8px rgba(0,0,0,0.3);
}
.xcs-tcard.xcs-tcard-bg .xcs-tcard-dept,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-dept,
.xcs-tcard.xcs-tcard-bg .xcs-tcard-stat-l,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stat-l,
.xcs-tcard.xcs-tcard-bg .xcs-tcard-status,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status {
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.xcs-tcard.xcs-tcard-bg .xcs-tcard-role,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-role {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

/* Make children render above the overlay */
.xcs-tcard.xcs-tcard-bg > *,
.xcs-tcard.xcs-tcard-bg-image > * {
  position: relative;
  z-index: 1;
}

/* Image-backed background */
.xcs-tcard-bg-image {
  background-image: var(--card-bg-image);
  background-size: cover;
  background-position: center;
}

/* 1. Forest — hutan misty hijau */
.xcs-tcard-bg-forest {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(167,243,208,0.3) 0%, transparent 50%),
    linear-gradient(180deg, #14532D 0%, #166534 35%, #15803D 70%, #1E3A2D 100%);
}
.xcs-tcard-bg-forest::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 1.5px at 12% 30%, rgba(220,252,231,0.6) 0, transparent 100%),
    radial-gradient(circle 1.5px at 78% 70%, rgba(220,252,231,0.5) 0, transparent 100%),
    radial-gradient(circle 1px at 50% 50%, rgba(220,252,231,0.4) 0, transparent 100%);
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

/* 2. Winter — salju turun */
.xcs-tcard-bg-winter {
  background: linear-gradient(180deg, var(--xcs-blue-soft) 0%, var(--xcs-blue-soft) 40%, var(--xcs-blue-fg) 100%);
  overflow: hidden;
}
.xcs-tcard-bg-winter::before {
  content: '❄ ❅ ❆ ❄ ❅';
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
  justify-content: space-around;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  padding: 12px;
  pointer-events: none;
  z-index: 0;
  animation: xcs-snow-fall 8s linear infinite;
  letter-spacing: 18px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
}
@keyframes xcs-snow-fall {
  0% { transform: translateY(-15px); opacity: 0.6; }
  100% { transform: translateY(15px); opacity: 0.8; }
}
/* Winter cards get DARK text since bg is light */
.xcs-tcard.xcs-tcard-bg-winter::after { display: none; }
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-name,
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-stat-n {
  color: var(--xcs-navy) !important;
  text-shadow: 0 1px 2px rgba(255,255,255,0.7);
}
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-dept,
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-stat-l,
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-status {
  color: var(--xcs-navy-2) !important;
}
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-role {
  background: rgba(255,255,255,0.7) !important;
  color: var(--xcs-navy) !important;
  border: 1px solid rgba(30,58,138,0.2) !important;
}

/* 3. Ocean — laut biru dalam */
.xcs-tcard-bg-ocean {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(125,211,252,0.3) 0%, transparent 50%),
    linear-gradient(180deg, #0C4A6E 0%, #075985 30%, #0369A1 60%, #0E7490 100%);
}
.xcs-tcard-bg-ocean::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 30px,
      rgba(125,211,252,0.08) 30px,
      rgba(125,211,252,0.08) 32px);
  pointer-events: none;
  z-index: 0;
}

/* 4. Sunset — pantai sunset */
.xcs-tcard-bg-sunset {
  background: linear-gradient(180deg, #F59E0B 0%, #FB923C 25%, #F97316 50%, #DC2626 75%, #7F1D1D 100%);
}
.xcs-tcard-bg-sunset::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background:
    radial-gradient(ellipse at 50% 0%, #FED7AA 0%, transparent 50%),
    linear-gradient(180deg, transparent 0%, rgba(127,29,29,0.4) 100%);
  pointer-events: none;
  z-index: 0;
}

/* 5. Volcanic — gunung berapi lava */
.xcs-tcard-bg-volcanic {
  background:
    radial-gradient(ellipse at 50% 100%, #DC2626 0%, transparent 50%),
    linear-gradient(180deg, #18181B 0%, #44403C 25%, #78350F 60%, #B91C1C 90%, #D6D6D6 100%);
}
.xcs-tcard-bg-volcanic::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 2px at 30% 70%, rgba(252,211,77,0.9), transparent 100%),
    radial-gradient(circle 1.5px at 60% 80%, rgba(252,165,42,0.8), transparent 100%),
    radial-gradient(circle 1px at 80% 60%, rgba(252,211,77,0.7), transparent 100%);
  pointer-events: none;
  z-index: 0;
  animation: xcs-ember-rise 3s ease-in-out infinite;
}
@keyframes xcs-ember-rise {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* 6. Aurora — aurora borealis */
.xcs-tcard-bg-aurora {
  background:
    linear-gradient(135deg,
      #0A0A0A 0%,
      #222222 20%,
      #134E4A 40%,
      #14532D 55%,
      #134E4A 70%,
      var(--xcs-navy-2) 85%,
      #1E1B4B 100%);
  background-size: 200% 200%;
  animation: xcs-aurora-flow 8s ease infinite;
}
@keyframes xcs-aurora-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.xcs-tcard-bg-aurora::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(74,222,128,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(160,160,160,0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* 7. Cyberpunk — neon kota futuristic */
.xcs-tcard-bg-cyberpunk {
  background:
    linear-gradient(180deg, #1E1B4B 0%, #4C1D95 40%, #831843 100%);
}
.xcs-tcard-bg-cyberpunk::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49%, rgba(236,72,153,0.5) 50%, transparent 51%),
    repeating-linear-gradient(0deg, transparent 0, transparent 18px, rgba(34,211,238,0.2) 18px, rgba(34,211,238,0.2) 20px);
  pointer-events: none;
  z-index: 0;
  animation: xcs-neon-flicker 2s ease-in-out infinite;
}
@keyframes xcs-neon-flicker {
  0%, 100% { opacity: 0.8; }
  47% { opacity: 0.85; }
  48% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
.xcs-tcard-bg-cyberpunk::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.3) 100%) !important;
}

/* ─── BACKGROUND PREVIEWS in shop & inventory ─────────────────────────── */

.xcs-preview-bg-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.xcs-preview-bg-card.xcs-preview-bg-image {
  background-image: var(--card-bg-image);
  background-size: cover;
  background-position: center;
}

.xcs-preview-bg-card .xcs-preview-bg-emoji {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* Reuse the .xcs-tcard-bg-* classes for the preview cards */
.xcs-preview-bg-card.xcs-tcard-bg-forest,
.xcs-preview-bg-card.xcs-tcard-bg-winter,
.xcs-preview-bg-card.xcs-tcard-bg-ocean,
.xcs-preview-bg-card.xcs-tcard-bg-sunset,
.xcs-preview-bg-card.xcs-tcard-bg-volcanic,
.xcs-preview-bg-card.xcs-tcard-bg-aurora,
.xcs-preview-bg-card.xcs-tcard-bg-cyberpunk {
  /* Inherits the gradient via the class itself */
}

/* Make sure preview shows decorations (snow, embers) at scale */
.xcs-preview-bg-card .xcs-tcard-bg-winter::before { font-size: 10px; padding: 6px; letter-spacing: 10px; }

/* ════════════════════════════════════════════════════════════════════════
 * USER DETAIL PAGE — Standalone full-page profile (opened via #user=ID)
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-userdetail-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  display: flex; flex-direction: column;
  gap: 24px;
}

/* Top bar */
.xcs-userdetail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xcs-userdetail-back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  color: var(--xcs-ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-userdetail-back:hover {
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
  transform: translateX(-2px);
}

.xcs-userdetail-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--xcs-blue);
}

/* Hero section */
.xcs-userdetail-hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--xcs-shadow-md);
  position: relative;
  overflow: hidden;
}

/* Subtle yellow glow accent on hero */
.xcs-userdetail-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(196,196,196,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.xcs-userdetail-hero-avatar {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.xcs-userdetail-hero-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xcs-userdetail-name {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.xcs-userdetail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--xcs-ink-2);
}
.xcs-userdetail-role {
  color: var(--xcs-blue);
  font-weight: 700;
}
.xcs-userdetail-dept {
  color: var(--xcs-ink-3);
}
.xcs-userdetail-dot {
  color: var(--xcs-ink-4);
  font-weight: 400;
}

/* Mood badge - bigger */
.xcs-userdetail-mood {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1.5px solid;
  align-self: flex-start;
  margin-top: 4px;
}
.xcs-userdetail-mood-emoji {
  font-size: 18px;
  line-height: 1;
}

/* Status quote */
.xcs-userdetail-status {
  margin: 12px 0 0;
  padding: 14px 18px;
  background: var(--xcs-bg-tint);
  border-left: 3px solid var(--xcs-yellow);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  font-size: 15px;
  color: var(--xcs-ink-1);
  line-height: 1.5;
  position: relative;
}
.xcs-userdetail-quote {
  font-size: 28px;
  font-weight: 800;
  color: var(--xcs-yellow);
  vertical-align: -10px;
  margin-right: 4px;
  line-height: 0;
}
.xcs-userdetail-status-meta {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 11px;
  color: var(--xcs-ink-3);
}
.xcs-userdetail-status-empty {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--xcs-line-1);
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--xcs-ink-4);
  font-style: italic;
}

/* Actions */
.xcs-userdetail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.xcs-userdetail-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #25D366 0%, #1FAD55 100%);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 4px 12px -2px rgba(37,211,102,0.4);
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-userdetail-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 8px 20px -4px rgba(37,211,102,0.55);
}

.xcs-userdetail-wa-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--xcs-bg-tint);
  border: 1px dashed var(--xcs-line-1);
  color: var(--xcs-ink-3);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-style: italic;
}

/* Stats grid */
.xcs-userdetail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.xcs-userdetail-stat-card {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--xcs-shadow-sm);
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-userdetail-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--xcs-shadow-md);
}

.xcs-userdetail-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.xcs-userdetail-stat-body {
  flex: 1;
  min-width: 0;
}

.xcs-userdetail-stat-n {
  font-size: 26px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.xcs-userdetail-stat-l {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Section blocks */
.xcs-userdetail-section {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--xcs-shadow-sm);
}

.xcs-userdetail-section-h {
  margin-bottom: 16px;
}
.xcs-userdetail-section-h h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--xcs-ink-1);
}
.xcs-userdetail-section-h p {
  margin: 0;
  font-size: 13px;
  color: var(--xcs-ink-3);
}

/* Activity list */
.xcs-userdetail-activity {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xcs-userdetail-activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}
.xcs-userdetail-activity-item:hover {
  background: var(--xcs-bg-tint);
  transform: translateX(2px);
}

.xcs-userdetail-activity-type {
  font-size: 22px;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--xcs-bg-tint);
  display: grid;
  place-items: center;
}

.xcs-userdetail-activity-body {
  flex: 1;
  min-width: 0;
}

.xcs-userdetail-activity-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--xcs-ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.xcs-userdetail-activity-meta {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.xcs-userdetail-activity-role.role-submitter {
  color: var(--xcs-blue);
  font-weight: 700;
}
.xcs-userdetail-activity-role.role-editor {
  color: var(--xcs-violet);
  font-weight: 700;
}

.xcs-userdetail-activity-dot {
  color: var(--xcs-ink-4);
}

.xcs-userdetail-activity-status {
  background: var(--xcs-bg-3);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* Empty state */
.xcs-userdetail-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--xcs-ink-3);
}
.xcs-userdetail-empty p {
  margin: 12px 0 0;
  font-size: 14px;
}

/* Not found */
.xcs-userdetail-notfound {
  margin: 80px auto;
  max-width: 400px;
  text-align: center;
  padding: 40px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 16px;
}
.xcs-userdetail-notfound h2 {
  margin: 16px 0 8px;
  color: var(--xcs-ink-1);
}
.xcs-userdetail-notfound p {
  color: var(--xcs-ink-3);
  margin-bottom: 24px;
}
.xcs-userdetail-notfound code {
  background: var(--xcs-bg-3);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

/* Footer */
.xcs-userdetail-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  font-size: 12px;
  color: var(--xcs-ink-4);
  text-align: center;
  border-top: 1px solid var(--xcs-line-1);
  margin-top: 12px;
}
.xcs-userdetail-footer code {
  background: var(--xcs-bg-tint);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.xcs-userdetail-footer a {
  color: var(--xcs-blue);
  text-decoration: none;
}
.xcs-userdetail-footer a:hover {
  text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 720px) {
  .xcs-userdetail-page {
    padding: 16px 12px 60px;
    gap: 16px;
  }
  .xcs-userdetail-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    gap: 20px;
  }
  .xcs-userdetail-hero-avatar .xcs-davatar {
    --davatar-size: 100px !important;
    width: 100px !important;
    height: 100px !important;
  }
  .xcs-userdetail-name {
    font-size: 24px;
  }
  .xcs-userdetail-meta,
  .xcs-userdetail-actions {
    justify-content: center;
  }
  .xcs-userdetail-mood {
    align-self: center;
  }
  .xcs-userdetail-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .xcs-userdetail-stat-card {
    padding: 14px;
    gap: 10px;
  }
  .xcs-userdetail-stat-icon {
    width: 36px; height: 36px; font-size: 18px;
  }
  .xcs-userdetail-stat-n {
    font-size: 20px;
  }
  .xcs-userdetail-section {
    padding: 16px;
  }
  .xcs-userdetail-section-h h2 {
    font-size: 16px;
  }
  .xcs-userdetail-status {
    font-size: 14px;
    padding: 12px 14px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * SHOP BUY BUTTON HOTFIX — Ensure button is clickable
 * Some pseudo-elements / animations were intercepting clicks.
 * ════════════════════════════════════════════════════════════════════════ */

/* Force all decorative pseudo-elements to NOT block clicks */
.xcs-shop-card::before,
.xcs-shop-card::after,
.xcs-shop-card.tier-legendary::before,
.xcs-shop-card.tier-legendary::after,
.xcs-shop-card.tier-epic::before,
.xcs-shop-card.tier-epic::after,
.xcs-shop-card.is-owned::before,
.xcs-shop-card.is-owned::after,
.xcs-shop-card.is-equipped::before,
.xcs-shop-card.is-equipped::after {
  pointer-events: none !important;
}

/* Boost button stacking so it's always on top */
.xcs-shop-card .xcs-shop-btn-buy,
.xcs-shop-card .xcs-shop-btn-owned {
  position: relative;
  z-index: 5 !important;
  pointer-events: auto !important;
}

.xcs-shop-card-footer {
  position: relative;
  z-index: 3;
}

/* Remove 3D tilt on touch devices where it can cause misalignment */
@media (hover: none) {
  .xcs-shop-card:hover {
    transform: translateY(-3px) !important;  /* no rotate, simpler */
  }
}

/* Ensure preview area doesn't trap clicks */
.xcs-shop-card-preview,
.xcs-shop-card-preview .xcs-preview {
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════════
 * BACKGROUND THEME CARDS — Readability Polish
 * Make text contrast properly + ensure stats visible even on dark themes
 * ════════════════════════════════════════════════════════════════════════ */

/* Stronger contrast for stats on themed cards */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-stat-n,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stat-n {
  color: #FFFFFF !important;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.6),
    0 0 12px rgba(0,0,0,0.4),
    0 0 4px rgba(0,0,0,0.5) !important;
  font-weight: 800 !important;
}

.xcs-tcard.xcs-tcard-bg .xcs-tcard-stat-l,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stat-l {
  color: rgba(255,255,255,0.92) !important;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.6),
    0 0 8px rgba(0,0,0,0.4) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

/* Stronger stats border line on themed cards */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-stats,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stats {
  border-top: 1px solid rgba(255,255,255,0.25) !important;
  padding-top: 10px !important;
}

/* Status text on themed cards — better readability */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-status,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status {
  color: #FFFFFF !important;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.7),
    0 0 10px rgba(0,0,0,0.5) !important;
  font-weight: 500 !important;
  opacity: 0.95 !important;
}

/* Status update time meta */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-status-meta,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status-meta {
  color: rgba(255,255,255,0.75) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6) !important;
}

/* Quote marks more visible */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-quote,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-quote {
  color: rgba(255,255,255,0.6) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Mood badge on themed cards — frosted glass effect */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-mood,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-mood {
  background: rgba(255,255,255,0.18) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3) !important;
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.xcs-tcard.xcs-tcard-bg .xcs-tcard-mood-label,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-mood-label {
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

/* Role badge on themed cards — stronger glass */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-role,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-role {
  background: rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Edit/Gift action buttons on themed cards */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-edit,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-edit {
  background: rgba(196,196,196,0.95) !important;
  color: var(--xcs-navy) !important;
  border: 1px solid rgba(196,196,196,0.4) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.xcs-tcard.xcs-tcard-bg .xcs-tcard-gift,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-gift {
  background: rgba(255,255,255,0.95) !important;
  color: var(--xcs-navy) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Name text — stronger shadow on themed cards */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-name,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-name {
  color: #FFFFFF !important;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.7),
    0 0 16px rgba(0,0,0,0.4) !important;
  font-weight: 800 !important;
}

/* Dept text on themed cards */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-dept,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-dept {
  color: rgba(255,255,255,0.9) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important;
  font-weight: 700 !important;
}

/* WhatsApp buttons on themed cards — boost contrast */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-wa,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-wa,
.xcs-tcard.xcs-tcard-bg .xcs-tcard-wa-empty,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-wa-empty {
  box-shadow:
    0 2px 8px rgba(0,0,0,0.4),
    0 4px 16px -4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * MOBILE CARD CONSISTENCY — Ensure all cards same height, all elements visible
 * ════════════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
  /* Force consistent height — all cards align in grid row */
  .xcs-tcard {
    min-height: 280px !important;
    height: auto !important;
  }

  /* For themed cards in mobile, slightly tighter for snug fit */
  .xcs-tcard.xcs-tcard-bg,
  .xcs-tcard.xcs-tcard-bg-image {
    min-height: 280px !important;
  }

  /* Stats area must be visible — never cut off */
  .xcs-tcard-stats {
    margin-top: auto !important;
    padding: 8px 0 6px !important;
    border-top-width: 1px;
  }

  /* WhatsApp button always visible at card bottom */
  .xcs-tcard-wa,
  .xcs-tcard-wa-empty {
    margin: 6px 6px 0 !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * RED "BELUM ADA NOMOR" BUTTON — Stronger visibility
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-tcard-wa-empty {
  position: relative;
  overflow: hidden;
}

/* Pulse animation to draw attention to red button */
.xcs-tcard-wa-empty::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  opacity: 0;
  animation: xcs-wa-empty-pulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes xcs-wa-empty-pulse {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 0.4; transform: scale(1); }
}

/* Orange "Tambah nomor WA" — friendlier */
.xcs-tcard-wa-empty[title*="Klik"] {
  position: relative;
  overflow: hidden;
}

/* Hover lift */
.xcs-tcard-wa-empty:hover {
  transform: translateY(-1px);
}

/* ════════════════════════════════════════════════════════════════════════
 * TEXT READABILITY ON THEMED CARDS v2 — Simple solid pills, no backdrop-filter
 * Approach: solid semi-transparent backgrounds with padding directly
 * on block elements. NO backdrop-filter (broke text rendering in v1).
 * ════════════════════════════════════════════════════════════════════════ */

/* Name — semi-transparent black bg, full width respected */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-name,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-name {
  background-color: rgba(0,0,0,0.5);
  padding: 5px 12px;
  border-radius: 8px;
  margin: 6px 12px 0;
  border: 1px solid rgba(255,255,255,0.18);
  color: #FFFFFF !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  /* Don't constrain — let text be visible naturally */
  display: block;
  text-align: center;
}

/* Dept */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-dept,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-dept {
  background-color: rgba(0,0,0,0.4);
  padding: 3px 10px;
  border-radius: 6px;
  margin: 4px 24px 0;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  display: block;
  text-align: center;
}

/* Status section wrapper — give the entire status area a unified bg */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-status,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status {
  background-color: rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 10px 8px !important;
  margin: 8px 10px 0;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Status text — already inside status wrapper, just make it readable */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-status-text,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status-text {
  color: #FFFFFF !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  font-style: italic;
}

/* Status time */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-status-time,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status-time {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Hide decorative quote on themed cards (status wrapper has its own bg now) */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-quote,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-quote {
  display: none !important;
}

/* Empty status */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-status-empty,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status-empty {
  color: rgba(255,255,255,0.7) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

/* Stats wrapper — solid glass-look background */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-stats,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stats {
  background-color: rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 10px 8px !important;
  margin: 8px 10px 0;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-top: 1px solid rgba(255,255,255,0.18) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Stats text */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-stat-n,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stat-n {
  color: #FFFFFF !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.xcs-tcard.xcs-tcard-bg .xcs-tcard-stat-l,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stat-l {
  color: rgba(255,255,255,0.88) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

/* Role badge */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-role,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-role {
  background-color: rgba(0,0,0,0.5) !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Mood badge */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-mood,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-mood {
  background-color: rgba(0,0,0,0.4) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.xcs-tcard.xcs-tcard-bg .xcs-tcard-mood-label,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-mood-label {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Action buttons */
.xcs-tcard.xcs-tcard-bg .xcs-tcard-edit,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-edit {
  background: rgba(196,196,196,0.95) !important;
  color: var(--xcs-navy) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.xcs-tcard.xcs-tcard-bg .xcs-tcard-gift,
.xcs-tcard.xcs-tcard-bg-image .xcs-tcard-gift {
  background: rgba(255,255,255,0.95) !important;
  color: var(--xcs-navy) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ─── Winter theme special — light bg needs DARK text/pills ─────────── */

.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-name,
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-dept,
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-status,
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-stats {
  background-color: rgba(255,255,255,0.85) !important;
  border-color: rgba(30,58,138,0.2) !important;
}

.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-name {
  color: #0A0A0A !important;
  text-shadow: none !important;
}

.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-dept {
  color: var(--xcs-navy) !important;
  text-shadow: none !important;
}

.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-status-text,
.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-status-time {
  color: var(--xcs-navy) !important;
  text-shadow: none !important;
}

.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-stat-n {
  color: #0A0A0A !important;
  text-shadow: none !important;
}

.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-stat-l {
  color: var(--xcs-navy) !important;
  text-shadow: none !important;
}

.xcs-tcard.xcs-tcard-bg-winter .xcs-tcard-role {
  background-color: rgba(255,255,255,0.85) !important;
  color: var(--xcs-navy) !important;
  border-color: rgba(30,58,138,0.2) !important;
}

/* Mobile — adjust margins on themed cards */
@media (max-width: 720px) {
  .xcs-tcard.xcs-tcard-bg .xcs-tcard-name,
  .xcs-tcard.xcs-tcard-bg-image .xcs-tcard-name {
    margin: 4px 6px 0;
    padding: 3px 8px;
    font-size: 12.5px !important;
  }
  .xcs-tcard.xcs-tcard-bg .xcs-tcard-dept,
  .xcs-tcard.xcs-tcard-bg-image .xcs-tcard-dept {
    margin: 3px 16px 0;
    padding: 2px 6px;
    font-size: 9px !important;
  }
  .xcs-tcard.xcs-tcard-bg .xcs-tcard-status,
  .xcs-tcard.xcs-tcard-bg-image .xcs-tcard-status {
    margin: 6px 6px 0;
    padding: 6px !important;
  }
  .xcs-tcard.xcs-tcard-bg .xcs-tcard-stats,
  .xcs-tcard.xcs-tcard-bg-image .xcs-tcard-stats {
    margin: 6px 6px 0;
    padding: 6px !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * COMMENTS / FORUM — Inline discussion thread per request
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-comments {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: var(--xcs-shadow-sm);
}

.xcs-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--xcs-line-1);
}

.xcs-comments-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--xcs-ink-1);
}

.xcs-comments-count {
  font-size: 11px;
  color: var(--xcs-ink-3);
  background: var(--xcs-bg-tint);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}

/* Empty + loading */
.xcs-comments-loading,
.xcs-comments-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--xcs-ink-3);
  font-size: 13px;
}

.xcs-comments-empty {
  background: var(--xcs-bg-tint);
  border-radius: 10px;
  border: 1px dashed var(--xcs-line-1);
}

.xcs-comments-empty-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 10px;
}

.xcs-comments-empty p {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--xcs-ink-2);
}

.xcs-comments-empty small {
  font-size: 11.5px;
  color: var(--xcs-ink-4);
}

/* Comments list */
.xcs-comments-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.xcs-comment {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--xcs-bg-tint);
  transition: background var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-comment.is-own {
  background: rgba(196,196,196,0.06);
  border-left: 3px solid var(--xcs-yellow);
}

.xcs-comment-avatar {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-comment-avatar:hover {
  transform: scale(1.08);
}

.xcs-comment-body {
  flex: 1;
  min-width: 0;
}

.xcs-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11.5px;
  flex-wrap: wrap;
}

.xcs-comment-author {
  font-weight: 800;
  color: var(--xcs-ink-1);
  font-size: 13px;
}

.xcs-comment-time {
  color: var(--xcs-ink-3);
  font-weight: 500;
}

.xcs-comment-edited {
  color: var(--xcs-ink-4);
  font-size: 10.5px;
  font-style: italic;
}

.xcs-comment-text {
  color: var(--xcs-ink-1);
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.xcs-comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.xcs-comment-action {
  appearance: none;
  background: none;
  border: 0;
  color: var(--xcs-ink-3);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  padding: 0;
  letter-spacing: 0.02em;
  transition: color var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-comment-action:hover {
  color: var(--xcs-blue);
}

.xcs-comment-action-danger:hover {
  color: var(--xcs-red);
}

/* Mention badges in comment text */
.xcs-mention-badge {
  display: inline;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  border: 1px solid;
  margin: 0 1px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-mention-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Edit inline */
.xcs-comment-edit {
  margin-bottom: 4px;
}

.xcs-comment-textarea {
  width: 100%;
  border: 1px solid var(--xcs-line-1);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
  resize: vertical;
  min-height: 60px;
}

.xcs-comment-textarea:focus {
  outline: none;
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

.xcs-comment-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* Compose box */
.xcs-comments-compose {
  border-top: 1px solid var(--xcs-line-1);
  padding-top: 16px;
}

.xcs-comments-compose-wrap {
  position: relative;
}

.xcs-comments-textarea {
  width: 100%;
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
  resize: vertical;
  min-height: 70px;
  transition: border-color var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-comments-textarea:focus {
  outline: none;
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

.xcs-comments-textarea::placeholder {
  color: var(--xcs-ink-4);
}

.xcs-comments-compose-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.xcs-comments-error {
  color: var(--xcs-red);
  font-size: 12px;
  font-weight: 600;
  flex: 1;
}

.xcs-comments-compose-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--xcs-ink-4);
  margin-right: auto;
}

.xcs-comments-kbd {
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

/* Mention autocomplete dropdown */
.xcs-mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 14px;
  margin-bottom: 6px;
  min-width: 240px;
  max-width: 320px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 10px;
  box-shadow: var(--xcs-shadow-lg);
  list-style: none;
  padding: 4px;
  margin-left: 0;
  margin-right: 0;
  z-index: 10;
  max-height: 280px;
  overflow-y: auto;
}

.xcs-mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-mention-item.is-active,
.xcs-mention-item:hover {
  background: var(--xcs-bg-tint);
}

.xcs-mention-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.xcs-mention-name {
  font-weight: 700;
  color: var(--xcs-ink-1);
  font-size: 13px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xcs-mention-dept {
  font-size: 10.5px;
  color: var(--xcs-ink-3);
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 720px) {
  .xcs-comments {
    padding: 14px;
    border-radius: 12px;
  }
  .xcs-comment {
    padding: 10px;
    gap: 8px;
  }
  .xcs-comment-text {
    font-size: 13.5px;
  }
  .xcs-comments-textarea {
    font-size: 14px;
    padding: 10px 12px;
  }
  .xcs-comments-compose-hint {
    flex: 1;
    flex-wrap: wrap;
  }
  .xcs-mention-dropdown {
    left: 0;
    right: 0;
    min-width: 0;
    max-width: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * FORUM — Balai Desa standalone page
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-forum-page {
  max-width: 740px;
  margin: 0 auto;
  padding: 4px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header */
.xcs-forum-header {
  text-align: center;
  padding: 0 0 8px;
}

.xcs-forum-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--xcs-blue);
  margin-bottom: 6px;
}

.xcs-forum-title {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  letter-spacing: -0.02em;
}

.xcs-forum-title span {
  display: inline-block;
  margin-left: 4px;
  animation: xcs-bounce 2s ease-in-out infinite;
}

@keyframes xcs-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.xcs-forum-sub {
  margin: 0;
  font-size: 14px;
  color: var(--xcs-ink-3);
}

/* Composer */
.xcs-forum-composer {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--xcs-shadow-md);
  position: relative;
}

.xcs-forum-composer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.xcs-forum-composer-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--xcs-ink-1);
}

.xcs-forum-composer-tip {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
}

.xcs-forum-composer-tip code {
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--xcs-blue);
}

/* Image preview */
.xcs-forum-image-preview {
  margin-top: 12px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  max-height: 320px;
}

.xcs-forum-image-preview img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.xcs-forum-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  display: grid;
  place-items: center;
}

.xcs-forum-image-remove:hover {
  background: rgba(0,0,0,0.85);
}

/* Composer bar */
.xcs-forum-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.xcs-forum-composer-tools {
  display: flex;
  gap: 8px;
}

.xcs-forum-image-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  color: var(--xcs-ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-forum-image-btn:hover {
  background: var(--xcs-bg-3);
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
}

.xcs-forum-composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.xcs-forum-charcount {
  font-size: 11px;
  color: var(--xcs-ink-4);
  font-variant-numeric: tabular-nums;
}

/* Feed empty + loading */
.xcs-forum-loading,
.xcs-forum-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--xcs-ink-3);
}

.xcs-forum-empty h3 {
  margin: 12px 0 4px;
  color: var(--xcs-ink-2);
  font-size: 16px;
}

.xcs-forum-empty p {
  margin: 0;
  font-size: 13px;
}

/* Feed list */
.xcs-forum-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.xcs-forum-post {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 16px;
  padding: 18px 18px 12px;
  box-shadow: var(--xcs-shadow-sm);
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-forum-post:hover {
  box-shadow: var(--xcs-shadow-md);
}

.xcs-forum-post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.xcs-forum-post-avatar {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
  /* Container is exactly 42px — child .xcs-davatar should not overflow */
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

/* Scope forum avatar decoration sizes — keep proportional for small 42px size */
.xcs-forum-post-avatar .xcs-davatar {
  width: 42px !important;
  height: 42px !important;
  --davatar-size: 42px !important;
}
.xcs-forum-post-avatar .xcs-davatar-accessory {
  font-size: 14px !important;
  top: -3px !important;
  right: -2px !important;
}

/* Similar for comment avatars (28px) */
.xcs-forum-comment-avatar .xcs-davatar {
  width: 28px !important;
  height: 28px !important;
  --davatar-size: 28px !important;
}
.xcs-forum-comment-avatar .xcs-davatar-accessory {
  font-size: 11px !important;
  top: -2px !important;
  right: -1px !important;
}

.xcs-forum-post-avatar:hover {
  transform: scale(1.06);
}

.xcs-forum-post-meta {
  flex: 1;
  min-width: 0;
}

.xcs-forum-post-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 14px;
  color: var(--xcs-ink-1);
}

.xcs-forum-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--xcs-bg-tint);
  color: var(--xcs-ink-3);
  border: 1px solid var(--xcs-line-1);
}

.xcs-forum-badge-admin {
  background: rgba(196,196,196,0.15);
  color: #B45309;
  border-color: rgba(196,196,196,0.4);
}

.xcs-forum-post-time {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  margin-top: 2px;
}

.xcs-forum-post-edited {
  font-style: italic;
  color: var(--xcs-ink-4);
}

.xcs-forum-post-dept {
  color: var(--xcs-ink-4);
}

.xcs-forum-post-delete {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-forum-post-delete:hover {
  opacity: 1;
  background: rgba(239,68,68,0.1);
}

/* Post body */
.xcs-forum-post-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--xcs-ink-1);
  margin-bottom: 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Post image */
.xcs-forum-post-image {
  margin: -2px -18px 12px;
  border-top: 1px solid var(--xcs-line-1);
  border-bottom: 1px solid var(--xcs-line-1);
  background: var(--xcs-bg-tint);
}

.xcs-forum-post-image img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: #000;
}

.xcs-forum-post-image.image-broken::before {
  content: '🖼️ Gambar tidak bisa dimuat';
  display: block;
  padding: 40px 20px;
  text-align: center;
  color: var(--xcs-ink-4);
  font-size: 13px;
}

/* Post footer */
.xcs-forum-post-foot {
  border-top: 1px solid var(--xcs-line-1);
  padding-top: 10px;
}

.xcs-forum-comment-toggle {
  appearance: none;
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--xcs-ink-3);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-forum-comment-toggle:hover {
  background: var(--xcs-bg-tint);
  color: var(--xcs-blue);
}

.xcs-forum-comment-toggle.is-open {
  color: var(--xcs-blue);
}

.xcs-forum-comment-toggle-arrow {
  font-size: 10px;
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
}

/* Comments inside post */
.xcs-forum-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--xcs-line-1);
}

.xcs-forum-comments-loading,
.xcs-forum-comments-empty {
  text-align: center;
  padding: 16px;
  font-size: 12.5px;
  color: var(--xcs-ink-4);
  font-style: italic;
}

.xcs-forum-comments-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xcs-forum-comment {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--xcs-bg-tint);
}

.xcs-forum-comment-avatar {
  flex-shrink: 0;
  cursor: pointer;
}

.xcs-forum-comment-body {
  flex: 1;
  min-width: 0;
}

.xcs-forum-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 11px;
  color: var(--xcs-ink-3);
}

.xcs-forum-comment-meta strong {
  color: var(--xcs-ink-1);
  font-weight: 700;
  font-size: 12.5px;
}

.xcs-forum-comment-del {
  appearance: none;
  background: none;
  border: 0;
  color: var(--xcs-ink-4);
  cursor: pointer;
  font-size: 10.5px;
  margin-left: auto;
  font-weight: 600;
}

.xcs-forum-comment-del:hover {
  color: var(--xcs-red);
}

.xcs-forum-comment-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--xcs-ink-1);
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Comment compose */
.xcs-forum-comment-compose {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.xcs-forum-comment-compose .xcs-mention-wrap {
  flex: 1;
}

/* Mention textarea (shared) */
.xcs-mention-wrap {
  position: relative;
}

.xcs-mention-textarea {
  width: 100%;
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
  transition: border-color var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-mention-wrap.is-small .xcs-mention-textarea {
  font-size: 13px;
  padding: 8px 12px;
  min-height: 44px;
  border-radius: 10px;
}

.xcs-mention-textarea:focus {
  outline: none;
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

.xcs-mention-textarea::placeholder {
  color: var(--xcs-ink-4);
}

/* Mention tag (rendered) — BLUE pill */
.xcs-mention-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  background: rgba(0,0,0,0.15);
  color: var(--xcs-blue);
  border: 1px solid rgba(0,0,0,0.3);
  margin: 0 1px;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  text-decoration: none;
}

.xcs-mention-tag:hover {
  background: rgba(0,0,0,0.25);
  border-color: rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

/* Image guide modal */
.xcs-modal-image-guide {
  max-width: 560px;
  width: 100%;
}

.xcs-image-guide-steps {
  margin-bottom: 16px;
}

.xcs-image-guide-tabs {
  font-size: 13px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  margin-bottom: 10px;
}

.xcs-image-guide-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xcs-image-guide-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--xcs-ink-2);
}

.xcs-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--xcs-blue);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.xcs-image-guide-link {
  color: var(--xcs-blue);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid currentColor;
}

.xcs-image-guide-link:hover {
  color: var(--xcs-blue-hover, var(--xcs-blue));
}

.xcs-image-guide-warning {
  background: rgba(239,68,68,0.08);
  border-left: 3px solid #DC2626;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  color: var(--xcs-ink-2);
  line-height: 1.5;
  margin: 12px 0;
}

.xcs-image-guide-details {
  background: var(--xcs-bg-tint);
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid var(--xcs-line-1);
}

.xcs-image-guide-details summary {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--xcs-ink-2);
  list-style: none;
  user-select: none;
}

.xcs-image-guide-details summary::-webkit-details-marker {
  display: none;
}

.xcs-image-guide-details summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-image-guide-details[open] summary::before {
  transform: rotate(90deg);
}

.xcs-image-guide-details[open] summary {
  border-bottom: 1px solid var(--xcs-line-1);
}

.xcs-image-guide-mobile {
  padding: 8px 12px 12px 30px;
  margin: 0;
  font-size: 12.5px;
  color: var(--xcs-ink-2);
  line-height: 1.6;
}

.xcs-image-guide-mobile li {
  margin-bottom: 4px;
}

.xcs-image-guide-cta {
  display: block;
  text-align: center;
  background: linear-gradient(180deg, #84CF1F 0%, #5BAA08 100%);
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.02em;
  margin: 14px 0;
  box-shadow: 0 4px 12px -2px rgba(91,170,8,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-image-guide-cta:hover {
  transform: translateY(-1px);
}

.xcs-image-url-input {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--xcs-line-1);
}

.xcs-image-url-input label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--xcs-ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.xcs-image-url-input input {
  width: 100%;
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
}

.xcs-image-url-input input:focus {
  outline: none;
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

.xcs-image-url-error {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--xcs-red);
  font-weight: 600;
}

.xcs-image-url-preview {
  margin-top: 12px;
}

.xcs-image-url-preview-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--xcs-ink-3);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.xcs-image-url-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  display: block;
}

/* Forum sidebar item — special accent */
.xcs-nav-item.is-forum.is-active {
  background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(110,110,110,0.1) 100%);
  border-left: 3px solid var(--xcs-blue);
}

/* Mobile */
@media (max-width: 720px) {
  .xcs-forum-page {
    padding: 0 0 40px;
  }
  .xcs-forum-title { font-size: 24px; }
  .xcs-forum-header { padding: 4px 12px 8px; }
  .xcs-forum-composer {
    border-radius: 12px;
    padding: 14px;
  }
  .xcs-forum-post {
    border-radius: 12px;
    padding: 14px 14px 10px;
  }
  .xcs-forum-post-image {
    margin: -2px -14px 12px;
  }
  .xcs-forum-comment {
    padding: 8px;
    gap: 8px;
  }
  .xcs-forum-comment-text {
    font-size: 12.5px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * FORUM VOTING SYSTEM
 * ════════════════════════════════════════════════════════════════════════ */

/* Top Voters leaderboard */
.xcs-forum-top-voters {
  background: linear-gradient(135deg, rgba(196,196,196,0.08) 0%, rgba(0,0,0,0.05) 100%);
  border: 1px solid var(--xcs-line-1);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--xcs-shadow-sm);
}

.xcs-forum-top-voters-h {
  margin-bottom: 14px;
}

.xcs-forum-top-voters-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  margin-bottom: 2px;
}

.xcs-forum-top-voters-sub {
  display: block;
  font-size: 11.5px;
  color: var(--xcs-ink-3);
}

.xcs-forum-top-voters-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.xcs-forum-top-voter {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  min-width: 0;
}

.xcs-forum-top-voter:hover {
  transform: translateY(-2px);
  box-shadow: var(--xcs-shadow-md);
}

.xcs-forum-top-voter.rank-1 {
  background: linear-gradient(135deg, rgba(196,196,196,0.15) 0%, rgba(196,196,196,0.05) 100%);
  border-color: rgba(196,196,196,0.4);
}

.xcs-forum-top-voter.rank-2 {
  background: linear-gradient(135deg, rgba(154,154,154,0.15) 0%, rgba(154,154,154,0.05) 100%);
  border-color: rgba(154,154,154,0.4);
}

.xcs-forum-top-voter.rank-3 {
  background: linear-gradient(135deg, rgba(217,119,6,0.15) 0%, rgba(217,119,6,0.05) 100%);
  border-color: rgba(217,119,6,0.4);
}

.xcs-forum-top-voter-rank {
  font-size: 22px;
  flex-shrink: 0;
}

.xcs-forum-top-voter-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  position: relative;
}

.xcs-forum-top-voter-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.xcs-forum-top-voter-info {
  flex: 1;
  min-width: 0;
}

.xcs-forum-top-voter-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--xcs-ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xcs-forum-top-voter-stats {
  font-size: 10.5px;
  color: var(--xcs-ink-3);
  margin-top: 2px;
}

.xcs-forum-top-voter-stats strong {
  color: var(--xcs-blue);
  font-weight: 800;
}

/* Sort bar */
.xcs-forum-sort-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0;
}

.xcs-forum-sort-btn {
  appearance: none;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  color: var(--xcs-ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-forum-sort-btn:hover {
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
}

.xcs-forum-sort-btn.is-active {
  background: var(--xcs-navy);
  color: #fff;
  border-color: var(--xcs-navy);
}

/* Vote score badge on post */
.xcs-forum-post-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 100%);
  color: var(--xcs-navy);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(196,196,196,0.4);
  margin-left: auto;
  margin-right: 8px;
}

.xcs-forum-post-score-icon {
  font-size: 14px;
}

.xcs-forum-post.is-hot {
  border-color: rgba(196,196,196,0.5);
  box-shadow: 0 4px 18px -4px rgba(196,196,196,0.25);
}

/* Vote breakdown chips */
.xcs-forum-vote-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--xcs-bg-tint);
  border-radius: 8px;
}

.xcs-forum-vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--xcs-ink-2);
}

.xcs-forum-vote-chip.item-vote_competition {
  background: linear-gradient(135deg, rgba(196,196,196,0.15) 0%, rgba(245,158,11,0.1) 100%);
  border-color: rgba(196,196,196,0.4);
  color: #B45309;
}

.xcs-forum-vote-chip.item-vote_superfast {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.3);
  color: #6D28D9;
}

.xcs-forum-vote-chip.item-vote_twinturbo {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.3);
  color: var(--xcs-navy-2);
}

.xcs-forum-vote-chip.item-vote_xcs7 {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.3);
  color: #15803D;
}

.xcs-forum-vote-chip-emoji {
  font-size: 13px;
}

.xcs-forum-vote-chip-count {
  font-weight: 800;
  color: inherit;
}

/* Vote button */
.xcs-forum-vote-btn {
  appearance: none;
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 100%);
  color: var(--xcs-navy);
  border: 0;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  box-shadow: 0 2px 6px rgba(196,196,196,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  margin-right: 8px;
}

.xcs-forum-vote-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,196,196,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ─── Vote Modal ────────────────────────────────────────────────── */

.xcs-modal-vote {
  max-width: 480px;
}

.xcs-vote-intro {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--xcs-ink-3);
  line-height: 1.5;
}

.xcs-vote-empty {
  text-align: center;
  padding: 20px;
  color: var(--xcs-ink-3);
}

.xcs-vote-empty p {
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--xcs-ink-2);
}

.xcs-vote-empty small {
  font-size: 12px;
  display: block;
  margin-bottom: 14px;
}

.xcs-vote-items-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding: 12px;
  background: var(--xcs-bg-tint);
  border-radius: 10px;
  text-align: left;
}

.xcs-vote-preview-item {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--xcs-ink-2);
  display: flex;
  justify-content: space-between;
}

.xcs-vote-preview-item small {
  color: var(--xcs-ink-4);
  font-weight: 500;
  margin: 0;
  display: inline;
}

.xcs-vote-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xcs-vote-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--xcs-bg-2);
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-vote-item:hover {
  transform: translateX(2px);
  border-color: var(--xcs-blue);
  box-shadow: var(--xcs-shadow-md);
}

.xcs-vote-item.tier-common { border-color: rgba(34,197,94,0.4); }
.xcs-vote-item.tier-uncommon { border-color: rgba(0,0,0,0.4); }
.xcs-vote-item.tier-rare { border-color: rgba(124,58,237,0.4); }
.xcs-vote-item.tier-legendary {
  border-color: rgba(196,196,196,0.5);
  background: linear-gradient(135deg, rgba(196,196,196,0.06) 0%, rgba(196,196,196,0.02) 100%);
}

.xcs-vote-item-emoji {
  font-size: 32px;
  flex-shrink: 0;
}

.xcs-vote-item-body {
  flex: 1;
  min-width: 0;
}

.xcs-vote-item-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--xcs-ink-1);
}

.xcs-vote-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 11.5px;
}

.xcs-vote-item-power {
  background: rgba(196,196,196,0.15);
  color: #B45309;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 800;
}

.xcs-vote-item-stock {
  color: var(--xcs-ink-3);
}

.xcs-vote-item-stock strong {
  color: var(--xcs-blue);
  font-weight: 800;
}

.xcs-vote-item-arrow {
  font-size: 18px;
  color: var(--xcs-ink-4);
  flex-shrink: 0;
}

/* ─── Vote Item Preview in Shop ──────────────────────────────────── */

.xcs-preview-vote {
  background: linear-gradient(135deg, var(--xcs-bg-2) 0%, var(--xcs-bg-tint) 100%);
  border: 2px solid var(--xcs-line-1);
  border-radius: 12px;
  position: relative;
  display: grid;
  place-items: center;
}

.xcs-preview-vote.tier-common {
  background: linear-gradient(135deg, rgba(34,197,94,0.12) 0%, rgba(34,197,94,0.04) 100%);
  border-color: rgba(34,197,94,0.4);
}

.xcs-preview-vote.tier-uncommon {
  background: linear-gradient(135deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.04) 100%);
  border-color: rgba(0,0,0,0.4);
}

.xcs-preview-vote.tier-rare {
  background: linear-gradient(135deg, rgba(124,58,237,0.15) 0%, rgba(124,58,237,0.04) 100%);
  border-color: rgba(124,58,237,0.5);
}

.xcs-preview-vote.tier-legendary {
  background: linear-gradient(135deg, rgba(196,196,196,0.18) 0%, rgba(245,158,11,0.06) 100%);
  border-color: rgba(196,196,196,0.6);
  box-shadow: 0 0 16px rgba(196,196,196,0.25);
}

.xcs-preview-vote-emoji {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.xcs-preview-vote-power {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--xcs-navy);
  color: var(--xcs-yellow);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(196,196,196,0.4);
}

/* Inventory: qty badge for vote items */
.xcs-shop-card-qty {
  display: inline-block;
  margin-left: 8px;
  background: var(--xcs-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

/* Mobile */
@media (max-width: 720px) {
  .xcs-forum-top-voters-list {
    grid-template-columns: 1fr;
  }
  .xcs-forum-sort-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }
  .xcs-forum-sort-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
  }
  .xcs-forum-post-score {
    font-size: 12px;
    padding: 3px 8px;
  }
  .xcs-forum-vote-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  .xcs-forum-vote-breakdown {
    padding: 6px 8px;
  }
  .xcs-vote-item {
    padding: 10px;
  }
  .xcs-vote-item-emoji {
    font-size: 26px;
  }
  .xcs-modal-vote {
    max-width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * VOTE ITEMS — IMAGE-BASED RENDERS
 * ════════════════════════════════════════════════════════════════════════ */

/* Vote item preview in shop — replaced emoji with product image */
.xcs-preview-vote-img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  pointer-events: none;
}

/* Vote modal items — image variant */
.xcs-vote-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  border-radius: 6px;
}

/* Vote items preview list (when user has none) — show images */
.xcs-vote-items-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  background: var(--xcs-bg-tint);
  border-radius: 10px;
}

.xcs-vote-preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 8px;
  background: var(--xcs-bg-2);
  border-radius: 8px;
  border: 1px solid var(--xcs-line-1);
  font-size: 12px;
  font-weight: 700;
  color: var(--xcs-ink-2);
}

.xcs-vote-preview-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.xcs-vote-preview-item span {
  margin-top: 2px;
  font-weight: 800;
  font-size: 11px;
  color: var(--xcs-ink-1);
}

.xcs-vote-preview-item small {
  color: var(--xcs-ink-4);
  font-weight: 600;
  font-size: 10px;
  margin: 0;
  display: block;
}

/* Vote breakdown chips — image version */
.xcs-forum-vote-chip-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 3px;
}

.xcs-forum-vote-chip {
  padding: 3px 8px 3px 4px;
}

.xcs-forum-vote-chip.item-free {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.3);
  color: var(--xcs-blue);
}

/* ════════════════════════════════════════════════════════════════════════
 * FREE VOTE BUTTON — Thumbs up toggle (1 per user per post)
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-forum-free-vote-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-2);
  border: 1.5px solid var(--xcs-line-1);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  transition: all var(--xcs-dur-fast) var(--xcs-ease);
  margin-right: 8px;
}

.xcs-forum-free-vote-btn:hover {
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
  transform: translateY(-1px);
}

.xcs-forum-free-vote-btn.is-voted {
  background: var(--xcs-blue);
  color: #fff;
  border-color: var(--xcs-blue);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.xcs-forum-free-vote-btn.is-voted:hover {
  background: var(--xcs-blue);
  border-color: var(--xcs-blue);
}

.xcs-forum-free-vote-icon {
  font-size: 14px;
  transition: transform var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-forum-free-vote-btn:hover .xcs-forum-free-vote-icon {
  transform: scale(1.15);
}

.xcs-forum-free-vote-btn.is-voted .xcs-forum-free-vote-icon {
  animation: xcs-thumb-pop 0.3s ease;
}

@keyframes xcs-thumb-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4) rotate(-8deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Slight adjustment: vote item btn color change to differentiate from free vote */
.xcs-forum-vote-btn {
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 100%) !important;
  margin-right: 8px;
}

/* Mobile adjustments */
@media (max-width: 720px) {
  .xcs-forum-free-vote-btn {
    padding: 6px 10px;
    font-size: 11.5px;
    margin-right: 4px;
  }
  .xcs-forum-vote-btn {
    padding: 6px 10px;
    font-size: 11.5px;
    margin-right: 4px;
  }
  .xcs-vote-item-img {
    width: 44px;
    height: 44px;
  }
  .xcs-vote-items-preview {
    grid-template-columns: 1fr 1fr;
  }
  .xcs-vote-preview-item img {
    width: 40px;
    height: 40px;
  }
  .xcs-forum-vote-chip-img {
    width: 18px;
    height: 18px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * VOTE HISTORY MODAL — Click 🏆 badge to see who voted
 * ════════════════════════════════════════════════════════════════════════ */

/* Clickable score badge */
.xcs-forum-post-score.is-clickable {
  appearance: none;
  cursor: pointer;
  border: 0;
  font-family: inherit;
}

.xcs-forum-post-score.is-clickable:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(196,196,196,0.55);
}

/* Clickable breakdown row */
.xcs-forum-vote-breakdown {
  cursor: pointer;
  transition: background var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-forum-vote-breakdown:hover {
  background: var(--xcs-bg-3);
}

/* Modal sizing */
.xcs-modal-vote-history {
  max-width: 520px;
  width: 100%;
}

/* Summary stats row */
.xcs-vote-history-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(196,196,196,0.08) 0%, rgba(0,0,0,0.04) 100%);
  border: 1px solid var(--xcs-line-1);
  border-radius: 12px;
}

.xcs-vote-history-stat {
  text-align: center;
}

.xcs-vote-history-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.xcs-vote-history-stat-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--xcs-ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Groups */
.xcs-vote-history-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.xcs-vote-history-group {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 12px;
  padding: 12px;
}

.xcs-vote-history-group.is-free {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.2);
}

.xcs-vote-history-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--xcs-line-1);
  margin-bottom: 10px;
}

.xcs-vote-history-group-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}

.xcs-vote-history-group-emoji {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.xcs-vote-history-group-info {
  flex: 1;
  min-width: 0;
}

.xcs-vote-history-group-name {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--xcs-ink-1);
}

.xcs-vote-history-group-meta {
  font-size: 11px;
  color: var(--xcs-ink-3);
  margin-top: 2px;
  font-weight: 600;
}

/* Voter list */
.xcs-vote-history-voters {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xcs-vote-history-voter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--xcs-dur-fast) var(--xcs-ease);
}

.xcs-vote-history-voter:hover {
  background: var(--xcs-bg-tint);
}

.xcs-vote-history-voter-avatar {
  flex-shrink: 0;
}

.xcs-vote-history-voter-info {
  flex: 1;
  min-width: 0;
}

.xcs-vote-history-voter-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--xcs-ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xcs-vote-history-voter-time {
  font-size: 10.5px;
  color: var(--xcs-ink-3);
  margin-top: 2px;
}

.xcs-vote-history-voter-power {
  flex-shrink: 0;
  background: rgba(196,196,196,0.15);
  color: #B45309;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(196,196,196,0.3);
}

.xcs-vote-history-group.is-free .xcs-vote-history-voter-power {
  background: rgba(0,0,0,0.12);
  color: var(--xcs-blue);
  border-color: rgba(0,0,0,0.3);
}

/* Mobile */
@media (max-width: 720px) {
  .xcs-modal-vote-history {
    max-width: 100%;
  }
  .xcs-vote-history-summary {
    padding: 10px;
  }
  .xcs-vote-history-stat-num {
    font-size: 18px;
  }
  .xcs-vote-history-stat-label {
    font-size: 9.5px;
  }
  .xcs-vote-history-group {
    padding: 10px;
  }
  .xcs-vote-history-voter {
    padding: 6px;
  }
  .xcs-vote-history-voter-name {
    font-size: 12.5px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * FORUM POLISH — BrandHouse-inspired premium feel
 * Applied as override on top of base forum styles.
 * Big typography, soft gradients, breathing room, floating cards.
 * ════════════════════════════════════════════════════════════════════════ */

/* Page container — wider, more breathing room */
.xcs-forum-page {
  max-width: 820px;
  padding: 12px 0 80px;
  gap: 28px;
}

/* ─── Hero Header — Big bold display ─── */
.xcs-forum-header {
  padding: 28px 24px 8px;
  position: relative;
}

/* Soft glow behind hero */
.xcs-forum-header::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.10) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.xcs-forum-header > * {
  position: relative;
  z-index: 1;
}

.xcs-forum-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--xcs-blue);
  margin-bottom: 10px;
  display: inline-block;
  padding: 5px 14px;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 999px;
  text-transform: uppercase;
}

.xcs-forum-title {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 14px;
  /* Subtle gradient on title for premium feel */
  background: linear-gradient(135deg, var(--xcs-ink-1) 0%, var(--xcs-blue) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.xcs-forum-title span {
  -webkit-text-fill-color: initial;
  background: none;
  margin-left: 6px;
}

.xcs-forum-sub {
  font-size: 15.5px;
  color: var(--xcs-ink-3);
  font-weight: 500;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ─── Top Voters — Premium leaderboard card ─── */
.xcs-forum-top-voters {
  background: linear-gradient(135deg, rgba(0,0,0,0.04) 0%, rgba(196,196,196,0.04) 100%);
  border: 1px solid var(--xcs-line-1);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 4px 24px -8px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
}

.xcs-forum-top-voters-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--xcs-blue);
  margin-bottom: 4px;
}

.xcs-forum-top-voters-sub {
  font-size: 18px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.xcs-forum-top-voters-h {
  margin-bottom: 18px;
}

.xcs-forum-top-voter {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 14px 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.xcs-forum-top-voter:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.25);
  border-color: rgba(0,0,0,0.3);
}

.xcs-forum-top-voter.rank-1 {
  background: linear-gradient(135deg, #FEFCE8 0%, #FFFFFF 100%);
  border: 1.5px solid rgba(196,196,196,0.5);
  box-shadow: 0 4px 16px -4px rgba(196,196,196,0.3);
}

.xcs-forum-top-voter.rank-2 {
  background: linear-gradient(135deg, #F7F7F7 0%, #FFFFFF 100%);
  border: 1.5px solid rgba(154,154,154,0.5);
}

.xcs-forum-top-voter.rank-3 {
  background: linear-gradient(135deg, var(--xcs-yellow-soft) 0%, #FFFFFF 100%);
  border: 1.5px solid rgba(217,119,6,0.4);
}

/* ─── Composer — Premium feel ─── */
.xcs-forum-composer {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 8px 24px -12px rgba(0,0,0,0.12);
  transition: box-shadow 0.3s ease;
}

.xcs-forum-composer:focus-within {
  box-shadow:
    0 1px 3px rgba(0,0,0,0.06),
    0 12px 36px -12px rgba(0,0,0,0.2);
  border-color: rgba(0,0,0,0.25);
}

.xcs-forum-composer-name {
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: -0.01em;
}

.xcs-forum-composer-tip {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  margin-top: 2px;
}

.xcs-forum-composer-tip code {
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.2);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--xcs-blue);
}

.xcs-mention-textarea {
  border: 1.5px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.55;
  transition: all 0.2s ease;
  background: var(--xcs-bg-1);
}

.xcs-mention-textarea:focus {
  background: var(--xcs-bg-2);
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.1);
}

/* ─── Sort tabs — pill style ─── */
.xcs-forum-sort-bar {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--xcs-bg-tint);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  width: fit-content;
  margin: 0 auto;
}

.xcs-forum-sort-btn {
  background: transparent;
  border: 0;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--xcs-ink-3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.xcs-forum-sort-btn:hover {
  color: var(--xcs-ink-2);
  background: rgba(0,0,0,0.06);
}

.xcs-forum-sort-btn.is-active {
  background: var(--xcs-navy);
  color: #fff;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ─── Post card — Floating premium feel ─── */
.xcs-forum-post {
  background: var(--xcs-bg-2);
  border: 1px solid var(--xcs-line-1);
  border-radius: 20px;
  padding: 22px 24px 16px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 4px 16px -8px rgba(0,0,0,0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.xcs-forum-post:hover {
  border-color: rgba(0,0,0,0.15);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 12px 32px -12px rgba(0,0,0,0.12);
}

.xcs-forum-post.is-hot {
  background: linear-gradient(135deg, #FAFAFA 0%, #FFFFFF 100%);
  border: 1.5px solid rgba(196,196,196,0.4);
  box-shadow:
    0 4px 24px -8px rgba(196,196,196,0.25),
    0 1px 3px rgba(0,0,0,0.05);
}

/* Header polished */
.xcs-forum-post-head {
  gap: 14px;
  margin-bottom: 14px;
}

.xcs-forum-post-author {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.xcs-forum-post-time {
  font-size: 12px;
  color: var(--xcs-ink-3);
  margin-top: 3px;
  font-weight: 500;
}

.xcs-forum-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 5px;
}

.xcs-forum-badge-admin {
  background: linear-gradient(135deg, rgba(196,196,196,0.15) 0%, rgba(245,158,11,0.1) 100%);
  color: #B45309;
  border-color: rgba(196,196,196,0.4);
}

/* Score badge — premium gradient */
.xcs-forum-post-score {
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 100%);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  box-shadow:
    0 2px 8px rgba(196,196,196,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4);
  gap: 5px;
}

.xcs-forum-post-score.is-clickable {
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 100%);
}

.xcs-forum-post-score.is-clickable:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(196,196,196,0.45),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Post body */
.xcs-forum-post-body {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--xcs-ink-1);
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}

/* Image gets rounded corners + soft shadow */
.xcs-forum-post-image {
  margin: 0 -24px 14px;
  border: 0;
  border-top: 1px solid var(--xcs-line-1);
  border-bottom: 1px solid var(--xcs-line-1);
}

/* ─── Vote breakdown — chip style refined ─── */
.xcs-forum-vote-breakdown {
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--xcs-bg-tint) 0%, rgba(0,0,0,0.03) 100%);
  border-radius: 12px;
  border: 1px solid var(--xcs-line-1);
  gap: 8px;
}

.xcs-forum-vote-chip {
  background: var(--xcs-bg-2);
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Footer buttons — symmetric layout */
.xcs-forum-post-foot {
  border-top: 1px solid var(--xcs-line-1);
  padding-top: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Free vote button — premium */
.xcs-forum-free-vote-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  border-width: 1.5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.xcs-forum-free-vote-btn.is-voted {
  background: #0A0A0A;
  border-color: transparent;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.xcs-forum-free-vote-btn.is-voted:hover {
  background: #0A0A0A;
  transform: translateY(-1px);
  box-shadow:
    0 4px 14px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Item vote button */
.xcs-forum-vote-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #F59E0B 100%) !important;
  color: var(--xcs-navy);
  box-shadow:
    0 2px 8px rgba(196,196,196,0.3),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.xcs-forum-vote-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 14px rgba(196,196,196,0.45),
    inset 0 1px 0 rgba(255,255,255,0.45);
}

.xcs-forum-comment-toggle {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin-left: auto;
  transition: all 0.2s ease;
}

.xcs-forum-comment-toggle:hover {
  background: var(--xcs-bg-tint);
  color: var(--xcs-blue);
}

/* Primary Post button — symmetric gradient */
.xcs-forum-composer .xcs-btn-primary {
  background: linear-gradient(135deg, var(--xcs-navy) 0%, #222222 100%);
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 12px;
  border: 0;
  letter-spacing: -0.005em;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.xcs-forum-composer .xcs-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 4px 14px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.xcs-forum-composer .xcs-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Image button */
.xcs-forum-image-btn {
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  border-width: 1.5px;
  transition: all 0.2s ease;
}

.xcs-forum-image-btn:hover {
  background: rgba(0,0,0,0.06);
  border-color: var(--xcs-blue);
  color: var(--xcs-blue);
  transform: translateY(-1px);
}

/* Comments thread */
.xcs-forum-comments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(0,0,0,0.2);
}

.xcs-forum-comment {
  padding: 12px;
  border-radius: 12px;
  background: var(--xcs-bg-tint);
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.xcs-forum-comment:hover {
  border-color: var(--xcs-line-1);
}

.xcs-forum-comment-meta strong {
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: -0.005em;
}

/* ─── Mobile polish ─── */
@media (max-width: 720px) {
  .xcs-forum-page {
    padding: 0 0 60px;
    gap: 18px;
  }
  .xcs-forum-header {
    padding: 18px 16px 4px;
  }
  .xcs-forum-title {
    font-size: 32px;
    letter-spacing: -0.03em;
  }
  .xcs-forum-sub {
    font-size: 14px;
  }
  .xcs-forum-eyebrow {
    font-size: 10.5px;
    padding: 4px 12px;
  }
  .xcs-forum-composer {
    border-radius: 16px;
    padding: 16px;
  }
  .xcs-forum-post {
    border-radius: 16px;
    padding: 16px 16px 12px;
  }
  .xcs-forum-post-image {
    margin: 0 -16px 12px;
  }
  .xcs-forum-top-voters {
    border-radius: 16px;
    padding: 16px;
  }
  .xcs-forum-top-voters-sub {
    font-size: 16px;
  }
  .xcs-forum-sort-bar {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 5px;
    border-radius: 12px;
  }
  .xcs-forum-sort-btn {
    flex-shrink: 0;
    padding: 7px 12px;
    font-size: 11.5px;
  }
  .xcs-forum-post-foot {
    gap: 6px;
  }
  .xcs-forum-free-vote-btn,
  .xcs-forum-vote-btn {
    padding: 7px 12px;
    font-size: 12px;
  }
  .xcs-forum-comment-toggle {
    padding: 7px 10px;
    font-size: 12px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * BRANDHOUSE LA POLISH — System-wide design language
 * Premium SaaS feel: bold typography, vibrant blue, soft shadows
 * ════════════════════════════════════════════════════════════════════════ */

:root, [data-theme="light"] {
  /* BrandHouse signature blue palette */
  --bh-blue:        #1A1A1A;
  --bh-blue-hover:  #000000;
  --bh-blue-soft:   #E8E8E8;
  --bh-blue-tint:   rgba(0,0,0,0.06);

  /* BrandHouse neutrals */
  --bh-slate-50:    #F7F7F7;
  --bh-slate-100:   #F4F4F4;
  --bh-slate-200:   #E3E3E3;
  --bh-slate-700:   #3A3A3A;
  --bh-slate-800:   #222222;
  --bh-slate-900:   #0A0A0A;
  --bh-ink:         #0A0A0A;
  --bh-muted:       #6E6E6E;
}

/* ═══════════════════════════════════════════════════
 * SIDEBAR — BrandHouse premium dark style
 * ═══════════════════════════════════════════════════ */

.xcs-sidebar {
  background: var(--xcs-navy);             /* darker, more "premium" navy */
  padding: 24px 14px 16px;
  gap: 6px;
  border-right: 1px solid #1F1F1F;
}

.xcs-brand {
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
}

.xcs-brand-name {
  font-family: 'Jost', system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: 17px !important;
  letter-spacing: 0.06em !important;
  color: #FFFFFF !important;
}

.xcs-brand-sub {
  font-size: 9.5px !important;
  letter-spacing: 0.16em !important;
  color: rgba(255,255,255,0.45) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  margin-top: 3px !important;
}

/* Search box — softer pill */
.xcs-search {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 0 12px;
  transition: all 0.2s ease;
}

.xcs-search:focus-within {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

.xcs-search input {
  padding: 10px 0;
  font-size: 13px;
  letter-spacing: -0.005em;
}

/* Nav items — BrandHouse refined */
.xcs-nav { gap: 3px; margin-top: 6px; }

.xcs-nav-item {
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: rgba(255,255,255,0.6);
  position: relative;
  transition: all 0.15s ease;
}

.xcs-nav-item svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.xcs-nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.95);
}

.xcs-nav-item:hover svg {
  transform: translateX(1px);
}

/* Active item — dot indicator on left + tinted bg */
.xcs-nav-item.is-active {
  background: #FFFFFF;
  color: #0A0A0A;
  box-shadow: none;
  font-weight: 700;
}

.xcs-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #0A0A0A;
  border-radius: 0 3px 3px 0;
  box-shadow: none;
}

/* Primary CTA — yellow, larger more prominent */
.xcs-nav-item.is-primary {
  background: var(--xcs-chrome);
  color: #0A0A0A;
  border: 0;
  margin: 10px 0 4px;
  font-weight: 800;
  padding: 13px 12px;
  border-radius: 12px;
  letter-spacing: -0.01em;
  box-shadow:
    0 4px 14px -4px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

.xcs-nav-item.is-primary:hover {
  background: var(--xcs-chrome);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px -4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.45);
}

/* Daily CTA — green refined */
.xcs-nav-item.is-daily {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  font-weight: 800;
  padding: 13px 12px;
  border-radius: 12px;
  letter-spacing: -0.01em;
  box-shadow:
    0 4px 14px -4px rgba(16,185,129,0.5),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.xcs-nav-item.is-daily:hover {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px -4px rgba(16,185,129,0.6),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Pill counter — refined */
.xcs-pill {
  background: rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: -0.005em;
}

.xcs-nav-item.is-active .xcs-pill {
  background: rgba(0,0,0,0.10);
  color: #0A0A0A;
}

/* ═══════════════════════════════════════════════════
 * APRESIASI section — premium card
 * ═══════════════════════════════════════════════════ */

.xcs-nav-group-header {
  font-size: 9.5px !important;
  letter-spacing: 0.16em !important;
  font-weight: 800 !important;
  color: rgba(255,255,255,0.4) !important;
  padding: 16px 12px 6px !important;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════
 * TOKEN BALANCE — Sidebar bottom premium feel
 * ═══════════════════════════════════════════════════ */

.xcs-sidebar-coin {
  background: linear-gradient(135deg, rgba(196,196,196,0.08) 0%, rgba(245,158,11,0.04) 100%) !important;
  border: 1px solid rgba(196,196,196,0.25) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  transition: all 0.2s ease;
}

.xcs-sidebar-coin:hover {
  border-color: rgba(196,196,196,0.45) !important;
  background: linear-gradient(135deg, rgba(196,196,196,0.12) 0%, rgba(245,158,11,0.06) 100%) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
 * USER ACCOUNT FOOTER — refined
 * ═══════════════════════════════════════════════════ */

.xcs-user-card {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  transition: all 0.2s ease;
}

.xcs-user-card:hover {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* ═══════════════════════════════════════════════════
 * APP BACKGROUND — slate-50 like BrandHouse
 * ═══════════════════════════════════════════════════ */

body {
  background: var(--bh-slate-50) !important;
}

[data-theme="light"] {
  --xcs-bg-1: #F4F4F4 !important;
}

/* ═══════════════════════════════════════════════════
 * CARDS — Floating premium feel system-wide
 * ═══════════════════════════════════════════════════ */

/* Soften all cards globally with BrandHouse shadow language */
.xcs-card,
.xcs-forum-post,
.xcs-forum-composer,
.xcs-forum-top-voters,
.xcs-stat,
.xcs-room-card,
.xcs-shop-card {
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 1px 2px rgba(0,0,0,0.04) !important;
}

/* Hover states for cards */
.xcs-card:hover,
.xcs-forum-post:hover,
.xcs-shop-card:hover {
  box-shadow:
    0 4px 12px -4px rgba(0,0,0,0.1),
    0 2px 4px rgba(0,0,0,0.04) !important;
}

/* ═══════════════════════════════════════════════════
 * BUTTONS — BrandHouse signature pill + blue
 * ═══════════════════════════════════════════════════ */

.xcs-btn-primary,
button.xcs-btn-primary {
  background: #0A0A0A;
  color: #FFFFFF;
  border: 0;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.xcs-btn-primary:hover:not(:disabled) {
  background: #262626;
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

.xcs-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.xcs-btn-ghost {
  background: var(--xcs-bg-2);
  color: var(--xcs-ink-1);
  border: 1.5px solid var(--xcs-line-2);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.xcs-btn-ghost:hover {
  background: var(--xcs-bg-2);
  border-color: var(--xcs-ink-1);
}

/* ═══════════════════════════════════════════════════
 * FORUM — Override title color (was gradient, now solid like BrandHouse)
 * ═══════════════════════════════════════════════════ */

.xcs-forum-title {
  background: linear-gradient(135deg, #0A0A0A 0%, var(--xcs-blue) 60%, #0A0A0A 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 900 !important;
  font-size: 48px !important;
  letter-spacing: -0.04em !important;
  line-height: 1 !important;
}

@media (max-width: 720px) {
  .xcs-forum-title {
    font-size: 32px !important;
  }
}

.xcs-forum-eyebrow {
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  color: var(--bh-blue) !important;
  font-weight: 700 !important;
  padding: 6px 16px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  letter-spacing: 0.16em !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.xcs-forum-eyebrow::before {
  content: '↗ ';
  display: inline-block;
  color: var(--bh-blue);
  margin-right: 4px;
}

/* Composer Post button → blue gradient */
.xcs-forum-composer .xcs-btn-primary {
  background: #0A0A0A !important;
}

.xcs-forum-composer .xcs-btn-primary:hover:not(:disabled) {
  background: #262626 !important;
}

/* Active sort tab uses BrandHouse blue */
.xcs-forum-sort-btn.is-active {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.15) !important;
}

/* Free vote button (already blue, but ensure exact BH blue) */
.xcs-forum-free-vote-btn.is-voted {
  background: #0A0A0A !important;
  border-color: transparent !important;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

.xcs-forum-free-vote-btn.is-voted:hover {
  background: #262626 !important;
  transform: translateY(-1px);
  box-shadow:
    0 4px 14px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

/* ═══════════════════════════════════════════════════
 * MOBILE HEADER — refined
 * ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .xcs-mobile-bar {
    background: var(--xcs-navy) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  }
}

/* ═══════════════════════════════════════════════════
 * HOVER STATE for all interactive surfaces
 * ═══════════════════════════════════════════════════ */

.xcs-nav-item.is-meetus.is-active,
.xcs-nav-item.is-contentbank.is-active,
.xcs-nav-item.is-forum.is-active {
  background: linear-gradient(90deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.08) 100%);
  border-left: 0;
}

/* ════════════════════════════════════════════════════════════════════════
 * BRANDHOUSE V2 — Sidebar LIGHT THEME (matches reference)
 * ════════════════════════════════════════════════════════════════════════ */

/* Override the dark sidebar from V1 → light premium sidebar */
.xcs-sidebar {
  background: #FFFFFF !important;
  color: var(--bh-ink) !important;
  border-right: 1px solid var(--bh-slate-200) !important;
  padding: 24px 16px 16px !important;
}

/* Brand area */
.xcs-brand {
  border-bottom: 1px solid var(--bh-slate-100) !important;
  padding: 0 8px 16px !important;
  margin-bottom: 10px !important;
}

.xcs-brand-clickable,
.xcs-brand {
  color: var(--bh-ink) !important;
}

.xcs-brand-name {
  color: #FFFFFF !important;
  font-family: 'Jost', system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: 17px !important;
  letter-spacing: 0.06em !important;
}

.xcs-brand-sub {
  color: var(--bh-muted) !important;
  font-weight: 700 !important;
  font-size: 9.5px !important;
  letter-spacing: 0.18em !important;
}

.xcs-logo {
  filter: none !important;
}

/* Search box */
.xcs-search {
  background: var(--bh-slate-50) !important;
  border: 1px solid var(--bh-slate-200) !important;
  color: var(--bh-muted) !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
}

.xcs-search:focus-within {
  background: #FFFFFF !important;
  border-color: var(--bh-blue) !important;
  box-shadow: 0 0 0 3px var(--bh-blue-tint) !important;
}

.xcs-search input {
  color: var(--bh-ink) !important;
  font-size: 13px !important;
  padding: 11px 0 !important;
}

.xcs-search input::placeholder {
  color: var(--bh-muted) !important;
}

.xcs-search kbd {
  background: var(--bh-slate-100) !important;
  color: var(--bh-muted) !important;
  border: 1px solid var(--bh-slate-200);
  font-weight: 700;
}

/* Nav items — clean light style */
.xcs-nav-item {
  color: var(--bh-slate-700) !important;
  font-weight: 600 !important;
  padding: 11px 14px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  letter-spacing: -0.005em !important;
  position: relative;
}

.xcs-nav-item:hover {
  background: var(--bh-slate-50) !important;
  color: var(--bh-ink) !important;
}

.xcs-nav-item.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.xcs-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #0A0A0A;
  border-radius: 0 3px 3px 0;
}

.xcs-nav-item.is-active svg {
  stroke: var(--bh-blue) !important;
}

/* Primary CTAs — keep yellow/green but matched to BH style */
.xcs-nav-item.is-primary {
  background: var(--xcs-chrome) !important;
  color: #0A0A0A !important;
  margin: 10px 0 4px !important;
  padding: 13px 14px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  box-shadow:
    0 4px 14px -4px rgba(196,196,196,0.55),
    inset 0 1px 0 rgba(255,255,255,0.4) !important;
}

.xcs-nav-item.is-primary:hover {
  background: var(--xcs-chrome) !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px -4px rgba(196,196,196,0.7),
    inset 0 1px 0 rgba(255,255,255,0.5) !important;
}

.xcs-nav-item.is-primary svg {
  stroke: #0A0A0A !important;
}

.xcs-nav-item.is-daily {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
  padding: 13px 14px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  box-shadow:
    0 4px 14px -4px rgba(16,185,129,0.5),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.xcs-nav-item.is-daily:hover {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
  transform: translateY(-1px);
}

.xcs-nav-item.is-daily svg {
  stroke: #FFFFFF !important;
}

/* Active states for special nav items */
.xcs-nav-item.is-meetus.is-active,
.xcs-nav-item.is-contentbank.is-active,
.xcs-nav-item.is-forum.is-active {
  background: #FFFFFF !important;
  border-left: 0;
}

/* Pill counter */
.xcs-pill {
  background: var(--bh-slate-100) !important;
  color: var(--bh-muted) !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
}

.xcs-nav-item.is-active .xcs-pill {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}

.xcs-nav-item.is-primary .xcs-kbd,
.xcs-nav-item.is-daily .xcs-kbd {
  background: rgba(255,255,255,0.3) !important;
  color: inherit !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
}

/* Apresiasi section header */
.xcs-nav-group-header,
.xcs-apresiasi-toggle {
  color: var(--bh-muted) !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.16em !important;
  padding: 16px 14px 8px !important;
  text-transform: uppercase;
  border-top: 1px solid var(--bh-slate-100);
  margin-top: 8px;
}

.xcs-apresiasi-toggle:hover {
  color: var(--bh-ink) !important;
  background: var(--bh-slate-50) !important;
  border-radius: 10px;
}

/* Apresiasi child items */
.xcs-nav-item.is-child {
  padding-left: 36px !important;
  font-size: 13px !important;
}

/* Token balance card */
.xcs-sidebar-coin {
  background: linear-gradient(135deg, #FAFAFA 0%, #FFFFFF 100%) !important;
  border: 1px solid rgba(196,196,196,0.4) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  box-shadow: 0 2px 8px rgba(196,196,196,0.15) !important;
  margin-top: 12px;
}

.xcs-sidebar-coin:hover {
  border-color: rgba(196,196,196,0.6) !important;
  box-shadow: 0 4px 14px rgba(196,196,196,0.25) !important;
  transform: translateY(-1px);
}

/* User account footer card */
.xcs-user-card {
  background: var(--bh-slate-50) !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  color: var(--bh-ink) !important;
  margin-top: 8px;
}

.xcs-user-card:hover {
  background: #FFFFFF !important;
  border-color: var(--bh-blue) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.xcs-user-card-name {
  color: var(--bh-ink) !important;
  font-weight: 800 !important;
}

.xcs-user-card-role {
  color: var(--bh-muted) !important;
}

/* Logout button on sidebar */
.xcs-user-card svg {
  stroke: var(--bh-muted) !important;
}

/* Theme toggle bar at sidebar bottom */
.xcs-theme-toggle-wrap {
  background: var(--bh-slate-50) !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 12px !important;
  padding: 4px !important;
}

.xcs-theme-toggle-btn {
  color: var(--bh-muted) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  padding: 6px 8px !important;
}

.xcs-theme-toggle-btn:hover {
  color: var(--bh-ink) !important;
}

.xcs-theme-toggle-btn.is-active {
  background: #FFFFFF !important;
  color: var(--bh-ink) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

/* ═══════════════════════════════════════════════════
 * DASHBOARD — Hero, stats, activity cards
 * ═══════════════════════════════════════════════════ */

/* Big bold heading for dashboard */
.xcs-dash-h1,
.xcs-dash-greeting h1 {
  font-size: 36px !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  color: var(--bh-ink) !important;
  line-height: 1.1 !important;
}

/* Dashboard date eyebrow */
.xcs-dash-date,
.xcs-dash-eyebrow {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  color: var(--bh-blue) !important;
  text-transform: uppercase;
}

.xcs-dash-sub {
  font-size: 15px !important;
  color: var(--bh-muted) !important;
}

/* Stat cards */
.xcs-stat {
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 16px !important;
  padding: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.xcs-stat:hover {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.2) !important;
  transform: translateY(-2px);
}

.xcs-stat-label,
.xcs-stat-title {
  color: var(--bh-muted) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
}

.xcs-stat-num,
.xcs-stat-value {
  font-size: 36px !important;
  font-weight: 900 !important;
  color: var(--bh-ink) !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
}

.xcs-stat-sub,
.xcs-stat-meta {
  font-size: 11.5px !important;
  color: var(--bh-muted) !important;
  margin-top: 6px !important;
}

/* Stat with red/urgent */
.xcs-stat-sub.is-warn,
.xcs-stat-meta.is-warn,
.xcs-stat .is-urgent {
  color: #DC2626 !important;
  font-weight: 700;
}

/* Hall of Fame banner */
.xcs-hof-banner {
  background: linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%) !important;
  border: 1px solid rgba(196,196,196,0.4) !important;
  border-radius: 16px !important;
  padding: 18px 22px !important;
  box-shadow: 0 4px 16px -8px rgba(196,196,196,0.3) !important;
}

/* Streak / status pills in dashboard */
.xcs-streak-pill {
  background: linear-gradient(135deg, #FAFAFA 0%, var(--xcs-yellow-soft) 100%);
  border: 1px solid rgba(196,196,196,0.4);
  border-radius: 14px;
  padding: 10px 14px;
}

/* Activity items */
.xcs-activity-item {
  border-radius: 12px !important;
  padding: 14px 18px !important;
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  transition: all 0.2s ease;
}

.xcs-activity-item:hover {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Section heading "Aktivitas tim" */
.xcs-section-h {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--bh-ink) !important;
  letter-spacing: -0.015em !important;
}

/* Buttons in dashboard */
.xcs-dash-cta {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
  border: 0 !important;
  padding: 11px 22px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  letter-spacing: -0.005em !important;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.xcs-dash-cta:hover {
  background: #262626 !important;
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.xcs-dash-cta-ghost {
  background: #FFFFFF !important;
  color: var(--bh-ink) !important;
  border: 1.5px solid var(--xcs-line-2) !important;
  padding: 10px 22px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

.xcs-dash-cta-ghost:hover {
  border-color: var(--bh-ink) !important;
  background: var(--bh-slate-50) !important;
}

/* ═══════════════════════════════════════════════════
 * QUEUE / TABLE rows
 * ═══════════════════════════════════════════════════ */

.xcs-req-card,
.xcs-table-row {
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
  transition: all 0.2s ease;
}

.xcs-req-card:hover,
.xcs-table-row:hover {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,0.15) !important;
}

/* ═══════════════════════════════════════════════════
 * SHOP cards
 * ═══════════════════════════════════════════════════ */

.xcs-shop-card {
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 18px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

.xcs-shop-card:hover {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.2) !important;
  transform: translateY(-2px);
}

.xcs-shop-btn-buy {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
  border: 0 !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 9px 18px !important;
}

.xcs-shop-btn-buy:hover:not(:disabled) {
  background: #262626 !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
 * NOTIFICATION BELL — refined
 * ═══════════════════════════════════════════════════ */

.xcs-notif-bell {
  background: #FFFFFF !important;
  color: var(--bh-ink) !important;
  border: 1px solid var(--bh-slate-200) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.xcs-notif-bell:hover {
  border-color: var(--bh-blue) !important;
  color: var(--bh-blue) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
 * MOBILE HEADER — light variant
 * ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .xcs-mobile-bar {
    background: #FFFFFF !important;
    color: var(--bh-ink) !important;
    border-bottom: 1px solid var(--bh-slate-200) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  }
  .xcs-mobile-bar .xcs-icon-btn-lg,
  .xcs-mobile-brand-clickable {
    color: var(--bh-ink) !important;
  }
  .xcs-mobile-bar svg {
    stroke: var(--bh-ink) !important;
  }
  .xcs-mobile-brand span {
    color: var(--bh-ink) !important;
    font-weight: 900 !important;
    letter-spacing: -0.01em !important;
  }
}

/* ═══════════════════════════════════════════════════
 * DARK MODE — preserve dark sidebar for users who pick dark
 * ═══════════════════════════════════════════════════ */

[data-theme="dark"] .xcs-sidebar {
  background: #0A0A0A !important;
  border-right-color: rgba(255,255,255,0.05) !important;
  color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .xcs-brand-name {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-brand-sub {
  color: rgba(255,255,255,0.5) !important;
}

[data-theme="dark"] .xcs-brand {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-search {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .xcs-search input {
  color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .xcs-search input::placeholder {
  color: rgba(255,255,255,0.4) !important;
}

[data-theme="dark"] .xcs-nav-item {
  color: rgba(255,255,255,0.65) !important;
}

[data-theme="dark"] .xcs-nav-item:hover {
  background: rgba(255,255,255,0.05) !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-nav-item.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
}

[data-theme="dark"] .xcs-nav-item.is-active svg {
  stroke: #0A0A0A !important;
}

[data-theme="dark"] .xcs-mobile-bar {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-mobile-bar svg {
  stroke: #FFFFFF !important;
}

[data-theme="dark"] .xcs-mobile-brand span {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-user-card {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .xcs-user-card-name {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-theme-toggle-wrap {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-theme-toggle-btn {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-theme-toggle-btn.is-active {
  background: rgba(255,255,255,0.1) !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-sidebar-coin {
  background: linear-gradient(135deg, rgba(196,196,196,0.08) 0%, rgba(245,158,11,0.04) 100%) !important;
  border-color: rgba(196,196,196,0.3) !important;
}

[data-theme="dark"] .xcs-notif-bell {
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.9) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * BRANDHOUSE V3 — BLUE SIDEBAR & MOBILE HEADER
 * Override V2 light sidebar dengan signature BrandHouse blue
 * ════════════════════════════════════════════════════════════════════════ */

/* ─── SIDEBAR — Full BrandHouse Blue ─── */
.xcs-sidebar {
  background: var(--xcs-navy) !important;
  color: rgba(255,255,255,0.92) !important;
  border-right: 1px solid #1F1F1F !important;
}

/* Brand area */
.xcs-brand {
  border-bottom: 1px solid rgba(255,255,255,0.12) !important;
}

.xcs-brand-clickable,
.xcs-brand {
  color: #FFFFFF !important;
}

.xcs-brand-name {
  color: #FFFFFF !important;
}

.xcs-brand-sub {
  color: rgba(255,255,255,0.65) !important;
}

.xcs-logo {
  filter: none !important;
}

/* Search box — translucent on blue */
.xcs-search {
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.8) !important;
}

.xcs-search:focus-within {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.4) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1) !important;
}

.xcs-search input {
  color: #FFFFFF !important;
}

.xcs-search input::placeholder {
  color: rgba(255,255,255,0.55) !important;
}

.xcs-search kbd {
  background: rgba(255,255,255,0.18) !important;
  color: rgba(255,255,255,0.85) !important;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Nav items — white text on blue */
.xcs-nav-item {
  color: rgba(255,255,255,0.78) !important;
}

.xcs-nav-item svg {
  stroke: rgba(255,255,255,0.78) !important;
}

.xcs-nav-item:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #FFFFFF !important;
}

.xcs-nav-item:hover svg {
  stroke: #FFFFFF !important;
}

/* Active item — white pill with blue text (inverted for contrast pop) */
.xcs-nav-item.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  font-weight: 800 !important;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,1) !important;
}

.xcs-nav-item.is-active svg {
  stroke: #0A0A0A !important;
}

.xcs-nav-item.is-active::before {
  display: none;  /* drop the left dot bar since active state is now solid white */
}

/* Active states for special items */
.xcs-nav-item.is-meetus.is-active,
.xcs-nav-item.is-contentbank.is-active,
.xcs-nav-item.is-forum.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  border-left: 0 !important;
}

/* Yellow CTA preserved + add white border for contrast on blue */
.xcs-nav-item.is-primary {
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow:
    0 4px 16px -4px rgba(196,196,196,0.65),
    inset 0 1px 0 rgba(255,255,255,0.4) !important;
}

.xcs-nav-item.is-primary svg {
  stroke: #0A0A0A !important;
}

.xcs-nav-item.is-daily {
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow:
    0 4px 16px -4px rgba(16,185,129,0.55),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.xcs-nav-item.is-daily svg {
  stroke: #FFFFFF !important;
}

/* Pill counter */
.xcs-pill {
  background: rgba(255,255,255,0.18) !important;
  color: #FFFFFF !important;
}

.xcs-nav-item.is-active .xcs-pill {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}

.xcs-nav-item.is-primary .xcs-kbd,
.xcs-nav-item.is-daily .xcs-kbd {
  background: rgba(255,255,255,0.3) !important;
}

/* APRESIASI section header */
.xcs-nav-group-header,
.xcs-apresiasi-toggle {
  color: rgba(255,255,255,0.55) !important;
  border-top: 1px solid rgba(255,255,255,0.12) !important;
}

.xcs-apresiasi-toggle:hover {
  color: #FFFFFF !important;
  background: rgba(255,255,255,0.05) !important;
}

/* Token balance card — translucent over blue */
.xcs-sidebar-coin {
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1) !important;
  color: #FFFFFF !important;
}

.xcs-sidebar-coin:hover {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.35) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15) !important;
}

.xcs-sidebar-coin * {
  color: #FFFFFF !important;
}

/* User account footer */
.xcs-user-card {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #FFFFFF !important;
}

.xcs-user-card:hover {
  background: rgba(255,255,255,0.14) !important;
  border-color: rgba(255,255,255,0.3) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15) !important;
}

.xcs-user-card-name {
  color: #FFFFFF !important;
}

.xcs-user-card-role {
  color: rgba(255,255,255,0.65) !important;
}

.xcs-user-card svg {
  stroke: rgba(255,255,255,0.7) !important;
}

/* Theme toggle */
.xcs-theme-toggle-wrap {
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}

.xcs-theme-toggle-btn {
  color: rgba(255,255,255,0.7) !important;
}

.xcs-theme-toggle-btn:hover {
  color: #FFFFFF !important;
}

.xcs-theme-toggle-btn.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

/* ─── MOBILE HEADER — Blue variant ─── */
@media (max-width: 768px) {
  .xcs-mobile-bar {
    background: var(--xcs-blue) !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.3) !important;
  }
  .xcs-mobile-bar .xcs-icon-btn-lg,
  .xcs-mobile-brand-clickable {
    color: #FFFFFF !important;
  }
  .xcs-mobile-bar svg {
    stroke: #FFFFFF !important;
  }
  .xcs-mobile-brand span {
    color: #FFFFFF !important;
  }
}

/* ─── DARK MODE — keep darker variant of blue ─── */
[data-theme="dark"] .xcs-sidebar {
  background: var(--xcs-navy) !important;
  border-right-color: rgba(255,255,255,0.05) !important;
}

[data-theme="dark"] .xcs-nav-item.is-active {
  background: #FFFFFF !important;
  color: var(--xcs-navy) !important;
}

[data-theme="dark"] .xcs-nav-item.is-active svg {
  stroke: var(--xcs-navy) !important;
}

[data-theme="dark"] .xcs-mobile-bar {
  background: var(--xcs-navy) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * BRANDHOUSE V4 — SYSTEM-WIDE PAGE HERO + TYPOGRAPHY
 * Apply Forum-style hero polish to EVERY page (Dashboard, MeetUs, Help, etc)
 * ════════════════════════════════════════════════════════════════════════ */

/* ─── Page header — BrandHouse hero treatment ─── */
.xcs-pagehead {
  padding: 8px 0 18px;
  margin-bottom: 4px;
}

/* Eyebrow — pill style consistent dengan Forum */
.xcs-pagehead .xcs-eyebrow,
.xcs-eyebrow {
  display: inline-block;
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  color: var(--xcs-ink-3) !important;
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  margin-bottom: 14px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Big bold display heading — gradient ink→blue→ink */
.xcs-pagehead h1 {
  font-family: 'Jost', system-ui, sans-serif !important;
  font-size: 42px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.05 !important;
  margin: 0 0 12px !important;
  /* Flat color (was a 3-stop gradient with background-clip:text). */
  color: var(--xcs-ink-1) !important;
  background: none !important;
  -webkit-text-fill-color: var(--xcs-ink-1) !important;
}

/* Emojis inside h1 jangan kena gradient (revert to colored) */
.xcs-pagehead h1 > * {
  -webkit-text-fill-color: initial;
  background: none;
}

.xcs-pagehead-sub {
  color: var(--bh-muted) !important;
  font-size: 15.5px !important;
  font-weight: 500 !important;
  max-width: 640px;
  line-height: 1.55 !important;
}

/* CTA group at right of pagehead */
.xcs-pagehead-cta {
  gap: 10px !important;
}

.xcs-pagehead-cta .xcs-btn-primary {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
  border: 0 !important;
  padding: 11px 22px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  letter-spacing: -0.005em !important;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.xcs-pagehead-cta .xcs-btn-primary:hover:not(:disabled) {
  background: #262626 !important;
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

.xcs-pagehead-cta .xcs-btn-ghost {
  background: #FFFFFF !important;
  color: var(--bh-ink) !important;
  border: 1.5px solid var(--xcs-line-2) !important;
  padding: 10px 22px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  letter-spacing: -0.005em !important;
  transition: all 0.2s ease;
}

.xcs-pagehead-cta .xcs-btn-ghost:hover {
  border-color: var(--bh-ink) !important;
  background: var(--bh-slate-50) !important;
  transform: translateY(-1px);
}

/* Streak chip — refined */
.xcs-streak {
  border-radius: 14px !important;
  padding: 8px 14px 8px 12px !important;
  border-width: 1px !important;
  font-weight: 700 !important;
}

.xcs-streak-n {
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  font-size: 13px;
}

.xcs-streak-l {
  font-size: 10px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.8;
}

/* ─── Mobile responsive heading ─── */
@media (max-width: 720px) {
  .xcs-pagehead h1 {
    font-size: 28px !important;
    letter-spacing: -0.03em !important;
  }
  .xcs-pagehead-sub {
    font-size: 14px !important;
  }
  .xcs-pagehead .xcs-eyebrow,
  .xcs-eyebrow {
    padding: 5px 12px !important;
    font-size: 10px !important;
  }
  .xcs-pagehead {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .xcs-pagehead-cta {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* ─── Section headings (smaller, for inside-page sections) ─── */
.xcs-section-h,
.xcs-section-title,
h2.xcs-h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--bh-ink) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
}

/* ─── Stat cards — make even more refined ─── */
.xcs-stat {
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 16px !important;
  padding: 20px 22px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.xcs-stat:hover {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.18) !important;
  transform: translateY(-2px);
}

.xcs-stat h3,
.xcs-stat-title {
  color: var(--bh-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
  margin: 0 0 10px !important;
}

.xcs-stat-num,
.xcs-stat-value,
.xcs-stat .num,
.xcs-stat strong:first-of-type {
  font-size: 38px !important;
  font-weight: 900 !important;
  color: var(--bh-ink) !important;
  letter-spacing: -0.035em !important;
  line-height: 1 !important;
  display: block;
  margin-bottom: 4px;
}

.xcs-stat-sub,
.xcs-stat-meta {
  font-size: 12px !important;
  color: var(--bh-muted) !important;
  margin-top: 6px !important;
}

/* ─── Inputs/Forms — Clean polish ─── */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  font-family: inherit;
  border-radius: 10px;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Forms with explicit class */
.xcs-input,
.xcs-textarea,
.xcs-select {
  border: 1.5px solid var(--xcs-line-2) !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  color: var(--bh-ink) !important;
  transition: all 0.2s ease;
}

.xcs-input:focus,
.xcs-textarea:focus,
.xcs-select:focus {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 0 0 3px var(--bh-blue-tint) !important;
}

/* Labels */
.xcs-label,
label.xcs-form-label {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--bh-ink) !important;
  letter-spacing: -0.005em !important;
  margin-bottom: 6px !important;
  display: block;
}

/* ─── Meetus search box ─── */
.xcs-meetus-search {
  margin-bottom: 20px;
}

.xcs-meetus-search-input {
  background: #FFFFFF !important;
  border: 1.5px solid var(--xcs-line-2) !important;
  border-radius: 14px !important;
  padding: 4px 16px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.xcs-meetus-search-input:focus-within {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 0 0 4px var(--bh-blue-tint), 0 2px 8px rgba(0,0,0,0.1) !important;
}

.xcs-meetus-search-input svg {
  stroke: var(--bh-muted);
  flex-shrink: 0;
}

.xcs-meetus-search-input input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 0 !important;
  font-size: 14.5px !important;
  color: var(--bh-ink) !important;
  outline: none;
}

.xcs-meetus-search-input input::placeholder {
  color: var(--bh-muted) !important;
}

.xcs-meetus-search-clear {
  background: var(--bh-slate-100);
  border: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--bh-muted);
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.xcs-meetus-search-clear:hover {
  background: var(--bh-slate-200);
  color: var(--bh-ink);
}

/* ─── MVP banner / Hall of Fame ─── */
.xcs-mvp-banner {
  background: linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%) !important;
  border: 1px solid rgba(196,196,196,0.4) !important;
  border-radius: 16px !important;
  padding: 18px 22px !important;
  box-shadow: 0 4px 16px -8px rgba(196,196,196,0.3) !important;
  transition: all 0.25s ease;
}

.xcs-mvp-banner:hover {
  border-color: rgba(196,196,196,0.6) !important;
  box-shadow: 0 6px 20px -6px rgba(196,196,196,0.4) !important;
}

.xcs-mvp-eyebrow {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  color: #B45309 !important;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.xcs-mvp-line {
  color: var(--bh-ink) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
}

.xcs-mvp-line strong {
  font-weight: 800 !important;
  letter-spacing: -0.005em;
}

/* ─── Activity items ─── */
.xcs-activity {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xcs-activity-item {
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.xcs-activity-item:hover {
  border-color: var(--bh-blue) !important;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.15) !important;
}

/* ─── Section "card containers" (wrappers around big sections) ─── */
.xcs-section {
  background: #FFFFFF !important;
  border: 1px solid var(--bh-slate-200) !important;
  border-radius: 16px !important;
  padding: 22px 24px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* Main content area background */
.xcs-main {
  background: var(--bh-slate-50) !important;
}

.xcs-main-inner {
  padding: 28px 32px !important;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .xcs-main-inner {
    padding: 18px 14px !important;
  }
  .xcs-section {
    padding: 16px 18px !important;
    border-radius: 14px !important;
  }
}

/* ─── Bottom CTA / "Antrian penuh" link ─── */
.xcs-cta-link,
a.xcs-link-blue {
  color: var(--bh-blue) !important;
  font-weight: 700 !important;
  text-decoration: none;
  transition: color 0.15s ease;
}

.xcs-cta-link:hover,
a.xcs-link-blue:hover {
  color: var(--bh-blue-hover) !important;
}

/* ─── Tabs (sort tabs, queue tabs, etc) ─── */
.xcs-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--bh-slate-100) !important;
  border-radius: 12px;
  width: fit-content;
}

.xcs-tabs button,
.xcs-tab {
  background: transparent !important;
  border: 0;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--bh-muted) !important;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: -0.005em;
}

.xcs-tabs button:hover:not(.is-active),
.xcs-tab:hover:not(.is-active) {
  color: var(--bh-ink) !important;
  background: rgba(255,255,255,0.5) !important;
}

.xcs-tabs button.is-active,
.xcs-tab.is-active {
  background: #FFFFFF !important;
  color: var(--bh-ink) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* ─── Help page sections ─── */
.xcs-help-page,
.xcs-help-section {
  font-size: 15px;
  line-height: 1.65;
}

.xcs-help-section h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--bh-ink) !important;
  letter-spacing: -0.02em !important;
}

.xcs-help-section h3 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--bh-ink) !important;
}

/* ─── Detail page heading ─── */
.xcs-detail-h1 {
  font-size: 36px !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  color: var(--bh-ink) !important;
}

/* Forum-specific (already polished but ensure consistency) */
.xcs-forum-page .xcs-forum-title {
  font-size: 44px !important;
  font-weight: 900 !important;
}

@media (max-width: 720px) {
  .xcs-forum-page .xcs-forum-title {
    font-size: 32px !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * BRANDHOUSE V5 — Deep Navy-Blue (#0A0A0A) + Dark Mode Fix
 * ════════════════════════════════════════════════════════════════════════ */

/* ─── Sidebar: gunakan #0A0A0A (deeper, lebih premium) ─── */
.xcs-sidebar {
  background: #0A0A0A !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
}

/* Active item: putih dengan text deep navy-blue */
.xcs-nav-item.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
}

.xcs-nav-item.is-active svg {
  stroke: #0A0A0A !important;
}

.xcs-nav-item.is-meetus.is-active,
.xcs-nav-item.is-contentbank.is-active,
.xcs-nav-item.is-forum.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
}

.xcs-nav-item.is-active .xcs-pill {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}

.xcs-theme-toggle-btn.is-active {
  color: #0A0A0A !important;
}

/* Mobile header — match deep navy */
@media (max-width: 768px) {
  .xcs-mobile-bar {
    background: #0A0A0A !important;
    box-shadow: 0 1px 8px rgba(13,1,162,0.4) !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * DARK MODE FIX — Forum + Page heroes
 * Saat user pilih theme "Gelap", komponen polish V2/V3/V4 tetap readable
 * ════════════════════════════════════════════════════════════════════════ */

/* App background dark */
[data-theme="dark"] body,
[data-theme="dark"] .xcs-main {
  background: #0A0A0A !important;
}

/* Sidebar stays deep navy-blue in both themes (signature brand) */
[data-theme="dark"] .xcs-sidebar {
  background: #0A0A0A !important;
}

[data-theme="dark"] .xcs-mobile-bar {
  background: #0A0A0A !important;
}

/* ─── PAGE HERO in dark mode ─── */

[data-theme="dark"] .xcs-pagehead .xcs-eyebrow,
[data-theme="dark"] .xcs-eyebrow {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: var(--xcs-ink-3) !important;
}

/* Heading gradient: white → light blue → white */
[data-theme="dark"] .xcs-pagehead h1,
[data-theme="dark"] .xcs-forum-title {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--xcs-blue-fg) 60%, #FFFFFF 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

[data-theme="dark"] .xcs-pagehead-sub,
[data-theme="dark"] .xcs-forum-sub {
  color: rgba(255,255,255,0.6) !important;
}

/* ─── Cards & surfaces in dark mode ─── */
[data-theme="dark"] .xcs-stat,
[data-theme="dark"] .xcs-card,
[data-theme="dark"] .xcs-forum-post,
[data-theme="dark"] .xcs-forum-composer,
[data-theme="dark"] .xcs-forum-top-voters,
[data-theme="dark"] .xcs-shop-card,
[data-theme="dark"] .xcs-section,
[data-theme="dark"] .xcs-activity-item,
[data-theme="dark"] .xcs-req-card,
[data-theme="dark"] .xcs-table-row {
  background: #141414 !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.92) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

[data-theme="dark"] .xcs-stat:hover,
[data-theme="dark"] .xcs-forum-post:hover,
[data-theme="dark"] .xcs-shop-card:hover,
[data-theme="dark"] .xcs-activity-item:hover,
[data-theme="dark"] .xcs-req-card:hover {
  border-color: rgba(255,255,255,0.4) !important;
  box-shadow: 0 8px 24px -8px rgba(255,255,255,0.25) !important;
}

[data-theme="dark"] .xcs-stat-num,
[data-theme="dark"] .xcs-stat-value,
[data-theme="dark"] .xcs-stat strong:first-of-type {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-stat-label,
[data-theme="dark"] .xcs-stat-title,
[data-theme="dark"] .xcs-stat-sub,
[data-theme="dark"] .xcs-stat-meta {
  color: rgba(255,255,255,0.55) !important;
}

/* ─── Forum specifics in dark mode ─── */

[data-theme="dark"] .xcs-forum-post-body,
[data-theme="dark"] .xcs-forum-post-author {
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .xcs-forum-post-time,
[data-theme="dark"] .xcs-forum-post-dept,
[data-theme="dark"] .xcs-forum-composer-tip,
[data-theme="dark"] .xcs-forum-composer-name {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-forum-composer-name {
  color: rgba(255,255,255,0.95) !important;
}

/* Forum composer textarea dark */
[data-theme="dark"] .xcs-mention-textarea {
  background: #0A0A0A !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .xcs-mention-textarea::placeholder {
  color: rgba(255,255,255,0.4) !important;
}

[data-theme="dark"] .xcs-mention-textarea:focus {
  background: #141414 !important;
  border-color: var(--xcs-blue-fg) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18) !important;
}

/* Forum sort tabs dark mode */
[data-theme="dark"] .xcs-forum-sort-bar {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-forum-sort-btn {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-forum-sort-btn:hover {
  color: rgba(255,255,255,0.9) !important;
  background: rgba(255,255,255,0.05) !important;
}

[data-theme="dark"] .xcs-forum-sort-btn.is-active {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}

/* Image button dark */
[data-theme="dark"] .xcs-forum-image-btn {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.8) !important;
}

[data-theme="dark"] .xcs-forum-image-btn:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: var(--xcs-blue-fg) !important;
  color: var(--xcs-blue-fg) !important;
}

/* Char count + post button area */
[data-theme="dark"] .xcs-forum-charcount {
  color: rgba(255,255,255,0.4) !important;
}

/* Vote breakdown chips dark */
[data-theme="dark"] .xcs-forum-vote-breakdown {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-forum-vote-chip {
  background: #141414 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.9) !important;
}

/* Comment items dark */
[data-theme="dark"] .xcs-forum-comment {
  background: rgba(255,255,255,0.03) !important;
}

[data-theme="dark"] .xcs-forum-comment:hover {
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .xcs-forum-comment-meta {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-forum-comment-meta strong,
[data-theme="dark"] .xcs-forum-comment-text {
  color: rgba(255,255,255,0.95) !important;
}

/* Top voters dark */
[data-theme="dark"] .xcs-forum-top-voters {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(196,196,196,0.03) 100%) !important;
}

[data-theme="dark"] .xcs-forum-top-voter {
  background: #141414 !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-forum-top-voter-name {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-forum-top-voter-stats {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-forum-top-voter.rank-1 {
  background: linear-gradient(135deg, rgba(196,196,196,0.12) 0%, rgba(26,36,64,0.95) 100%) !important;
  border-color: rgba(196,196,196,0.4) !important;
}

[data-theme="dark"] .xcs-forum-top-voter.rank-2 {
  background: linear-gradient(135deg, rgba(154,154,154,0.1) 0%, rgba(26,36,64,0.95) 100%) !important;
}

[data-theme="dark"] .xcs-forum-top-voter.rank-3 {
  background: linear-gradient(135deg, rgba(217,119,6,0.1) 0%, rgba(26,36,64,0.95) 100%) !important;
}

/* Free vote button dark mode */
[data-theme="dark"] .xcs-forum-free-vote-btn {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.85) !important;
}

[data-theme="dark"] .xcs-forum-free-vote-btn:hover {
  border-color: var(--xcs-blue-fg) !important;
  color: var(--xcs-blue-fg) !important;
}

/* Voted state stays blue */
[data-theme="dark"] .xcs-forum-free-vote-btn.is-voted {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}

/* Comment toggle dark */
[data-theme="dark"] .xcs-forum-comment-toggle {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-forum-comment-toggle:hover {
  color: var(--xcs-blue-fg) !important;
  background: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-forum-comment-toggle.is-open {
  color: var(--xcs-blue-fg) !important;
}

/* Forum post foot border */
[data-theme="dark"] .xcs-forum-post-foot {
  border-top-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-forum-comments {
  border-top-color: rgba(255,255,255,0.2) !important;
}

/* Forum badges */
[data-theme="dark"] .xcs-forum-badge {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.7) !important;
}

/* ─── Mention textarea dropdown ─── */
[data-theme="dark"] .xcs-mention-dropdown {
  background: #141414 !important;
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .xcs-mention-item {
  color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .xcs-mention-item.is-active,
[data-theme="dark"] .xcs-mention-item:hover {
  background: rgba(255,255,255,0.12) !important;
}

[data-theme="dark"] .xcs-mention-name {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-mention-dept {
  color: rgba(255,255,255,0.5) !important;
}

/* ─── Tabs in dark mode ─── */
[data-theme="dark"] .xcs-tabs {
  background: rgba(255,255,255,0.04) !important;
}

[data-theme="dark"] .xcs-tabs button,
[data-theme="dark"] .xcs-tab {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-tabs button:hover:not(.is-active),
[data-theme="dark"] .xcs-tab:hover:not(.is-active) {
  color: rgba(255,255,255,0.9) !important;
  background: rgba(255,255,255,0.04) !important;
}

[data-theme="dark"] .xcs-tabs button.is-active,
[data-theme="dark"] .xcs-tab.is-active {
  background: rgba(255,255,255,0.15) !important;
  color: #FFFFFF !important;
}

/* ─── Inputs dark ─── */
[data-theme="dark"] .xcs-input,
[data-theme="dark"] .xcs-textarea,
[data-theme="dark"] .xcs-select {
  background: #0A0A0A !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .xcs-input:focus,
[data-theme="dark"] .xcs-textarea:focus,
[data-theme="dark"] .xcs-select:focus {
  border-color: var(--xcs-blue-fg) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18) !important;
}

[data-theme="dark"] .xcs-meetus-search-input {
  background: #141414 !important;
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .xcs-meetus-search-input input {
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .xcs-meetus-search-input input::placeholder {
  color: rgba(255,255,255,0.4) !important;
}

/* ─── MVP banner dark mode (keep yellow but adapt) ─── */
[data-theme="dark"] .xcs-mvp-banner {
  background: linear-gradient(135deg, rgba(196,196,196,0.06) 0%, rgba(19,28,48,0.9) 100%) !important;
  border-color: rgba(196,196,196,0.25) !important;
}

[data-theme="dark"] .xcs-mvp-line {
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .xcs-mvp-eyebrow {
  color: var(--xcs-yellow) !important;
}

/* ─── Notification bell dark ─── */
[data-theme="dark"] .xcs-notif-bell {
  background: #141414 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.85) !important;
}

[data-theme="dark"] .xcs-notif-bell:hover {
  border-color: var(--xcs-blue-fg) !important;
  color: var(--xcs-blue-fg) !important;
}

/* ─── Bottom CTA links ─── */
[data-theme="dark"] .xcs-cta-link,
[data-theme="dark"] a.xcs-link-blue {
  color: var(--xcs-blue-fg) !important;
}

[data-theme="dark"] .xcs-cta-link:hover {
  color: var(--xcs-blue-fg) !important;
}

/* Section heading dark */
[data-theme="dark"] .xcs-section-h,
[data-theme="dark"] .xcs-section-title,
[data-theme="dark"] h2.xcs-h2 {
  color: #FFFFFF !important;
}

/* Streak chip dark mode */
[data-theme="dark"] .xcs-streak-warm {
  background: rgba(196,196,196,0.08) !important;
  border-color: rgba(196,196,196,0.3) !important;
  color: #D6D6D6 !important;
}

[data-theme="dark"] .xcs-streak-hot {
  background: rgba(249,115,22,0.08) !important;
  border-color: rgba(249,115,22,0.3) !important;
  color: #FB923C !important;
}

[data-theme="dark"] .xcs-streak-fire {
  background: rgba(239,68,68,0.08) !important;
  border-color: rgba(239,68,68,0.3) !important;
  color: #F87171 !important;
}

/* Buttons preserve readability in dark */
[data-theme="dark"] .xcs-btn-ghost,
[data-theme="dark"] .xcs-pagehead-cta .xcs-btn-ghost {
  background: rgba(255,255,255,0.04) !important;
  color: rgba(255,255,255,0.92) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .xcs-btn-ghost:hover,
[data-theme="dark"] .xcs-pagehead-cta .xcs-btn-ghost:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.25) !important;
}

/* Score badge stays yellow in dark mode */
[data-theme="dark"] .xcs-forum-post-score {
  /* keep as-is (yellow gradient looks good on dark) */
}

/* Vote modal dark */
[data-theme="dark"] .xcs-modal,
[data-theme="dark"] .xcs-modal-image-guide,
[data-theme="dark"] .xcs-modal-vote,
[data-theme="dark"] .xcs-modal-vote-history {
  background: #141414 !important;
  color: rgba(255,255,255,0.95) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .xcs-modal-h h2 {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-modal-close {
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.8) !important;
}

[data-theme="dark"] .xcs-vote-item {
  background: #0A0A0A !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .xcs-vote-item:hover {
  border-color: var(--xcs-blue-fg) !important;
}

[data-theme="dark"] .xcs-vote-item-name {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-vote-item-stock {
  color: rgba(255,255,255,0.6) !important;
}

/* Vote history modal dark */
[data-theme="dark"] .xcs-vote-history-summary {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-vote-history-stat-num {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-vote-history-stat-label {
  color: rgba(255,255,255,0.6) !important;
}

[data-theme="dark"] .xcs-vote-history-group {
  background: #0A0A0A !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-vote-history-group-header {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-vote-history-group-name {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-vote-history-group-meta,
[data-theme="dark"] .xcs-vote-history-voter-time {
  color: rgba(255,255,255,0.55) !important;
}

[data-theme="dark"] .xcs-vote-history-voter:hover {
  background: rgba(255,255,255,0.04) !important;
}

[data-theme="dark"] .xcs-vote-history-voter-name {
  color: #FFFFFF !important;
}

/* Image guide modal dark */
[data-theme="dark"] .xcs-image-guide-list li,
[data-theme="dark"] .xcs-image-guide-mobile {
  color: rgba(255,255,255,0.85) !important;
}

[data-theme="dark"] .xcs-image-guide-link {
  color: var(--xcs-blue-fg) !important;
}

[data-theme="dark"] .xcs-image-guide-tabs {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-image-guide-warning {
  background: rgba(239,68,68,0.1) !important;
  color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .xcs-image-guide-details {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .xcs-image-guide-details summary {
  color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .xcs-image-url-input label,
[data-theme="dark"] .xcs-image-url-preview-label {
  color: rgba(255,255,255,0.85) !important;
}

[data-theme="dark"] .xcs-image-url-input input {
  background: #0A0A0A !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.95) !important;
}

/* ─── Notification panel dark ─── */
[data-theme="dark"] .xcs-notif-panel {
  background: #141414 !important;
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .xcs-notif-card {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.95) !important;
}

[data-theme="dark"] .xcs-notif-card.unread {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.3) !important;
}

[data-theme="dark"] .xcs-notif-card-title {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-notif-card-body {
  color: rgba(255,255,255,0.85) !important;
}

[data-theme="dark"] .xcs-notif-title {
  color: #FFFFFF !important;
}

[data-theme="dark"] .xcs-notif-sub,
[data-theme="dark"] .xcs-notif-card-foot {
  color: rgba(255,255,255,0.55) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * 🎨 QUICK COLOR CONFIG — EDIT DI SINI UNTUK GANTI WARNA SIDEBAR/HEADER
 * ════════════════════════════════════════════════════════════════════════
 *
 *  Hanya ada 2 warna utama yang perlu diubah:
 *
 *  --xcs-sidebar-bg   →  Warna background sidebar (desktop) + mobile header
 *  --xcs-sidebar-fg   →  Warna text/icon active state (biasanya putih atau
 *                         versi gelap dari sidebar-bg untuk active pill)
 *
 *  Contoh preset:
 *  - Deep navy blue:   #0A0A0A  (current default)
 *  - BrandHouse blue:  #1A1A1A
 *  - Royal blue:       #161616
 *  - Indigo:           #1A1A1A
 *  - Slate dark:       #0A0A0A
 *  - Dark navy:        #0A0A0A
 *  - Black:            #000000
 *  - Custom warna lain: gunakan picker color di Chrome DevTools
 *
 * ════════════════════════════════════════════════════════════════════════ */

:root {
  --xcs-sidebar-bg: #0A0A0A;       /* ← UBAH WARNA SIDEBAR DI SINI */
  --xcs-sidebar-fg: #0A0A0A;       /* ← warna text saat active item (sama dengan bg untuk kontras putih) */
}

/* Apply ke sidebar */
.xcs-sidebar {
  background: var(--xcs-sidebar-bg) !important;
}

/* Apply ke mobile header */
@media (max-width: 768px) {
  .xcs-mobile-bar {
    background: var(--xcs-sidebar-bg) !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.25) !important;
  }
}

/* Active item: putih solid dengan text = warna sidebar */
.xcs-nav-item.is-active,
.xcs-nav-item.is-meetus.is-active,
.xcs-nav-item.is-contentbank.is-active,
.xcs-nav-item.is-forum.is-active {
  background: #FFFFFF !important;
  color: var(--xcs-sidebar-fg) !important;
}

.xcs-nav-item.is-active svg {
  stroke: var(--xcs-sidebar-fg) !important;
}

.xcs-nav-item.is-active .xcs-pill {
  background: var(--xcs-sidebar-fg) !important;
  color: #FFFFFF !important;
}

.xcs-theme-toggle-btn.is-active {
  color: var(--xcs-sidebar-fg) !important;
}

/* Dark mode keeps same sidebar color */
[data-theme="dark"] .xcs-sidebar,
[data-theme="dark"] .xcs-mobile-bar {
  background: var(--xcs-sidebar-bg) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * LOGO — NO EFFECTS (clean, no glow)
 * Override all previous drop-shadow filters on logos.
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-logo,
.xcs-sidebar .xcs-logo,
.xcs-mobile-bar .xcs-logo,
.xcs-mobile-brand .xcs-logo,
.xcs-brand .xcs-logo {
  filter: none !important;
}

/* Mobile bar logo wrapper too */
.xcs-mobile-brand svg,
.xcs-mobile-brand .xcs-logo svg {
  filter: none !important;
  text-shadow: none !important;
}

/* Sidebar brand logo svg */
.xcs-sidebar .xcs-logo svg,
.xcs-brand .xcs-logo svg {
  filter: none !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * MOBILE HEADER LOGO — MATCH SIDEBAR
 * The mobile header (.xcs-mobile-bar) had a yellow pill background,
 * text-shadow on the wordmark, and a pulse animation that re-applied the
 * yellow glow mid-cycle. The sidebar logo has none of these — it sits
 * flat on navy. Strip them so the header logo reads identically.
 * ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .xcs-mobile-bar > .xcs-mobile-brand,
  .xcs-mobile-bar .xcs-mobile-brand {
    background: transparent !important;
    animation: none !important;
  }
  .xcs-mobile-bar > .xcs-mobile-brand span,
  .xcs-mobile-bar .xcs-mobile-brand span {
    text-shadow: none !important;
  }
  .xcs-mobile-bar > .xcs-mobile-brand svg,
  .xcs-mobile-bar .xcs-mobile-brand svg,
  .xcs-mobile-bar .xcs-mobile-brand .xcs-logo,
  .xcs-mobile-bar .xcs-mobile-brand .xcs-logo svg {
    filter: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * SIDEBAR SCROLL FIX — Desktop
 * The sidebar is `height: 100vh` flex column. When the user list grows
 * (balance card + theme switcher + userblock with logout) it overflows
 * the viewport with no way to reach the bottom. Add vertical scroll.
 * Thin scrollbar styling keeps it visually quiet on navy.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-sidebar {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
/* WebKit (Chrome/Safari/Edge) */
.xcs-sidebar::-webkit-scrollbar {
  width: 6px;
}
.xcs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.xcs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 3px;
}
.xcs-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.30);
}

/* ════════════════════════════════════════════════════════════════════════
 * SHOP ADMIN TABLE — Responsive horizontal scroll + column collapse
 * Problem: at narrow widths (especially with sidebar open) the rightmost
 * columns (Order, Actions) get cut off and there's no way to scroll.
 * Fix: ensure the table wrapper scrolls horizontally, give the table a
 * sensible min-width so it actually overflows, then hide non-essential
 * columns (Order, Tier in mobile-narrow) at small viewports.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-admin-table-wrap {
  /* Was `overflow: hidden` + `overflow-x: auto` (conflicting). Be explicit. */
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}
.xcs-admin-table {
  /* Force horizontal overflow so the wrap can actually scroll. The min-width
     is calibrated to fit all 9 columns comfortably. */
  min-width: 920px;
}

/* Narrow viewports (tablet/sidebar-open) → hide the lowest-priority column */
@media (max-width: 1100px) {
  .xcs-admin-table .col-order,
  .xcs-admin-table th.col-order,
  .xcs-admin-table td.col-order {
    display: none;
  }
  .xcs-admin-table {
    min-width: 780px;
  }
}

/* Mobile → hide Tier too; keep Preview/Name/Type/Price/Status/Actions */
@media (max-width: 720px) {
  .xcs-admin-table .col-tier,
  .xcs-admin-table th.col-tier,
  .xcs-admin-table td.col-tier {
    display: none;
  }
  .xcs-admin-table {
    min-width: 640px;
  }
}

/* Tiny screens → also hide ID column (long codes that take horizontal space) */
@media (max-width: 520px) {
  .xcs-admin-table .col-id,
  .xcs-admin-table th.col-id,
  .xcs-admin-table td.col-id {
    display: none;
  }
  .xcs-admin-table {
    min-width: 520px;
  }
}

/* Subtle visual cue that horizontal scroll exists: thin scrollbar */
.xcs-admin-table-wrap::-webkit-scrollbar {
  height: 8px;
}
.xcs-admin-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.xcs-admin-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 4px;
}
.xcs-admin-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.30);
}
[data-theme="dark"] .xcs-admin-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
}
[data-theme="dark"] .xcs-admin-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.30);
}

/* Hard-delete button — visually distinct from soft-delete (red instead of grey) */
.xcs-admin-act-hard-delete {
  /* Use the same base styling but make it look more destructive */
  filter: hue-rotate(-10deg) saturate(1.4);
}
.xcs-admin-act-hard-delete:hover {
  background: rgba(239,68,68,0.12) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * SIDEBAR SEARCH — Clear button (×)
 * Replaces the ⌘K kbd hint when the search input has content. Visual match:
 * same size, same color tone as the kbd it replaces, but acts as a button.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-search-clear {
  appearance: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.7);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.xcs-search-clear:hover {
  background: rgba(255,255,255,0.18);
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.25);
}
.xcs-search-clear:focus-visible {
  outline: 2px solid rgba(196,196,196,0.5);
  outline-offset: 1px;
}

/* ════════════════════════════════════════════════════════════════════════
 * RESULT CARD — Kirim Hasil (Google Drive deliverable)
 * Sits below the Detail aside card. PIC/admin can submit a gdrive URL,
 * which auto-moves status to "Ditinjau".
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-result-card .xcs-card-h h3 {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Saved link display */
.xcs-result-show {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.xcs-result-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;
  color: var(--xcs-blue);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.xcs-result-link:hover {
  background: rgba(0,0,0,0.12);
  border-color: rgba(0,0,0,0.35);
  text-decoration: none;
}
.xcs-result-link-ico { font-size: 16px; flex-shrink: 0; }
.xcs-result-link-text { flex: 1; font-size: 13px; }
.xcs-result-link-ext { font-size: 14px; opacity: 0.7; flex-shrink: 0; }
.xcs-result-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Empty (no link, can't submit) */
.xcs-result-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--xcs-ink-3, #6E6E6E);
  text-align: center;
}

/* Submission form */
.xcs-result-form { display: flex; flex-direction: column; gap: 8px; }
.xcs-result-form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--xcs-ink-2, #3A3A3A);
}
.xcs-result-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 8px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--xcs-bg-1, #FFFFFF);
  color: var(--xcs-ink-1, #0A0A0A);
  box-sizing: border-box;
}
.xcs-result-input:focus {
  outline: none;
  border-color: var(--xcs-blue);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}
.xcs-result-input.has-error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.xcs-result-err {
  font-size: 12px;
  color: #B91C1C;
  background: rgba(239,68,68,0.08);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239,68,68,0.2);
}
.xcs-result-hint {
  font-size: 11.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  line-height: 1.5;
}
.xcs-result-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Small-button + danger-text modifiers (general-purpose, used here) */
.xcs-btn-sm {
  padding: 6px 12px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
}
.xcs-btn-danger-text {
  color: #B91C1C !important;
}
.xcs-btn-danger-text:hover {
  background: rgba(239,68,68,0.08) !important;
}

/* Dark theme adjustments */
[data-theme="dark"] .xcs-result-link {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  color: var(--xcs-blue-fg);
}
[data-theme="dark"] .xcs-result-link:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.40);
}
[data-theme="dark"] .xcs-result-input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: #E3E3E3;
}
[data-theme="dark"] .xcs-result-input:focus {
  border-color: var(--xcs-blue-fg);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.20);
}
[data-theme="dark"] .xcs-result-err {
  background: rgba(239,68,68,0.15);
  color: #FCA5A5;
  border-color: rgba(239,68,68,0.30);
}
[data-theme="dark"] .xcs-btn-danger-text {
  color: #FCA5A5 !important;
}
[data-theme="dark"] .xcs-btn-danger-text:hover {
  background: rgba(239,68,68,0.15) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * RESULT CONFIRM — Requester confirmation actions (Terima / Minta Revisi)
 * Sits inside the Kirim Hasil card below the link, only when status='review'
 * AND viewer is the requester or admin/staff/lead.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-result-confirm {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--xcs-line-1, #E3E3E3);
}
.xcs-result-confirm-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.xcs-result-confirm-ico {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.xcs-result-confirm-head strong {
  display: block;
  font-size: 13px;
  color: var(--xcs-ink-1, #0A0A0A);
}
.xcs-result-confirm-sub {
  font-size: 11.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-top: 2px;
}
.xcs-result-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.xcs-result-textarea {
  font-family: inherit !important;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}
.xcs-result-revform {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-theme="dark"] .xcs-result-confirm {
  border-top-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-result-confirm-head strong {
  color: #F4F4F4;
}

/* ════════════════════════════════════════════════════════════════════════
 * BROADCAST POPUP — Global admin → user messages
 * Single floating modal; all undismissed messages stack inside a scrollable
 * container. Each message has its own "Siap" button to dismiss per-user.
 * Persists across page loads until expires or user dismisses each one.
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-broadcast-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.55);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: xcs-bcast-fade-in 0.2s ease-out;
  backdrop-filter: blur(2px);
}
@keyframes xcs-bcast-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.xcs-broadcast-panel {
  background: var(--xcs-bg-1, #FFFFFF);
  color: var(--xcs-ink-1, #0A0A0A);
  border-radius: 18px;
  width: min(640px, 100%);
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,0.45);
  overflow: hidden;
  animation: xcs-bcast-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes xcs-bcast-pop {
  from { transform: scale(0.92) translateY(20px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
.xcs-broadcast-head {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--xcs-line-1, #E3E3E3);
  flex-shrink: 0;
}
.xcs-broadcast-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.xcs-broadcast-count {
  background: var(--xcs-blue);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.xcs-broadcast-head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--xcs-ink-3, #6E6E6E);
}
.xcs-broadcast-list {
  overflow-y: auto;
  padding: 14px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.xcs-broadcast-list::-webkit-scrollbar { width: 8px; }
.xcs-broadcast-list::-webkit-scrollbar-track { background: transparent; }
.xcs-broadcast-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}
.xcs-broadcast-list::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.30); }

.xcs-broadcast-item {
  background: var(--xcs-bg-2, #F7F7F7);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-left: 4px solid var(--xcs-blue); /* overridden inline per kind */
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.xcs-broadcast-item-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.xcs-broadcast-item-ico {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.xcs-broadcast-item-titlewrap { flex: 1; min-width: 0; }
.xcs-broadcast-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  word-wrap: break-word;
}
.xcs-broadcast-item-meta {
  font-size: 11px;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-top: 2px;
}
.xcs-broadcast-item-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--xcs-ink-2, #3A3A3A);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.xcs-broadcast-item-foot {
  display: flex;
  justify-content: flex-end;
}
.xcs-broadcast-dismiss {
  appearance: none;
  background: #FFFFFF;
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  color: var(--xcs-ink-1, #0A0A0A);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.xcs-broadcast-dismiss:hover:not(:disabled) {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.xcs-broadcast-dismiss:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Dark theme overrides */
[data-theme="dark"] .xcs-broadcast-panel {
  background: #0A0A0A;
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-broadcast-head {
  border-bottom-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-broadcast-head p {
  color: rgba(244,244,244,0.65);
}
[data-theme="dark"] .xcs-broadcast-item {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-broadcast-item-meta {
  color: rgba(244,244,244,0.55);
}
[data-theme="dark"] .xcs-broadcast-item-body {
  color: rgba(244,244,244,0.85);
}
[data-theme="dark"] .xcs-broadcast-dismiss {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-broadcast-dismiss:hover:not(:disabled) {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
}
[data-theme="dark"] .xcs-broadcast-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
}

/* Mobile: full-width, less rounded */
@media (max-width: 520px) {
  .xcs-broadcast-overlay { padding: 8px; }
  .xcs-broadcast-panel { border-radius: 14px; max-height: 92vh; }
  .xcs-broadcast-head { padding: 16px 18px 12px; }
  .xcs-broadcast-list { padding: 12px 14px 16px; }
}

/* ════════════════════════════════════════════════════════════════════════
 * BROADCAST ADMIN PAGE — Compose / list / edit
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-bcastadmin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.xcs-bcastadmin-row {
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-left: 4px solid var(--xcs-blue);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--xcs-shadow-sm);
}
.xcs-bcastadmin-row.is-expired {
  opacity: 0.6;
}
.xcs-bcastadmin-main { flex: 1; min-width: 0; }
.xcs-bcastadmin-titlerow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.xcs-bcastadmin-titlerow h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.xcs-bcastadmin-kind { font-size: 20px; line-height: 1; }
.xcs-bcastadmin-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: #F4F4F4;
  color: #6E6E6E;
}
.xcs-bcastadmin-tag.is-expired {
  background: rgba(239,68,68,0.10);
  color: #B91C1C;
}
.xcs-bcastadmin-body {
  margin: 4px 0 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--xcs-ink-2, #3A3A3A);
  white-space: pre-wrap;
  word-wrap: break-word;
  /* Clamp long messages in admin list */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xcs-bcastadmin-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--xcs-ink-3, #6E6E6E);
}
.xcs-bcastadmin-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

[data-theme="dark"] .xcs-bcastadmin-row {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-bcastadmin-body {
  color: rgba(244,244,244,0.80);
}
[data-theme="dark"] .xcs-bcastadmin-meta {
  color: rgba(244,244,244,0.55);
}
[data-theme="dark"] .xcs-bcastadmin-tag {
  background: rgba(255,255,255,0.06);
  color: rgba(244,244,244,0.65);
}

/* Compose modal */
.xcs-bcastform-modal {
  max-width: 640px;
  width: 100%;
}
.xcs-bcastform-kindrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.xcs-bcastform-kindbtn {
  appearance: none;
  background: transparent;
  border: 1.5px solid var(--xcs-line-1, #E3E3E3);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  color: var(--xcs-ink-1, #0A0A0A);
}
.xcs-bcastform-kindbtn:hover {
  background: var(--xcs-bg-tint, #F7F7F7);
  border-color: var(--accent, var(--xcs-blue));
}
.xcs-bcastform-kindbtn.is-on {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: var(--accent, var(--xcs-blue));
  color: var(--accent, var(--xcs-blue));
}
.xcs-bcastform-kindico { font-size: 16px; }

.xcs-bcastform-preview {
  background: var(--xcs-bg-tint, #F7F7F7);
  border: 1px dashed var(--xcs-line-1, #E3E3E3);
  border-radius: 10px;
  padding: 12px;
}

[data-theme="dark"] .xcs-bcastform-kindbtn {
  border-color: rgba(255,255,255,0.15);
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-bcastform-kindbtn:hover {
  background: rgba(255,255,255,0.04);
}
[data-theme="dark"] .xcs-bcastform-preview {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.10);
}

/* Mobile: stack actions below main */
@media (max-width: 640px) {
  .xcs-bcastadmin-row {
    flex-direction: column;
  }
  .xcs-bcastadmin-actions {
    align-self: stretch;
    justify-content: flex-end;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * BROADCAST READERS — Inline expandable list of users who clicked Siap
 * ════════════════════════════════════════════════════════════════════════ */

/* The row was originally a horizontal flex (main + actions). Now we need
   to ALSO host an expanded readers panel below them. Switch the row to
   flex-column and move the horizontal layout into .xcs-bcastadmin-rowhead. */
.xcs-bcastadmin-row {
  flex-direction: column !important;
  gap: 0 !important;
}
.xcs-bcastadmin-rowhead {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

@media (max-width: 640px) {
  .xcs-bcastadmin-rowhead {
    flex-direction: column;
  }
  .xcs-bcastadmin-rowhead .xcs-bcastadmin-actions {
    align-self: stretch;
    justify-content: flex-end;
  }
}

/* Read-count toggle button — looks like the surrounding meta text but is interactive */
.xcs-bcastadmin-readers-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 8px 2px 0;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}
.xcs-bcastadmin-readers-toggle:hover {
  background: rgba(0,0,0,0.08);
  color: var(--xcs-blue);
}
.xcs-bcastadmin-readers-caret {
  font-size: 10px;
  opacity: 0.7;
}
[data-theme="dark"] .xcs-bcastadmin-readers-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: var(--xcs-blue-fg);
}

/* Expanded panel below the row header */
.xcs-bcastadmin-readers {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--xcs-line-1, #E3E3E3);
  animation: xcs-bcast-readers-expand 0.2s ease-out;
}
@keyframes xcs-bcast-readers-expand {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.xcs-bcastadmin-readers-head {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--xcs-ink-3, #6E6E6E);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.xcs-bcastadmin-readers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.xcs-bcastadmin-reader {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--xcs-bg-tint, #F7F7F7);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 999px;
  padding: 3px 10px 3px 3px;
  font-size: 12.5px;
}
.xcs-bcastadmin-reader-av {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
}
.xcs-bcastadmin-reader-name {
  color: var(--xcs-ink-1, #0A0A0A);
  font-weight: 500;
  white-space: nowrap;
}

.xcs-bcastadmin-readers-loading,
.xcs-bcastadmin-readers-empty,
.xcs-bcastadmin-readers-error {
  font-size: 12.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  padding: 6px 0;
}
.xcs-bcastadmin-readers-error {
  color: #B91C1C;
}

[data-theme="dark"] .xcs-bcastadmin-readers {
  border-top-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-bcastadmin-readers-head {
  color: rgba(244,244,244,0.55);
}
[data-theme="dark"] .xcs-bcastadmin-reader {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-bcastadmin-reader-name {
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-bcastadmin-readers-loading,
[data-theme="dark"] .xcs-bcastadmin-readers-empty {
  color: rgba(244,244,244,0.55);
}
[data-theme="dark"] .xcs-bcastadmin-readers-error {
  color: #FCA5A5;
}

/* ════════════════════════════════════════════════════════════════════════
 * SHOP ADMIN TABLE — Horizontal scroll arrow buttons
 * Two arrow buttons above the table, each shift the scroll wrap by ~200px.
 * Visibility is driven by JS (canScrollLeft / canScrollRight). We keep both
 * buttons mounted but toggle visibility per-button so the bar height stays
 * stable when transitioning from "only one button" to "two buttons" states.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-admin-table-scrollbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 10px;
  align-items: center;
}
.xcs-admin-scrollbtn {
  appearance: none;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  color: var(--xcs-ink-1, #0A0A0A);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: var(--xcs-shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.xcs-admin-scrollbtn:hover:not(:disabled) {
  background: var(--xcs-blue);
  border-color: var(--xcs-blue);
  color: #FFFFFF;
}
.xcs-admin-scrollbtn:active:not(:disabled) {
  transform: scale(0.94);
}
.xcs-admin-scrollbtn:focus-visible {
  outline: 2px solid rgba(0,0,0,0.5);
  outline-offset: 2px;
}

[data-theme="dark"] .xcs-admin-scrollbtn {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-admin-scrollbtn:hover:not(:disabled) {
  background: var(--xcs-blue-fg);
  border-color: var(--xcs-blue-fg);
  color: #0A0A0A;
}


/* ════════════════════════════════════════════════════════════════════════
 * DAILY ATTENDANCE — Popup + permanent button
 *
 * Popup: full-screen overlay with confetti-vibe panel. Friday gets a
 *        warm gradient + ⭐ to feel like a special day.
 * Button: small pill in the sidebar, sits above the balance chip.
 *         Only renders when canClaim=true; disappears post-claim.
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-att-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.55);
  display: grid;
  place-items: center;
  padding: 16px;
  backdrop-filter: blur(2px);
  animation: xcs-att-fade 0.2s ease-out;
}
@keyframes xcs-att-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.xcs-att-panel {
  position: relative;
  background: var(--xcs-bg-1, #FFFFFF);
  color: var(--xcs-ink-1, #0A0A0A);
  border-radius: 24px;
  width: min(440px, 100%);
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,0.45);
  animation: xcs-att-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
@keyframes xcs-att-pop {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
/* Friday gets a celebratory warm tint */
.xcs-att-panel.is-friday {
  background: linear-gradient(180deg, #F7F7F7 0%, #FFFFFF 80%);
}
.xcs-att-panel.is-friday::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(196,196,196,0.18) 0%, transparent 60%);
  pointer-events: none;
}

.xcs-att-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.05);
  color: var(--xcs-ink-2, #3A3A3A);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  z-index: 2;
}
.xcs-att-close:hover:not(:disabled) {
  background: rgba(0,0,0,0.1);
}
.xcs-att-close:disabled { opacity: 0.4; cursor: wait; }

.xcs-att-head { position: relative; z-index: 1; }
.xcs-att-ico {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
  animation: xcs-att-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
@keyframes xcs-att-bounce {
  0%   { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.xcs-att-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.xcs-att-sub {
  margin: 0;
  color: var(--xcs-ink-3, #6E6E6E);
  font-size: 13.5px;
  line-height: 1.5;
}

.xcs-att-amount {
  margin: 22px 0 6px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.xcs-att-amount-val {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--xcs-blue);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.xcs-att-panel.is-friday .xcs-att-amount-val {
  color: #B45309; /* warm amber for Friday */
}
.xcs-att-amount-plus {
  font-size: 36px;
  vertical-align: top;
}
.xcs-att-amount-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--xcs-ink-3, #6E6E6E);
  text-transform: lowercase;
}

.xcs-att-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: rgba(239,68,68,0.10);
  color: #B91C1C;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  margin: 8px 0 4px;
  position: relative;
  z-index: 1;
}
.xcs-att-streak-hint {
  color: rgba(185,28,28,0.7);
  font-weight: 500;
}

.xcs-att-err {
  margin: 12px 0 0;
  padding: 8px 12px;
  background: rgba(239,68,68,0.10);
  color: #B91C1C;
  border-radius: 8px;
  font-size: 12.5px;
}

.xcs-att-actions {
  margin: 22px 0 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.xcs-att-btn, .xcs-att-btn-secondary {
  padding: 11px 22px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  min-width: 110px;
}
.xcs-att-btn {
  /* "Klaim" button — big and inviting */
  background: #0A0A0A !important;
  border: 0 !important;
  color: #FFFFFF !important;
}
.xcs-att-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -2px rgba(36,95,234,0.45);
}
.xcs-att-panel.is-friday .xcs-att-btn {
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%) !important;
}
.xcs-att-panel.is-friday .xcs-att-btn:hover:not(:disabled) {
  box-shadow: 0 6px 16px -2px rgba(245,158,11,0.45);
}

.xcs-att-foot {
  margin-top: 6px;
  font-size: 11px;
  color: var(--xcs-ink-3, #6E6E6E);
  position: relative;
  z-index: 1;
}

/* Dark theme */
[data-theme="dark"] .xcs-att-panel {
  background: #222222;
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-att-panel.is-friday {
  background: linear-gradient(180deg, #2A2A2A 0%, #222222 80%);
}
[data-theme="dark"] .xcs-att-sub,
[data-theme="dark"] .xcs-att-foot {
  color: rgba(244,244,244,0.65);
}
[data-theme="dark"] .xcs-att-amount-label {
  color: rgba(244,244,244,0.55);
}
[data-theme="dark"] .xcs-att-amount-val {
  color: var(--xcs-blue-fg);
}
[data-theme="dark"] .xcs-att-panel.is-friday .xcs-att-amount-val {
  color: #FBBF24;
}
[data-theme="dark"] .xcs-att-close {
  background: rgba(255,255,255,0.06);
  color: rgba(244,244,244,0.7);
}
[data-theme="dark"] .xcs-att-close:hover:not(:disabled) {
  background: rgba(255,255,255,0.12);
}
[data-theme="dark"] .xcs-att-streak {
  background: rgba(239,68,68,0.15);
  color: #FCA5A5;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .xcs-att-panel { padding: 26px 20px 18px; border-radius: 20px; }
  .xcs-att-amount-val { font-size: 48px; }
  .xcs-att-ico { font-size: 48px; }
  .xcs-att-head h3 { font-size: 19px; }
  .xcs-att-actions { flex-direction: column-reverse; width: 100%; }
  .xcs-att-btn, .xcs-att-btn-secondary {
    width: 100%;
    min-width: 0;
  }
}

/* ────────────────────────────────────────────────────────────────────────
 * ATTENDANCE BUTTON — Sidebar pill (only when unclaimed)
 * ──────────────────────────────────────────────────────────────────────── */
.xcs-att-pill {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 4px 6px 8px;
  width: calc(100% - 12px);
  padding: 9px 14px;
  border-radius: 10px;
  border: 0;
  background: #0A0A0A;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px -2px rgba(36,95,234,0.5);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  text-align: left;
  /* Subtle attention-getting shine for an unclaimed reward */
  animation: xcs-att-pill-pulse 2.4s ease-in-out infinite;
}
@keyframes xcs-att-pill-pulse {
  0%, 100% { box-shadow: 0 2px 8px -2px rgba(36,95,234,0.5); }
  50%      { box-shadow: 0 4px 16px -2px rgba(36,95,234,0.85); }
}
.xcs-att-pill:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.10);
}
.xcs-att-pill:active:not(:disabled) { transform: scale(0.97); }
.xcs-att-pill:disabled {
  opacity: 0.7;
  cursor: wait;
  animation: none;
}
.xcs-att-pill.is-friday {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 2px 8px -2px rgba(245,158,11,0.55);
  animation-name: xcs-att-pill-pulse-friday;
}
@keyframes xcs-att-pill-pulse-friday {
  0%, 100% { box-shadow: 0 2px 8px -2px rgba(245,158,11,0.55); }
  50%      { box-shadow: 0 4px 16px -2px rgba(245,158,11,0.90); }
}
/* One-shot bounce when coins just landed via quick-claim */
.xcs-att-pill.is-pulse {
  animation: xcs-att-pill-claimed 0.6s ease-out;
}
@keyframes xcs-att-pill-claimed {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.08); filter: brightness(1.2); }
  100% { transform: scale(1); }
}

.xcs-att-pill-ico { font-size: 18px; flex-shrink: 0; }
.xcs-att-pill-text { flex: 1; }
.xcs-att-pill-text strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════════════════
 * ATTENDANCE WEEK VIEW — 7-day grid inside the popup
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-att-panel-week {
  width: min(560px, 100%);
  padding: 28px 24px 20px;
}

.xcs-att-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 18px 0 6px;
  position: relative;
  z-index: 1;
}

.xcs-att-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 4px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--xcs-line-1, #E3E3E3);
  background: var(--xcs-bg-1, #FFFFFF);
  min-height: 92px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.xcs-att-day-dow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--xcs-ink-3, #6E6E6E);
}
.xcs-att-day-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 13px;
  line-height: 1.1;
}
.xcs-att-day-amount-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--xcs-ink-1, #0A0A0A);
  font-size: 12.5px;
}
.xcs-att-day-state {
  font-size: 10px;
  text-align: center;
  min-height: 16px;
}
.xcs-att-day-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.xcs-att-day-tag.is-claimed {
  background: rgba(16,185,129,0.15);
  color: #065F46;
}
.xcs-att-day-tag.is-missed {
  background: rgba(110,110,110,0.10);
  color: #3A3A3A;
  font-weight: 600;
}
.xcs-att-day-tag.is-today {
  background: #0A0A0A;
  color: #FFFFFF;
  animation: xcs-att-day-pulse 1.8s ease-in-out infinite;
}
@keyframes xcs-att-day-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(36,95,234,0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(36,95,234,0.0); }
}
.xcs-att-day-tag.is-future {
  background: rgba(110,110,110,0.08);
  color: #9A9A9A;
  font-size: 11px;
}

/* Per-state card styling */
.xcs-att-day.is-claimed {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.30);
}
.xcs-att-day.is-claimed .xcs-att-day-amount-val {
  color: #065F46;
}
.xcs-att-day.is-claimed .xcs-att-day-dow {
  color: #065F46;
}

.xcs-att-day.is-missed {
  background: rgba(110,110,110,0.05);
  border-color: var(--xcs-line-1, #E3E3E3);
  opacity: 0.55;
}
.xcs-att-day.is-missed .xcs-att-day-amount-val {
  text-decoration: line-through;
  color: #9A9A9A;
}

.xcs-att-day.is-today {
  /* Stand-out: thicker border + subtle scale */
  border-color: var(--xcs-blue);
  border-width: 2px;
  background: rgba(36,95,234,0.04);
  transform: scale(1.05);
  z-index: 2;
}
.xcs-att-day.is-today.is-claimable {
  /* Pulse: subtle so the BIG claim button still wins attention */
  box-shadow: 0 4px 12px -2px rgba(36,95,234,0.30);
}
.xcs-att-day.is-today .xcs-att-day-amount-val {
  color: var(--xcs-blue);
  font-size: 14px;
}

/* Today AND Friday — warm amber instead of blue */
.xcs-att-day.is-today.is-friday {
  border-color: #F59E0B;
  background: rgba(245,158,11,0.06);
}
.xcs-att-day.is-today.is-friday .xcs-att-day-amount-val {
  color: #B45309;
}
.xcs-att-day.is-today.is-friday .xcs-att-day-tag.is-today {
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  animation-name: xcs-att-day-pulse-friday;
}
@keyframes xcs-att-day-pulse-friday {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(245,158,11,0.0); }
}

.xcs-att-day.is-future {
  opacity: 0.6;
}
.xcs-att-day.is-future .xcs-att-day-amount-val {
  color: var(--xcs-ink-3, #6E6E6E);
}

/* Dark mode */
[data-theme="dark"] .xcs-att-day {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-att-day-amount-val {
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-att-day-dow {
  color: rgba(244,244,244,0.55);
}
[data-theme="dark"] .xcs-att-day.is-claimed {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.35);
}
[data-theme="dark"] .xcs-att-day.is-claimed .xcs-att-day-amount-val,
[data-theme="dark"] .xcs-att-day.is-claimed .xcs-att-day-dow {
  color: #6EE7B7;
}
[data-theme="dark"] .xcs-att-day.is-today {
  border-color: var(--xcs-blue-fg);
  background: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-att-day.is-today .xcs-att-day-amount-val {
  color: var(--xcs-blue-fg);
}
[data-theme="dark"] .xcs-att-day-tag.is-claimed {
  background: rgba(16,185,129,0.20);
  color: #6EE7B7;
}
[data-theme="dark"] .xcs-att-day-tag.is-missed {
  background: rgba(154,154,154,0.15);
  color: rgba(244,244,244,0.55);
}

/* Mobile — keep grid 7-wide but shrink everything */
@media (max-width: 520px) {
  .xcs-att-panel-week {
    padding: 22px 14px 16px;
  }
  .xcs-att-week {
    gap: 4px;
    margin: 14px -4px 4px;
  }
  .xcs-att-day {
    min-height: 80px;
    padding: 8px 2px 6px;
    border-width: 1px;
  }
  .xcs-att-day.is-today {
    border-width: 1.5px;
  }
  .xcs-att-day-dow { font-size: 9.5px; }
  .xcs-att-day-amount-val { font-size: 11px; }
  .xcs-att-day.is-today .xcs-att-day-amount-val { font-size: 12.5px; }
  .xcs-att-day-tag { padding: 1px 4px; font-size: 9.5px; }
  .xcs-att-day-tag.is-future { font-size: 10.5px; }
}

/* ════════════════════════════════════════════════════════════════════════
 * USER SEARCH RESULTS — Cards above Antrian list when query matches users
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-usersearch-results {
  margin: 14px 0 6px;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 12px;
  padding: 14px 16px;
}
.xcs-usersearch-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-bottom: 10px;
}
.xcs-usersearch-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.xcs-usersearch-row {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.xcs-usersearch-row:hover {
  background: var(--xcs-bg-tint, #F7F7F7);
  border-color: var(--xcs-line-1, #E3E3E3);
}
.xcs-usersearch-info { flex: 1; min-width: 0; }
.xcs-usersearch-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--xcs-ink-1, #0A0A0A);
}
.xcs-usersearch-sub {
  font-size: 11.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  text-transform: capitalize;
  margin-top: 1px;
}
.xcs-usersearch-arrow {
  color: var(--xcs-ink-3, #6E6E6E);
  font-size: 16px;
  flex-shrink: 0;
}
.xcs-usersearch-row:hover .xcs-usersearch-arrow {
  color: var(--xcs-blue);
}
[data-theme="dark"] .xcs-usersearch-results {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-usersearch-row:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-usersearch-name { color: #F4F4F4; }
[data-theme="dark"] .xcs-usersearch-sub { color: rgba(244,244,244,0.55); }

/* ════════════════════════════════════════════════════════════════════════
 * RUANG EDITOR — Scrollable PIC card body
 * Was: showed first 4 tasks with "Lihat semua" link.
 * Now: shows ALL tasks inside a vertically scrollable container with a
 *      reasonable max height. "Buka tab penuh" link appears only when 8+
 *      tasks (still useful for focused single-PIC view).
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-room-body-scroll {
  max-height: 540px;
  overflow-y: auto;
  /* Smooth thin scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(110,110,110,0.30) transparent;
  /* Leave room so cards don't crowd the scrollbar */
  padding-right: 4px;
}
.xcs-room-body-scroll::-webkit-scrollbar {
  width: 6px;
}
.xcs-room-body-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.xcs-room-body-scroll::-webkit-scrollbar-thumb {
  background: rgba(110,110,110,0.25);
  border-radius: 3px;
}
.xcs-room-body-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(110,110,110,0.45);
}
[data-theme="dark"] .xcs-room-body-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
}
[data-theme="dark"] .xcs-room-body-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.30);
}
@media (max-width: 768px) {
  .xcs-room-body-scroll { max-height: 420px; }
}

/* ════════════════════════════════════════════════════════════════════════
 * ATTENDANCE PAGE — Full dedicated page under Apresiasi > Absen Harian
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-attpage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.xcs-attpage-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}
.xcs-attpage-hero.is-friday {
  background: linear-gradient(135deg, #F7F7F7 0%, var(--xcs-bg-1, #FFFFFF) 70%);
}
.xcs-attpage-hero-main { flex: 1; min-width: 0; }
.xcs-attpage-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-bottom: 4px;
}
.xcs-attpage-hero-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--xcs-ink-1, #0A0A0A);
}
.xcs-attpage-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: rgba(239,68,68,0.10);
  color: #B91C1C;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.xcs-attpage-hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.xcs-attpage-claim {
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  background: #0A0A0A !important;
  border: 0 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px -2px rgba(36,95,234,0.4);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.xcs-attpage-claim:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.xcs-attpage-claim.is-friday {
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%) !important;
  box-shadow: 0 4px 16px -2px rgba(245,158,11,0.4);
}
.xcs-attpage-claim strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.xcs-attpage-claimed-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #10B981;
  color: #FFFFFF;
  font-size: 26px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.xcs-attpage-toast {
  background: #10B981;
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  animation: xcs-att-fade 0.3s ease-out;
}

.xcs-attpage-week {
  /* override the popup-size grid for the page (larger cards) */
  gap: 8px;
  margin: 0;
}
.xcs-attpage-week .xcs-att-day {
  min-height: 110px;
  padding: 14px 8px 12px;
}
.xcs-attpage-week .xcs-att-day-dow { font-size: 11.5px; }
.xcs-attpage-week .xcs-att-day-amount-val { font-size: 14px; }
.xcs-attpage-week .xcs-att-day.is-today .xcs-att-day-amount-val { font-size: 16px; }

.xcs-attpage-recap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.xcs-attpage-recap-stat {
  text-align: center;
  padding: 12px 8px;
}
.xcs-attpage-recap-val {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.xcs-attpage-recap-label {
  font-size: 11.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="dark"] .xcs-attpage-hero.is-friday {
  background: linear-gradient(135deg, #2A2A2A 0%, rgba(255,255,255,0.03) 70%);
}
[data-theme="dark"] .xcs-attpage-hero-title { color: #F4F4F4; }
[data-theme="dark"] .xcs-attpage-streak {
  background: rgba(239,68,68,0.18);
  color: #FCA5A5;
}

/* Mobile */
@media (max-width: 640px) {
  .xcs-attpage-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    text-align: left;
  }
  .xcs-attpage-hero-cta {
    align-items: stretch;
  }
  .xcs-attpage-claim { width: 100%; }
  .xcs-attpage-week {
    gap: 4px;
  }
  .xcs-attpage-week .xcs-att-day {
    min-height: 88px;
    padding: 8px 2px;
  }
  .xcs-attpage-recap {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .xcs-attpage-recap-stat { padding: 8px; }
}

/* ════════════════════════════════════════════════════════════════════════
 * ADMIN BADGE — Replaces stats panel for admins who are not PICs.
 * Used in: Meet Us trading cards + UserDetail profile stats section.
 * ════════════════════════════════════════════════════════════════════════ */

/* Meet Us trading card variant — sits in the stats row */
.xcs-tcard-adminbadge {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  gap: 2px;
}
.xcs-tcard-adminbadge-ico {
  font-size: 20px;
  line-height: 1;
}
.xcs-tcard-adminbadge-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* UserDetail profile variant — takes the full row instead of 3 cards */
.xcs-userdetail-adminbadge-card {
  /* Center the single badge card */
  grid-column: 1 / -1;
  max-width: 280px;
  margin-inline: auto;
}

/* ════════════════════════════════════════════════════════════════════════
 * RUANG EDITOR — Horizontal scroll for PIC columns
 * Was: CSS grid with minmax(220px, 1fr) which squished cards together when
 *      there were many PICs (6 video editors made each card too narrow).
 * Now: flex row with overflow-x:auto so admin can scroll/swipe sideways
 *      and see every PIC at a comfortable card width.
 * Override hooks at the end of stylesheet so cascade wins.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-picsection-grid {
  display: flex !important;
  gap: 12px !important;
  grid-template-columns: none !important;
  overflow-x: auto;
  overflow-y: visible;
  /* Smooth touch scrolling on iOS/Android */
  -webkit-overflow-scrolling: touch;
  /* Give the scrollbar some breathing room */
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(110,110,110,0.30) transparent;
}
.xcs-picsection-grid::-webkit-scrollbar { height: 8px; }
.xcs-picsection-grid::-webkit-scrollbar-track { background: transparent; }
.xcs-picsection-grid::-webkit-scrollbar-thumb {
  background: rgba(110,110,110,0.25);
  border-radius: 4px;
}
.xcs-picsection-grid::-webkit-scrollbar-thumb:hover { background: rgba(110,110,110,0.45); }
[data-theme="dark"] .xcs-picsection-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
}
[data-theme="dark"] .xcs-picsection-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.30);
}

/* Each PIC card: fixed minimum width, doesn't shrink, snaps in scroll. */
.xcs-picsection-grid > .xcs-room {
  flex: 0 0 280px;
  min-width: 280px;
  max-width: 320px;
  scroll-snap-align: start;
}
@media (max-width: 760px) {
  .xcs-picsection-grid > .xcs-room {
    flex: 0 0 240px;
    min-width: 240px;
  }
}
@media (max-width: 480px) {
  .xcs-picsection-grid > .xcs-room {
    flex: 0 0 85%;
    min-width: 85%;
    max-width: 85%;
  }
}

/* Visual hint that there's more to scroll — soft gradient on the right edge.
   Disable on mobile (touch users know they can swipe). */
@media (min-width: 760px) {
  .xcs-picsection {
    position: relative;
  }
  .xcs-picsection::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(to right, transparent 0%, var(--xcs-bg-0, #F7F7F7) 90%);
    pointer-events: none;
    opacity: 0.85;
  }
}
[data-theme="dark"] .xcs-picsection::after {
  background: linear-gradient(to right, transparent 0%, var(--xcs-bg-0, #0A0A0A) 90%);
}

/* ════════════════════════════════════════════════════════════════════════
 * @everyone — mention pill + autocomplete entry styling
 * Tampil seperti mention biasa, dengan warna sedikit beda supaya jelas
 * bahwa ini menyentuh semua user.
 * ════════════════════════════════════════════════════════════════════════ */

/* Dropdown entry — broadcast-style header with 📢 icon */
.xcs-mention-item.is-everyone {
  background: rgba(245,158,11,0.06);
  border-left: 3px solid #F59E0B;
}
.xcs-mention-item.is-everyone.is-active {
  background: rgba(245,158,11,0.15);
}
.xcs-mention-avatar-everyone {
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%) !important;
  color: #FFFFFF;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Rendered tag in forum / comments — amber-toned, non-clickable cursor */
.xcs-mention-tag-everyone,
.xcs-mention-badge-everyone {
  background: linear-gradient(135deg, rgba(245,158,11,0.18) 0%, rgba(180,83,9,0.18) 100%) !important;
  color: #B45309 !important;
  border-color: rgba(245,158,11,0.40) !important;
  cursor: default !important;
  font-weight: 700;
}
[data-theme="dark"] .xcs-mention-tag-everyone,
[data-theme="dark"] .xcs-mention-badge-everyone {
  background: linear-gradient(135deg, rgba(245,158,11,0.22) 0%, rgba(180,83,9,0.22) 100%) !important;
  color: #FBBF24 !important;
  border-color: rgba(245,158,11,0.55) !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * MEET US — admin overrides section in edit modal
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-profile-admin-overrides {
  border-top: 1.5px dashed var(--xcs-line-1, #E3E3E3);
  padding-top: 16px;
  margin-top: 16px;
}
.xcs-profile-admin-overrides .xcs-profile-label {
  font-size: 13px;
  font-weight: 700;
  color: #B45309;
  display: flex;
  align-items: center;
  gap: 6px;
}
.xcs-admin-override-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
}
.xcs-admin-override-row label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--xcs-ink-2, #3A3A3A);
}
.xcs-admin-override-row input {
  padding: 8px 12px;
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 8px;
  font-size: 13.5px;
  background: var(--xcs-bg-1, #FFFFFF);
  color: var(--xcs-ink-1, #0A0A0A);
  font-family: inherit;
}
.xcs-admin-override-row input:focus {
  outline: 2px solid rgba(245,158,11,0.4);
  border-color: #F59E0B;
}
.xcs-admin-override-row input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.xcs-admin-override-hint {
  grid-column: 2 / 3;
  font-size: 11px;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-top: -2px;
}
[data-theme="dark"] .xcs-profile-admin-overrides {
  border-top-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-profile-admin-overrides .xcs-profile-label {
  color: #FBBF24;
}
[data-theme="dark"] .xcs-admin-override-row input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-admin-override-row label {
  color: rgba(244,244,244,0.75);
}
[data-theme="dark"] .xcs-admin-override-row .xcs-admin-override-hint {
  color: rgba(244,244,244,0.55);
}

@media (max-width: 540px) {
  .xcs-admin-override-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .xcs-admin-override-hint {
    grid-column: 1 / 2;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * FORUM UNREAD BADGE — Sidebar pill with red accent + subtle pulse
 * Distinguishes from neutral queue counts (those are persistent totals).
 * Disappears when count reaches 0 (handled by sidebar logic).
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-pill.is-forum-unread {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  font-weight: 800;
  /* Subtle pulse so the user notices fresh posts */
  animation: xcs-forum-pulse 2.2s ease-in-out infinite;
}
@keyframes xcs-forum-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(239,68,68,0.0); }
}
[data-theme="dark"] .xcs-pill.is-forum-unread {
  background: #F87171 !important;
  color: #0A0A0A !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * GIFT GLOBAL — Confetti, claim popup, admin tab styling
 * Used by gift-global.jsx (GiftGlobalPopup + GiftGlobalAdminTab).
 * ════════════════════════════════════════════════════════════════════════ */

/* ── Confetti — falling colored squares overlay ───────────────────────── */
.xcs-confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1199;  /* just under giftpopup-overlay (1200) */
}
.xcs-confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0.95;
  will-change: transform, opacity;
  animation-name: xcs-confetti-fall;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}
@keyframes xcs-confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg) scale(0.8);
    opacity: 0;
  }
}

/* ── Gift popup overlay + panel ───────────────────────────────────────── */
.xcs-giftpopup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;  /* over broadcast popup (1100), under notifications bell */
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: xcs-giftpopup-fadein 0.25s ease-out;
}
@keyframes xcs-giftpopup-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.xcs-giftpopup-panel {
  position: relative;
  background: linear-gradient(180deg, #FFF8E1 0%, #FFFFFF 100%);
  border: 2px solid rgba(245, 158, 11, 0.35);
  border-radius: 24px;
  padding: 36px 28px 28px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(245, 158, 11, 0.30),
    0 8px 20px rgba(0,0,0, 0.18);
  animation: xcs-giftpopup-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes xcs-giftpopup-pop {
  0%   { transform: scale(0.7) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.xcs-giftpopup-panel.is-claimed {
  background: linear-gradient(180deg, #DCFCE7 0%, #FFFFFF 100%);
  border-color: rgba(34, 197, 94, 0.40);
  box-shadow:
    0 20px 60px rgba(34, 197, 94, 0.25),
    0 8px 20px rgba(0,0,0, 0.18);
}

[data-theme="dark"] .xcs-giftpopup-panel {
  background: linear-gradient(180deg, #2A2A2A 0%, #222222 100%);
  border-color: rgba(245, 158, 11, 0.50);
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-giftpopup-panel.is-claimed {
  background: linear-gradient(180deg, #14532D 0%, #222222 100%);
  border-color: rgba(34, 197, 94, 0.55);
}

/* Ribbon at top — "Hadiah dari Admin" / "Terkirim" */
.xcs-giftpopup-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.xcs-giftpopup-panel.is-claimed .xcs-giftpopup-ribbon {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.xcs-giftpopup-ico {
  font-size: 56px;
  line-height: 1;
  margin: 8px 0 12px;
  animation: xcs-giftpopup-bounce 1.2s ease-in-out infinite;
}
@keyframes xcs-giftpopup-bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-6px) rotate(3deg); }
}

.xcs-giftpopup-title {
  font-size: 22px;
  font-weight: 800;
  color: #B45309;
  margin: 0 0 10px;
  line-height: 1.25;
}
[data-theme="dark"] .xcs-giftpopup-title { color: #FBBF24; }
.xcs-giftpopup-panel.is-claimed .xcs-giftpopup-title { color: #065F46; }
[data-theme="dark"] .xcs-giftpopup-panel.is-claimed .xcs-giftpopup-title { color: #6EE7B7; }

.xcs-giftpopup-msg {
  font-size: 14.5px;
  color: var(--xcs-ink-2, #3A3A3A);
  margin: 0 0 18px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
[data-theme="dark"] .xcs-giftpopup-msg { color: rgba(244,244,244,0.85); }
.xcs-giftpopup-msg-success { color: #065F46; font-size: 15px; }
[data-theme="dark"] .xcs-giftpopup-msg-success { color: #6EE7B7; }

/* Big amount display */
.xcs-giftpopup-amount {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 24px;
  padding: 12px 24px;
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px dashed rgba(245, 158, 11, 0.45);
  border-radius: 14px;
}
.xcs-giftpopup-amount-plus {
  font-size: 28px;
  font-weight: 800;
  color: #B45309;
}
.xcs-giftpopup-amount-val {
  font-size: 44px;
  font-weight: 900;
  color: #B45309;
  letter-spacing: -0.02em;
  line-height: 1;
}
.xcs-giftpopup-amount-label {
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
  margin-left: 4px;
}
[data-theme="dark"] .xcs-giftpopup-amount {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
}
[data-theme="dark"] .xcs-giftpopup-amount-plus,
[data-theme="dark"] .xcs-giftpopup-amount-val { color: #FBBF24; }
[data-theme="dark"] .xcs-giftpopup-amount-label { color: #D6D6D6; }

.xcs-giftpopup-panel.is-claimed .xcs-giftpopup-amount {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.45);
}
.xcs-giftpopup-panel.is-claimed .xcs-giftpopup-amount-plus,
.xcs-giftpopup-panel.is-claimed .xcs-giftpopup-amount-val { color: #065F46; }
.xcs-giftpopup-panel.is-claimed .xcs-giftpopup-amount-label { color: #047857; }

/* Claim button — bigger than default primary */
.xcs-giftpopup-actions {
  display: flex;
  justify-content: center;
}
.xcs-giftpopup-btn {
  font-size: 15px !important;
  padding: 12px 28px !important;
  border-radius: 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35) !important;
}

.xcs-giftpopup-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--xcs-ink-3, #6E6E6E);
  font-style: italic;
}
[data-theme="dark"] .xcs-giftpopup-foot { color: rgba(244,244,244,0.55); }

/* ── Admin tab system inside Broadcast page ───────────────────────────── */
.xcs-bcastadmin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--xcs-line-1, #E3E3E3);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.xcs-bcastadmin-tabs::-webkit-scrollbar { display: none; }
.xcs-bcastadmin-tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--xcs-ink-3, #6E6E6E);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.xcs-bcastadmin-tab:hover {
  color: var(--xcs-ink-1, #0A0A0A);
}
.xcs-bcastadmin-tab.is-active {
  color: var(--xcs-blue, var(--xcs-blue));
  border-bottom-color: var(--xcs-blue, var(--xcs-blue));
}
[data-theme="dark"] .xcs-bcastadmin-tabs {
  border-bottom-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .xcs-bcastadmin-tab {
  color: rgba(244,244,244,0.6);
}
[data-theme="dark"] .xcs-bcastadmin-tab:hover {
  color: #F4F4F4;
}
[data-theme="dark"] .xcs-bcastadmin-tab.is-active {
  color: var(--xcs-blue-fg);
  border-bottom-color: var(--xcs-blue-fg);
}

/* Hide the inner BroadcastAdmin's pagehead when nested in the tabbed wrapper
   so we don't show two page headers stacked. */
.xcs-bcastadmin-tabpanel .xcs-bcastadmin > .xcs-pagehead {
  display: none;
}

/* When inside the tab panel, restore the "+ Buat broadcast" button via a
   smaller top toolbar. We do this by ensuring the list area gets a margin. */
.xcs-bcastadmin-tabpanel .xcs-bcastadmin {
  padding-top: 0;
}

/* ── Gift admin list (similar to broadcast list) ──────────────────────── */
.xcs-giftadmin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.xcs-giftadmin-hint {
  margin: 0;
  font-size: 13.5px;
  color: var(--xcs-ink-2, #3A3A3A);
  max-width: 640px;
  line-height: 1.5;
}
[data-theme="dark"] .xcs-giftadmin-hint { color: rgba(244,244,244,0.75); }

.xcs-giftadmin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.xcs-giftadmin-row {
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 0.15s ease;
}
.xcs-giftadmin-row:hover { border-color: rgba(245, 158, 11, 0.40); }
.xcs-giftadmin-row.is-expired { opacity: 0.65; }
[data-theme="dark"] .xcs-giftadmin-row {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}

.xcs-giftadmin-titlerow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.xcs-giftadmin-ico {
  font-size: 22px;
}
.xcs-giftadmin-titlerow h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--xcs-ink-1, #0A0A0A);
}
[data-theme="dark"] .xcs-giftadmin-titlerow h3 { color: #F4F4F4; }

.xcs-giftadmin-amount-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(245,158,11,0.18) 0%, rgba(180,83,9,0.18) 100%);
  color: #B45309;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
[data-theme="dark"] .xcs-giftadmin-amount-chip {
  background: linear-gradient(135deg, rgba(245,158,11,0.25) 0%, rgba(180,83,9,0.25) 100%);
  color: #FBBF24;
}

.xcs-giftadmin-message {
  font-size: 13.5px;
  color: var(--xcs-ink-2, #3A3A3A);
  margin: 0 0 10px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
[data-theme="dark"] .xcs-giftadmin-message { color: rgba(244,244,244,0.80); }

.xcs-giftadmin-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  flex-wrap: wrap;
}
[data-theme="dark"] .xcs-giftadmin-meta { color: rgba(244,244,244,0.60); }

/* Audit two-column layout */
.xcs-giftadmin-audit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) {
  .xcs-giftadmin-audit { grid-template-columns: 1fr; }
}

/* ── Gift form composer ───────────────────────────────────────────────── */
.xcs-giftform-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.xcs-giftform-preset {
  appearance: none;
  border: 1.5px solid var(--xcs-line-1, #E3E3E3);
  background: var(--xcs-bg-1, #FFFFFF);
  color: var(--xcs-ink-1, #0A0A0A);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}
.xcs-giftform-preset:hover:not(:disabled) {
  border-color: rgba(245, 158, 11, 0.50);
  background: rgba(245, 158, 11, 0.08);
}
.xcs-giftform-preset.is-on {
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  color: #FFFFFF;
  border-color: transparent;
}
[data-theme="dark"] .xcs-giftform-preset {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: #F4F4F4;
}

/* Preview card */
.xcs-giftform-preview {
  background: linear-gradient(180deg, #FFF8E1 0%, #FFFFFF 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.30);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
[data-theme="dark"] .xcs-giftform-preview {
  background: linear-gradient(180deg, #2A2A2A 0%, #222222 100%);
  border-color: rgba(245, 158, 11, 0.45);
}
.xcs-giftform-preview-ico { font-size: 36px; margin-bottom: 6px; }
.xcs-giftform-preview-title {
  font-size: 15px;
  font-weight: 800;
  color: #B45309;
  margin-bottom: 6px;
}
.xcs-giftform-preview-msg {
  font-size: 12.5px;
  color: var(--xcs-ink-2, #3A3A3A);
  margin-bottom: 12px;
  white-space: pre-wrap;
  line-height: 1.4;
}
[data-theme="dark"] .xcs-giftform-preview-title { color: #FBBF24; }
[data-theme="dark"] .xcs-giftform-preview-msg { color: rgba(244,244,244,0.80); }
.xcs-giftform-preview-amount {
  display: inline-block;
  font-size: 22px;
  font-weight: 900;
  color: #B45309;
  background: rgba(245,158,11,0.15);
  padding: 6px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.xcs-giftform-preview-amount small {
  font-size: 12px;
  font-weight: 700;
  margin-left: 3px;
}
[data-theme="dark"] .xcs-giftform-preview-amount {
  background: rgba(245,158,11,0.22);
  color: #FBBF24;
}

/* ════════════════════════════════════════════════════════════════════════
 * MEET US — Admin override live preview card
 * Small mini trading-card-style preview inside the edit modal that
 * updates real-time as admin types.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-admin-override-preview {
  margin: 12px 0 16px;
}
.xcs-admin-override-preview-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-bottom: 6px;
}
.xcs-admin-override-preview-card {
  position: relative;
  background: linear-gradient(180deg, #222222 0%, #0A0A0A 100%);
  border-radius: 14px;
  padding: 14px 14px 12px;
  color: #F4F4F4;
  text-align: center;
  border: 1.5px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  max-width: 260px;
  margin: 0 auto;
}
.xcs-admin-override-preview-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.85);
  color: rgba(244,244,244,0.85);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}
.xcs-admin-override-preview-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 4px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #FFFFFF;
}
.xcs-admin-override-preview-name {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
  word-break: break-word;
}
.xcs-admin-override-preview-dept {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(244,244,244,0.65);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.xcs-admin-override-preview-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.xcs-admin-override-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.xcs-admin-override-preview-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.xcs-admin-override-preview-stats strong {
  font-size: 14px;
  font-weight: 800;
  color: #F4F4F4;
  line-height: 1.1;
}
.xcs-admin-override-preview-stats span {
  font-size: 9px;
  font-weight: 600;
  color: rgba(244,244,244,0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ════════════════════════════════════════════════════════════════════════
 * BACKFILL REWARDS TAB — Admin one-time button + summary card
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-backfill {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.xcs-backfill-card {
  max-width: 640px;
  width: 100%;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 14px;
  padding: 24px;
}
[data-theme="dark"] .xcs-backfill-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}
.xcs-backfill-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--xcs-ink-1, #0A0A0A);
}
.xcs-backfill-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--xcs-ink-2, #3A3A3A);
  line-height: 1.55;
}
[data-theme="dark"] .xcs-backfill-card h3 { color: #F4F4F4; }
[data-theme="dark"] .xcs-backfill-card p { color: rgba(244,244,244,0.80); }

.xcs-backfill-rates {
  list-style: none;
  padding: 12px 16px;
  margin: 0 0 16px;
  background: rgba(245,158,11,0.08);
  border: 1px dashed rgba(245,158,11,0.30);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--xcs-ink-1, #0A0A0A);
}
.xcs-backfill-rates li { padding: 4px 0; }
.xcs-backfill-rates li + li { border-top: 1px dashed rgba(245,158,11,0.20); }
[data-theme="dark"] .xcs-backfill-rates {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.40);
  color: #F4F4F4;
}
.xcs-backfill-amt {
  color: #B45309;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
[data-theme="dark"] .xcs-backfill-amt { color: #FBBF24; }

.xcs-backfill-warn {
  font-size: 12.5px !important;
  color: #B45309 !important;
  font-style: italic;
}
[data-theme="dark"] .xcs-backfill-warn { color: #FBBF24 !important; }

.xcs-backfill-summary {
  margin-top: 20px;
  padding: 16px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.30);
  border-radius: 10px;
}
[data-theme="dark"] .xcs-backfill-summary {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.40);
}
.xcs-backfill-summary h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #065F46;
}
[data-theme="dark"] .xcs-backfill-summary h4 { color: #6EE7B7; }
.xcs-backfill-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}
.xcs-backfill-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--xcs-bg-1, #FFFFFF);
  padding: 10px 8px;
  border-radius: 8px;
  text-align: center;
}
.xcs-backfill-stats strong {
  font-size: 22px;
  font-weight: 800;
  color: #065F46;
  line-height: 1;
}
.xcs-backfill-stats span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-top: 4px;
}
[data-theme="dark"] .xcs-backfill-stats > div {
  background: rgba(255,255,255,0.06);
}
[data-theme="dark"] .xcs-backfill-stats strong { color: #6EE7B7; }
[data-theme="dark"] .xcs-backfill-stats span { color: rgba(244,244,244,0.55); }
.xcs-backfill-errors {
  margin-top: 14px;
  font-size: 12.5px;
}
.xcs-backfill-errors summary {
  cursor: pointer;
  color: #B91C1C;
  font-weight: 600;
}
.xcs-backfill-errors ul {
  margin: 8px 0 0 16px;
  padding: 0;
  list-style: disc;
  color: var(--xcs-ink-2, #3A3A3A);
}
.xcs-backfill-errors code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(0,0,0,0.05);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════════════════════════
 * WALLET CHIP — Small balance display below stats on MEET US card
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-tcard-wallet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 8px auto 0;
  padding: 5px 12px;
  background: rgba(196,196,196, 0.18);
  border: 1px solid rgba(196,196,196, 0.35);
  color: #B45309;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: default;
  user-select: none;
}
.xcs-tcard-wallet-ico {
  font-size: 12px;
  line-height: 1;
}
.xcs-tcard-wallet-val {
  font-weight: 800;
}
.xcs-tcard-wallet-label {
  font-weight: 600;
  opacity: 0.85;
  font-size: 11px;
  text-transform: lowercase;
}
[data-theme="dark"] .xcs-tcard-wallet {
  background: rgba(196,196,196, 0.20);
  border-color: rgba(196,196,196, 0.50);
  color: #FBBF24;
}

/* ════════════════════════════════════════════════════════════════════════
 * TOP 5 SPENDERS LEADERBOARD — Above MEET US grid
 * Compact card listing top 5 with medal + initials + amount.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-topspenders {
  background: linear-gradient(135deg, rgba(196,196,196,0.08) 0%, rgba(245,158,11,0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 8px 0 20px;
}
[data-theme="dark"] .xcs-topspenders {
  background: linear-gradient(135deg, rgba(196,196,196,0.10) 0%, rgba(245,158,11,0.10) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}
.xcs-topspenders-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.xcs-topspenders-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #B45309;
}
.xcs-topspenders-sub {
  font-size: 11.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  font-style: italic;
}
[data-theme="dark"] .xcs-topspenders-head h3 { color: #FBBF24; }
[data-theme="dark"] .xcs-topspenders-sub { color: rgba(244,244,244,0.60); }

.xcs-topspenders-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 920px) {
  .xcs-topspenders-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .xcs-topspenders-list { grid-template-columns: repeat(2, 1fr); }
}

.xcs-topspenders-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.xcs-topspenders-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}
.xcs-topspenders-item.is-top3 {
  background: linear-gradient(135deg, rgba(196,196,196,0.06) 0%, rgba(245,158,11,0.06) 100%);
  border-color: rgba(245, 158, 11, 0.30);
}
[data-theme="dark"] .xcs-topspenders-item {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .xcs-topspenders-item.is-top3 {
  background: linear-gradient(135deg, rgba(196,196,196,0.10) 0%, rgba(245,158,11,0.10) 100%);
  border-color: rgba(245, 158, 11, 0.45);
}

.xcs-topspenders-rank {
  font-size: 22px;
  line-height: 1;
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  color: var(--xcs-ink-3, #6E6E6E);
}
.xcs-topspenders-item.is-top3 .xcs-topspenders-rank {
  font-size: 24px;
}
.xcs-topspenders-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.xcs-topspenders-body {
  flex: 1;
  min-width: 0;
}
.xcs-topspenders-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--xcs-ink-1, #0A0A0A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.xcs-topspenders-spent {
  font-size: 12px;
  font-weight: 800;
  color: #B45309;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.xcs-topspenders-spent small {
  font-size: 9.5px;
  font-weight: 600;
  opacity: 0.75;
  margin-left: 2px;
}
[data-theme="dark"] .xcs-topspenders-name { color: #F4F4F4; }
[data-theme="dark"] .xcs-topspenders-spent { color: #FBBF24; }

.xcs-topspenders-empty {
  text-align: center;
  padding: 20px;
  color: var(--xcs-ink-3, #6E6E6E);
  font-size: 13px;
}
[data-theme="dark"] .xcs-topspenders-empty { color: rgba(244,244,244,0.55); }

/* ════════════════════════════════════════════════════════════════════════
 * COMPLETION REWARD POPUP — Smaller variant of gift popup
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-completion-popup {
  max-width: 380px !important;
  padding: 28px 24px 22px !important;
}
.xcs-completion-popup .xcs-giftpopup-ico {
  font-size: 44px !important;
}
.xcs-completion-popup .xcs-giftpopup-title {
  font-size: 19px !important;
}
.xcs-completion-popup .xcs-giftpopup-amount-val {
  font-size: 36px !important;
}

/* ════════════════════════════════════════════════════════════════════════
 * UI POLISH — Round 18
 * Fixes readability + estetika issues found in screenshot review.
 * Specific issues addressed:
 *   - Long names like "jefferson noah bachtiar" wrapping awkwardly
 *   - Wallet chip getting cut off at bottom of card
 *   - Card heights inconsistent across grid
 *   - Status text low contrast on dark backgrounds
 *   - Top-spender row spacing + name truncation
 * Appended LATE in stylesheet so cascade wins.
 * ════════════════════════════════════════════════════════════════════════ */

/* ── MEET US trading card ─────────────────────────────────────────────── */

/* Make all cards equal-height so 3-up grid feels tidy. Inner content
   stretches naturally with gap, status section uses flex:1 to fill. */
.xcs-meetus-grid {
  align-items: stretch;  /* override default stretch from grid */
}
.xcs-tcard {
  display: flex;
  flex-direction: column;
  /* Reserve enough bottom space so wallet chip never gets cut off */
  padding-bottom: 14px;
  /* Comfortable minimum height — cards with short content still look full */
  min-height: 440px;
}

/* Long names — break long single words (like "bachtiar") to next line
   cleanly and clamp to 2 lines max so giant names don't break layout. */
.xcs-tcard-name {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  line-height: 1.2;
  padding: 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.4em;
  font-size: 15.5px;
}
.xcs-tcard-dept {
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Status quote text — slightly stronger background tint so the italic
   text stays readable on busy avatar backgrounds. */
.xcs-tcard-status {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  margin: 8px 6px 4px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-theme="dark"] .xcs-tcard-status {
  background: rgba(0,0,0, 0.55);
}
.xcs-tcard-status-text {
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .xcs-tcard-status-text {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  color: rgba(244,244,244, 0.92);
}
[data-theme="dark"] .xcs-tcard-status-time {
  color: rgba(244,244,244, 0.62);
}

/* Wallet chip — slightly smaller, fits within card and uses a tooltip
   for full precision. Override against earlier rules. */
.xcs-tcard-wallet {
  margin: 10px auto 0 !important;
  padding: 4px 11px !important;
  font-size: 11px !important;
  max-width: calc(100% - 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xcs-tcard-wallet-val {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* Stats footer — tighter, more elegant separator */
.xcs-tcard-stats {
  padding-top: 12px;
  margin-top: 4px;
}

/* Avatar wrap — give consistent bottom margin so name positioning is
   stable across cards with/without mood/status. */
.xcs-tcard-avatar-wrap {
  margin-bottom: 8px;
}

/* ── TOP SPENDERS section ─────────────────────────────────────────────── */

/* Slightly more breathing room + tighter typography */
.xcs-topspenders {
  padding: 18px 20px;
}
.xcs-topspenders-head h3 {
  font-size: 14.5px;
  letter-spacing: 0.01em;
}
.xcs-topspenders-sub {
  font-size: 11px;
}
.xcs-topspenders-list {
  gap: 8px;
}
.xcs-topspenders-item {
  padding: 9px 11px;
  gap: 9px;
  min-width: 0;  /* allow text truncation */
}
.xcs-topspenders-rank {
  font-size: 19px;
  min-width: 26px;
}
.xcs-topspenders-item.is-top3 .xcs-topspenders-rank {
  font-size: 22px;
}
.xcs-topspenders-avatar {
  width: 30px;
  height: 30px;
  font-size: 11.5px;
}
.xcs-topspenders-body {
  min-width: 0;
  flex: 1;
}
.xcs-topspenders-name {
  font-size: 12px;
  letter-spacing: -0.005em;
}
.xcs-topspenders-spent {
  font-size: 12.5px;
  letter-spacing: 0;
  font-feature-settings: "tnum" 1;
}

/* ════════════════════════════════════════════════════════════════════════
 * ════════════════════════════════════════════════════════════════════════
 * DARK PREMIUM SWEEP — Round 20
 * Goal: refresh entire UI to dark-first premium look matching the loader.
 * Strategy: append-only overrides at end of stylesheet so cascade wins.
 *
 * Sections:
 *   A. Token override — refresh dark palette to charcoal premium
 *   B. Body / app shell — base canvas, depth gradients
 *   C. Sidebar — glass + accent yellow rail
 *   D. Top bar / header — frosted glass
 *   E. Cards / panels — frosted glass with subtle border
 *   F. Buttons — refined gradient, micro-shadow
 *   G. Inputs / forms — dark glass field
 *   H. Modals / popups — backdrop blur dark
 *   I. Typography — tighten letter-spacing, hierarchy
 *   J. Hover / focus states — yellow glow + lift
 *   K. Tables / lists — subtle row separation
 *   L. Misc page polish — meetus, forum, broadcast, dashboard
 * ════════════════════════════════════════════════════════════════════════
 * ════════════════════════════════════════════════════════════════════════ */

/* ── A. Dark palette refresh ─────────────────────────────────────────── */
[data-theme="dark"] {
  /* Deeper, more elegant charcoal stack with subtle warm tone */
  --xcs-bg-1:        #0A0A0A;            /* app canvas */
  --xcs-bg-2:        #141414;            /* card / elevated */
  --xcs-bg-3:        #1E1E1E;            /* hover surface */
  --xcs-bg-tint:     #171717;            /* alt row */

  /* Glassy variants for backdrop-filter usage */
  --xcs-glass-1:     rgba(14, 14, 14, 0.72);   /* sidebar / topbar */
  --xcs-glass-2:     rgba(22, 22, 22, 0.66);   /* cards */
  --xcs-glass-3:     rgba(34, 34, 34, 0.55);   /* modal backdrop fill */

  /* Refined text — slightly warmer, less grey */
  --xcs-ink-1:       #F2F2F2;
  --xcs-ink-2:       #CFCFCF;
  --xcs-ink-3:       #9A9A9A;
  --xcs-ink-4:       #6E6E6E;

  /* Borders — barely-there, defined by light */
  --xcs-line-1:      #262626;
  --xcs-line-2:      #3A3A3A;
  --xcs-line-focus:  #A8A8A8;

  /* Brand accent — yellow stays bright; navy reinterpreted as deep charcoal */
  --xcs-yellow:      #C4C4C4;
  --xcs-yellow-soft: rgba(196,196,196,0.15);
  --xcs-yellow-hi:   #E6E6E6;
  --xcs-navy:        #0A0A0A;           /* re-pointed: sidebar base */
  --xcs-blue:        #E6E6E6;           /* link/primary inverted to yellow */
  --xcs-blue-soft:   rgba(230,230,230,0.12);
  --xcs-blue-fg:     #F2F2F2;

  /* Status accents — kept saturation reasonable for dark bg */
  --xcs-green:       #4CC27B;
  --xcs-green-soft:  rgba(76,194,123,0.15);
  --xcs-orange:      #E0A33A;
  --xcs-orange-soft: rgba(224,163,58,0.15);
  --xcs-red:         #F06060;
  --xcs-red-soft:    rgba(240,96,96,0.15);
  --xcs-violet:      #A0A0A0;
  --xcs-violet-soft: rgba(160,160,160,0.15);

  /* Shadows — soft, low-saturation, multi-layer */
  --xcs-shadow-sm:   0 1px 2px rgba(0,0,0,0.5);
  --xcs-shadow-md:   0 6px 24px -6px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.35);
  --xcs-shadow-lg:   0 18px 48px -12px rgba(0,0,0,0.7), 0 4px 8px rgba(0,0,0,0.4);
  --xcs-shadow-pop:  0 28px 64px -16px rgba(0,0,0,0.8), 0 8px 16px rgba(0,0,0,0.5);
  --xcs-shadow-glow: 0 0 0 1px rgba(255,255,255,0.12), 0 0 20px rgba(255,255,255,0.06);
}

/* ── B. Body / app shell ─────────────────────────────────────────────── */
[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(196,196,196, 0.035) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255,255,255, 0.025) 0%, transparent 50%),
    var(--xcs-bg-1) !important;
  background-attachment: fixed;
  color: var(--xcs-ink-1);
}

/* Page-head h1 in dark — use cleaner light-on-dark gradient */
[data-theme="dark"] .xcs-pagehead h1 {
  background: linear-gradient(135deg, #FFFFFF 0%, #CFCFCF 50%, #FFFFFF 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.01em;
}

/* Eyebrow label above headings */
[data-theme="dark"] .xcs-eyebrow {
  color: var(--xcs-yellow);
  letter-spacing: 0.16em;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
  font-size: 11px;
}

/* ── C. Sidebar — glass + accent rail ────────────────────────────────── */
[data-theme="dark"] .xcs-sidebar {
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.94) 0%, rgba(6, 6, 6, 0.92) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    inset -1px 0 0 rgba(196,196,196, 0.04),
    4px 0 28px -8px rgba(0, 0, 0, 0.6);
}

/* Sidebar logo area */
[data-theme="dark"] .xcs-sidebar-logo,
[data-theme="dark"] .xcs-sidebar-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 14px;
}

/* Nav items — minimal by default, glow on active/hover */
[data-theme="dark"] .xcs-nav-item {
  background: transparent;
  color: rgba(255,255,255,0.72);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
}
[data-theme="dark"] .xcs-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
}
[data-theme="dark"] .xcs-nav-item.is-active {
  background: #FFFFFF;
  color: #0A0A0A;
  border-color: transparent;
  box-shadow: 0 4px 16px -6px rgba(0,0,0,0.35);
}
[data-theme="dark"] .xcs-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #0A0A0A;
  border-radius: 0 4px 4px 0;
  box-shadow: none;
}

/* Primary buttons inside sidebar (Buat Permintaan) */
[data-theme="dark"] .xcs-nav-item.is-primary {
  background: var(--xcs-chrome);
  color: #0A0A0A !important;
  border: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 20px -6px rgba(196,196,196, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .xcs-nav-item.is-primary:hover {
  background: var(--xcs-chrome);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -8px rgba(0,0,0,0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
[data-theme="dark"] .xcs-nav-item.is-daily {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF !important;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 800;
  box-shadow: 0 6px 20px -6px rgba(16, 185, 129, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .xcs-nav-item.is-daily:hover {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  transform: translateY(-1px);
}

/* Sidebar pills (counts) */
[data-theme="dark"] .xcs-pill {
  background: rgba(255,255,255,0.14);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(196,196,196, 0.20);
}
[data-theme="dark"] .xcs-nav-item.is-active .xcs-pill {
  background: rgba(0,0,0,0.10);
  color: #0A0A0A;
  border-color: transparent;
}
/* Keyboard shortcut hint chip */
[data-theme="dark"] .xcs-kbd {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.6);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
}
[data-theme="dark"] .xcs-nav-item.is-primary .xcs-kbd {
  background: rgba(10, 11, 15, 0.25);
  border-color: rgba(10, 11, 15, 0.4);
  color: rgba(10, 11, 15, 0.85);
}

/* Sidebar APRESIASI group header */
[data-theme="dark"] .xcs-nav-group-head {
  color: var(--xcs-ink-3);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 14px 12px 4px;
}

/* User card at bottom of sidebar */
[data-theme="dark"] .xcs-sidebar-user,
[data-theme="dark"] .xcs-sidebar-userbox {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .xcs-sidebar-coin-pill,
[data-theme="dark"] .xcs-sidebar-coin {
  background: linear-gradient(135deg, rgba(196,196,196, 0.10) 0%, rgba(180, 83, 9, 0.10) 100%);
  border: 1px solid rgba(196,196,196, 0.18);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  color: var(--xcs-yellow);
  font-weight: 800;
}

/* Sidebar search */
[data-theme="dark"] .xcs-sidebar-search,
[data-theme="dark"] .xcs-sidebar-search input {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--xcs-ink-1) !important;
  border-radius: 10px;
}
[data-theme="dark"] .xcs-sidebar-search input::placeholder {
  color: rgba(241, 243, 246, 0.40);
}
[data-theme="dark"] .xcs-sidebar-search:focus-within,
[data-theme="dark"] .xcs-sidebar-search input:focus {
  border-color: rgba(196,196,196, 0.40) !important;
  box-shadow: 0 0 0 3px rgba(196,196,196, 0.10);
}

/* Theme toggle buttons in sidebar */
[data-theme="dark"] .xcs-themeswitch,
[data-theme="dark"] .xcs-themeswitch button,
[data-theme="dark"] .xcs-theme-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(241, 243, 246, 0.65);
  border-radius: 8px;
}
[data-theme="dark"] .xcs-themeswitch button.is-on,
[data-theme="dark"] .xcs-themeswitch button[aria-pressed="true"] {
  background: rgba(196,196,196, 0.15);
  color: var(--xcs-yellow);
  border-color: rgba(196,196,196, 0.30);
}

/* ── D. Top bar (notifications bell + menu burger) ───────────────────── */
[data-theme="dark"] .xcs-topbar,
[data-theme="dark"] .xcs-main-topbar {
  background: rgba(12, 12, 12, 0.65);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .xcs-bell,
[data-theme="dark"] .xcs-notifbell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(241, 243, 246, 0.85);
  border-radius: 50%;
  transition: all 0.18s ease;
}
[data-theme="dark"] .xcs-bell:hover,
[data-theme="dark"] .xcs-notifbell:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196,196,196, 0.30);
  color: var(--xcs-yellow);
}

/* ── E. Cards / panels — glass-frost ─────────────────────────────────── */
[data-theme="dark"] .xcs-card,
[data-theme="dark"] .xcs-stat,
[data-theme="dark"] .xcs-section,
[data-theme="dark"] .xcs-panel {
  background: linear-gradient(135deg, rgba(26, 29, 38, 0.72) 0%, rgba(18, 20, 26, 0.72) 100%);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
[data-theme="dark"] .xcs-card:hover,
[data-theme="dark"] .xcs-stat:hover {
  border-color: rgba(196,196,196, 0.20);
  box-shadow: 0 8px 28px -8px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(196,196,196, 0.08);
}

/* Row items (e.g. queue rows, request rows) */
[data-theme="dark"] .xcs-row,
[data-theme="dark"] .xcs-rows-head {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .xcs-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
[data-theme="dark"] .xcs-rows-head {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px 8px 0 0;
  font-weight: 700;
  color: var(--xcs-ink-3);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.10em;
}

/* ── F. Buttons — refined ────────────────────────────────────────────── */
[data-theme="dark"] .xcs-btn-primary {
  background: var(--xcs-chrome);
  color: #0A0A0A;
  border: 0;
  font-weight: 800;
  letter-spacing: -0.005em;
  border-radius: 10px;
  padding: 10px 18px;
  box-shadow: 0 4px 14px -4px rgba(196,196,196, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] .xcs-btn-primary:hover:not(:disabled) {
  background: var(--xcs-chrome);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
[data-theme="dark"] .xcs-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
[data-theme="dark"] .xcs-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

[data-theme="dark"] .xcs-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--xcs-ink-1);
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 600;
  transition: all 0.18s ease;
}
[data-theme="dark"] .xcs-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .xcs-btn-danger {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.30);
  color: #FCA5A5;
}
[data-theme="dark"] .xcs-btn-danger:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.45);
}

/* ── G. Inputs / forms ──────────────────────────────────────────────── */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--xcs-ink-1);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.18s ease;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: rgba(241, 243, 246, 0.35);
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(196,196,196, 0.40);
  box-shadow: 0 0 0 3px rgba(196,196,196, 0.10);
}
[data-theme="dark"] input:disabled,
[data-theme="dark"] textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Labels above fields */
[data-theme="dark"] label {
  color: var(--xcs-ink-2);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

/* ── H. Modals / popups ──────────────────────────────────────────────── */
[data-theme="dark"] .xcs-modal-backdrop,
[data-theme="dark"] .xcs-modal-overlay {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

[data-theme="dark"] .xcs-modal {
  background: linear-gradient(180deg, rgba(26, 29, 38, 0.95) 0%, rgba(18, 20, 26, 0.95) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.8),
              0 12px 24px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .xcs-modal-h,
[data-theme="dark"] .xcs-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 24px;
}
[data-theme="dark"] .xcs-modal-foot,
[data-theme="dark"] .xcs-modal-footer,
[data-theme="dark"] .xcs-modal-f {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .xcs-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--xcs-ink-2);
  width: 32px; height: 32px;
  border-radius: 50%;
  transition: all 0.18s ease;
}
[data-theme="dark"] .xcs-modal-close:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.30);
  color: #FCA5A5;
}

/* ── I. Typography refinement ────────────────────────────────────────── */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 {
  color: var(--xcs-ink-1);
  letter-spacing: -0.015em;
}
[data-theme="dark"] h4, [data-theme="dark"] h5 {
  color: var(--xcs-ink-1);
  letter-spacing: -0.01em;
}
[data-theme="dark"] p {
  color: var(--xcs-ink-2);
  line-height: 1.6;
}

/* Mono numbers (status counts, prices) */
[data-theme="dark"] .xcs-stat-num,
[data-theme="dark"] .xcs-stat-n,
[data-theme="dark"] .xcs-tcard-stat-n {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  font-weight: 800;
}

/* ── J. Focus / hover states — global ────────────────────────────────── */
/* Nilainya dulu perak (#C4C4C4) dari palet sebelum B5. Perak sudah dicabut
   dari merek, dan cincin fokus adalah satu-satunya petunjuk bagi pengguna
   papan ketik — ia harus memakai aksen yang sama dengan sisa aplikasi.
   Token dipakai, bukan angka, supaya ia ikut berubah bersama tema. */
[data-theme="dark"] *:focus-visible {
  outline: 2px solid var(--fsw-accent, #A3FF4D);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ── K. Tables / lists ───────────────────────────────────────────────── */
[data-theme="dark"] table {
  border-collapse: separate;
  border-spacing: 0;
}
[data-theme="dark"] thead th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--xcs-ink-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 12px 14px;
}
[data-theme="dark"] tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
}
[data-theme="dark"] tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ── L. Page-specific polish ────────────────────────────────────────── */

/* Dashboard hero / stats */
[data-theme="dark"] .xcs-hero,
[data-theme="dark"] .xcs-greeting {
  color: var(--xcs-ink-1);
}
[data-theme="dark"] .xcs-greeting h1,
[data-theme="dark"] .xcs-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Status dots & chips */
[data-theme="dark"] .xcs-status-chip,
[data-theme="dark"] .xcs-pri,
[data-theme="dark"] .xcs-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-weight: 600;
  font-size: 11.5px;
}

/* Forum cards */
[data-theme="dark"] .xcs-forum-post,
[data-theme="dark"] .xcs-forum-card {
  background: linear-gradient(180deg, rgba(26, 29, 38, 0.6) 0%, rgba(18, 20, 26, 0.6) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}
[data-theme="dark"] .xcs-forum-post:hover {
  border-color: rgba(196,196,196, 0.18);
}

/* Meet Us trading card — preserve existing card look but refine borders */
[data-theme="dark"] .xcs-tcard:not(.xcs-tcard-bg):not(.xcs-tcard-bg-image) {
  background:
    linear-gradient(180deg, rgba(26, 29, 38, 0.72) 0%, rgba(12, 12, 12, 0.92) 100%);
  backdrop-filter: blur(8px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 32px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
[data-theme="dark"] .xcs-tcard:not(.xcs-tcard-bg):not(.xcs-tcard-bg-image):hover {
  border-color: rgba(196,196,196, 0.22);
  transform: translateY(-3px);
  box-shadow:
    0 20px 48px -16px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(196,196,196, 0.10) inset,
    0 0 24px rgba(196,196,196, 0.08);
}
/* Hover for cards WITH custom background — just elevate, don't change bg */
[data-theme="dark"] .xcs-tcard.xcs-tcard-bg:hover,
[data-theme="dark"] .xcs-tcard.xcs-tcard-bg-image:hover {
  transform: translateY(-3px);
  box-shadow:
    0 20px 48px -16px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(196,196,196, 0.18);
}

/* Broadcast / gift / attendance popups already have their own dark styles
   but reinforce backdrop here */
[data-theme="dark"] .xcs-bcastpopup-overlay,
[data-theme="dark"] .xcs-giftpopup-overlay,
[data-theme="dark"] .xcs-attpopup-overlay {
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
}

/* Comments / mention area */
[data-theme="dark"] .xcs-comment,
[data-theme="dark"] .xcs-comment-row {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

/* Shop items */
[data-theme="dark"] .xcs-shop-item,
[data-theme="dark"] .xcs-shop-card {
  background: linear-gradient(180deg, rgba(26, 29, 38, 0.7) 0%, rgba(12, 12, 12, 0.85) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: all 0.2s ease;
}
[data-theme="dark"] .xcs-shop-item:hover,
[data-theme="dark"] .xcs-shop-card:hover {
  border-color: rgba(196,196,196, 0.25);
  transform: translateY(-2px);
}

/* Notification bell dropdown */
[data-theme="dark"] .xcs-notif-panel,
[data-theme="dark"] .xcs-notif-dropdown {
  background: linear-gradient(180deg, rgba(26, 29, 38, 0.96) 0%, rgba(18, 20, 26, 0.96) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.7);
  border-radius: 14px;
}
[data-theme="dark"] .xcs-notif-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .xcs-notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Detail page sections */
[data-theme="dark"] .xcs-detail-section,
[data-theme="dark"] .xcs-detail-card {
  background: linear-gradient(180deg, rgba(26, 29, 38, 0.6) 0%, rgba(18, 20, 26, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border-radius: 14px;
}

/* Help / Tata Cara page */
[data-theme="dark"] .xcs-help-section h2,
[data-theme="dark"] .xcs-help-section h3 {
  color: var(--xcs-yellow);
}

/* APRESIASI menu in sidebar dropdown */
[data-theme="dark"] .xcs-nav-group.is-open .xcs-nav-group-children {
  background: rgba(255, 255, 255, 0.015);
  border-radius: 8px;
  padding: 4px 0;
  margin-top: 4px;
}
[data-theme="dark"] .xcs-nav-child {
  color: rgba(241, 243, 246, 0.65);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}
[data-theme="dark"] .xcs-nav-child:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
}
[data-theme="dark"] .xcs-nav-child.is-active {
  color: var(--xcs-yellow);
  background: rgba(196,196,196, 0.08);
}

/* Smooth page transitions on screen change */
[data-theme="dark"] .xcs-main,
[data-theme="dark"] .xcs-main-inner {
  animation: xcs-page-fadein 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes xcs-page-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar — dark refined */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(196,196,196, 0.25);
  background-clip: padding-box;
}

/* Selection highlight */
[data-theme="dark"] ::selection {
  background: rgba(196,196,196, 0.30);
  color: #FFFFFF;
}

/* Toast notification — dark glass */
[data-theme="dark"] .xcs-toast {
  background: linear-gradient(180deg, rgba(26, 29, 38, 0.92) 0%, rgba(18, 20, 26, 0.92) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--xcs-ink-1);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
}

/* Tabs (broadcast admin, etc.) */
[data-theme="dark"] .xcs-bcastadmin-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .xcs-bcastadmin-tab {
  color: var(--xcs-ink-3);
}
[data-theme="dark"] .xcs-bcastadmin-tab:hover {
  color: var(--xcs-ink-1);
}
[data-theme="dark"] .xcs-bcastadmin-tab.is-active {
  color: var(--xcs-yellow);
  border-bottom-color: var(--xcs-yellow);
}

/* Reduce-motion respect — disable hover lift and page fade-in */
@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] *,
  [data-theme="dark"] *::before,
  [data-theme="dark"] *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.05s !important;
  }
  [data-theme="dark"] .xcs-card:hover,
  [data-theme="dark"] .xcs-tcard:hover,
  [data-theme="dark"] .xcs-shop-item:hover {
    transform: none !important;
  }
}

/* Mobile — reduce blur intensity (perf) and tighten spacing */
@media (max-width: 768px) {
  [data-theme="dark"] .xcs-sidebar {
    backdrop-filter: blur(12px) saturate(130%);
  }
  [data-theme="dark"] .xcs-card,
  [data-theme="dark"] .xcs-tcard {
    backdrop-filter: blur(8px);
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * END DARK PREMIUM SWEEP
 * ════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════
 * SIDEBAR OVERRIDE — Round 21 (force win over BRANDHOUSE V5 hardcodes)
 * BRANDHOUSE V5 (lines 13470+) sets sidebar to #0A0A0A with !important.
 * To win the cascade we use html[data-theme] + !important + explicit dark
 * variants. Light mode sidebar can stay navy blue (brand signature).
 * Only dark mode sidebar transforms to charcoal premium.
 * ════════════════════════════════════════════════════════════════════════ */

html[data-theme="dark"] .xcs-sidebar,
html[data-theme="dark"] .xcs-mobile-bar {
  background:
    linear-gradient(180deg, rgba(12, 12, 12, 0.96) 0%, rgba(6, 6, 6, 0.96) 100%) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow:
    inset -1px 0 0 rgba(196,196,196, 0.05),
    4px 0 28px -8px rgba(0, 0, 0, 0.6) !important;
}

/* Sidebar text/links — clean white in dark mode */
html[data-theme="dark"] .xcs-sidebar,
html[data-theme="dark"] .xcs-sidebar *:not(.is-active):not(.is-active *):not(.is-primary):not(.is-primary *):not(.xcs-theme-opt.on):not(.xcs-theme-opt.on *):not(.xcs-notif-bell):not(.xcs-notif-bell *):not(.xcs-balance-chip):not(.xcs-balance-chip *) {
  color: rgba(255,255,255,0.85);
}
html[data-theme="dark"] .xcs-brand-name {
  color: #FFFFFF !important;
  font-family: 'Jost', system-ui, sans-serif !important;
  letter-spacing: 0.06em;
}
html[data-theme="dark"] .xcs-brand-sub {
  color: #C4C4C4 !important;
  letter-spacing: 0.18em;
}

/* Active nav item — yellow rail + glow (override BRANDHOUSE V5 white-bg active) */
html[data-theme="dark"] .xcs-nav-item.is-active,
html[data-theme="dark"] .xcs-nav-item.is-meetus.is-active,
html[data-theme="dark"] .xcs-nav-item.is-contentbank.is-active,
html[data-theme="dark"] .xcs-nav-item.is-forum.is-active {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  border: 1px solid transparent;
  box-shadow:
    0 4px 16px -6px rgba(0,0,0,0.35);
}
html[data-theme="dark"] .xcs-nav-item.is-active svg,
html[data-theme="dark"] .xcs-nav-item.is-meetus.is-active svg,
html[data-theme="dark"] .xcs-nav-item.is-forum.is-active svg {
  stroke: #0A0A0A !important;
}
html[data-theme="dark"] .xcs-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #0A0A0A;
  border-radius: 0 4px 4px 0;
  box-shadow: none;
}
html[data-theme="dark"] .xcs-nav-item.is-active .xcs-pill {
  background: rgba(0,0,0,0.10) !important;
  color: #0A0A0A !important;
  border-color: transparent;
}

/* Default nav items — soft hover */
html[data-theme="dark"] .xcs-nav-item {
  position: relative;
  background: transparent;
  color: rgba(255,255,255,0.72);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-theme="dark"] .xcs-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
}

/* Primary/Daily buttons — keep colorful but in dark context */
html[data-theme="dark"] .xcs-nav-item.is-primary {
  background: var(--xcs-chrome) !important;
  color: #0A0A0A !important;
  border: 0;
  font-weight: 800;
  box-shadow:
    0 6px 20px -6px rgba(196,196,196, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
html[data-theme="dark"] .xcs-nav-item.is-primary:hover {
  background: var(--xcs-chrome) !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
}
html[data-theme="dark"] .xcs-nav-item.is-daily {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow:
    0 6px 20px -6px rgba(16, 185, 129, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Search field in sidebar */
html[data-theme="dark"] .xcs-search,
html[data-theme="dark"] .xcs-search input {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--xcs-ink-1) !important;
}
html[data-theme="dark"] .xcs-search input::placeholder {
  color: rgba(255,255,255,0.35) !important;
}

/* Coin balance chip */
html[data-theme="dark"] .xcs-balance-chip,
html[data-theme="dark"] .xcs-sidebar-coin-pill {
  background: linear-gradient(135deg, rgba(196,196,196, 0.12) 0%, rgba(180, 83, 9, 0.10) 100%) !important;
  border: 1px solid rgba(196,196,196, 0.22) !important;
  color: var(--xcs-yellow) !important;
}
html[data-theme="dark"] .xcs-balance-amount {
  color: var(--xcs-yellow) !important;
}
html[data-theme="dark"] .xcs-balance-label {
  color: rgba(196,196,196, 0.55) !important;
}

/* Theme toggle */
html[data-theme="dark"] .xcs-theme-toggle,
html[data-theme="dark"] .xcs-theme-toggle-btn,
html[data-theme="dark"] .xcs-themeswitch button {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(241, 243, 246, 0.55) !important;
}
html[data-theme="dark"] .xcs-theme-toggle-btn.is-active {
  background: rgba(196,196,196, 0.18) !important;
  color: var(--xcs-yellow) !important;
  border-color: rgba(196,196,196, 0.35) !important;
}

/* User card at bottom */
html[data-theme="dark"] .xcs-sidebar-user,
html[data-theme="dark"] .xcs-sidebar-userbox,
html[data-theme="dark"] .xcs-me-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* APRESIASI group */
html[data-theme="dark"] .xcs-nav-group-header,
html[data-theme="dark"] .xcs-nav-group-label {
  color: rgba(241, 243, 246, 0.50) !important;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 10.5px;
}
html[data-theme="dark"] .xcs-nav-group-emoji {
  opacity: 0.7;
}

/* Body background — force dark even with BRANDHOUSE V5 setting #0A0A0A */
html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(196,196,196, 0.035) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255,255,255, 0.025) 0%, transparent 50%),
    #0A0A0A !important;
  background-attachment: fixed;
}
html[data-theme="dark"] .xcs-main {
  background: transparent !important;
}

/* Page-head h1 in dark — override BRANDHOUSE V5 forced light gradient */
html[data-theme="dark"] .xcs-pagehead h1 {
  background: linear-gradient(135deg, #FFFFFF 0%, #CFCFCF 50%, #FFFFFF 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/* Eyebrow tag — yellow accent in dark (override BRANDHOUSE V5 blue) */
html[data-theme="dark"] .xcs-pagehead .xcs-eyebrow,
html[data-theme="dark"] .xcs-eyebrow {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.18) !important;
  color: var(--xcs-ink-3) !important;
  letter-spacing: 0.16em;
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════════════════════
 * APP SETTINGS TAB
 * Admin-editable global config UI inside Broadcast admin panel.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-settings {
  max-width: 720px;
  margin: 0 auto;
}
.xcs-settings-section {
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 14px;
  padding: 24px;
}
[data-theme="dark"] .xcs-settings-section {
  background: linear-gradient(180deg, rgba(26, 29, 38, 0.6) 0%, rgba(18, 20, 26, 0.6) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}
.xcs-settings-section-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--xcs-line-1, #E3E3E3);
}
[data-theme="dark"] .xcs-settings-section-head {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.xcs-settings-section-head h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--xcs-ink-1);
}
.xcs-settings-section-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  line-height: 1.5;
}
[data-theme="dark"] .xcs-settings-section-head h3 { color: #F2F2F2; }
[data-theme="dark"] .xcs-settings-section-head p { color: rgba(241, 243, 246, 0.6); }

.xcs-settings-field {
  margin-bottom: 18px;
}
.xcs-settings-field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--xcs-ink-1);
  margin-bottom: 6px;
}
.xcs-settings-field > label[for="set-wa-enabled"] {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.xcs-settings-field > label[for="set-wa-enabled"] input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--xcs-yellow);
}
.xcs-settings-field input[type="text"],
.xcs-settings-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--xcs-bg-1, #FFFFFF);
  color: var(--xcs-ink-1);
}
.xcs-settings-field input[type="text"]:focus,
.xcs-settings-field textarea:focus {
  outline: none;
  border-color: rgba(196,196,196, 0.5);
  box-shadow: 0 0 0 3px rgba(196,196,196, 0.12);
}
.xcs-settings-field input:disabled,
.xcs-settings-field textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.xcs-settings-field textarea {
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
  line-height: 1.5;
}
.xcs-settings-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--xcs-ink-3, #6E6E6E);
  line-height: 1.5;
}
.xcs-settings-hint code {
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
}
[data-theme="dark"] .xcs-settings-hint code {
  background: rgba(255, 255, 255, 0.06);
  color: var(--xcs-yellow);
}

.xcs-settings-preview {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(196,196,196, 0.06);
  border: 1px dashed rgba(196,196,196, 0.30);
  border-radius: 10px;
}
[data-theme="dark"] .xcs-settings-preview {
  background: rgba(196,196,196, 0.08);
  border-color: rgba(196,196,196, 0.40);
}
.xcs-settings-preview-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: rgba(180, 83, 9, 0.85);
  margin-bottom: 6px;
}
[data-theme="dark"] .xcs-settings-preview-label { color: rgba(196,196,196, 0.85); }
.xcs-settings-preview-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #B45309;
  word-break: break-all;
  text-decoration: none;
}
.xcs-settings-preview-link:hover { text-decoration: underline; }
[data-theme="dark"] .xcs-settings-preview-link { color: #FBBF24; }
.xcs-settings-preview-disabled {
  font-size: 12.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  font-style: italic;
}

.xcs-settings-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--xcs-line-1, #E3E3E3);
}
[data-theme="dark"] .xcs-settings-actions {
  border-top-color: rgba(255, 255, 255, 0.06);
}
.xcs-result-ok {
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.10);
  color: #047857;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
}
[data-theme="dark"] .xcs-result-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #6EE7B7;
}

/* ════════════════════════════════════════════════════════════════════════
 * HALL OF SPENDERS V2 — Premium podium leaderboard
 * Replaces flat 5-column row with a hero podium for top 3 + compact row
 * for rank 4-5. Includes sparkle bg, crown for #1, photo avatars, glow.
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-topspenders-v2 {
  position: relative;
  margin: 8px 0 24px;
  padding: 28px 24px 22px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(196,196,196, 0.18) 0%, transparent 60%),
    linear-gradient(135deg, rgba(196,196,196, 0.06) 0%, rgba(245, 158, 11, 0.08) 50%, rgba(180, 83, 9, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  overflow: hidden;
  box-shadow:
    0 12px 32px -12px rgba(180, 83, 9, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .xcs-topspenders-v2 {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(196,196,196, 0.20) 0%, transparent 65%),
    linear-gradient(135deg, rgba(120, 53, 15, 0.18) 0%, rgba(66, 32, 6, 0.20) 50%, rgba(31, 41, 55, 0.20) 100%);
  border: 1px solid rgba(196,196,196, 0.30);
  box-shadow:
    0 16px 48px -16px rgba(0, 0, 0, 0.6),
    0 0 32px rgba(196,196,196, 0.08),
    inset 0 1px 0 rgba(196,196,196, 0.10);
  backdrop-filter: blur(8px);
}

/* Sparkle particles floating in background */
.xcs-tsv2-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.xcs-tsv2-sparkles > span {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--xcs-yellow);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(196,196,196, 0.7),
              0 0 16px rgba(196,196,196, 0.4);
  opacity: 0;
  animation: xcs-tsv2-sparkle 6s ease-in-out infinite;
}
.xcs-tsv2-sparkles > span:nth-child(1) { left: 8%;  top: 20%; animation-delay: 0s;   }
.xcs-tsv2-sparkles > span:nth-child(2) { left: 18%; top: 70%; animation-delay: 1.2s; }
.xcs-tsv2-sparkles > span:nth-child(3) { left: 32%; top: 30%; animation-delay: 2.4s; }
.xcs-tsv2-sparkles > span:nth-child(4) { left: 50%; top: 80%; animation-delay: 0.8s; }
.xcs-tsv2-sparkles > span:nth-child(5) { left: 68%; top: 25%; animation-delay: 3.6s; }
.xcs-tsv2-sparkles > span:nth-child(6) { left: 82%; top: 65%; animation-delay: 1.8s; }
.xcs-tsv2-sparkles > span:nth-child(7) { left: 92%; top: 35%; animation-delay: 4.2s; }
.xcs-tsv2-sparkles > span:nth-child(8) { left: 42%; top: 10%; animation-delay: 2.8s; }
@keyframes xcs-tsv2-sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  20%      { opacity: 1; transform: scale(1.2); }
  60%      { opacity: 0.6; transform: scale(1); }
}

/* Header */
.xcs-topspenders-v2-head {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 24px;
}
.xcs-topspenders-v2-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #B45309 0%, #F59E0B 50%, #B45309 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .xcs-topspenders-v2-head h3 {
  background: linear-gradient(135deg, #FBBF24 0%, var(--xcs-yellow-soft) 50%, #FBBF24 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.xcs-topspenders-v2-sub {
  font-size: 12px;
  color: rgba(180, 83, 9, 0.75);
  font-weight: 600;
  letter-spacing: 0.02em;
}
[data-theme="dark"] .xcs-topspenders-v2-sub { color: rgba(251, 191, 36, 0.65); }

/* ── PODIUM layout — flex with rank-1 in middle, taller ─────────────── */
.xcs-tsv2-podium {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.xcs-tsv2-podium-spot {
  flex: 1;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.xcs-tsv2-podium-spot:hover {
  transform: translateY(-4px);
}

/* Crown for #1 — bouncing animation */
.xcs-tsv2-crown {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(196,196,196, 0.6));
  animation: xcs-tsv2-crown-bounce 2.4s ease-in-out infinite;
  margin-bottom: -4px;
}
@keyframes xcs-tsv2-crown-bounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-3px) rotate(2deg); }
}

/* Medal badge above avatar */
.xcs-tsv2-medal {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.xcs-tsv2-podium-spot.is-first .xcs-tsv2-medal {
  font-size: 26px;
}

/* Avatar — bigger for rank 1 */
.xcs-tsv2-avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.xcs-tsv2-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xcs-tsv2-avatar-initials {
  font-size: inherit;
}
.xcs-tsv2-avatar-lg {
  width: 76px;
  height: 76px;
  font-size: 26px;
  border: 3px solid var(--xcs-yellow);
  box-shadow:
    0 0 0 4px rgba(196,196,196, 0.15),
    0 8px 24px rgba(196,196,196, 0.30),
    0 0 32px rgba(196,196,196, 0.25);
  animation: xcs-tsv2-avatar-glow 3s ease-in-out infinite;
}
@keyframes xcs-tsv2-avatar-glow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(196,196,196, 0.15), 0 8px 24px rgba(196,196,196, 0.30), 0 0 32px rgba(196,196,196, 0.25); }
  50%      { box-shadow: 0 0 0 6px rgba(196,196,196, 0.20), 0 12px 32px rgba(196,196,196, 0.40), 0 0 48px rgba(196,196,196, 0.35); }
}
.xcs-tsv2-avatar-md {
  width: 60px;
  height: 60px;
  font-size: 20px;
  border: 2px solid rgba(255, 255, 255, 0.6);
}
.xcs-tsv2-podium-spot.rank-2 .xcs-tsv2-avatar-md {
  border-color: #C0C0C0;
  box-shadow: 0 6px 16px rgba(192, 192, 192, 0.25);
}
.xcs-tsv2-podium-spot.rank-3 .xcs-tsv2-avatar-md {
  border-color: #CD7F32;
  box-shadow: 0 6px 16px rgba(205, 127, 50, 0.25);
}
.xcs-tsv2-avatar-sm {
  width: 38px;
  height: 38px;
  font-size: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

/* Name */
.xcs-tsv2-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--xcs-ink-1, #0A0A0A);
  text-align: center;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xcs-tsv2-podium-spot.is-first .xcs-tsv2-name {
  font-size: 14.5px;
  font-weight: 800;
}
[data-theme="dark"] .xcs-tsv2-name { color: #F2F2F2; }

/* Amount — large prominent display */
.xcs-tsv2-amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: rgba(196,196,196, 0.10);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(196,196,196, 0.25);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.xcs-tsv2-podium-spot.is-first .xcs-tsv2-amount {
  padding: 5px 14px;
  background: linear-gradient(135deg, rgba(196,196,196, 0.20) 0%, rgba(180, 83, 9, 0.20) 100%);
  border-color: rgba(196,196,196, 0.45);
  box-shadow: 0 4px 12px rgba(196,196,196, 0.2);
}
.xcs-tsv2-amount-sign {
  color: #B45309;
  font-weight: 800;
  font-size: 14px;
}
.xcs-tsv2-amount-val {
  color: #B45309;
  font-weight: 800;
  font-size: 13px;
}
.xcs-tsv2-podium-spot.is-first .xcs-tsv2-amount-val {
  font-size: 15px;
}
.xcs-tsv2-amount-unit {
  font-size: 9.5px;
  color: #92400E;
  font-weight: 700;
  margin-left: 2px;
  text-transform: lowercase;
}
[data-theme="dark"] .xcs-tsv2-amount-sign,
[data-theme="dark"] .xcs-tsv2-amount-val { color: #FBBF24; }
[data-theme="dark"] .xcs-tsv2-amount-unit { color: #D6D6D6; }

/* Podium blocks at bottom — different heights */
.xcs-tsv2-block {
  width: 100%;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 0 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 800;
  position: relative;
}
.xcs-tsv2-block.rank-1 {
  height: 70px;
  background: linear-gradient(180deg, var(--xcs-yellow) 0%, #B45309 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 -4px 12px rgba(196,196,196, 0.25);
}
.xcs-tsv2-block.rank-2 {
  height: 52px;
  background: linear-gradient(180deg, #E5E7EB 0%, #6B7280 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.xcs-tsv2-block.rank-3 {
  height: 38px;
  background: linear-gradient(180deg, #D97706 0%, #78350F 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.xcs-tsv2-block-num {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.xcs-tsv2-block.rank-1 .xcs-tsv2-block-num {
  font-size: 34px;
}

/* Rank 4-5 row below podium */
.xcs-tsv2-rest {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding-top: 16px;
  border-top: 1px dashed rgba(196,196,196, 0.25);
}
.xcs-tsv2-rest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.xcs-tsv2-rest-item:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(245, 158, 11, 0.40);
  transform: translateX(2px);
}
[data-theme="dark"] .xcs-tsv2-rest-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(196,196,196, 0.18);
}
[data-theme="dark"] .xcs-tsv2-rest-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(196,196,196, 0.35);
}
.xcs-tsv2-rest-rank {
  font-size: 13px;
  font-weight: 800;
  color: rgba(180, 83, 9, 0.65);
  min-width: 24px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
[data-theme="dark"] .xcs-tsv2-rest-rank { color: rgba(251, 191, 36, 0.65); }
.xcs-tsv2-rest-info {
  flex: 1;
  min-width: 0;
}
.xcs-tsv2-rest-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--xcs-ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
[data-theme="dark"] .xcs-tsv2-rest-name { color: #F2F2F2; }
.xcs-tsv2-rest-amount {
  font-size: 12px;
  font-weight: 800;
  color: #B45309;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  margin-top: 1px;
}
.xcs-tsv2-rest-amount small {
  font-size: 9.5px;
  opacity: 0.75;
  margin-left: 1px;
}
[data-theme="dark"] .xcs-tsv2-rest-amount { color: #FBBF24; }

/* Empty / loading states */
.xcs-topspenders-v2-loading,
.xcs-topspenders-v2-empty {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  color: var(--xcs-ink-3, #6E6E6E);
  font-size: 13.5px;
}
.xcs-topspenders-v2-empty-ico {
  font-size: 42px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(196,196,196, 0.30));
}
.xcs-topspenders-v2-empty-cta {
  margin-top: 8px;
  font-size: 12.5px;
  font-style: italic;
  color: rgba(180, 83, 9, 0.65);
}
[data-theme="dark"] .xcs-topspenders-v2-empty-cta { color: rgba(251, 191, 36, 0.65); }

/* Responsive — podium stacks on small mobile, rest grid becomes single col */
@media (max-width: 640px) {
  .xcs-topspenders-v2 { padding: 22px 16px 16px; }
  .xcs-tsv2-podium { gap: 6px; }
  .xcs-tsv2-podium-spot { padding: 0 2px; }
  .xcs-tsv2-avatar-lg { width: 60px; height: 60px; font-size: 20px; }
  .xcs-tsv2-avatar-md { width: 48px; height: 48px; font-size: 16px; }
  .xcs-tsv2-name { font-size: 11.5px; }
  .xcs-tsv2-podium-spot.is-first .xcs-tsv2-name { font-size: 13px; }
  .xcs-tsv2-amount-val { font-size: 11.5px; }
  .xcs-tsv2-podium-spot.is-first .xcs-tsv2-amount-val { font-size: 13px; }
  .xcs-tsv2-block.rank-1 { height: 50px; }
  .xcs-tsv2-block.rank-2 { height: 38px; }
  .xcs-tsv2-block.rank-3 { height: 28px; }
  .xcs-tsv2-block-num { font-size: 22px; }
  .xcs-tsv2-block.rank-1 .xcs-tsv2-block-num { font-size: 26px; }
  .xcs-tsv2-rest { grid-template-columns: 1fr; }
  .xcs-tsv2-crown { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .xcs-tsv2-crown,
  .xcs-tsv2-sparkles > span,
  .xcs-tsv2-avatar-lg {
    animation: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * Broadcast admin action bar — replaces nested pagehead
 * Sits at top of Broadcast tab content, contains description + create CTA
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-bcastadmin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--xcs-bg-2, rgba(0,0,0,0.02));
  border: 1px solid var(--xcs-line-1, rgba(0,0,0,0.06));
  border-radius: 12px;
  flex-wrap: wrap;
}
[data-theme="dark"] .xcs-bcastadmin-bar {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
}
.xcs-bcastadmin-bar-desc {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--xcs-ink-2, #3A3A3A);
}
[data-theme="dark"] .xcs-bcastadmin-bar-desc {
  color: rgba(241, 243, 246, 0.7);
}
.xcs-bcastadmin-bar-cta {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .xcs-bcastadmin-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .xcs-bcastadmin-bar-cta {
    width: 100%;
    justify-content: center;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * COIN AUDIT PANEL — Admin-only transaction history table
 * Lives inside Shop Admin → tab "📊 Coin History"
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-coinaudit {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Summary cards row */
.xcs-coinaudit-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 920px) {
  .xcs-coinaudit-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .xcs-coinaudit-summary { grid-template-columns: 1fr; }
}
.xcs-coinaudit-stat {
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 14px;
  padding: 14px 16px;
}
[data-theme="dark"] .xcs-coinaudit-stat {
  background: linear-gradient(135deg, rgba(26, 29, 38, 0.6) 0%, rgba(18, 20, 26, 0.6) 100%);
  border-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}
.xcs-coinaudit-stat.is-positive {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.04);
}
.xcs-coinaudit-stat.is-negative {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.04);
}
[data-theme="dark"] .xcs-coinaudit-stat.is-positive {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.10) 0%, rgba(18, 20, 26, 0.6) 100%);
  border-color: rgba(34, 197, 94, 0.30);
}
[data-theme="dark"] .xcs-coinaudit-stat.is-negative {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.10) 0%, rgba(18, 20, 26, 0.6) 100%);
  border-color: rgba(239, 68, 68, 0.30);
}
.xcs-coinaudit-stat-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--xcs-ink-3, #6E6E6E);
  text-transform: uppercase;
}
[data-theme="dark"] .xcs-coinaudit-stat-label { color: rgba(241, 243, 246, 0.55); }
.xcs-coinaudit-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--xcs-ink-1, #0A0A0A);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
[data-theme="dark"] .xcs-coinaudit-stat-val { color: #F2F2F2; }
.xcs-coinaudit-stat.is-positive .xcs-coinaudit-stat-val { color: #047857; }
.xcs-coinaudit-stat.is-negative .xcs-coinaudit-stat-val { color: #B91C1C; }
[data-theme="dark"] .xcs-coinaudit-stat.is-positive .xcs-coinaudit-stat-val { color: #6EE7B7; }
[data-theme="dark"] .xcs-coinaudit-stat.is-negative .xcs-coinaudit-stat-val { color: #FCA5A5; }
.xcs-coinaudit-stat-sub {
  font-size: 11.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  margin-top: 2px;
}
[data-theme="dark"] .xcs-coinaudit-stat-sub { color: rgba(241, 243, 246, 0.45); }

/* Filters bar */
.xcs-coinaudit-filters {
  display: grid;
  grid-template-columns: 2fr 2fr 1.2fr 1.2fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--xcs-line-1, rgba(0, 0, 0, 0.06));
  border-radius: 12px;
}
[data-theme="dark"] .xcs-coinaudit-filters {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
}
@media (max-width: 900px) {
  .xcs-coinaudit-filters { grid-template-columns: 1fr 1fr; }
  .xcs-coinaudit-clear { grid-column: 1 / -1; }
}
.xcs-coinaudit-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.xcs-coinaudit-filter label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--xcs-ink-3, #6E6E6E);
}
[data-theme="dark"] .xcs-coinaudit-filter label { color: rgba(241, 243, 246, 0.5); }
.xcs-coinaudit-filter input,
.xcs-coinaudit-filter select {
  padding: 8px 10px;
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 8px;
  font-size: 13px;
  background: var(--xcs-bg-1, #FFFFFF);
  color: var(--xcs-ink-1);
  font-family: inherit;
  min-width: 0;
  width: 100%;
}
[data-theme="dark"] .xcs-coinaudit-filter input,
[data-theme="dark"] .xcs-coinaudit-filter select {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--xcs-ink-1);
}
.xcs-coinaudit-filter input:focus,
.xcs-coinaudit-filter select:focus {
  outline: none;
  border-color: rgba(196,196,196, 0.5);
  box-shadow: 0 0 0 3px rgba(196,196,196, 0.10);
}
.xcs-coinaudit-clear {
  white-space: nowrap;
  font-size: 12.5px;
}

/* Result bar (count + page info) */
.xcs-coinaudit-resultbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--xcs-ink-3, #6E6E6E);
  padding: 0 4px;
}
[data-theme="dark"] .xcs-coinaudit-resultbar { color: rgba(241, 243, 246, 0.55); }
.xcs-coinaudit-resultbar strong {
  color: var(--xcs-ink-1, #0A0A0A);
}
[data-theme="dark"] .xcs-coinaudit-resultbar strong { color: var(--xcs-yellow); }
.xcs-coinaudit-pageinfo {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
}

/* Table */
.xcs-coinaudit-tablewrap {
  overflow-x: auto;
  border: 1px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 12px;
  background: var(--xcs-bg-1, #FFFFFF);
}
[data-theme="dark"] .xcs-coinaudit-tablewrap {
  background: rgba(18, 20, 26, 0.5);
  border-color: rgba(255, 255, 255, 0.06);
}
.xcs-coinaudit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 980px;
}
.xcs-coinaudit-table thead th {
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.02));
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--xcs-ink-3, #6E6E6E);
  padding: 10px 12px;
  border-bottom: 1px solid var(--xcs-line-1, #E3E3E3);
  white-space: nowrap;
}
[data-theme="dark"] .xcs-coinaudit-table thead th {
  background: rgba(255, 255, 255, 0.02);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: rgba(241, 243, 246, 0.55);
}
.xcs-coinaudit-table thead th.num {
  text-align: right;
}
.xcs-coinaudit-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--xcs-line-1, #F4F4F4);
  vertical-align: middle;
}
[data-theme="dark"] .xcs-coinaudit-table tbody td {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}
.xcs-coinaudit-table tbody tr:hover {
  background: rgba(196,196,196, 0.03);
}
[data-theme="dark"] .xcs-coinaudit-table tbody tr:hover {
  background: rgba(196,196,196, 0.04);
}
.xcs-coinaudit-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.xcs-coinaudit-time {
  color: var(--xcs-ink-3, #6E6E6E);
  white-space: nowrap;
  font-size: 12px;
}
[data-theme="dark"] .xcs-coinaudit-time { color: rgba(241, 243, 246, 0.6); }
.xcs-coinaudit-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.xcs-coinaudit-user-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 10px;
  flex-shrink: 0;
}
.xcs-coinaudit-user-name {
  font-weight: 600;
  color: var(--xcs-ink-1);
  font-size: 12.5px;
}
[data-theme="dark"] .xcs-coinaudit-user-name { color: #F2F2F2; }
.xcs-coinaudit-kind {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.xcs-coinaudit-amount {
  font-weight: 800;
  font-size: 13px;
}
.xcs-coinaudit-amount.pos { color: #047857; }
.xcs-coinaudit-amount.neg { color: #B91C1C; }
[data-theme="dark"] .xcs-coinaudit-amount.pos { color: #6EE7B7; }
[data-theme="dark"] .xcs-coinaudit-amount.neg { color: #FCA5A5; }
.xcs-coinaudit-balance {
  color: var(--xcs-ink-2);
  font-weight: 600;
}
[data-theme="dark"] .xcs-coinaudit-balance { color: rgba(241, 243, 246, 0.7); }
.xcs-coinaudit-ref {
  font-size: 11.5px;
  color: var(--xcs-ink-2);
}
.xcs-coinaudit-refid {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--xcs-ink-3);
}
[data-theme="dark"] .xcs-coinaudit-refid {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 243, 246, 0.7);
}
.xcs-coinaudit-by {
  color: var(--xcs-ink-2);
  font-size: 11.5px;
}
[data-theme="dark"] .xcs-coinaudit-by { color: rgba(241, 243, 246, 0.6); }
.xcs-coinaudit-by em {
  font-style: italic;
  opacity: 0.65;
}
.xcs-coinaudit-note {
  color: var(--xcs-ink-2);
  font-size: 11.5px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="dark"] .xcs-coinaudit-note { color: rgba(241, 243, 246, 0.55); }
.xcs-coinaudit-empty {
  text-align: center;
  padding: 40px 12px;
  color: var(--xcs-ink-3, #6E6E6E);
  font-style: italic;
}

/* Pagination */
.xcs-coinaudit-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  flex-wrap: wrap;
}
.xcs-coinaudit-pagination button {
  font-size: 12.5px;
  padding: 6px 12px;
}
.xcs-coinaudit-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.xcs-coinaudit-pageinput {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--xcs-ink-2);
  padding: 0 8px;
  white-space: nowrap;
}
[data-theme="dark"] .xcs-coinaudit-pageinput { color: rgba(241, 243, 246, 0.7); }

/* ════════════════════════════════════════════════════════════════════════
 * BREWAK CARD PACK SYSTEM
 * Pack opening UI + card design + rarity glows + collection grid.
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-brewak-wrapper { position: relative; }
.xcs-brewak-page    { position: relative; }

/* Tabs (Buka Pack | Koleksi) */
.xcs-brewak-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.04));
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 20px;
}
[data-theme="dark"] .xcs-brewak-tabs {
  background: rgba(255, 255, 255, 0.04);
}
.xcs-brewak-tab {
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--xcs-ink-3, #6E6E6E);
  cursor: pointer;
  transition: all 0.15s;
}
.xcs-brewak-tab:hover {
  color: var(--xcs-ink-1);
}
.xcs-brewak-tab.is-active {
  background: var(--xcs-yellow);
  color: #0A0A0A;
  box-shadow: 0 2px 8px rgba(196,196,196, 0.35);
}

/* Balance chip in pack header */
.xcs-brewak-balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(196,196,196, 0.12), rgba(180, 83, 9, 0.10));
  border: 1px solid rgba(196,196,196, 0.30);
  border-radius: 999px;
  font-size: 14px;
}
.xcs-brewak-balance strong {
  font-weight: 800;
  color: #B45309;
  font-variant-numeric: tabular-nums;
}
.xcs-brewak-balance small {
  font-size: 11px;
  opacity: 0.7;
}
[data-theme="dark"] .xcs-brewak-balance strong { color: #FBBF24; }

/* MAIN PACK SCREEN — split into visual + info */
.xcs-brewak-mainpack {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, rgba(196,196,196, 0.04), rgba(168, 85, 247, 0.04));
  border-radius: 20px;
  border: 1px solid var(--xcs-line-1);
}
[data-theme="dark"] .xcs-brewak-mainpack {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(196,196,196, 0.10), transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(168, 85, 247, 0.08), transparent 60%),
    rgba(26, 29, 38, 0.4);
  border-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}
@media (max-width: 768px) {
  .xcs-brewak-mainpack { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px; }
}

/* Pack visual — the rectangle in the middle */
.xcs-brewak-pack-visual {
  width: 220px;
  height: 320px;
  margin: 0 auto;
  background:
    linear-gradient(135deg, #222222 0%, #111111 100%);
  border: 3px solid var(--xcs-yellow);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 32px rgba(196,196,196, 0.15);
  animation: xcs-brewak-pack-float 4s ease-in-out infinite;
}
.xcs-brewak-pack-visual::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(196,196,196, 0.30);
  border-radius: 10px;
}
.xcs-brewak-pack-visual::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: xcs-brewak-pack-shine 3.5s ease-in-out infinite;
}
@keyframes xcs-brewak-pack-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-8px) rotate(2deg); }
}
@keyframes xcs-brewak-pack-shine {
  0%, 60% { left: -100%; }
  100%    { left: 100%; }
}
.xcs-brewak-pack-logo {
  font-size: 64px;
  filter: drop-shadow(0 4px 12px rgba(196,196,196, 0.5));
  margin-bottom: 8px;
}
.xcs-brewak-pack-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--xcs-yellow);
  text-shadow: 0 0 16px rgba(196,196,196, 0.5);
}
.xcs-brewak-pack-sub {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(196,196,196, 0.65);
  font-weight: 700;
  margin-top: 4px;
}

/* Info side */
.xcs-brewak-pack-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
}
.xcs-brewak-pack-info p {
  margin: 0 0 16px;
  color: var(--xcs-ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.xcs-brewak-odds {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.xcs-brewak-odds li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1);
  font-size: 13px;
  font-weight: 600;
}
[data-theme="dark"] .xcs-brewak-odds li {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.xcs-brewak-odds-common    { border-left: 3px solid #9A9A9A !important; }
.xcs-brewak-odds-rare      { border-left: 3px solid var(--xcs-blue) !important; }
.xcs-brewak-odds-epic      { border-left: 3px solid var(--xcs-violet) !important; }
.xcs-brewak-odds-legendary { border-left: 3px solid var(--xcs-yellow) !important; }
.xcs-brewak-odds-mythical  {
  border-left: 3px solid #EC4899 !important;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.06), transparent) !important;
}
.xcs-brewak-odds li strong {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}
.xcs-brewak-open-btn {
  width: 100%;
  font-size: 15px;
  padding: 14px;
  margin-bottom: 8px;
}
.xcs-brewak-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.30);
  border-radius: 8px;
  color: #B91C1C;
  font-size: 13px;
  margin-bottom: 12px;
}
[data-theme="dark"] .xcs-brewak-error { color: #FCA5A5; }

/* ── PACK OPENING ANIMATION ─────────────────────────────────────────── */
.xcs-brewak-anim {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, rgba(196,196,196, 0.10), transparent 60%);
  cursor: pointer;
  user-select: none;
}
.xcs-brewak-anim-pack {
  position: relative;
  width: 240px;
  height: 340px;
  perspective: 1000px;
}
.xcs-brewak-anim-pack-front {
  width: 100%; height: 100%;
  background:
    linear-gradient(135deg, #222222 0%, #111111 100%);
  border: 3px solid var(--xcs-yellow);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.xcs-brewak-anim-pack-logo { font-size: 64px; margin-bottom: 8px; }
.xcs-brewak-anim-pack-label {
  font-size: 26px; font-weight: 900; letter-spacing: 0.18em; color: var(--xcs-yellow);
}
.xcs-brewak-anim-pack-sublabel {
  font-size: 11px; letter-spacing: 0.16em; color: rgba(196,196,196, 0.65);
  font-weight: 700; margin-top: 4px;
}

/* Stage: rumble (shaking) */
.xcs-brewak-anim-pack.stage-rumble .xcs-brewak-anim-pack-front {
  animation: xcs-brewak-rumble 0.1s linear infinite;
}
@keyframes xcs-brewak-rumble {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-2px, 1px) rotate(-1deg); }
  50%      { transform: translate(2px, -1px) rotate(1deg); }
  75%      { transform: translate(-1px, 2px) rotate(-0.5deg); }
}

/* Stage: glow (bright halo + scale up) */
.xcs-brewak-anim-pack.stage-glow .xcs-brewak-anim-pack-front {
  transform: scale(1.1);
  box-shadow:
    0 0 80px rgba(196,196,196, 0.8),
    0 0 160px rgba(196,196,196, 0.5),
    0 24px 64px rgba(0, 0, 0, 0.4);
  border-color: #FFFFFF;
}

/* Stage: burst (pack expands and dims out) */
.xcs-brewak-anim-pack.stage-burst .xcs-brewak-anim-pack-front {
  transform: scale(1.8);
  opacity: 0;
  filter: blur(8px);
}

/* Center burst flash */
.xcs-brewak-anim-burst {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0%, var(--xcs-yellow) 30%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.xcs-brewak-anim-pack.stage-burst .xcs-brewak-anim-burst {
  animation: xcs-brewak-burst 0.5s ease-out forwards;
}
@keyframes xcs-brewak-burst {
  0%   { width: 0; height: 0; opacity: 1; }
  60%  { width: 400px; height: 400px; opacity: 0.8; }
  100% { width: 800px; height: 800px; opacity: 0; }
}

/* Particles */
.xcs-brewak-anim-particles {
  position: absolute; inset: -50%;
  pointer-events: none;
}
.xcs-brewak-anim-particles > span {
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  background: var(--xcs-yellow);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(196,196,196, 0.9);
  opacity: 0;
}
.xcs-brewak-anim-pack.stage-glow .xcs-brewak-anim-particles > span,
.xcs-brewak-anim-pack.stage-burst .xcs-brewak-anim-particles > span {
  animation: xcs-brewak-particle 1s ease-out forwards;
}
.xcs-brewak-anim-particles > span:nth-child(1) { animation-delay: 0.0s; --dx: 100px;  --dy: -80px; }
.xcs-brewak-anim-particles > span:nth-child(2) { animation-delay: 0.05s; --dx: -80px; --dy: -100px; }
.xcs-brewak-anim-particles > span:nth-child(3) { animation-delay: 0.1s; --dx: 120px; --dy: 60px; }
.xcs-brewak-anim-particles > span:nth-child(4) { animation-delay: 0.15s; --dx: -120px; --dy: 80px; }
.xcs-brewak-anim-particles > span:nth-child(5) { animation-delay: 0.0s; --dx: 60px;  --dy: 120px; }
.xcs-brewak-anim-particles > span:nth-child(6) { animation-delay: 0.05s; --dx: -100px; --dy: -60px; }
.xcs-brewak-anim-particles > span:nth-child(7) { animation-delay: 0.1s; --dx: 80px;  --dy: -120px; }
.xcs-brewak-anim-particles > span:nth-child(8) { animation-delay: 0.15s; --dx: -60px; --dy: 100px; }
@keyframes xcs-brewak-particle {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}

.xcs-brewak-anim-skip-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  letter-spacing: 0.10em;
  color: rgba(241, 243, 246, 0.50);
  text-transform: uppercase;
  animation: xcs-brewak-skip-pulse 1.5s ease-in-out infinite;
}
@keyframes xcs-brewak-skip-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

/* ── CARD REVEAL ───────────────────────────────────────────────────── */
.xcs-brewak-reveal {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.xcs-brewak-reveal-progress {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--xcs-ink-3);
  font-weight: 700;
  margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
}
.xcs-brewak-reveal-card-wrap {
  animation: xcs-brewak-card-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes xcs-brewak-card-pop {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.05) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.xcs-brewak-reveal-hint {
  margin-top: 24px;
  font-size: 13px;
  color: var(--xcs-ink-3);
  font-weight: 600;
  animation: xcs-brewak-skip-pulse 1.5s ease-in-out infinite;
}

/* Summary view (after revealing all 5) */
.xcs-brewak-reveal-summary {
  padding: 24px 0;
  text-align: center;
}
.xcs-brewak-reveal-summary header {
  margin-bottom: 28px;
}
.xcs-brewak-reveal-summary h2 {
  margin: 8px 0 0;
  font-size: 28px;
}
.xcs-brewak-reveal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 900px) {
  .xcs-brewak-reveal-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .xcs-brewak-reveal-grid { grid-template-columns: repeat(2, 1fr); }
}
.xcs-brewak-reveal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── GAME CARD (shared) ────────────────────────────────────────────── */
.xcs-brewak-card {
  position: relative;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 2px solid var(--card-accent, #9A9A9A);
  border-radius: 14px;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
[data-theme="dark"] .xcs-brewak-card {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.xcs-brewak-card.is-clickable { cursor: pointer; }
.xcs-brewak-card.is-clickable:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 0 0 2px var(--card-accent, #9A9A9A);
}
.xcs-brewak-card.is-selected {
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.18),
    0 0 0 3px var(--xcs-yellow);
}
.xcs-brewak-card.is-dim {
  opacity: 0.55;
}

/* Sizes */
.xcs-brewak-card-sm  { width: 140px; }
.xcs-brewak-card-md  { width: 180px; }
.xcs-brewak-card-lg  { width: 260px; padding: 20px 16px 16px; }

.xcs-brewak-card-rarity-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--card-accent, #9A9A9A);
  color: #FFFFFF;
  margin-bottom: 10px;
}
.xcs-brewak-card-copies {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--xcs-yellow);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  z-index: 2;
}
.xcs-brewak-card-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
[data-theme="dark"] .xcs-brewak-card-art {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.3));
}
.xcs-brewak-card-emoji {
  font-size: 64px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.20));
}
.xcs-brewak-card-lg .xcs-brewak-card-emoji { font-size: 96px; }
.xcs-brewak-card-sm .xcs-brewak-card-emoji { font-size: 48px; }
.xcs-brewak-card-shimmer {
  position: absolute;
  inset: -50%;
  background: linear-gradient(45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 70%);
  animation: xcs-brewak-card-shimmer 3s linear infinite;
}
@keyframes xcs-brewak-card-shimmer {
  0%   { transform: translate(-100%, -100%); }
  100% { transform: translate(100%, 100%); }
}
.xcs-brewak-card-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  line-height: 1.2;
  margin-bottom: 4px;
}
[data-theme="dark"] .xcs-brewak-card-name { color: #F2F2F2; }
.xcs-brewak-card-lg .xcs-brewak-card-name { font-size: 17px; }
.xcs-brewak-card-sm .xcs-brewak-card-name { font-size: 12px; }
.xcs-brewak-card-desc {
  font-size: 11px;
  color: var(--xcs-ink-3, #6E6E6E);
  line-height: 1.4;
  margin-bottom: 8px;
  font-style: italic;
}
.xcs-brewak-card-lg .xcs-brewak-card-desc { font-size: 12.5px; }
[data-theme="dark"] .xcs-brewak-card-desc { color: rgba(241, 243, 246, 0.6); }
.xcs-brewak-card-power {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(196,196,196, 0.12);
  border: 1px solid rgba(196,196,196, 0.30);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #B45309;
  font-family: 'JetBrains Mono', monospace;
}
[data-theme="dark"] .xcs-brewak-card-power { color: #FBBF24; }

/* RARITY GLOWS */
.xcs-brewak-rarity-common  { /* no extra glow */ }
.xcs-brewak-rarity-rare {
  --card-accent: #1A1A1A;
  box-shadow:
    0 4px 16px rgba(0,0,0, 0.15),
    0 0 0 1px rgba(0,0,0, 0.25);
}
.xcs-brewak-rarity-epic {
  --card-accent: #6E6E6E;
  box-shadow:
    0 4px 16px rgba(168, 85, 247, 0.20),
    0 0 0 1px rgba(168, 85, 247, 0.30),
    0 0 16px rgba(168, 85, 247, 0.15);
}
.xcs-brewak-rarity-legendary {
  --card-accent: #C4C4C4;
  box-shadow:
    0 4px 16px rgba(196,196,196, 0.25),
    0 0 0 1px rgba(196,196,196, 0.40),
    0 0 24px rgba(196,196,196, 0.25);
  animation: xcs-brewak-legendary-pulse 2.5s ease-in-out infinite;
}
@keyframes xcs-brewak-legendary-pulse {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(196,196,196, 0.25),
      0 0 0 1px rgba(196,196,196, 0.40),
      0 0 24px rgba(196,196,196, 0.25);
  }
  50% {
    box-shadow:
      0 4px 16px rgba(196,196,196, 0.35),
      0 0 0 1px rgba(196,196,196, 0.60),
      0 0 40px rgba(196,196,196, 0.40);
  }
}
.xcs-brewak-rarity-mythical {
  --card-accent: #EC4899;
  background:
    linear-gradient(135deg,
      rgba(236, 72, 153, 0.10),
      rgba(168, 85, 247, 0.10),
      rgba(0,0,0, 0.10),
      rgba(196,196,196, 0.10));
  background-size: 400% 400%;
  animation:
    xcs-brewak-mythical-bg 4s ease infinite,
    xcs-brewak-mythical-glow 3s ease-in-out infinite;
}
@keyframes xcs-brewak-mythical-bg {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes xcs-brewak-mythical-glow {
  0%, 100% {
    box-shadow:
      0 8px 24px rgba(236, 72, 153, 0.30),
      0 0 0 2px rgba(236, 72, 153, 0.60),
      0 0 40px rgba(236, 72, 153, 0.40);
  }
  33% {
    box-shadow:
      0 8px 24px rgba(168, 85, 247, 0.30),
      0 0 0 2px rgba(168, 85, 247, 0.60),
      0 0 40px rgba(168, 85, 247, 0.40);
  }
  66% {
    box-shadow:
      0 8px 24px rgba(0,0,0, 0.30),
      0 0 0 2px rgba(0,0,0, 0.60),
      0 0 40px rgba(0,0,0, 0.40);
  }
}

/* ── COLLECTION GRID ───────────────────────────────────────────────── */
.xcs-brewak-loading,
.xcs-brewak-empty {
  text-align: center;
  padding: 64px 24px;
}
.xcs-brewak-empty-emoji {
  font-size: 72px;
  margin-bottom: 12px;
}
.xcs-brewak-empty h3 {
  font-size: 22px;
  margin: 0 0 8px;
}
.xcs-brewak-empty p {
  color: var(--xcs-ink-3);
  margin: 0 0 20px;
}
.xcs-brewak-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 20px;
  flex-wrap: wrap;
}
.xcs-brewak-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.xcs-brewak-chip {
  padding: 6px 12px;
  background: var(--xcs-bg-1);
  border: 1px solid var(--xcs-line-1);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--xcs-ink-2);
  transition: all 0.15s;
}
[data-theme="dark"] .xcs-brewak-chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(241, 243, 246, 0.7);
}
.xcs-brewak-chip:hover:not(:disabled) {
  border-color: var(--xcs-yellow);
}
.xcs-brewak-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.xcs-brewak-chip.is-active {
  background: #0A0A0A;
  color: #FFFFFF;
  border-color: #0A0A0A;
}
[data-theme="dark"] .xcs-brewak-chip.is-active {
  background: var(--xcs-yellow);
  color: #0A0A0A;
  border-color: var(--xcs-yellow);
}
.xcs-brewak-chip-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  opacity: 0.7;
  padding: 1px 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}
.xcs-brewak-chip.is-active .xcs-brewak-chip-count {
  background: rgba(255, 255, 255, 0.15);
  opacity: 0.9;
}
[data-theme="dark"] .xcs-brewak-chip.is-active .xcs-brewak-chip-count {
  background: rgba(10, 11, 15, 0.25);
}
.xcs-brewak-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--xcs-ink-3);
}
.xcs-brewak-sort select {
  padding: 6px 10px;
  border: 1px solid var(--xcs-line-1);
  border-radius: 8px;
  font-size: 12.5px;
  background: var(--xcs-bg-1);
  color: var(--xcs-ink-1);
  font-family: inherit;
}
[data-theme="dark"] .xcs-brewak-sort select {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--xcs-ink-1);
}

.xcs-brewak-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.xcs-brewak-collection-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.xcs-brewak-feature-btn {
  padding: 6px 10px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--xcs-line-1);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--xcs-ink-2);
  transition: all 0.15s;
}
[data-theme="dark"] .xcs-brewak-feature-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(241, 243, 246, 0.7);
}
.xcs-brewak-feature-btn:hover:not(:disabled) {
  border-color: var(--xcs-yellow);
  color: #B45309;
}
[data-theme="dark"] .xcs-brewak-feature-btn:hover:not(:disabled) {
  color: var(--xcs-yellow);
}
.xcs-brewak-feature-btn.is-featured {
  background: rgba(196,196,196, 0.12);
  border-color: rgba(196,196,196, 0.40);
  color: #B45309;
  font-weight: 800;
}
[data-theme="dark"] .xcs-brewak-feature-btn.is-featured {
  color: var(--xcs-yellow);
}
.xcs-brewak-empty-filter {
  text-align: center;
  padding: 40px;
  color: var(--xcs-ink-3);
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════════════
 * CARD IMAGE (in GameCard) — image artwork that fills the art container
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-brewak-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  z-index: 0;
}
.xcs-brewak-card-art {
  position: relative;
  isolation: isolate;
}
.xcs-brewak-card-art .xcs-brewak-card-emoji {
  position: relative;
  z-index: 1;
}
.xcs-brewak-card-art .xcs-brewak-card-shimmer {
  z-index: 2;
}

/* ════════════════════════════════════════════════════════════════════════
 * CARD ADMIN PAGE
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-cardadmin { position: relative; }

/* Stats summary row */
.xcs-cardadmin-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 16px 0 20px;
}
@media (max-width: 900px) { .xcs-cardadmin-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .xcs-cardadmin-stats { grid-template-columns: repeat(2, 1fr); } }
.xcs-cardadmin-stat {
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1);
  border-left: 4px solid var(--accent, #9A9A9A);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
}
[data-theme="dark"] .xcs-cardadmin-stat {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  border-left-color: var(--accent, #9A9A9A);
}
.xcs-cardadmin-stat-label {
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--xcs-ink-3);
}
.xcs-cardadmin-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent, #0A0A0A);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Filters bar */
.xcs-cardadmin-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.xcs-cardadmin-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.xcs-cardadmin-search input {
  padding: 8px 12px;
  border: 1px solid var(--xcs-line-1);
  border-radius: 999px;
  font-size: 13px;
  background: var(--xcs-bg-1);
  color: var(--xcs-ink-1);
  width: 280px;
  max-width: 100%;
}
[data-theme="dark"] .xcs-cardadmin-search input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}

/* Card list rows */
.xcs-cardadmin-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.xcs-cardadmin-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1);
  border-radius: 12px;
  transition: all 0.18s ease;
}
[data-theme="dark"] .xcs-cardadmin-row {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
}
.xcs-cardadmin-row:hover {
  border-color: rgba(196,196,196, 0.30);
}
.xcs-cardadmin-row.is-disabled {
  opacity: 0.6;
}
.xcs-cardadmin-row-preview {
  flex-shrink: 0;
}
.xcs-cardadmin-row-info {
  flex: 1;
  min-width: 0;
}
.xcs-cardadmin-row-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-theme="dark"] .xcs-cardadmin-row-name { color: #F2F2F2; }
.xcs-cardadmin-disabled-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #B91C1C;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.30);
}
[data-theme="dark"] .xcs-cardadmin-disabled-tag {
  background: rgba(239, 68, 68, 0.20);
  color: #FCA5A5;
}
.xcs-cardadmin-row-id {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  margin-top: 3px;
}
.xcs-cardadmin-row-id code {
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
[data-theme="dark"] .xcs-cardadmin-row-id code {
  background: rgba(255, 255, 255, 0.06);
}
.xcs-cardadmin-row-owned {
  font-size: 11.5px;
  color: var(--xcs-yellow);
  margin-top: 3px;
  font-weight: 600;
}
[data-theme="dark"] .xcs-cardadmin-row-owned { color: #FBBF24; }
.xcs-cardadmin-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.xcs-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* ════════════════════════════════════════════════════════════════════════
 * CARD EDIT MODAL
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-cardadmin-modal {
  max-width: 880px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.xcs-cardadmin-modal-body {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px;
}
@media (max-width: 720px) {
  .xcs-cardadmin-modal-body {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

.xcs-cardadmin-modal-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.02));
  border-radius: 12px;
  position: sticky;
  top: 0;
  align-self: start;
}
[data-theme="dark"] .xcs-cardadmin-modal-preview {
  background: rgba(255, 255, 255, 0.025);
}
.xcs-cardadmin-modal-preview-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xcs-ink-3);
}

.xcs-cardadmin-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.xcs-cardadmin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xcs-cardadmin-field > label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--xcs-ink-3, #6E6E6E);
}
.xcs-cardadmin-field input[type="text"],
.xcs-cardadmin-field input[type="number"],
.xcs-cardadmin-field select,
.xcs-cardadmin-field textarea {
  padding: 8px 12px;
  border: 1px solid var(--xcs-line-1);
  border-radius: 8px;
  font-size: 13.5px;
  background: var(--xcs-bg-1);
  color: var(--xcs-ink-1);
  font-family: inherit;
}
[data-theme="dark"] .xcs-cardadmin-field input,
[data-theme="dark"] .xcs-cardadmin-field select,
[data-theme="dark"] .xcs-cardadmin-field textarea {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--xcs-ink-1);
}
.xcs-cardadmin-field input:focus,
.xcs-cardadmin-field select:focus,
.xcs-cardadmin-field textarea:focus {
  outline: none;
  border-color: rgba(196,196,196, 0.5);
  box-shadow: 0 0 0 3px rgba(196,196,196, 0.10);
}
.xcs-cardadmin-field textarea {
  resize: vertical;
  min-height: 50px;
  line-height: 1.4;
}
.xcs-cardadmin-hint {
  font-size: 11px;
  color: var(--xcs-ink-3);
  line-height: 1.4;
  margin-top: 2px;
}
.xcs-cardadmin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.xcs-cardadmin-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.xcs-cardadmin-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--xcs-line-1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  flex: 1;
  user-select: none;
}
[data-theme="dark"] .xcs-cardadmin-radio {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.xcs-cardadmin-radio:has(input:checked) {
  background: rgba(196,196,196, 0.12);
  border-color: rgba(196,196,196, 0.45);
  color: #B45309;
}
[data-theme="dark"] .xcs-cardadmin-radio:has(input:checked) {
  background: rgba(196,196,196, 0.15);
  color: var(--xcs-yellow);
}
.xcs-cardadmin-radio input { accent-color: var(--xcs-yellow); }

.xcs-cardadmin-color-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.xcs-cardadmin-color-group input[type="color"] {
  width: 44px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--xcs-line-1);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}
.xcs-cardadmin-color-group input[type="text"] {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* Btn variants used in card admin */
.xcs-btn-danger {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.30);
  color: #B91C1C;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.18s;
}
.xcs-btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.50);
}
[data-theme="dark"] .xcs-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
}

/* ════════════════════════════════════════════════════════════════════════
 * FEATURED CARD SLOT on MEET US trading card
 * Shown beside the avatar. Clickable on own card to open picker modal.
 * ════════════════════════════════════════════════════════════════════════ */

.xcs-tcard-avatar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 4px;
  margin: 6px 0 8px;
}
.xcs-tcard-fcslot-spacer {
  /* Left placeholder kept invisible — only right slot is used */
  width: 60px;
  flex-shrink: 0;
  visibility: hidden;
}

.xcs-tcard-fcslot {
  width: 64px;
  min-height: 100px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 9px;
  padding: 5px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .xcs-tcard-fcslot {
  background: rgba(12, 12, 12, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.xcs-tcard-fcslot.is-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .xcs-tcard-fcslot.is-empty {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}
.xcs-tcard-fcslot.is-me {
  cursor: pointer;
}
.xcs-tcard-fcslot.is-me:hover {
  transform: translateY(-2px);
  border-color: var(--xcs-yellow);
  box-shadow: 0 6px 16px rgba(196,196,196, 0.25);
}
.xcs-tcard-fcslot.is-me.is-empty:hover {
  background: rgba(196,196,196, 0.08);
}

/* Filled slot — with card content */
.xcs-tcard-fcslot.is-filled {
  border-color: var(--card-accent, #9A9A9A);
  border-width: 2px;
}
.xcs-tcard-fcslot-art {
  width: 100%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(0, 0, 0, 0.04));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 4px;
}
[data-theme="dark"] .xcs-tcard-fcslot-art {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.4));
}
.xcs-tcard-fcslot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xcs-tcard-fcslot-emoji {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.xcs-tcard-fcslot-name {
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--xcs-ink-1, #0A0A0A);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
[data-theme="dark"] .xcs-tcard-fcslot-name { color: #F2F2F2; }
.xcs-tcard-fcslot-rarity {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--card-accent, #9A9A9A);
  margin-top: 1px;
}

/* Shimmer overlay for legendary+mythical */
.xcs-tcard-fcslot-shimmer {
  position: absolute;
  inset: -20%;
  background: linear-gradient(45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 70%);
  animation: xcs-brewak-card-shimmer 3.5s linear infinite;
  pointer-events: none;
}

/* Empty placeholder */
.xcs-tcard-fcslot-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0.55;
}
.xcs-tcard-fcslot-placeholder > span {
  font-size: 24px;
  line-height: 1;
}
.xcs-tcard-fcslot-placeholder small {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--xcs-ink-3);
  letter-spacing: 0.04em;
}
[data-theme="dark"] .xcs-tcard-fcslot-placeholder small { color: rgba(241, 243, 246, 0.55); }

/* Rarity-specific tints for filled slot (subtle, won't dominate trading card) */
.xcs-tcard-fcslot.xcs-brewak-rarity-rare {
  box-shadow: 0 2px 12px rgba(0,0,0, 0.20);
}
.xcs-tcard-fcslot.xcs-brewak-rarity-epic {
  box-shadow: 0 2px 12px rgba(168, 85, 247, 0.25);
}
.xcs-tcard-fcslot.xcs-brewak-rarity-legendary {
  box-shadow:
    0 2px 12px rgba(196,196,196, 0.30),
    0 0 16px rgba(196,196,196, 0.15);
  animation: xcs-fcslot-pulse 2.5s ease-in-out infinite;
}
@keyframes xcs-fcslot-pulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(196,196,196, 0.30), 0 0 16px rgba(196,196,196, 0.15); }
  50%      { box-shadow: 0 4px 18px rgba(196,196,196, 0.45), 0 0 24px rgba(196,196,196, 0.25); }
}
.xcs-tcard-fcslot.xcs-brewak-rarity-mythical {
  background:
    linear-gradient(135deg,
      rgba(236, 72, 153, 0.08),
      rgba(168, 85, 247, 0.08),
      rgba(0,0,0, 0.08),
      rgba(196,196,196, 0.08));
  background-size: 400% 400%;
  animation:
    xcs-brewak-mythical-bg 4s ease infinite,
    xcs-fcslot-mythical 3s ease-in-out infinite;
}
[data-theme="dark"] .xcs-tcard-fcslot.xcs-brewak-rarity-mythical {
  background:
    linear-gradient(135deg,
      rgba(236, 72, 153, 0.15),
      rgba(168, 85, 247, 0.15),
      rgba(0,0,0, 0.15),
      rgba(196,196,196, 0.15));
  background-size: 400% 400%;
  animation:
    xcs-brewak-mythical-bg 4s ease infinite,
    xcs-fcslot-mythical 3s ease-in-out infinite;
}
@keyframes xcs-fcslot-mythical {
  0%, 100% { box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35); }
  33%      { box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35); }
  66%      { box-shadow: 0 4px 16px rgba(0,0,0, 0.35); }
}

/* Hide on mobile (cards too cramped) — show by default again at 540px */
@media (max-width: 380px) {
  .xcs-tcard-fcslot, .xcs-tcard-fcslot-spacer { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════
 * FEATURED CARD PICKER MODAL
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-fcpicker-modal {
  max-width: 720px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.xcs-fcpicker-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.xcs-fcpicker-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.xcs-fcpicker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.xcs-fcpicker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: all 0.18s ease;
}
.xcs-fcpicker-item:hover {
  background: rgba(196,196,196, 0.06);
  border-color: rgba(196,196,196, 0.30);
}
.xcs-fcpicker-item.is-current {
  background: rgba(196,196,196, 0.12);
  border-color: rgba(196,196,196, 0.45);
}
[data-theme="dark"] .xcs-fcpicker-item:hover {
  background: rgba(196,196,196, 0.08);
}
[data-theme="dark"] .xcs-fcpicker-item.is-current {
  background: rgba(196,196,196, 0.15);
}
.xcs-fcpicker-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--xcs-ink-3);
  text-align: center;
}
.xcs-fcpicker-item.is-current .xcs-fcpicker-tag {
  color: #B45309;
}
[data-theme="dark"] .xcs-fcpicker-item.is-current .xcs-fcpicker-tag {
  color: var(--xcs-yellow);
}
.xcs-fcpicker-clear {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--xcs-line-1);
}
[data-theme="dark"] .xcs-fcpicker-clear {
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* ════════════════════════════════════════════════════════════════════════
 * FEATURED CARD SLOT — placement-aware refinement
 *
 * Two instances per trading card:
 *   - .xcs-tcard-fcslot-desktop  → visible >540px, hidden below
 *   - .xcs-tcard-fcslot-mobile   → visible ≤540px, hidden above
 *
 * On desktop: sits beside the avatar.
 * On mobile : sits above the WhatsApp button as a wider horizontal pill.
 * ════════════════════════════════════════════════════════════════════════ */

/* Desktop placement — visible only on wider screens */
.xcs-tcard-fcslot-desktop { display: flex; }
.xcs-tcard-fcslot-mobile  { display: none; }

@media (max-width: 540px) {
  .xcs-tcard-fcslot-desktop { display: none !important; }
  .xcs-tcard-fcslot-mobile  { display: flex !important; }
}

/* Restore avatar-row centering after removing the left spacer/slot */
.xcs-tcard-avatar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 8px;
  margin: 6px 0 8px;
}

/* The avatar-wrap is the only clickable element to open detail — give it
   a soft hover state so users know it's interactive. */
.xcs-tcard-avatar-wrap {
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.18s ease;
}
.xcs-tcard-avatar-wrap:hover {
  transform: scale(1.04);
}

/* Mobile placement — wider, horizontal pill above WA button */
.xcs-tcard-fcslot-mobile {
  /* Override the desktop slot dimensions */
  width: auto !important;
  min-height: 0 !important;
  margin: 8px 12px 6px !important;
  padding: 8px 12px !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  text-align: left !important;
}
.xcs-tcard-fcslot-mobile.is-empty {
  justify-content: center !important;
}
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-art {
  width: 42px !important;
  height: 42px !important;
  aspect-ratio: 1 !important;
  margin-bottom: 0 !important;
  flex-shrink: 0;
}
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-emoji {
  font-size: 22px !important;
}
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-name {
  font-size: 12px !important;
  text-align: left !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-rarity {
  font-size: 9px !important;
  margin-top: 2px !important;
  text-align: left !important;
}
/* Stack name + rarity vertically (since we use flex row now) */
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-name,
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-rarity {
  flex: 1;
  min-width: 0;
}
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-placeholder {
  flex-direction: row !important;
  gap: 6px !important;
  opacity: 0.7;
}
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-placeholder > span {
  font-size: 18px !important;
}
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-placeholder small {
  font-size: 11px !important;
}

/* Group name + rarity for mobile horizontal layout via a wrapper effect */
.xcs-tcard-fcslot-mobile .xcs-tcard-fcslot-name {
  margin-bottom: 1px !important;
}

/* Make sure on >540px the spacer rule doesn't accidentally hide stuff */
@media (min-width: 541px) {
  /* Spacer no longer rendered in JSX, but keep rule in case old CSS lingers */
  .xcs-tcard-fcslot-spacer { display: none !important; }
}

/* Below 380px: keep only the mobile slot visible (it's already small enough) */
@media (max-width: 380px) {
  .xcs-tcard-fcslot-desktop { display: none !important; }
  .xcs-tcard-fcslot-mobile  { display: flex !important; }
}

/* ════════════════════════════════════════════════════════════════════════
 * BREWEK GameCard V2 — full-bleed TCG style
 * Image (or emoji art) fills the entire card. Name+desc overlay at bottom.
 * Floating power badge top-left, copies top-right, rarity ribbon top-center.
 * Overrides earlier (.xcs-brewak-card-*) rules from V1 layout.
 * ════════════════════════════════════════════════════════════════════════ */

/* Card container — fixed aspect ratio, no internal padding */
.xcs-brewak-card {
  position: relative;
  background: linear-gradient(160deg, #222222 0%, #0A0A0A 100%);
  border: 2px solid var(--card-accent, #9A9A9A);
  border-radius: 14px;
  padding: 0 !important;            /* override V1 */
  display: block !important;        /* override V1 flex */
  text-align: left !important;
  overflow: hidden;
  aspect-ratio: 5 / 7;              /* TCG aspect ratio (Jinx-style) */
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
[data-theme="dark"] .xcs-brewak-card {
  background: linear-gradient(160deg, #111111 0%, #0A0A0A 100%);
}
.xcs-brewak-card.is-clickable { cursor: pointer; }
.xcs-brewak-card.is-clickable:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.25),
    0 0 0 3px var(--card-accent, #9A9A9A);
}
.xcs-brewak-card.is-selected {
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.20),
    0 0 0 3px var(--xcs-yellow);
}
.xcs-brewak-card.is-dim { opacity: 0.55; }

/* Card sizes */
.xcs-brewak-card-sm { width: 130px; }
.xcs-brewak-card-md { width: 180px; }
.xcs-brewak-card-lg { width: 260px; }

/* Background layer — image OR emoji center */
.xcs-brewak-card-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.xcs-brewak-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.xcs-brewak-card-emoji-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.20), transparent 60%),
    linear-gradient(135deg, var(--card-accent, #9A9A9A) 0%, #0A0A0A 80%);
}
.xcs-brewak-card-emoji {
  font-size: 90px;
  line-height: 1;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
.xcs-brewak-card-sm .xcs-brewak-card-emoji { font-size: 56px; }
.xcs-brewak-card-md .xcs-brewak-card-emoji { font-size: 72px; }
.xcs-brewak-card-lg .xcs-brewak-card-emoji { font-size: 120px; }

/* Bottom gradient — makes name/desc readable over any artwork */
.xcs-brewak-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.40) 75%,
    rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

/* Power badge — top-left circular */
.xcs-brewak-card-power-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 9px 4px 7px;
  background: linear-gradient(135deg, var(--xcs-yellow) 0%, #B45309 100%);
  color: #0A0A0A;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
  font-size: 11px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.xcs-brewak-card-power-ico { font-size: 12px; line-height: 1; }
.xcs-brewak-card-power-num { letter-spacing: -0.02em; }
.xcs-brewak-card-sm .xcs-brewak-card-power-badge {
  padding: 2px 7px 2px 6px; font-size: 9.5px;
}
.xcs-brewak-card-lg .xcs-brewak-card-power-badge {
  padding: 5px 11px 5px 9px; font-size: 13px;
}

/* Copies badge — top-right */
.xcs-brewak-card-copies {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.85);
  color: var(--xcs-yellow);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1.5px solid rgba(196,196,196, 0.5);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.xcs-brewak-card-sm .xcs-brewak-card-copies {
  padding: 2px 7px; font-size: 9.5px;
}

/* Rarity ribbon — top-center, full width */
.xcs-brewak-card-rarity-tag {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 3px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--card-accent, #9A9A9A);
  border: 1px solid var(--card-accent, #9A9A9A);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.xcs-brewak-card-sm .xcs-brewak-card-rarity-tag {
  font-size: 8px; padding: 2px 8px;
}

/* Bottom info panel */
.xcs-brewak-card-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 10px 12px 10px;
  color: #FFFFFF;
}
.xcs-brewak-card-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  margin-bottom: 3px;
  /* Allow 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xcs-brewak-card-sm .xcs-brewak-card-name { font-size: 11px; padding: 0; }
.xcs-brewak-card-lg .xcs-brewak-card-name { font-size: 18px; }

.xcs-brewak-card-desc {
  font-size: 10.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.xcs-brewak-card-lg .xcs-brewak-card-desc { font-size: 12px; -webkit-line-clamp: 3; }

.xcs-brewak-card-footer {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.xcs-brewak-card-sm .xcs-brewak-card-footer { display: none; }
.xcs-brewak-card-lg .xcs-brewak-card-footer { font-size: 10px; margin-top: 2px; }

/* Shimmer overlay — legendary + mythical */
.xcs-brewak-card-shimmer {
  position: absolute;
  inset: -50%;
  background: linear-gradient(45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.30) 50%,
    transparent 70%);
  animation: xcs-brewak-card-shimmer 3.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* ════════════════════════════════════════════════════════════════════════
 * FEATURED CARD SLOT V2 — horizontal pill above WhatsApp button
 * Override all previous slot rules with this simpler unified design.
 * ════════════════════════════════════════════════════════════════════════ */

/* Remove the avatar-row gap (slot no longer next to avatar) */
.xcs-tcard-avatar-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 6px 0 8px !important;
}

/* Hide any leftover old slot variants */
.xcs-tcard-fcslot-spacer,
.xcs-tcard-fcslot-desktop {
  display: none !important;
}

/* New unified slot — wide horizontal pill */
.xcs-tcard-fcslot {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 6px 12px 10px !important;
  padding: 8px 12px !important;
  text-align: left !important;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .xcs-tcard-fcslot {
  background: rgba(12, 12, 12, 0.85);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(8px);
}

/* Empty / placeholder state */
.xcs-tcard-fcslot.is-empty {
  background: rgba(255, 255, 255, 0.40);
  border-style: dashed;
  border-color: rgba(0, 0, 0, 0.12);
  justify-content: center !important;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-empty {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}
.xcs-tcard-fcslot.is-me { cursor: pointer; }
.xcs-tcard-fcslot.is-me:hover {
  transform: translateY(-1px);
  border-color: var(--xcs-yellow);
  box-shadow: 0 6px 16px rgba(196,196,196, 0.25);
}
.xcs-tcard-fcslot.is-me.is-empty:hover {
  background: rgba(196,196,196, 0.08);
}

/* Filled state — rarity accent ring */
.xcs-tcard-fcslot.is-filled {
  border-color: var(--card-accent, #9A9A9A);
  border-width: 2px;
}

/* Art (left thumbnail) */
.xcs-tcard-fcslot-art {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, var(--card-accent, #9A9A9A), #0A0A0A);
  border: 1px solid rgba(255, 255, 255, 0.20);
  position: relative;
}
.xcs-tcard-fcslot-art img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.xcs-tcard-fcslot-emoji {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

/* Meta (right text block) */
.xcs-tcard-fcslot-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.xcs-tcard-fcslot-name {
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: var(--xcs-ink-1, #0A0A0A) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
  text-align: left !important;
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .xcs-tcard-fcslot-name { color: #F2F2F2 !important; }
.xcs-tcard-fcslot-rarity {
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 0.10em !important;
  text-transform: uppercase !important;
  color: var(--card-accent, #9A9A9A) !important;
  margin: 0 !important;
  text-align: left !important;
}

/* Edit chevron (only on own card) */
.xcs-tcard-fcslot-chevron {
  flex-shrink: 0;
  font-size: 14px;
  opacity: 0.55;
  transition: opacity 0.18s;
}
.xcs-tcard-fcslot.is-me:hover .xcs-tcard-fcslot-chevron { opacity: 1; }

/* Placeholder (empty) */
.xcs-tcard-fcslot-placeholder {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  opacity: 0.65;
}
.xcs-tcard-fcslot-placeholder-ico {
  font-size: 20px;
  line-height: 1;
}
.xcs-tcard-fcslot-placeholder-text {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--xcs-ink-2, #3A3A3A);
}
[data-theme="dark"] .xcs-tcard-fcslot-placeholder-text { color: rgba(241, 243, 246, 0.75); }

/* Shimmer for legendary/mythical (subtle on slot) */
.xcs-tcard-fcslot-shimmer {
  position: absolute;
  inset: -20%;
  background: linear-gradient(45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.30) 50%,
    transparent 70%);
  animation: xcs-brewak-card-shimmer 3.5s linear infinite;
  pointer-events: none;
}

/* Mobile: increase touch target */
@media (max-width: 540px) {
  .xcs-tcard-fcslot { margin: 6px 10px 10px !important; padding: 10px 12px !important; }
  .xcs-tcard-fcslot-art { width: 48px; height: 48px; }
  .xcs-tcard-fcslot-emoji { font-size: 28px; }
}

/* ════════════════════════════════════════════════════════════════════════
 * FEATURED CARD PICKER V2 — list rows + zoom popup
 * Replaces V1 grid layout (was causing card cropping/overflow issues).
 * ════════════════════════════════════════════════════════════════════════ */

/* Hide old grid layout if any cached CSS lingers */
.xcs-fcpicker-grid {
  display: none !important;
}

/* List of rows */
.xcs-fcpicker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xcs-fcpicker-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1.5px solid var(--xcs-line-1, #E3E3E3);
  border-left: 4px solid var(--card-accent, #9A9A9A);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}
[data-theme="dark"] .xcs-fcpicker-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  border-left-color: var(--card-accent, #9A9A9A);
}
.xcs-fcpicker-row:hover {
  background: rgba(196,196,196, 0.06);
  border-color: var(--xcs-yellow);
  border-left-color: var(--card-accent, #9A9A9A);
  transform: translateX(2px);
}
[data-theme="dark"] .xcs-fcpicker-row:hover {
  background: rgba(196,196,196, 0.08);
}
.xcs-fcpicker-row.is-current {
  background: rgba(196,196,196, 0.10);
  border-color: rgba(196,196,196, 0.50);
  border-left-color: var(--card-accent, #9A9A9A);
}
[data-theme="dark"] .xcs-fcpicker-row.is-current {
  background: rgba(196,196,196, 0.15);
  border-color: rgba(196,196,196, 0.40);
}

/* Thumbnail (left) */
.xcs-fcpicker-row-art {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.20), transparent 60%),
    linear-gradient(135deg, var(--card-accent, #9A9A9A), #0A0A0A);
  border: 1.5px solid var(--card-accent, #9A9A9A);
  display: flex;
  align-items: center;
  justify-content: center;
}
.xcs-fcpicker-row-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xcs-fcpicker-row-emoji {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Info block */
.xcs-fcpicker-row-info {
  flex: 1;
  min-width: 0;
}
.xcs-fcpicker-row-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--xcs-ink-1, #0A0A0A);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .xcs-fcpicker-row-name { color: #F2F2F2; }

.xcs-fcpicker-row-copies {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  background: rgba(196,196,196, 0.20);
  color: #B45309;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}
[data-theme="dark"] .xcs-fcpicker-row-copies { color: var(--xcs-yellow); }

.xcs-fcpicker-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 700;
}
.xcs-fcpicker-row-rarity {
  color: var(--card-accent, #9A9A9A);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.xcs-fcpicker-row-power {
  color: var(--xcs-ink-3, #6E6E6E);
  font-family: 'JetBrains Mono', monospace;
}
[data-theme="dark"] .xcs-fcpicker-row-power { color: rgba(241, 243, 246, 0.65); }

/* Action (right) */
.xcs-fcpicker-row-action {
  flex-shrink: 0;
}
.xcs-fcpicker-row-featured {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(196,196,196, 0.25), rgba(180, 83, 9, 0.20));
  border: 1px solid rgba(196,196,196, 0.55);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #B45309;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
[data-theme="dark"] .xcs-fcpicker-row-featured { color: var(--xcs-yellow); }

.xcs-fcpicker-row-chevron {
  font-size: 24px;
  font-weight: 300;
  color: var(--xcs-ink-3, #6E6E6E);
  line-height: 1;
  padding: 0 8px;
}
[data-theme="dark"] .xcs-fcpicker-row-chevron { color: rgba(241, 243, 246, 0.55); }

/* ════════════════════════════════════════════════════════════════════════
 * CARD ZOOM MODAL — full TCG card popup with confirm button
 * Stacked on top of FeaturedCardPicker (z-index higher than overlay).
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-cardzoom-overlay {
  z-index: 1100;   /* above other modals (1000) */
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: xcs-cardzoom-fade 0.18s ease-out;
}
@keyframes xcs-cardzoom-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.xcs-cardzoom-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 90vw;
  max-height: 90vh;
  animation: xcs-cardzoom-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes xcs-cardzoom-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.xcs-cardzoom-close {
  position: absolute;
  top: -40px;
  right: -8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  z-index: 2;
}
.xcs-cardzoom-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

/* Card wrapper — full-size zoom card with 9:16 aspect ratio.
   Sizing strategy: pick the height first (capped to viewport space available
   for the card after the close button + actions bar), then width auto-derives
   from `aspect-ratio: 9/16`. Also cap by width so portrait viewports work.
   `min(...)` makes the card always fit BOTH dimensions. */
.xcs-cardzoom-card-wrap {
  position: relative;
  /* Height: clamp between 380px (mobile minimum readable) and viewport
     minus ~180px for close btn + actions bar. */
  --zoom-card-h: min(560px, calc(100vh - 200px));
  /* Width derived from 9:16 ratio, capped to viewport width. */
  --zoom-card-w: min(calc(var(--zoom-card-h) * 9 / 16), 88vw);
  /* If width hit the viewport cap, derive height back from it so the card
     stays exactly 9:16 even on narrow viewports. */
  height: var(--zoom-card-h);
  width: var(--zoom-card-w);
  /* When the width cap kicks in (narrow phones), shrink height to match: */
  max-height: calc(var(--zoom-card-w) * 16 / 9);
}

/* Card itself fills the wrapper exactly */
.xcs-cardzoom-card-wrap .xcs-brewak-card,
.xcs-cardzoom-card-wrap .xcs-brewak-card-lg {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;   /* let the wrapper drive size */
  max-width: none !important;
  max-height: none !important;
}

/* Mobile fine-tune — slightly smaller cap so action buttons stay tappable */
@media (max-width: 480px) {
  .xcs-cardzoom-card-wrap {
    --zoom-card-h: min(520px, calc(100vh - 220px));
    --zoom-card-w: min(calc(var(--zoom-card-h) * 9 / 16), 80vw);
  }
  .xcs-cardzoom-close { top: -42px; right: 0; }
}

/* Bigger artwork inside the taller card */
.xcs-cardzoom-card-wrap .xcs-brewak-card-emoji {
  font-size: clamp(80px, 16vw, 140px);
}

/* Actions bar below card */
.xcs-cardzoom-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}
.xcs-cardzoom-btn-back {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}
.xcs-cardzoom-btn-back:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}
.xcs-cardzoom-btn-confirm {
  flex: 1;
  font-size: 14px;
  padding: 12px 18px;
  font-weight: 800;
}
.xcs-cardzoom-btn-confirm.is-removing {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
}
.xcs-cardzoom-btn-confirm.is-removing:hover:not(:disabled) {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
}

@media (max-width: 480px) {
  .xcs-cardzoom-actions { flex-direction: column-reverse; }
  .xcs-cardzoom-btn-back, .xcs-cardzoom-btn-confirm { width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════════
 * FEATURED CARD — Edit Modal section
 * Mirrors the mood/decorator section style. Shows current featured card
 * with options to change or clear.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-profile-fcedit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 2px solid var(--card-accent, #9A9A9A);
  border-radius: 12px;
  margin-bottom: 10px;
  position: relative;
}
[data-theme="dark"] .xcs-profile-fcedit {
  background: rgba(255, 255, 255, 0.04);
}
.xcs-profile-fcedit.is-empty {
  border-style: dashed;
  border-color: var(--xcs-line-1, #E3E3E3);
  background: rgba(0, 0, 0, 0.02);
  justify-content: center;
  text-align: center;
  padding: 18px 14px;
}
[data-theme="dark"] .xcs-profile-fcedit.is-empty {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.xcs-profile-fcedit-art {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.20), transparent 60%),
    linear-gradient(135deg, var(--card-accent, #9A9A9A), #0A0A0A);
  border: 1.5px solid var(--card-accent, #9A9A9A);
}
.xcs-profile-fcedit-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xcs-profile-fcedit-emoji {
  font-size: 30px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.30));
}

.xcs-profile-fcedit-info {
  flex: 1;
  min-width: 0;
}
.xcs-profile-fcedit-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--xcs-ink-1, #0A0A0A);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
[data-theme="dark"] .xcs-profile-fcedit-name { color: #F2F2F2; }
.xcs-profile-fcedit-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 700;
}
.xcs-profile-fcedit-rarity {
  color: var(--card-accent, #9A9A9A);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.xcs-profile-fcedit-power {
  color: var(--xcs-ink-3, #6E6E6E);
  font-family: 'JetBrains Mono', monospace;
}
[data-theme="dark"] .xcs-profile-fcedit-power { color: rgba(241, 243, 246, 0.65); }

.xcs-profile-fcedit-empty-ico {
  font-size: 36px;
  margin-bottom: 6px;
  opacity: 0.55;
}
.xcs-profile-fcedit-empty-text {
  font-size: 13px;
  color: var(--xcs-ink-3, #6E6E6E);
  font-style: italic;
}
[data-theme="dark"] .xcs-profile-fcedit-empty-text { color: rgba(241, 243, 246, 0.60); }

.xcs-profile-fcedit-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.xcs-profile-fcedit-actions button {
  flex: 1;
  font-size: 12.5px;
  padding: 9px 12px;
}
.xcs-profile-fcedit-actions .xcs-btn-ghost {
  flex: 0 0 auto;
}

/* ════════════════════════════════════════════════════════════════════════
 * CARD ZOOM OVERLAY — full viewport coverage
 * Force fixed positioning + extremely high z-index so the modal escapes
 * any parent stacking context (trading card wrapper had overflow:hidden
 * which was clipping the modal). Portal handles DOM-level escape; this
 * handles the visual layering.
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-cardzoom-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  margin: 0 !important;
  overflow-y: auto;
}

/* Make sure the content panel is centered and doesn't inherit any
   parent constraints. */
.xcs-cardzoom-content {
  position: relative;
  margin: auto;
  max-width: min(90vw, 360px);
}

/* On very tall content (small viewports), allow scrolling inside overlay */
@media (max-height: 700px) {
  .xcs-cardzoom-overlay {
    align-items: flex-start !important;
    padding-top: 40px !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * NEW RARITY GLOWS — Ascended, Divine, Cosmic
 * Each tier MORE premium than the last. Mythical = pink rainbow,
 * Ascended = cyan electric, Divine = golden halo, Cosmic = nebula swirl.
 * ════════════════════════════════════════════════════════════════════════ */

/* Ascended — cyan electric crystal */
.xcs-brewak-rarity-ascended {
  --card-accent: #22D3EE;
  background:
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.10),
      rgba(14, 165, 233, 0.15),
      rgba(2, 132, 199, 0.10));
  background-size: 300% 300%;
  animation:
    xcs-brewak-ascended-bg 5s ease infinite,
    xcs-brewak-ascended-glow 2.5s ease-in-out infinite;
}
@keyframes xcs-brewak-ascended-bg {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes xcs-brewak-ascended-glow {
  0%, 100% {
    box-shadow:
      0 8px 24px rgba(34, 211, 238, 0.30),
      0 0 0 2px rgba(34, 211, 238, 0.60),
      0 0 40px rgba(34, 211, 238, 0.40);
  }
  50% {
    box-shadow:
      0 8px 24px rgba(34, 211, 238, 0.50),
      0 0 0 3px rgba(34, 211, 238, 0.80),
      0 0 60px rgba(34, 211, 238, 0.60);
  }
}

/* Divine — golden halo, slow majestic pulse */
.xcs-brewak-rarity-divine {
  --card-accent: #ECECEC;
  background:
    radial-gradient(circle at 50% 30%, rgba(253, 230, 138, 0.30), transparent 60%),
    linear-gradient(135deg,
      rgba(253, 230, 138, 0.12),
      rgba(196,196,196, 0.18),
      rgba(245, 158, 11, 0.10));
  animation: xcs-brewak-divine-pulse 4s ease-in-out infinite;
}
@keyframes xcs-brewak-divine-pulse {
  0%, 100% {
    box-shadow:
      0 8px 24px rgba(253, 230, 138, 0.40),
      0 0 0 2px rgba(253, 230, 138, 0.80),
      0 0 50px rgba(196,196,196, 0.50),
      0 0 100px rgba(253, 230, 138, 0.30);
  }
  50% {
    box-shadow:
      0 12px 32px rgba(253, 230, 138, 0.60),
      0 0 0 3px rgba(253, 230, 138, 1),
      0 0 80px rgba(196,196,196, 0.70),
      0 0 140px rgba(253, 230, 138, 0.50);
  }
}

/* Cosmic — galactic nebula, slow rainbow shift with deep glow */
.xcs-brewak-rarity-cosmic {
  --card-accent: #FB7185;
  background:
    linear-gradient(135deg,
      rgba(251, 113, 133, 0.15),
      rgba(168, 85, 247, 0.18),
      rgba(0,0,0, 0.15),
      rgba(34, 211, 238, 0.15),
      rgba(251, 113, 133, 0.15));
  background-size: 500% 500%;
  animation:
    xcs-brewak-cosmic-bg 8s linear infinite,
    xcs-brewak-cosmic-glow 4s ease-in-out infinite;
}
@keyframes xcs-brewak-cosmic-bg {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes xcs-brewak-cosmic-glow {
  0%, 100% {
    box-shadow:
      0 10px 30px rgba(251, 113, 133, 0.40),
      0 0 0 3px rgba(251, 113, 133, 0.70),
      0 0 60px rgba(168, 85, 247, 0.50);
  }
  33% {
    box-shadow:
      0 10px 30px rgba(168, 85, 247, 0.40),
      0 0 0 3px rgba(168, 85, 247, 0.70),
      0 0 60px rgba(0,0,0, 0.50);
  }
  66% {
    box-shadow:
      0 10px 30px rgba(0,0,0, 0.40),
      0 0 0 3px rgba(34, 211, 238, 0.70),
      0 0 60px rgba(34, 211, 238, 0.50);
  }
}

/* Odds list — add styles for new rarities */
.xcs-brewak-odds-ascended { border-left: 3px solid #22D3EE !important; }
.xcs-brewak-odds-divine   { border-left: 3px solid var(--xcs-yellow-soft) !important; background: linear-gradient(90deg, rgba(253, 230, 138, 0.10), transparent) !important; }
.xcs-brewak-odds-cosmic   { border-left: 3px solid #FB7185 !important; background: linear-gradient(90deg, rgba(251, 113, 133, 0.10), transparent) !important; }

/* ════════════════════════════════════════════════════════════════════════
 * PACK SELECTOR TABS — Brewek vs Heavenly vs future packs
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-brewak-pack-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.xcs-brewak-pack-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--xcs-bg-1, #FFFFFF);
  border: 2px solid var(--xcs-line-1, #E3E3E3);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.20s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}
[data-theme="dark"] .xcs-brewak-pack-tab {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.xcs-brewak-pack-tab:hover {
  transform: translateY(-2px);
  border-color: var(--pack-color, var(--xcs-yellow));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
}
.xcs-brewak-pack-tab.is-active {
  border-color: var(--pack-color, var(--xcs-yellow));
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--pack-color, var(--xcs-yellow)) 12%, transparent),
    transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--pack-color, var(--xcs-yellow)) 25%, transparent);
}
.xcs-brewak-pack-tab-emoji {
  font-size: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.xcs-brewak-pack-tab-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.xcs-brewak-pack-tab-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--xcs-ink-1, #0A0A0A);
}
[data-theme="dark"] .xcs-brewak-pack-tab-name { color: #F2F2F2; }
.xcs-brewak-pack-tab-price {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pack-color, #B45309);
  font-family: 'JetBrains Mono', monospace;
}

/* When Heavenly is selected, override pack visual color */
.xcs-brewak-mainpack[style*="--pack-color"] .xcs-brewak-pack-visual {
  border-color: var(--pack-color, var(--xcs-yellow));
}
.xcs-brewak-pack-visual[style*="--pack-color"] {
  border-color: var(--pack-color, var(--xcs-yellow)) !important;
}
.xcs-brewak-pack-visual[style*="--pack-color"] .xcs-brewak-pack-brand {
  color: var(--pack-color, var(--xcs-yellow));
  text-shadow: 0 0 16px color-mix(in srgb, var(--pack-color, var(--xcs-yellow)) 50%, transparent);
}

/* ════════════════════════════════════════════════════════════════════════
 * ENSIKLOPEDIA SECTION — preview all cards under pack visual
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-brewak-ensiklo {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px dashed var(--xcs-line-1, #E3E3E3);
}
[data-theme="dark"] .xcs-brewak-ensiklo {
  border-top-color: rgba(255, 255, 255, 0.10);
}

.xcs-brewak-ensiklo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.xcs-brewak-ensiklo-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
}
.xcs-brewak-ensiklo-head p {
  margin: 0;
  font-size: 13px;
  color: var(--xcs-ink-3, #6E6E6E);
}

.xcs-brewak-ensiklo-progress {
  min-width: 200px;
  text-align: right;
}
.xcs-brewak-ensiklo-progress-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--xcs-yellow, var(--xcs-yellow));
  font-family: 'JetBrains Mono', monospace;
}
.xcs-brewak-ensiklo-progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 4px;
}
[data-theme="dark"] .xcs-brewak-ensiklo-progress-bar { background: rgba(255, 255, 255, 0.08); }
.xcs-brewak-ensiklo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--xcs-yellow), #F59E0B);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.xcs-brewak-ensiklo-progress-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--xcs-ink-3);
  letter-spacing: 0.04em;
}

.xcs-brewak-ensiklo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.xcs-brewak-ensiklo-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease;
}
.xcs-brewak-ensiklo-item .xcs-brewak-card {
  /* Same as collection grid — card centers itself within the flex item */
  margin: 0 auto;
}
.xcs-brewak-ensiklo-item:hover {
  transform: translateY(-3px);
}
.xcs-brewak-ensiklo-item.is-locked .xcs-brewak-card {
  /* Slightly dim locked cards so owned ones stand out */
  opacity: 0.9;
}
.xcs-brewak-ensiklo-tag {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}
.xcs-brewak-ensiklo-tag.is-owned {
  background: rgba(34, 197, 94, 0.12);
  color: #047857;
  border: 1px solid rgba(34, 197, 94, 0.30);
}
[data-theme="dark"] .xcs-brewak-ensiklo-tag.is-owned {
  background: rgba(34, 197, 94, 0.18);
  color: #6EE7B7;
}
.xcs-brewak-ensiklo-tag.is-locked {
  background: rgba(110,110,110, 0.10);
  color: var(--xcs-ink-3, #6E6E6E);
  border: 1px solid rgba(110,110,110, 0.25);
}
[data-theme="dark"] .xcs-brewak-ensiklo-tag.is-locked {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(241, 243, 246, 0.55);
}

/* ════════════════════════════════════════════════════════════════════════
 * PACK ADMIN PANEL
 * ════════════════════════════════════════════════════════════════════════ */
.xcs-packadmin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}
.xcs-packadmin-card {
  background: var(--xcs-bg-1, #FFFFFF);
  border: 1px solid var(--xcs-line-1);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
[data-theme="dark"] .xcs-packadmin-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.xcs-packadmin-card.is-disabled { opacity: 0.55; }

.xcs-packadmin-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--xcs-line-1);
}
[data-theme="dark"] .xcs-packadmin-card-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.xcs-packadmin-card-emoji {
  font-size: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--pack-color, var(--xcs-yellow)) 40%, transparent));
}
.xcs-packadmin-card-meta { flex: 1; min-width: 0; }
.xcs-packadmin-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--xcs-ink-1);
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-theme="dark"] .xcs-packadmin-card-name { color: #F2F2F2; }
.xcs-packadmin-card-id {
  font-size: 11.5px;
  color: var(--xcs-ink-3);
  margin-top: 2px;
}
.xcs-packadmin-card-id code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
[data-theme="dark"] .xcs-packadmin-card-id code { background: rgba(255, 255, 255, 0.06); }
.xcs-packadmin-card-price {
  font-weight: 800;
  color: var(--xcs-yellow, #B45309);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
[data-theme="dark"] .xcs-packadmin-card-price { color: #FBBF24; }

.xcs-packadmin-card-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--xcs-ink-2);
}
.xcs-packadmin-card-stats strong { color: var(--xcs-ink-1); }
[data-theme="dark"] .xcs-packadmin-card-stats { color: rgba(241, 243, 246, 0.7); }
[data-theme="dark"] .xcs-packadmin-card-stats strong { color: #F2F2F2; }
.xcs-packadmin-card-stats .is-ok strong { color: #047857; }
.xcs-packadmin-card-stats .is-warn { color: #B91C1C; }
.xcs-packadmin-card-stats .is-warn strong { color: #B91C1C; }

.xcs-packadmin-card-weights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.xcs-packadmin-weight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--card-accent, #9A9A9A);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
[data-theme="dark"] .xcs-packadmin-weight {
  background: rgba(255, 255, 255, 0.04);
}
.xcs-packadmin-weight-rar {
  color: var(--card-accent, #9A9A9A);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10px;
}
.xcs-packadmin-weight-val {
  font-family: 'JetBrains Mono', monospace;
  color: var(--xcs-ink-1);
}
[data-theme="dark"] .xcs-packadmin-weight-val { color: #F2F2F2; }

/* Pack Edit Modal */
.xcs-packedit-modal {
  max-width: 720px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.xcs-packedit-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.xcs-packedit-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.xcs-packedit-section h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.xcs-packedit-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.03));
  border-radius: 10px;
  font-size: 12.5px;
}
[data-theme="dark"] .xcs-packedit-presets {
  background: rgba(255, 255, 255, 0.03);
}
.xcs-packedit-presets > span {
  font-weight: 700;
  color: var(--xcs-ink-3);
  margin-right: 4px;
}

.xcs-packedit-weights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.xcs-packedit-weight-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--xcs-bg-1);
  border: 1px solid var(--xcs-line-1);
  border-left: 4px solid var(--card-accent, #9A9A9A);
  border-radius: 8px;
}
[data-theme="dark"] .xcs-packedit-weight-row {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  border-left-color: var(--card-accent, #9A9A9A);
}
.xcs-packedit-weight-label {
  flex: 1;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--card-accent, #9A9A9A);
}
.xcs-packedit-weight-row input {
  width: 70px;
  padding: 4px 6px;
  border: 1px solid var(--xcs-line-1);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-align: right;
  background: var(--xcs-bg-1);
  color: var(--xcs-ink-1);
}
[data-theme="dark"] .xcs-packedit-weight-row input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.10);
  color: #F2F2F2;
}
.xcs-packedit-weight-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--xcs-ink-3);
}

.xcs-packedit-total {
  margin-top: 4px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.xcs-packedit-total strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
}
.xcs-packedit-total.is-ok {
  background: rgba(34, 197, 94, 0.10);
  color: #047857;
  border: 1px solid rgba(34, 197, 94, 0.30);
}
[data-theme="dark"] .xcs-packedit-total.is-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #6EE7B7;
}
.xcs-packedit-total.is-warn {
  background: rgba(239, 68, 68, 0.10);
  color: #B91C1C;
  border: 1px solid rgba(239, 68, 68, 0.30);
}
[data-theme="dark"] .xcs-packedit-total.is-warn {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
}

/* ════════════════════════════════════════════════════════════════════════
 * PACK IMAGE SUPPORT — image fill for pack visual + tab thumbnails
 * ════════════════════════════════════════════════════════════════════════ */

/* Pack tab — thumbnail box (image or emoji) */
.xcs-brewak-pack-tab-art {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 60%),
              linear-gradient(135deg, var(--pack-color, var(--xcs-yellow)), #0A0A0A);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.xcs-brewak-pack-tab-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xcs-brewak-pack-tab-art .xcs-brewak-pack-tab-emoji {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.30));
}

/* Pack visual — when image mode: image fills the card with overlay text */
.xcs-brewak-pack-visual.has-image {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.xcs-brewak-pack-visual.has-image::before {
  content: none;  /* Disable the dashed border overlay for image mode */
}
.xcs-brewak-pack-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.xcs-brewak-pack-visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.50) 75%,
    rgba(0, 0, 0, 0.90) 100%);
  text-align: center;
}
.xcs-brewak-pack-visual.has-image .xcs-brewak-pack-brand {
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px var(--pack-color);
  margin: 0;
}
.xcs-brewak-pack-visual.has-image .xcs-brewak-pack-sub {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ── Pack Admin — thumbnail box (image or emoji) ──────────────────── */
.xcs-packadmin-card-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 60%),
              linear-gradient(135deg, var(--pack-color, var(--xcs-yellow)), #0A0A0A);
  border: 2px solid var(--pack-color, var(--xcs-yellow));
}
.xcs-packadmin-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xcs-packadmin-card-thumb .xcs-packadmin-card-emoji {
  font-size: 32px;
  line-height: 1;
}

/* ── Pack Edit Modal — live image preview ─────────────────────────── */
.xcs-packedit-img-preview {
  margin-top: 12px;
  padding: 12px;
  background: var(--xcs-bg-2, rgba(0, 0, 0, 0.03));
  border-radius: 10px;
}
[data-theme="dark"] .xcs-packedit-img-preview {
  background: rgba(255, 255, 255, 0.03);
}
.xcs-packedit-img-preview-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--xcs-ink-3);
  margin-bottom: 8px;
}
.xcs-packedit-img-preview-box {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--pack-color, var(--xcs-yellow));
  background: #222222;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xcs-packedit-img-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xcs-packedit-img-preview-fallback {
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════════════
 * FEATURED CARD SLOT — RARITY-TIERED DRAMATIC EFFECTS
 *
 * Per-rarity visual tier applied to the featured slot pill in trading cards.
 * Each higher tier gains more dramatic effects: glows, animations, particles.
 *
 * Tier ladder:
 *   common    → no effect (baseline)
 *   rare      → static blue tint
 *   epic      → soft purple glow
 *   legendary → gold pulsing glow + shimmer sweep
 *   mythical  → pink rainbow glow + shimmer + corner sparkles
 *   ascended  → cyan electric breathing glow + lightning sweep
 *   divine    → golden halo + radial light burst + slow majestic shimmer
 *   cosmic    → nebula rainbow shifting + cosmic dust particles
 * ════════════════════════════════════════════════════════════════════════ */

/* Base — make slot a proper "containing block" so ::before/::after position right */
.xcs-tcard-fcslot.is-filled {
  position: relative;
  isolation: isolate;
}

/* Reset shadow base so per-tier rules can stack cleanly */
.xcs-tcard-fcslot.is-filled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Hide the generic shimmer overlay for tiered rarities — each tier supplies its own */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-legendary .xcs-tcard-fcslot-shimmer,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-mythical  .xcs-tcard-fcslot-shimmer,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-ascended  .xcs-tcard-fcslot-shimmer,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine    .xcs-tcard-fcslot-shimmer,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic    .xcs-tcard-fcslot-shimmer {
  display: none;
}

/* ─── TIER 1: COMMON — baseline, no effect ─────────────────────────── */
/* (uses default slot styling) */

/* ─── TIER 2: RARE — subtle blue tint ──────────────────────────────── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-rare {
  background: linear-gradient(135deg, rgba(0,0,0, 0.06), rgba(0,0,0, 0.02)) !important;
  border-color: var(--xcs-blue) !important;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-rare {
  background: linear-gradient(135deg, rgba(0,0,0, 0.12), rgba(0,0,0, 0.05)) !important;
}

/* ─── TIER 3: EPIC — soft purple glow ──────────────────────────────── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-epic {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.10), rgba(168, 85, 247, 0.03)) !important;
  border-color: var(--xcs-violet) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 0 16px rgba(168, 85, 247, 0.25),
    inset 0 0 12px rgba(168, 85, 247, 0.08) !important;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-epic {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(168, 85, 247, 0.06)) !important;
}

/* ─── TIER 4: LEGENDARY — gold pulsing glow + shimmer sweep ────────── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-legendary {
  background: linear-gradient(135deg, rgba(196,196,196, 0.14), rgba(180, 83, 9, 0.06)) !important;
  border-color: var(--xcs-yellow) !important;
  border-width: 2px !important;
  animation: xcs-fcslot-legendary-pulse 2.5s ease-in-out infinite;
  overflow: hidden;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-legendary {
  background: linear-gradient(135deg, rgba(196,196,196, 0.20), rgba(180, 83, 9, 0.10)) !important;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-legendary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 230, 130, 0.45) 50%, transparent 70%);
  animation: xcs-fcslot-shimmer-sweep 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes xcs-fcslot-legendary-pulse {
  0%, 100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 20px rgba(196,196,196, 0.35),
      0 0 0 1px rgba(196,196,196, 0.40);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.12),
      0 0 32px rgba(196,196,196, 0.60),
      0 0 0 2px rgba(196,196,196, 0.75);
  }
}
@keyframes xcs-fcslot-shimmer-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── TIER 5: MYTHICAL — pink rainbow + shimmer + corner sparkles ──── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-mythical {
  background: linear-gradient(135deg,
    rgba(236, 72, 153, 0.18),
    rgba(168, 85, 247, 0.12),
    rgba(0,0,0, 0.10)) !important;
  background-size: 250% 250% !important;
  border-color: #EC4899 !important;
  border-width: 2px !important;
  animation:
    xcs-fcslot-mythical-bg 4s ease infinite,
    xcs-fcslot-mythical-pulse 2.2s ease-in-out infinite;
  overflow: hidden;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-mythical {
  background: linear-gradient(135deg,
    rgba(236, 72, 153, 0.28),
    rgba(168, 85, 247, 0.20),
    rgba(0,0,0, 0.15)) !important;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-mythical::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 200, 230, 0.55) 50%, transparent 75%);
  animation: xcs-fcslot-shimmer-sweep 2.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-mythical::before {
  content: '✦';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 10px;
  color: #FBCFE8;
  text-shadow: 0 0 6px rgba(236, 72, 153, 0.9);
  animation: xcs-fcslot-sparkle 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes xcs-fcslot-mythical-bg {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes xcs-fcslot-mythical-pulse {
  0%, 100% {
    box-shadow:
      0 2px 10px rgba(0, 0, 0, 0.10),
      0 0 24px rgba(236, 72, 153, 0.45),
      0 0 0 1px rgba(236, 72, 153, 0.50);
  }
  50% {
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.14),
      0 0 40px rgba(236, 72, 153, 0.70),
      0 0 0 2px rgba(236, 72, 153, 0.85);
  }
}
@keyframes xcs-fcslot-sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8) rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.4) rotate(180deg); }
}

/* ─── TIER 6: ASCENDED — cyan electric + lightning sweep ───────────── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-ascended {
  background: linear-gradient(135deg,
    rgba(34, 211, 238, 0.18),
    rgba(14, 165, 233, 0.12),
    rgba(2, 132, 199, 0.10)) !important;
  background-size: 300% 300% !important;
  border-color: #22D3EE !important;
  border-width: 2px !important;
  animation:
    xcs-fcslot-ascended-bg 3.5s ease infinite,
    xcs-fcslot-ascended-electric 2s ease-in-out infinite;
  overflow: hidden;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-ascended {
  background: linear-gradient(135deg,
    rgba(34, 211, 238, 0.28),
    rgba(14, 165, 233, 0.20),
    rgba(2, 132, 199, 0.15)) !important;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-ascended::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(165, 243, 252, 0.60) 50%, transparent 80%);
  animation: xcs-fcslot-shimmer-sweep 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-ascended::before {
  content: '⚡';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 11px;
  color: #67E8F9;
  text-shadow: 0 0 8px rgba(34, 211, 238, 1);
  animation: xcs-fcslot-electric-flicker 1.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes xcs-fcslot-ascended-bg {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes xcs-fcslot-ascended-electric {
  0%, 100% {
    box-shadow:
      0 2px 10px rgba(0, 0, 0, 0.12),
      0 0 28px rgba(34, 211, 238, 0.55),
      0 0 0 1px rgba(34, 211, 238, 0.60),
      inset 0 0 16px rgba(34, 211, 238, 0.10);
  }
  50% {
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.18),
      0 0 48px rgba(34, 211, 238, 0.85),
      0 0 0 2px rgba(34, 211, 238, 0.95),
      inset 0 0 24px rgba(34, 211, 238, 0.20);
  }
}
@keyframes xcs-fcslot-electric-flicker {
  0%, 100% { opacity: 1;   transform: scale(1)    rotate(0deg); }
  25%      { opacity: 0.4; transform: scale(0.85) rotate(-8deg); }
  50%      { opacity: 1;   transform: scale(1.1)  rotate(5deg); }
  75%      { opacity: 0.7; transform: scale(0.95) rotate(-3deg); }
}

/* ─── TIER 7: DIVINE — golden halo + radial light burst ────────────── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine {
  background:
    radial-gradient(circle at 50% 50%, rgba(253, 230, 138, 0.35), transparent 70%),
    linear-gradient(135deg,
      rgba(253, 230, 138, 0.20),
      rgba(196,196,196, 0.15),
      rgba(245, 158, 11, 0.10)) !important;
  border-color: var(--xcs-yellow-soft) !important;
  border-width: 2px !important;
  animation: xcs-fcslot-divine-halo 4s ease-in-out infinite;
  overflow: hidden;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine {
  background:
    radial-gradient(circle at 50% 50%, rgba(253, 230, 138, 0.40), transparent 70%),
    linear-gradient(135deg,
      rgba(253, 230, 138, 0.28),
      rgba(196,196,196, 0.20),
      rgba(245, 158, 11, 0.15)) !important;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine::after {
  content: '';
  position: absolute; inset: -50%;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(253, 230, 138, 0.30) 0%,
      transparent 40%);
  animation: xcs-fcslot-divine-rays 6s linear infinite;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine::before {
  content: '☀';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 13px;
  color: var(--xcs-yellow-soft);
  text-shadow: 0 0 10px rgba(253, 230, 138, 1), 0 0 16px rgba(196,196,196, 0.7);
  animation: xcs-fcslot-divine-shine 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes xcs-fcslot-divine-halo {
  0%, 100% {
    box-shadow:
      0 2px 12px rgba(0, 0, 0, 0.10),
      0 0 32px rgba(253, 230, 138, 0.65),
      0 0 64px rgba(196,196,196, 0.45),
      0 0 0 1px rgba(253, 230, 138, 0.80),
      inset 0 0 20px rgba(253, 230, 138, 0.15);
  }
  50% {
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.15),
      0 0 52px rgba(253, 230, 138, 0.95),
      0 0 100px rgba(196,196,196, 0.70),
      0 0 0 2px rgba(253, 230, 138, 1),
      inset 0 0 32px rgba(253, 230, 138, 0.25);
  }
}
@keyframes xcs-fcslot-divine-rays {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes xcs-fcslot-divine-shine {
  0%, 100% { transform: scale(1) rotate(0deg);     filter: brightness(1); }
  50%      { transform: scale(1.25) rotate(180deg); filter: brightness(1.4); }
}

/* ─── TIER 8: COSMIC — nebula rainbow + cosmic dust + deep glow ────── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic {
  background: linear-gradient(135deg,
    rgba(251, 113, 133, 0.22),
    rgba(168, 85, 247, 0.20),
    rgba(0,0,0, 0.18),
    rgba(34, 211, 238, 0.18),
    rgba(251, 113, 133, 0.22)) !important;
  background-size: 500% 500% !important;
  border-color: #FB7185 !important;
  border-width: 2px !important;
  animation:
    xcs-fcslot-cosmic-bg 8s linear infinite,
    xcs-fcslot-cosmic-glow 4s ease-in-out infinite;
  overflow: hidden;
}
[data-theme="dark"] .xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic {
  background: linear-gradient(135deg,
    rgba(251, 113, 133, 0.32),
    rgba(168, 85, 247, 0.28),
    rgba(0,0,0, 0.25),
    rgba(34, 211, 238, 0.25),
    rgba(251, 113, 133, 0.32)) !important;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.40) 0%, transparent 2%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.50) 0%, transparent 2.5%),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.35) 0%, transparent 1.5%),
    radial-gradient(circle at 85% 25%, rgba(255, 255, 255, 0.40) 0%, transparent 2%),
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.30) 0%, transparent 1.5%);
  animation: xcs-fcslot-cosmic-dust 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic::before {
  content: '✧';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 13px;
  color: #FFFFFF;
  text-shadow:
    0 0 8px rgba(251, 113, 133, 1),
    0 0 16px rgba(168, 85, 247, 0.8),
    0 0 24px rgba(0,0,0, 0.5);
  animation: xcs-fcslot-cosmic-rotate 4s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes xcs-fcslot-cosmic-bg {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes xcs-fcslot-cosmic-glow {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.15),
      0 0 36px rgba(251, 113, 133, 0.55),
      0 0 72px rgba(168, 85, 247, 0.40),
      0 0 0 1px rgba(251, 113, 133, 0.75);
  }
  33% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.15),
      0 0 40px rgba(168, 85, 247, 0.65),
      0 0 80px rgba(0,0,0, 0.45),
      0 0 0 2px rgba(168, 85, 247, 0.80);
  }
  66% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.15),
      0 0 44px rgba(0,0,0, 0.55),
      0 0 88px rgba(34, 211, 238, 0.45),
      0 0 0 2px rgba(34, 211, 238, 0.80);
  }
}
@keyframes xcs-fcslot-cosmic-dust {
  0%, 100% { opacity: 0.6; transform: scale(1)    rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.15) rotate(180deg); }
}
@keyframes xcs-fcslot-cosmic-rotate {
  0%   { transform: rotate(0deg)   scale(1); }
  50%  { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ─── Content z-index lift so effects sit BEHIND text/art ──────────── */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-legendary > *,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-mythical > *,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-ascended > *,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine > *,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic > * {
  position: relative;
  z-index: 3;
}

/* Make the rarity label text glow on premium tiers for legibility */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-legendary .xcs-tcard-fcslot-rarity,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-mythical  .xcs-tcard-fcslot-rarity,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-ascended  .xcs-tcard-fcslot-rarity,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine    .xcs-tcard-fcslot-rarity,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic    .xcs-tcard-fcslot-rarity {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  font-weight: 900 !important;
}

/* The name on Divine/Cosmic needs extra contrast against bright radial bg */
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-divine .xcs-tcard-fcslot-name,
.xcs-tcard-fcslot.is-filled.xcs-brewak-rarity-cosmic .xcs-tcard-fcslot-name {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.40);
}

/* Reduce motion for accessibility — disable all per-tier animation */
@media (prefers-reduced-motion: reduce) {
  .xcs-tcard-fcslot.is-filled[class*="xcs-brewak-rarity-"],
  .xcs-tcard-fcslot.is-filled[class*="xcs-brewak-rarity-"]::before,
  .xcs-tcard-fcslot.is-filled[class*="xcs-brewak-rarity-"]::after {
    animation: none !important;
  }
}


/* ════════════════════════════════════════════════════════════════════════
   PERF PATCH — XCS REQUEST SYSTEM ONLY (added by optimization request)
   Goal: remove heavy backdrop-filter / filter blur on POP-UPS & OVERLAYS so
   the browser does not repaint a blurred copy of the whole page every frame.
   Scrim/dialog backgrounds are kept semi-opaque so dimming still works.
   NOTE: This intentionally does NOT touch DRANKATOS (separate files), nor
   decorative card/sidebar/topbar blur. To revert: delete this whole block
   and restore the @keyframes xcs-backdrop-blur above.
   ════════════════════════════════════════════════════════════════════════ */
.xcs-lb,
.xcs-modal-scrim,
.xcs-modal-backdrop,
.xcs-nav-scrim,
.xcs-broadcast-overlay,
.xcs-att-overlay,
.xcs-attpopup-overlay,
.xcs-giftpopup-overlay,
.xcs-modal-overlay,
.xcs-modal,
.xcs-notif-dropdown,
.xcs-cardzoom-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}
/* keep modal/dropdown panels readable without the glass blur */
[data-theme="dark"] .xcs-modal,
[data-theme="dark"] .xcs-notif-dropdown {
  background: linear-gradient(180deg, rgba(26,29,38,0.98) 0%, rgba(18,20,26,0.98) 100%) !important;
}
/* PERF PATCH END */


/* ════════════════════════════════════════════════════════════════════════
   FEATURE — Auto-priority badge + "Open in new tab" affordances (XCS only)
   ════════════════════════════════════════════════════════════════════════ */
/* Auto-escalated priority: small ▲ marker + gentle pulse so it's noticeable */
.xcs-prio.is-auto { font-weight: 700; }
.xcs-prio-auto {
  font-size: 0.78em; line-height: 1; margin-left: 3px;
  display: inline-block; transform: translateY(-0.5px);
  animation: xcs-prio-pulse 2.4s ease-in-out infinite;
}
@keyframes xcs-prio-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .xcs-prio-auto { animation: none; } }

/* Queue rows are now <a> — keep them looking like the old buttons */
a.xcs-row { text-decoration: none; color: inherit; }
.xcs-row { position: relative; }
.xcs-row-newtab {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; cursor: pointer;
  color: var(--xcs-ink-3, #3A3A3A);
  background: var(--xcs-panel, #fff);
  border: 1px solid var(--xcs-border, #E3E3E3);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  opacity: 0; pointer-events: none; transition: opacity .12s, color .12s, border-color .12s;
}
.xcs-row:hover .xcs-row-newtab,
.xcs-row:focus-within .xcs-row-newtab { opacity: 1; pointer-events: auto; }
.xcs-row-newtab:hover { color: #fff; background: var(--xcs-blue, var(--xcs-blue)); border-color: var(--xcs-blue, var(--xcs-blue)); }

/* Kanban card — id + new-tab button group, and the new-tab button itself */
.xcs-room-card-idwrap { display: inline-flex; align-items: center; gap: 5px; }
.xcs-room-card-newtab {
  appearance: none; border: 1px solid var(--xcs-border, #E3E3E3);
  background: transparent; color: var(--xcs-ink-4, #6E6E6E);
  width: 18px; height: 18px; border-radius: 5px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .12s, color .12s, background .12s, border-color .12s;
}
.xcs-room-card:hover .xcs-room-card-newtab { opacity: 1; }
.xcs-room-card-newtab:hover { color: #fff; background: var(--xcs-blue, var(--xcs-blue)); border-color: var(--xcs-blue, var(--xcs-blue)); }
/* FEATURE END */
