/* ==========================================================================
   theme_gold.css — "Luxury Dark Gold" palette for the DARK theme (v14 preview).
   Loaded after theme.css. Only colours change: same tokens, same layout.
   Light mode keeps Clean Blue.
   ========================================================================== */
:root[data-theme="dark"],
:root:not([data-theme]) {
  --cb-bg: #121316;            /* obsidian */
  --cb-card: #1c1d22;          /* containers */
  --cb-elev: #24252b;
  --cb-hover: #2a2b31;
  --cb-text: #f2e6ce;          /* champagne */
  --cb-text-2: #d8ccb3;
  --cb-muted: #a09888;         /* muted beige */
  --cb-border: #2f2d29;
  --cb-border-2: #423d34;

  --cb-primary: #e6ca65;       /* gold text / icons */
  --cb-primary-hover: #f0da8a;
  --cb-primary-2: #c5a059;
  --cb-primary-soft: rgba(197, 160, 89, .14);
  --cb-primary-line: rgba(197, 160, 89, .42);
  --cb-on-primary: #121316;
  --cb-btn: #c5a059;
  --cb-btn-hover: #d4b26a;
  --cb-gold-grad: linear-gradient(135deg, #c5a059 0%, #e6ca65 100%);

  /* status: sage = hit, gold/amber = alerts & close, bronze = mid/low */
  --cb-success: #8fae6b;  --cb-success-ink: #a9c487;  --cb-success-soft: rgba(143, 174, 107, .13);
  --cb-warning: #e0a84a;  --cb-warning-ink: #e9bd6a;  --cb-warning-soft: rgba(224, 168, 74, .13);
  --cb-orange: #b9824a;   --cb-orange-ink: #cd9a63;   /* bronze */
  --cb-error: #c9705c;    --cb-error-ink: #dc8b78;    --cb-error-soft: rgba(201, 112, 92, .14);
  --cb-neutral: #6e6758;

  --cb-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --cb-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -8px rgba(0, 0, 0, .5);
  --cb-shadow-lg: 0 24px 54px -18px rgba(0, 0, 0, .7);
  --cb-ring: 0 0 0 3px rgba(230, 202, 101, .28);
  --cb-scrim: rgba(6, 6, 8, .65);

  /* kit: bronze for "below target" bands as asked */
  --st-hit: var(--cb-success-ink); --st-close: var(--cb-primary); --st-mid: var(--cb-orange-ink);
  --st-low: var(--cb-error-ink); --st-none: var(--cb-neutral);
  --stc-open: var(--cb-primary); --stc-prog: var(--cb-orange-ink); --stc-done: var(--cb-success-ink);
}

/* ---- gold highlights (dark only) ---- */
:root:not([data-theme="light"]) .nav-item.is-active {
  background: linear-gradient(90deg, rgba(197, 160, 89, .22), rgba(230, 202, 101, .05));
  color: #e6ca65;
}
:root:not([data-theme="light"]) .nav-item.is-active::before { background: var(--cb-gold-grad); }
:root:not([data-theme="light"]) .brand-mark,
:root:not([data-theme="light"]) .user-avatar:not(.has-img) { background: var(--cb-gold-grad); color: #121316; }

/* primary buttons: gold gradient, dark text (white on gold fails contrast) */
:root:not([data-theme="light"]) .btn-primary,
:root:not([data-theme="light"]) .lx-btn:not(.lx-btn-ghost),
:root:not([data-theme="light"]) .lx-pg.on {
  background: var(--cb-gold-grad); color: #121316; border-color: transparent; font-weight: 650;
}
:root:not([data-theme="light"]) .btn-primary:hover,
:root:not([data-theme="light"]) .lx-btn:not(.lx-btn-ghost):hover { background: linear-gradient(135deg, #d4b26a, #f0da8a); filter: none; }
:root:not([data-theme="light"]) .lx-btn:not(.lx-btn-ghost) .lx-ico { color: #121316; }

/* selected tab pills */
:root:not([data-theme="light"]) .lx-seg button.on,
:root:not([data-theme="light"]) .ix2-tabs a.on,
:root:not([data-theme="light"]) .ov-tog button.on,
:root:not([data-theme="light"]) .lang-btn.is-active {
  background: var(--cb-gold-grad); color: #121316; border-color: transparent; box-shadow: none;
}
:root:not([data-theme="light"]) .lx-seg button.on em,
:root:not([data-theme="light"]) .ix2-tabs a.on em { background: rgba(18, 19, 22, .18); color: #121316; }

/* key metric cards: gold hairline on top + gold icon tiles */
:root:not([data-theme="light"]) .lx-k { border-top: 1px solid rgba(197, 160, 89, .35); }
:root:not([data-theme="light"]) .lx-k.on { border-color: var(--cb-primary-line); background: linear-gradient(180deg, rgba(197, 160, 89, .1), transparent 70%), var(--cb-card); }
:root:not([data-theme="light"]) .card { border-top-color: rgba(197, 160, 89, .35); }
:root:not([data-theme="light"]) .topbar h1 { color: #f2e6ce; }

/* badges & highlights */
:root:not([data-theme="light"]) .nav-badge { background: rgba(197, 160, 89, .16); color: #e6ca65; border-color: rgba(197, 160, 89, .4); }
:root:not([data-theme="light"]) .pb-icon { background: var(--cb-gold-grad); color: #121316; }
:root:not([data-theme="light"]) ::selection { background: rgba(197, 160, 89, .35); }
