/* ══ RESET ════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══ THEMES ══════════════════════════════════════════════════ */
:root {
  --font:         "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --font-mono:    "Cascadia Code", "Cascadia Mono", Consolas, "Courier New", monospace;
  --radius:  5px;
  --radius-sm: 3px;

  /* MIDNIGHT (dark default) */
  color-scheme: dark;
  --bg: #0d1117; --bg-card: #161b27; --bg-header: #080c14; --bg-section: #1b2132; --bg-input: #1b2132;
  --text: #dcd6ce; --text-muted: #7a8499; --text-light: #414d65; --text-header: #c4bdb5;
  --accent: #e05555; --accent-h: #c73c3c; --accent-glow: rgba(224,85,85,0.18);
  --border: #252e45; --border-light: #1a2030;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.75);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#60a5fa; --s-progress:#fbbf24; --s-resolved:#4ade80; --s-closed:#737373;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0f2d1e; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#1e3a5f; --b-open-fg:#60a5fa; --b-open-bd:#1e40af;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0f2d1e; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #1c1c1c; --b-clo-fg: #737373; --b-clo-bd: #404040;
  --dash-bg: #0d1117; --bar-track-bg: #1b2132; --feed-bg: #0d1117; --feed-line: #1b2132;
  --metric-border: #252e45; --tab-bg: #161b27; --tab-border: #252e45; --tab-active-fg: #dcd6ce;
}

html[data-theme="midnight"] {
  color-scheme: dark;
  --bg: #0d1117; --bg-card: #161b27; --bg-header: #080c14; --bg-section: #1b2132; --bg-input: #1b2132;
  --text: #dcd6ce; --text-muted: #7a8499; --text-light: #414d65; --text-header: #c4bdb5;
  --accent: #e05555; --accent-h: #c73c3c; --accent-glow: rgba(224,85,85,0.18);
  --border: #252e45; --border-light: #1a2030;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.75);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#60a5fa; --s-progress:#fbbf24; --s-resolved:#4ade80; --s-closed:#737373;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0f2d1e; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#1e3a5f; --b-open-fg:#60a5fa; --b-open-bd:#1e40af;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0f2d1e; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #1c1c1c; --b-clo-fg: #737373; --b-clo-bd: #404040;
  --dash-bg: #0d1117; --bar-track-bg: #1b2132; --feed-bg: #0d1117; --feed-line: #1b2132;
  --metric-border: #252e45; --tab-bg: #161b27; --tab-border: #252e45; --tab-active-fg: #dcd6ce;
}

html[data-theme="forest"] {
  color-scheme: dark;
  --bg: #050e08; --bg-card: #0a1610; --bg-header: #020804; --bg-section: #0e1e14; --bg-input: #0e1e14;
  --text: #c2e8cc; --text-muted: #4a9060; --text-light: #205030; --text-header: #90d0a0;
  --accent: #22c55e; --accent-h: #16a34a; --accent-glow: rgba(34,197,94,0.22);
  --border: #0e2818; --border-light: #081c10;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.8);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#22c55e; --s-progress:#fbbf24; --s-resolved:#34d399; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0f2d1e; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#082a18; --b-open-fg:#22c55e; --b-open-bd:#14532d;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0f2d1e; --b-res-fg: #34d399; --b-res-bd: #14532d;
  --b-clo-bg: #1a1c18; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #050e08; --bar-track-bg: #0e1e14; --feed-bg: #050e08; --feed-line: #0a1610;
  --metric-border: #0e2818; --tab-bg: #0a1610; --tab-border: #0e2818; --tab-active-fg: #c2e8cc;
}

html[data-theme="rose"] {
  color-scheme: dark;
  --bg: #0e0508; --bg-card: #160a10; --bg-header: #060204; --bg-section: #1c0d16; --bg-input: #1c0d16;
  --text: #f0d0d8; --text-muted: #c06080; --text-light: #603040; --text-header: #e8b8cc;
  --accent: #f43f5e; --accent-h: #e11d48; --accent-glow: rgba(244,63,94,0.24);
  --border: #2a0e1c; --border-light: #1c0812;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.7); --shadow-lg: 0 16px 48px rgba(0,0,0,0.85);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#f43f5e; --s-progress:#fbbf24; --s-resolved:#4ade80; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0f2d1e; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#3d0e1e; --b-open-fg:#f43f5e; --b-open-bd:#881337;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0f2d1e; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #1a1010; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #0e0508; --bar-track-bg: #1c0d16; --feed-bg: #0e0508; --feed-line: #160a10;
  --metric-border: #2a0e1c; --tab-bg: #160a10; --tab-border: #2a0e1c; --tab-active-fg: #f0d0d8;
}

html[data-theme="copper"] {
  color-scheme: dark;
  --bg: #0e0a04; --bg-card: #181006; --bg-header: #080500; --bg-section: #201408; --bg-input: #201408;
  --text: #f0d8b0; --text-muted: #c09040; --text-light: #705020; --text-header: #e8c880;
  --accent: #f59e0b; --accent-h: #d97706; --accent-glow: rgba(245,158,11,0.24);
  --border: #2e1c08; --border-light: #201408;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.8);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#f59e0b; --s-progress:#fb923c; --s-resolved:#4ade80; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d2800; --b-med-fg: #f59e0b; --b-med-bd: #92400e;
  --b-low-bg: #0f2d1e; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#3d2200; --b-open-fg:#f59e0b; --b-open-bd:#92400e;
  --b-prog-bg:#3d2010; --b-prog-fg:#fb923c; --b-prog-bd:#7c2d12;
  --b-res-bg: #0f2d1e; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #1a1508; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #0e0a04; --bar-track-bg: #201408; --feed-bg: #0e0a04; --feed-line: #181006;
  --metric-border: #2e1c08; --tab-bg: #181006; --tab-border: #2e1c08; --tab-active-fg: #f0d8b0;
}

html[data-theme="steel"] {
  color-scheme: dark;
  --bg: #080c12; --bg-card: #0e141e; --bg-header: #040810; --bg-section: #121c28; --bg-input: #121c28;
  --text: #c8d8e8; --text-muted: #5878a0; --text-light: #2a4060; --text-header: #98b8d8;
  --accent: #38bdf8; --accent-h: #0ea5e9; --accent-glow: rgba(56,189,248,0.2);
  --border: #1a2a3c; --border-light: #101e2e;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.8);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#34d399;
  --s-open:#38bdf8; --s-progress:#fbbf24; --s-resolved:#34d399; --s-closed:#64748b;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0a2d1e; --b-low-fg: #34d399; --b-low-bd: #065f46;
  --b-open-bg:#082030; --b-open-fg:#38bdf8; --b-open-bd:#0c4a6e;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0a2d1e; --b-res-fg: #34d399; --b-res-bd: #065f46;
  --b-clo-bg: #141e28; --b-clo-fg: #64748b; --b-clo-bd: #334155;
  --dash-bg: #080c12; --bar-track-bg: #121c28; --feed-bg: #080c12; --feed-line: #0e141e;
  --metric-border: #1a2a3c; --tab-bg: #0e141e; --tab-border: #1a2a3c; --tab-active-fg: #c8d8e8;
}

html[data-theme="ocean"] {
  color-scheme: dark;
  --bg: #071624; --bg-card: #0d2035; --bg-header: #040d18; --bg-section: #0e2540; --bg-input: #0e2540;
  --text: #c5dff5; --text-muted: #6a9ec0; --text-light: #2e5a80; --text-header: #8cc8ee;
  --accent: #0ea5e9; --accent-h: #0284c7; --accent-glow: rgba(14,165,233,0.2);
  --border: #153350; --border-light: #0f2540;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.8);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#34d399;
  --s-open:#38bdf8; --s-progress:#fbbf24; --s-resolved:#34d399; --s-closed:#64748b;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0a2d1e; --b-low-fg: #34d399; --b-low-bd: #065f46;
  --b-open-bg:#082840; --b-open-fg:#38bdf8; --b-open-bd:#0369a1;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0a2d1e; --b-res-fg: #34d399; --b-res-bd: #065f46;
  --b-clo-bg: #1a2030; --b-clo-fg: #64748b; --b-clo-bd: #334155;
  --dash-bg: #071624; --bar-track-bg: #0e2540; --feed-bg: #071624; --feed-line: #0e2540;
  --metric-border: #153350; --tab-bg: #0d2035; --tab-border: #153350; --tab-active-fg: #c5dff5;
}

html[data-theme="carbon"] {
  color-scheme: dark;
  --bg: #101012; --bg-card: #18181c; --bg-header: #08080a; --bg-section: #202028; --bg-input: #202028;
  --text: #e0dff8; --text-muted: #7a78a8; --text-light: #40405a; --text-header: #c0bfee;
  --accent: #7c3aed; --accent-h: #6d28d9; --accent-glow: rgba(124,58,237,0.22);
  --border: #28283a; --border-light: #1c1c28;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.025);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.85);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#a3e635;
  --s-open:#a78bfa; --s-progress:#fbbf24; --s-resolved:#a3e635; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #1a2d0a; --b-low-fg: #a3e635; --b-low-bd: #3d6b0e;
  --b-open-bg:#1e1a3d; --b-open-fg:#a78bfa; --b-open-bd:#4c1d95;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #1a2d0a; --b-res-fg: #a3e635; --b-res-bd: #3d6b0e;
  --b-clo-bg: #1c1c1c; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #101012; --bar-track-bg: #202028; --feed-bg: #101012; --feed-line: #202028;
  --metric-border: #28283a; --tab-bg: #18181c; --tab-border: #28283a; --tab-active-fg: #e0dff8;
}

/* ── Static theme: Slate (blue-grey) ───────────────────────── */
html[data-theme="slate"] {
  color-scheme: dark;
  --bg: #0d1117; --bg-card: #161b22; --bg-header: #090d13; --bg-section: #1c2230; --bg-input: #1c2230;
  --text: #c0cfe0; --text-muted: #5878a0; --text-light: #2a3a54; --text-header: #90a8c8;
  --accent: #4a8fd4; --accent-h: #3a7cbf; --accent-glow: rgba(74,143,212,0.22);
  --border: #1e2d42; --border-light: #141e2e;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.025);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.85);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#34d399;
  --s-open:#4a8fd4; --s-progress:#fbbf24; --s-resolved:#34d399; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0a2d20; --b-low-fg: #34d399; --b-low-bd: #065f46;
  --b-open-bg:#0e1e34; --b-open-fg:#4a8fd4; --b-open-bd:#1e3a5a;
  --b-prog-bg:#2e2200; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0a2d20; --b-res-fg: #34d399; --b-res-bd: #065f46;
  --b-clo-bg: #141e2e; --b-clo-fg: #6b7280; --b-clo-bd: #334155;
  --dash-bg: #0d1117; --bar-track-bg: #1c2230; --feed-bg: #0d1117; --feed-line: #161b22;
  --metric-border: #1e2d42; --tab-bg: #161b22; --tab-border: #1e2d42; --tab-active-fg: #c0cfe0;
  --accent-dim: rgba(74,143,212,0.22);
  scrollbar-color: rgba(74,143,212,0.35) rgba(13,17,23,0.5);
}

/* ── Animated themes ────────────────────────────────────────── */

html[data-theme="aurora"] {
  color-scheme: dark;
  --bg: #08121e; --bg-card: #0e1c2e; --bg-header: #040c16; --bg-section: #102032; --bg-input: #102032;
  --text: #c8eee0; --text-muted: #4a9070; --text-light: #225040; --text-header: #90d8b8;
  --accent: #10b981; --accent-h: #059669; --accent-glow: rgba(16,185,129,0.22);
  --border: #0e2830; --border-light: #081c24;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.8);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#10b981; --s-progress:#fbbf24; --s-resolved:#34d399; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0f2d1e; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#082a20; --b-open-fg:#10b981; --b-open-bd:#065f46;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0f2d1e; --b-res-fg: #34d399; --b-res-bd: #14532d;
  --b-clo-bg: #1a1c20; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #08121e; --bar-track-bg: #102032; --feed-bg: #08121e; --feed-line: #0e1e30;
  --metric-border: #0e2830; --tab-bg: #0e1c2e; --tab-border: #0e2830; --tab-active-fg: #c8eee0;
}
@keyframes auroraShift {
  0%   { background-position: 0% 50%; }
  33%  { background-position: 66% 0%; }
  66%  { background-position: 100% 66%; }
  100% { background-position: 0% 50%; }
}
html[data-theme="aurora"] body {
  background: linear-gradient(135deg, #08121e 0%, #071e14 22%, #091428 44%, #0a2018 66%, #08121e 100%);
  background-size: 400% 400%;
  animation: auroraShift 18s ease infinite;
}
@keyframes auroraDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="aurora"] .theme-opt-dot {
  background: linear-gradient(135deg, #10b981, #3b82f6, #059669, #06b6d4);
  background-size: 300% 300%;
  animation: auroraDot 3s ease infinite;
}

html[data-theme="neon"] {
  color-scheme: dark;
  --bg: #07000f; --bg-card: #110018; --bg-header: #040008; --bg-section: #16002a; --bg-input: #16002a;
  --text: #f0e8ff; --text-muted: #9060d0; --text-light: #4a2080; --text-header: #e0c8ff;
  --accent: #e879f9; --accent-h: #d946ef; --accent-glow: rgba(232,121,249,0.28);
  --border: #2d0050; --border-light: #1c0035;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,0,255,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.72), 0 0 12px rgba(232,121,249,0.07);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.9);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#e879f9; --p-low:#a3e635;
  --s-open:#22d3ee; --s-progress:#e879f9; --s-resolved:#a3e635; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #2d0038; --b-med-fg: #e879f9; --b-med-bd: #6b0080;
  --b-low-bg: #1a2d0a; --b-low-fg: #a3e635; --b-low-bd: #3d6b0e;
  --b-open-bg:#00282d; --b-open-fg:#22d3ee; --b-open-bd:#155e75;
  --b-prog-bg:#2d0038; --b-prog-fg:#e879f9; --b-prog-bd:#6b0080;
  --b-res-bg: #1a2d0a; --b-res-fg: #a3e635; --b-res-bd: #3d6b0e;
  --b-clo-bg: #1a1a1a; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #07000f; --bar-track-bg: #16002a; --feed-bg: #07000f; --feed-line: #16002a;
  --metric-border: #2d0050; --tab-bg: #110018; --tab-border: #2d0050; --tab-active-fg: #f0e8ff;
}
@keyframes neonShift {
  0%   { background-position: 0% 50%; }
  33%  { background-position: 66% 100%; }
  66%  { background-position: 100% 33%; }
  100% { background-position: 0% 50%; }
}
html[data-theme="neon"] body {
  background: linear-gradient(135deg, #07000f 0%, #12002a 25%, #07000f 50%, #0a0018 75%, #07000f 100%);
}
@keyframes neonDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="neon"] .theme-opt-dot {
  background: linear-gradient(135deg, #e879f9, #22d3ee, #a855f7, #ec4899);
  background-size: 300% 300%;
  animation: neonDot 2.5s ease infinite;
}

html[data-theme="dusk"] {
  color-scheme: dark;
  --bg: #1a0818; --bg-card: #251020; --bg-header: #0e0410; --bg-section: #2a1425; --bg-input: #2a1425;
  --text: #f5dce8; --text-muted: #b06080; --text-light: #603040; --text-header: #e8b8cc;
  --accent: #f97316; --accent-h: #ea6c0c; --accent-glow: rgba(249,115,22,0.22);
  --border: #3d1830; --border-light: #281020;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.65); --shadow-lg: 0 16px 48px rgba(0,0,0,0.8);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#f97316; --s-progress:#fbbf24; --s-resolved:#4ade80; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0f2d1e; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#3d1a08; --b-open-fg:#f97316; --b-open-bd:#7c2d12;
  --b-prog-bg:#3d3010; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0f2d1e; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #201820; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #1a0818; --bar-track-bg: #2a1425; --feed-bg: #1a0818; --feed-line: #251020;
  --metric-border: #3d1830; --tab-bg: #251020; --tab-border: #3d1830; --tab-active-fg: #f5dce8;
}
@keyframes duskShift {
  0%   { background-position: 0% 50%; }
  33%  { background-position: 100% 0%; }
  66%  { background-position: 50% 100%; }
  100% { background-position: 0% 50%; }
}
html[data-theme="dusk"] body {
  background: linear-gradient(135deg, #1a0818 0%, #2d0e08 20%, #1a0820 40%, #250808 60%, #1a0818 100%);
}
@keyframes duskDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="dusk"] .theme-opt-dot {
  background: linear-gradient(135deg, #f97316, #db2777, #7c3aed, #f97316);
  background-size: 300% 300%;
  animation: duskDot 3s ease infinite;
}

html[data-theme="void"] {
  color-scheme: dark;
  --bg: #000005; --bg-card: #07060f; --bg-header: #020108; --bg-section: #0d0b18; --bg-input: #0d0b18;
  --text: #f0ecff; --text-muted: #a99fe0; --text-light: #6b60a8; --text-header: #e8e0ff;
  --accent: #818cf8; --accent-h: #6366f1; --accent-glow: rgba(129,140,248,0.24);
  --border: #1a1530; --border-light: #100e20;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.8), 0 0 0 1px rgba(129,140,248,0.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.8), 0 0 14px rgba(129,140,248,0.06);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.95);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#a3e635;
  --s-open:#818cf8; --s-progress:#fbbf24; --s-resolved:#a3e635; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #1a2d0a; --b-low-fg: #a3e635; --b-low-bd: #3d6b0e;
  --b-open-bg:#12102a; --b-open-fg:#818cf8; --b-open-bd:#312e80;
  --b-prog-bg:#3d3010; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #1a2d0a; --b-res-fg: #a3e635; --b-res-bd: #3d6b0e;
  --b-clo-bg: #111111; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #000005; --bar-track-bg: #0d0b18; --feed-bg: #000005; --feed-line: #07060f;
  --metric-border: #1a1530; --tab-bg: #07060f; --tab-border: #1a1530; --tab-active-fg: #d8d0f8;
  --accent-dim: rgba(129,140,248,0.28);
  scrollbar-color: rgba(129,140,248,0.35) rgba(0,0,5,0.5);
}
@keyframes voidShift {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 50% 0%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50% 100%; }
  100% { background-position: 0% 50%; }
}
html[data-theme="void"] body {
  background: linear-gradient(135deg, #000005 0%, #080514 30%, #000005 55%, #050010 80%, #000005 100%);
  background-size: 400% 400%;
  animation: voidShift 22s ease infinite;
}
/* Void stars — tiny sparkling dots via body::after */
html[data-theme="void"] body::after {
  content: '';
  pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 10%  15%, rgba(200,190,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 25%  60%, rgba(180,170,255,0.40) 0%, transparent 100%),
    radial-gradient(1px 1px at 40%  30%, rgba(220,210,255,0.50) 0%, transparent 100%),
    radial-gradient(1px 1px at 55%  75%, rgba(190,180,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 70%  20%, rgba(210,200,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 82%  55%, rgba(180,170,255,0.40) 0%, transparent 100%),
    radial-gradient(1px 1px at 92%  85%, rgba(200,190,255,0.50) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 18% 80%, rgba(220,210,255,0.30) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 10%, rgba(200,190,255,0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 75% 90%, rgba(180,170,255,0.30) 0%, transparent 100%);
  animation: voidStarTwinkle 8s ease-in-out infinite;
}
@keyframes voidStarTwinkle {
  0%,100% { opacity: 0.6; }
  33%     { opacity: 1;   }
  66%     { opacity: 0.3; }
}
@keyframes voidDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="void"] .theme-opt-dot {
  background: linear-gradient(135deg, #818cf8, #a78bfa, #6366f1, #c4b5fd);
  background-size: 300% 300%;
  animation: voidDot 3.5s ease infinite;
}

/* ── Animated theme: Ember (fire/coal orange-red glow) ─────── */
html[data-theme="ember"] {
  color-scheme: dark;
  --bg: #0c0600; --bg-card: #160b00; --bg-header: #060200; --bg-section: #1e1000; --bg-input: #1e1000;
  --text: #ffe8c8; --text-muted: #d07030; --text-light: #804010; --text-header: #ffd090;
  --accent: #f97316; --accent-h: #ea6c0c; --accent-glow: rgba(249,115,22,0.28);
  --border: #2e1400; --border-light: #1e0e00;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,100,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.75), 0 0 12px rgba(249,115,22,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.9);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#a3e635;
  --s-open:#f97316; --s-progress:#fbbf24; --s-resolved:#4ade80; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d2800; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #1a2d0a; --b-low-fg: #a3e635; --b-low-bd: #3d6b0e;
  --b-open-bg:#3d1e00; --b-open-fg:#f97316; --b-open-bd:#7c2d12;
  --b-prog-bg:#3d2800; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #1a2d0a; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #1a1208; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #0c0600; --bar-track-bg: #1e1000; --feed-bg: #0c0600; --feed-line: #160b00;
  --metric-border: #2e1400; --tab-bg: #160b00; --tab-border: #2e1400; --tab-active-fg: #ffe8c8;
  --accent-dim: rgba(249,115,22,0.28);
}
@keyframes emberShift {
  0%   { background-position: 0%   50%; }
  20%  { background-position: 30%  80%; }
  40%  { background-position: 70%  20%; }
  60%  { background-position: 100% 60%; }
  80%  { background-position: 60%  100%; }
  100% { background-position: 0%   50%; }
}
html[data-theme="ember"] body {
  background: linear-gradient(135deg, #0c0600 0%, #2a0c00 20%, #0c0600 38%, #1e0800 55%, #300d00 72%, #0c0600 100%);
  background-size: 400% 400%;
  animation: emberShift 12s ease infinite;
}
html[data-theme="ember"] body::after {
  content: '';
  pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 15%  75%, rgba(249,115,22,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 30%  40%, rgba(251,146,60,0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 85%, rgba(249,115,22,0.50) 0%, transparent 100%),
    radial-gradient(1px 1px at 68%  60%, rgba(234,88,12,0.40) 0%, transparent 100%),
    radial-gradient(2px 2px at 80%  30%, rgba(249,115,22,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 90%  70%, rgba(251,146,60,0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 42% 20%, rgba(234,88,12,0.50) 0%, transparent 100%);
  animation: emberGlow 6s ease-in-out infinite;
}
@keyframes emberGlow {
  0%,100% { opacity: 0.5; transform: translateY(0); }
  33%     { opacity: 0.9; transform: translateY(-4px); }
  66%     { opacity: 0.3; transform: translateY(2px); }
}
@keyframes emberDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="ember"] .theme-opt-dot {
  background: linear-gradient(135deg, #f97316, #dc2626, #f59e0b, #ea580c);
  background-size: 300% 300%;
  animation: emberDot 2.8s ease infinite;
}

/* ── Animated theme: Tide (ocean wave blue-teal) ─────────────── */
html[data-theme="tide"] {
  color-scheme: dark;
  --bg: #030e18; --bg-card: #061828; --bg-header: #010810; --bg-section: #0a1e30; --bg-input: #0a1e30;
  --text: #b8e8f8; --text-muted: #3878a0; --text-light: #1a4060; --text-header: #80c8e8;
  --accent: #06b6d4; --accent-h: #0891b2; --accent-glow: rgba(6,182,212,0.24);
  --border: #0c2840; --border-light: #061c30;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.75), 0 0 0 1px rgba(6,182,212,0.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.78), 0 0 14px rgba(6,182,212,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.92);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#34d399;
  --s-open:#06b6d4; --s-progress:#fbbf24; --s-resolved:#34d399; --s-closed:#64748b;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0a2d20; --b-low-fg: #34d399; --b-low-bd: #065f46;
  --b-open-bg:#062030; --b-open-fg:#06b6d4; --b-open-bd:#0c4a6e;
  --b-prog-bg:#3d2e00; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0a2d20; --b-res-fg: #34d399; --b-res-bd: #065f46;
  --b-clo-bg: #0e1c28; --b-clo-fg: #64748b; --b-clo-bd: #334155;
  --dash-bg: #030e18; --bar-track-bg: #0a1e30; --feed-bg: #030e18; --feed-line: #061828;
  --metric-border: #0c2840; --tab-bg: #061828; --tab-border: #0c2840; --tab-active-fg: #b8e8f8;
  --accent-dim: rgba(6,182,212,0.28);
  scrollbar-color: rgba(6,182,212,0.35) rgba(3,14,24,0.5);
}
@keyframes tideShift {
  0%   { background-position: 0%   30%; }
  25%  { background-position: 40%  0%;  }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 60%  100%; }
  100% { background-position: 0%   30%; }
}
html[data-theme="tide"] body {
  background: linear-gradient(160deg, #030e18 0%, #041830 25%, #061c3a 45%, #030e18 65%, #050f22 85%, #030e18 100%);
  background-size: 400% 400%;
  animation: tideShift 20s ease infinite;
}
html[data-theme="tide"] body::after {
  content: '';
  pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background-image:
    radial-gradient(600px 80px at 50% 110%, rgba(6,182,212,0.12) 0%, transparent 70%),
    radial-gradient(400px 60px at 20% 105%, rgba(14,165,233,0.10) 0%, transparent 70%),
    radial-gradient(300px 50px at 80% 108%, rgba(6,182,212,0.08) 0%, transparent 70%);
  animation: tideWave 8s ease-in-out infinite;
}
@keyframes tideWave {
  0%,100% { transform: translateX(0); opacity: 0.6; }
  33%     { transform: translateX(-30px); opacity: 1; }
  66%     { transform: translateX(20px); opacity: 0.4; }
}
@keyframes tideDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="tide"] .theme-opt-dot {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9, #0891b2, #22d3ee);
  background-size: 300% 300%;
  animation: tideDot 3s ease infinite;
}

/* ── Animated theme: Storm (electric purple / lightning) ──────── */
html[data-theme="storm"] {
  color-scheme: dark;
  --bg: #07050f; --bg-card: #0e0c1c; --bg-header: #040310; --bg-section: #14122a; --bg-input: #14122a;
  --text: #d8d0f8; --text-muted: #6050c0; --text-light: #302860; --text-header: #b0a0e8;
  --accent: #a855f7; --accent-h: #9333ea; --accent-glow: rgba(168,85,247,0.26);
  --border: #1e1840; --border-light: #120e28;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.75), 0 0 0 1px rgba(168,85,247,0.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.78), 0 0 14px rgba(168,85,247,0.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.92);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#a3e635;
  --s-open:#a855f7; --s-progress:#fbbf24; --s-resolved:#4ade80; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #1a2d0a; --b-low-fg: #a3e635; --b-low-bd: #3d6b0e;
  --b-open-bg:#1a1040; --b-open-fg:#a855f7; --b-open-bd:#4c1d95;
  --b-prog-bg:#2e2200; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #1a2d0a; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #10101e; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #07050f; --bar-track-bg: #14122a; --feed-bg: #07050f; --feed-line: #0e0c1c;
  --metric-border: #1e1840; --tab-bg: #0e0c1c; --tab-border: #1e1840; --tab-active-fg: #d8d0f8;
  --accent-dim: rgba(168,85,247,0.26);
  scrollbar-color: rgba(168,85,247,0.35) rgba(7,5,15,0.5);
}
@keyframes stormShift {
  0%   { background-position: 0%   50%; }
  20%  { background-position: 80%  20%; }
  40%  { background-position: 40%  80%; }
  60%  { background-position: 100% 30%; }
  80%  { background-position: 20%  90%; }
  100% { background-position: 0%   50%; }
}
html[data-theme="storm"] body {
  background: linear-gradient(135deg, #07050f 0%, #120e28 20%, #07050f 38%, #0e0a20 55%, #1a1038 72%, #07050f 100%);
  background-size: 400% 400%;
  animation: stormShift 10s ease infinite;
}
html[data-theme="storm"] body::after {
  content: '';
  pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background-image:
    radial-gradient(1px 120px at 15%  40%, rgba(168,85,247,0.50) 0%, transparent 100%),
    radial-gradient(1px 80px  at 35%  20%, rgba(192,132,252,0.35) 0%, transparent 100%),
    radial-gradient(1px 100px at 55%  65%, rgba(168,85,247,0.45) 0%, transparent 100%),
    radial-gradient(1px 60px  at 75%  30%, rgba(139,92,246,0.40) 0%, transparent 100%),
    radial-gradient(1px 90px  at 88%  75%, rgba(168,85,247,0.30) 0%, transparent 100%);
  animation: stormFlash 4s ease-in-out infinite;
}
@keyframes stormFlash {
  0%,100% { opacity: 0.2; }
  10%     { opacity: 1.0; }
  12%     { opacity: 0.1; }
  14%     { opacity: 0.9; }
  16%     { opacity: 0.1; }
  50%     { opacity: 0.4; }
  52%     { opacity: 0.8; }
  54%     { opacity: 0.2; }
}
@keyframes stormDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="storm"] .theme-opt-dot {
  background: linear-gradient(135deg, #a855f7, #7c3aed, #c084fc, #6d28d9);
  background-size: 300% 300%;
  animation: stormDot 2.5s ease infinite;
}

/* ── Animated theme: Crimson (deep red / blood) ────────────── */
html[data-theme="crimson"] {
  color-scheme: dark;
  --bg: #0a0304; --bg-card: #150608; --bg-header: #060102; --bg-section: #1c080a; --bg-input: #1c080a;
  --text: #f8d8d8; --text-muted: #b03040; --text-light: #601020; --text-header: #e89090;
  --accent: #e11d48; --accent-h: #be123c; --accent-glow: rgba(225,29,72,0.28);
  --border: #2e0c10; --border-light: #1e0808;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.75), 0 0 0 1px rgba(225,29,72,0.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.78), 0 0 14px rgba(225,29,72,0.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.92);
  --p-critical:#f87171; --p-high:#fb923c; --p-medium:#fbbf24; --p-low:#4ade80;
  --s-open:#e11d48; --s-progress:#fbbf24; --s-resolved:#4ade80; --s-closed:#6b7280;
  --b-crit-bg:#3d1515; --b-crit-fg:#f87171; --b-crit-bd:#7f1d1d;
  --b-high-bg:#3d2010; --b-high-fg:#fb923c; --b-high-bd:#7c2d12;
  --b-med-bg: #3d3010; --b-med-fg: #fbbf24; --b-med-bd: #78350f;
  --b-low-bg: #0a2d20; --b-low-fg: #4ade80; --b-low-bd: #14532d;
  --b-open-bg:#3d0c14; --b-open-fg:#e11d48; --b-open-bd:#881337;
  --b-prog-bg:#2e2200; --b-prog-fg:#fbbf24; --b-prog-bd:#78350f;
  --b-res-bg: #0a2d20; --b-res-fg: #4ade80; --b-res-bd: #14532d;
  --b-clo-bg: #180808; --b-clo-fg: #6b7280; --b-clo-bd: #374151;
  --dash-bg: #0a0304; --bar-track-bg: #1c080a; --feed-bg: #0a0304; --feed-line: #150608;
  --metric-border: #2e0c10; --tab-bg: #150608; --tab-border: #2e0c10; --tab-active-fg: #f8d8d8;
  --accent-dim: rgba(225,29,72,0.28);
  scrollbar-color: rgba(225,29,72,0.35) rgba(10,3,4,0.5);
}
@keyframes crimsonShift {
  0%   { background-position: 0%   50%; }
  25%  { background-position: 50%  0%;  }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50%  100%; }
  100% { background-position: 0%   50%; }
}
html[data-theme="crimson"] body {
  background: linear-gradient(135deg, #0a0304 0%, #200608 20%, #0a0304 40%, #180406 60%, #240810 80%, #0a0304 100%);
  background-size: 400% 400%;
  animation: crimsonShift 15s ease infinite;
}
html[data-theme="crimson"] body::after {
  content: '';
  pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20%  60%, rgba(225,29,72,0.60) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 30%, rgba(244,63,94,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px   at 58%  80%, rgba(225,29,72,0.50) 0%, transparent 100%),
    radial-gradient(2px 2px   at 72%  45%, rgba(190,18,60,0.40) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 20%, rgba(225,29,72,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px   at 10%  85%, rgba(244,63,94,0.35) 0%, transparent 100%);
  animation: crimsonPulse 5s ease-in-out infinite;
}
@keyframes crimsonPulse {
  0%,100% { opacity: 0.4; transform: scale(1); }
  50%     { opacity: 1.0; transform: scale(1.02); }
}
@keyframes crimsonDot {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.theme-opt[data-theme="crimson"] .theme-opt-dot {
  background: linear-gradient(135deg, #e11d48, #be123c, #f43f5e, #9f1239);
  background-size: 300% 300%;
  animation: crimsonDot 3s ease infinite;
}

/* Also gently animate the picker dot in theme-grid for animated themes */
.theme-opt[data-theme="aurora"] .theme-opt-dot,
.theme-opt[data-theme="void"]   .theme-opt-dot,
.theme-opt[data-theme="ember"]  .theme-opt-dot,
.theme-opt[data-theme="tide"]   .theme-opt-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

/* ── Animated theme: shared floating orbs via body pseudo-elements ── */
@keyframes orbDrift1 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(60px,-80px) scale(1.15)} 66%{transform:translate(-40px,50px) scale(0.9)} }
@keyframes orbDrift2 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(-70px,60px) scale(0.85)} 66%{transform:translate(50px,-40px) scale(1.1)} }
@keyframes orbDrift3 { 0%,100%{transform:translate(0,0) scale(1)} 40%{transform:translate(30px,70px) scale(1.08)} 80%{transform:translate(-50px,-30px) scale(0.92)} }

html[data-theme="aurora"]  body::before,
html[data-theme="ember"]   body::before,
html[data-theme="tide"]    body::before,
html[data-theme="storm"]   body::before,
html[data-theme="crimson"] body::before,
html[data-theme="void"]    body::before {
  content: ''; pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background-repeat: no-repeat;
}
html[data-theme="storm"] body::before {
  background:
    radial-gradient(ellipse 460px 300px at 20% 25%, rgba(168,85,247,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 340px 220px at 75% 65%, rgba(139,92,246,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 260px 180px at 50% 50%, rgba(192,132,252,0.08) 0%, transparent 70%);
  animation: orbDrift2 16s ease-in-out infinite;
}
html[data-theme="crimson"] body::before {
  background:
    radial-gradient(ellipse 420px 280px at 20% 70%, rgba(225,29,72,0.16) 0%, transparent 70%),
    radial-gradient(ellipse 320px 200px at 75% 30%, rgba(190,18,60,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 240px 160px at 50% 50%, rgba(244,63,94,0.09) 0%, transparent 70%);
  animation: orbDrift3 18s ease-in-out infinite;
}
html[data-theme="aurora"] body::before {
  background:
    radial-gradient(ellipse 420px 280px at 15% 20%, rgba(16,185,129,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 320px 220px at 80% 70%, rgba(56,189,248,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 260px 180px at 55% 50%, rgba(52,211,153,0.07) 0%, transparent 70%);
  animation: orbDrift1 22s ease-in-out infinite;
}
html[data-theme="ember"] body::before {
  background:
    radial-gradient(ellipse 400px 260px at 15% 70%, rgba(249,115,22,0.16) 0%, transparent 70%),
    radial-gradient(ellipse 300px 200px at 75% 30%, rgba(234,88,12,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 240px 160px at 50% 50%, rgba(251,146,60,0.10) 0%, transparent 70%);
  animation: orbDrift2 14s ease-in-out infinite;
}
html[data-theme="tide"] body::before {
  background:
    radial-gradient(ellipse 500px 320px at 25% 40%, rgba(6,182,212,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 360px 240px at 70% 25%, rgba(14,165,233,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 280px 180px at 55% 75%, rgba(6,182,212,0.08) 0%, transparent 70%);
  animation: orbDrift3 24s ease-in-out infinite;
}
html[data-theme="void"] body::before {
  background:
    radial-gradient(ellipse 500px 340px at 20% 30%, rgba(99,102,241,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 280px at 75% 60%, rgba(167,139,250,0.09) 0%, transparent 70%),
    radial-gradient(ellipse 300px 200px at 50% 85%, rgba(129,140,248,0.07) 0%, transparent 70%);
  animation: orbDrift1 30s ease-in-out infinite;
}
/* Ensure content stacks above orbs */
html[data-theme="aurora"]  .site-header,
html[data-theme="ember"]   .site-header,
html[data-theme="tide"]    .site-header,
html[data-theme="storm"]   .site-header,
html[data-theme="crimson"] .site-header,
html[data-theme="aurora"]  .tabs-bar,
html[data-theme="ember"]   .tabs-bar,
html[data-theme="tide"]    .tabs-bar,
html[data-theme="storm"]   .tabs-bar,
html[data-theme="crimson"] .tabs-bar,
html[data-theme="aurora"]  .tab-pane,
html[data-theme="ember"]   .tab-pane,
html[data-theme="tide"]    .tab-pane,
html[data-theme="storm"]   .tab-pane,
html[data-theme="crimson"] .tab-pane,
html[data-theme="void"]    .site-header,
html[data-theme="void"]    .tabs-bar,
html[data-theme="void"]    .tab-pane  { position: relative; z-index: 1; }

/* ── Animated header glow bar ────────────────────────────────── */
@keyframes headerGlow { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

html[data-theme="aurora"] .site-header {
  border-bottom-color: transparent;
  border-bottom-width: 3px; border-bottom-style: solid;
  border-image: linear-gradient(90deg, #10b981, #34d399, #06b6d4, #3b82f6, #10b981) 1;
  animation: none;
}
html[data-theme="aurora"] .site-header::after {
  content: ''; display: block; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399, #06b6d4, #3b82f6, #10b981);
  background-size: 300% 100%;
  animation: headerGlow 4s ease infinite;
}
html[data-theme="ember"] .site-header::after {
  content: ''; display: block; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #f97316, #fb923c, #ef4444, #ea580c, #f97316);
  background-size: 300% 100%;
  animation: headerGlow 3s ease infinite;
}
html[data-theme="tide"] .site-header::after {
  content: ''; display: block; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #06b6d4, #0ea5e9, #22d3ee, #0891b2, #06b6d4);
  background-size: 300% 100%;
  animation: headerGlow 5s ease infinite;
}
html[data-theme="void"] .site-header::after {
  content: ''; display: block; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #818cf8, #a78bfa, #6366f1, #c4b5fd, #818cf8);
  background-size: 300% 100%;
  animation: headerGlow 7s ease infinite;
}
html[data-theme="storm"] .site-header::after {
  content: ''; display: block; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #a855f7, #c084fc, #7c3aed, #d8b4fe, #a855f7);
  background-size: 300% 100%;
  animation: headerGlow 4s ease infinite;
}
html[data-theme="crimson"] .site-header::after {
  content: ''; display: block; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #e11d48, #f43f5e, #be123c, #fb7185, #e11d48);
  background-size: 300% 100%;
  animation: headerGlow 5s ease infinite;
}
html[data-theme="aurora"]  .site-header,
html[data-theme="ember"]   .site-header,
html[data-theme="tide"]    .site-header,
html[data-theme="storm"]   .site-header,
html[data-theme="crimson"] .site-header,
html[data-theme="void"]    .site-header { position: relative; overflow: visible; }

/* ── Logo text shimmer ───────────────────────────────────────── */
@keyframes textShimmer { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }

html[data-theme="aurora"] .logo-text {
  background: linear-gradient(90deg, #90d8b8 0%, #34d399 30%, #06b6d4 50%, #10b981 70%, #90d8b8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: textShimmer 4s linear infinite;
}
html[data-theme="ember"] .logo-text {
  background: linear-gradient(90deg, #ffe8c8 0%, #f97316 25%, #ef4444 50%, #fb923c 75%, #ffe8c8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: textShimmer 3s linear infinite;
  filter: drop-shadow(0 0 8px rgba(249,115,22,0.5));
}
html[data-theme="tide"] .logo-text {
  background: linear-gradient(90deg, #b8e8f8 0%, #06b6d4 25%, #22d3ee 50%, #0ea5e9 75%, #b8e8f8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: textShimmer 5s linear infinite;
  filter: drop-shadow(0 0 8px rgba(6,182,212,0.45));
}
html[data-theme="void"] .logo-text {
  background: linear-gradient(90deg, #d8d0f8 0%, #818cf8 25%, #c4b5fd 50%, #a78bfa 75%, #d8d0f8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: textShimmer 7s linear infinite;
  filter: drop-shadow(0 0 10px rgba(129,140,248,0.45));
}
html[data-theme="storm"] .logo-text {
  background: linear-gradient(90deg, #e8d8ff 0%, #a855f7 25%, #c084fc 50%, #7c3aed 75%, #e8d8ff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: textShimmer 3.5s linear infinite;
  filter: drop-shadow(0 0 10px rgba(168,85,247,0.55));
}
html[data-theme="crimson"] .logo-text {
  background: linear-gradient(90deg, #ffe0e0 0%, #e11d48 25%, #f43f5e 50%, #be123c 75%, #ffe0e0 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: textShimmer 4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(225,29,72,0.55));
}

/* ── Bug card glow on hover ──────────────────────────────────── */
html[data-theme="aurora"]  .bug-card,
html[data-theme="ember"]   .bug-card,
html[data-theme="tide"]    .bug-card,
html[data-theme="storm"]   .bug-card,
html[data-theme="crimson"] .bug-card,
html[data-theme="void"]    .bug-card {
  transition: box-shadow 0.55s ease, transform 0.35s ease, border-color 0.55s ease;
}
html[data-theme="aurora"] .bug-card:hover {
  box-shadow: var(--shadow-md), 0 0 18px 3px rgba(16,185,129,0.14);
  border-color: rgba(16,185,129,0.28);
}
html[data-theme="ember"] .bug-card:hover {
  box-shadow: var(--shadow-md), 0 0 18px 3px rgba(249,115,22,0.16);
  border-color: rgba(249,115,22,0.30);
}
html[data-theme="tide"] .bug-card:hover {
  box-shadow: var(--shadow-md), 0 0 18px 3px rgba(249,115,22,0.14);
  border-color: rgba(249,115,22,0.28);
}
html[data-theme="void"] .bug-card:hover {
  box-shadow: var(--shadow-md), 0 0 22px 4px rgba(129,140,248,0.18);
  border-color: rgba(129,140,248,0.32);
}
html[data-theme="storm"] .bug-card:hover {
  box-shadow: var(--shadow-md), 0 0 20px 3px rgba(168,85,247,0.20);
  border-color: rgba(168,85,247,0.34);
}
html[data-theme="crimson"] .bug-card:hover {
  box-shadow: var(--shadow-md), 0 0 18px 3px rgba(225,29,72,0.18);
  border-color: rgba(225,29,72,0.30);
}

/* ── Bug card stripe fade on hover (transition, not animation) ── */
html[data-theme="aurora"]  .bug-stripe,
html[data-theme="ember"]   .bug-stripe,
html[data-theme="tide"]    .bug-stripe,
html[data-theme="storm"]   .bug-stripe,
html[data-theme="crimson"] .bug-stripe,
html[data-theme="void"]    .bug-stripe {
  transition: opacity 0.5s ease;
}
html[data-theme="aurora"]  .bug-card:hover .bug-stripe,
html[data-theme="ember"]   .bug-card:hover .bug-stripe,
html[data-theme="tide"]    .bug-card:hover .bug-stripe,
html[data-theme="storm"]   .bug-card:hover .bug-stripe,
html[data-theme="crimson"] .bug-card:hover .bug-stripe,
html[data-theme="void"]    .bug-card:hover .bug-stripe {
  opacity: 0.6;
}

/* ── Stat card float ─────────────────────────────────────────── */
@keyframes cardFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}
html[data-theme="aurora"]  .stat-card,
html[data-theme="ember"]   .stat-card,
html[data-theme="tide"]    .stat-card,
html[data-theme="storm"]   .stat-card,
html[data-theme="crimson"] .stat-card,
html[data-theme="void"]    .stat-card {
  transition: box-shadow 0.5s ease;
  animation: cardFloat 6s ease-in-out infinite;
}
html[data-theme="aurora"] .stat-card:nth-child(2) { animation-delay: 1.2s; }
html[data-theme="aurora"] .stat-card:nth-child(3) { animation-delay: 2.4s; }
html[data-theme="aurora"] .stat-card:nth-child(4) { animation-delay: 3.6s; }
html[data-theme="ember"]   .stat-card:nth-child(2) { animation-delay: 1.2s; }
html[data-theme="ember"]   .stat-card:nth-child(3) { animation-delay: 2.4s; }
html[data-theme="ember"]   .stat-card:nth-child(4) { animation-delay: 3.6s; }
html[data-theme="tide"]   .stat-card:nth-child(2) { animation-delay: 1.2s; }
html[data-theme="tide"]   .stat-card:nth-child(3) { animation-delay: 2.4s; }
html[data-theme="tide"]   .stat-card:nth-child(4) { animation-delay: 3.6s; }
html[data-theme="void"]    .stat-card:nth-child(2) { animation-delay: 1.8s; }
html[data-theme="void"]    .stat-card:nth-child(3) { animation-delay: 3.6s; }
html[data-theme="void"]    .stat-card:nth-child(4) { animation-delay: 5.4s; }
html[data-theme="storm"]   .stat-card:nth-child(2) { animation-delay: 1.0s; }
html[data-theme="storm"]   .stat-card:nth-child(3) { animation-delay: 2.0s; }
html[data-theme="storm"]   .stat-card:nth-child(4) { animation-delay: 3.0s; }
html[data-theme="crimson"] .stat-card:nth-child(2) { animation-delay: 1.5s; }
html[data-theme="crimson"] .stat-card:nth-child(3) { animation-delay: 3.0s; }
html[data-theme="crimson"] .stat-card:nth-child(4) { animation-delay: 4.5s; }

/* ── Filter chip active glow ─────────────────────────────────── */
@keyframes chipGlow { 0%,100%{box-shadow:0 0 0 0 var(--chip-glow)} 50%{box-shadow:0 0 6px 2px var(--chip-glow)} }
html[data-theme="aurora"]  .filter-chip.active { --chip-glow: rgba(16,185,129,0.35);  animation: chipGlow 4s ease infinite; }
html[data-theme="ember"]   .filter-chip.active { --chip-glow: rgba(249,115,22,0.4);   animation: chipGlow 3s ease infinite; }
html[data-theme="tide"]    .filter-chip.active { --chip-glow: rgba(6,182,212,0.35);   animation: chipGlow 5s ease infinite; }
html[data-theme="void"]    .filter-chip.active { --chip-glow: rgba(129,140,248,0.4);  animation: chipGlow 5.5s ease infinite; }
html[data-theme="storm"]   .filter-chip.active { --chip-glow: rgba(168,85,247,0.45);  animation: chipGlow 3.5s ease infinite; }
html[data-theme="crimson"] .filter-chip.active { --chip-glow: rgba(225,29,72,0.45);   animation: chipGlow 4s ease infinite; }

/* ── Progress bar shimmer ────────────────────────────────────── */
@keyframes progressSheen {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}
html[data-theme="aurora"]  .stat-bar-fill,
html[data-theme="ember"]   .stat-bar-fill,
html[data-theme="tide"]    .stat-bar-fill,
html[data-theme="storm"]   .stat-bar-fill,
html[data-theme="crimson"] .stat-bar-fill,
html[data-theme="void"]    .stat-bar-fill {
  position: relative; overflow: hidden;
}
html[data-theme="aurora"]  .stat-bar-fill::after,
html[data-theme="ember"]   .stat-bar-fill::after,
html[data-theme="tide"]    .stat-bar-fill::after,
html[data-theme="storm"]   .stat-bar-fill::after,
html[data-theme="crimson"] .stat-bar-fill::after,
html[data-theme="void"]    .stat-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  background-size: 60% 100%;
  animation: progressSheen 3.5s ease-in-out infinite;
}

/* ── Action buttons subtle glow (transition — no restart on re-hover) ── */
html[data-theme="aurora"]  .action-btn,
html[data-theme="ember"]   .action-btn,
html[data-theme="tide"]    .action-btn,
html[data-theme="storm"]   .action-btn,
html[data-theme="crimson"] .action-btn,
html[data-theme="void"]    .action-btn { transition: transform 0.2s ease, box-shadow 0.35s ease; }
html[data-theme="aurora"]  .action-btn:hover { box-shadow: 0 0 10px 2px rgba(16,185,129,0.40); }
html[data-theme="ember"]   .action-btn:hover { box-shadow: 0 0 10px 2px rgba(249,115,22,0.45); }
html[data-theme="tide"]    .action-btn:hover { box-shadow: 0 0 10px 2px rgba(6,182,212,0.40); }
html[data-theme="void"]    .action-btn:hover { box-shadow: 0 0 10px 2px rgba(129,140,248,0.45); }
html[data-theme="storm"]   .action-btn:hover { box-shadow: 0 0 10px 2px rgba(168,85,247,0.50); }
html[data-theme="crimson"] .action-btn:hover { box-shadow: 0 0 10px 2px rgba(225,29,72,0.50); }

/* ── Detail section border pulse (bug detail page) ───────────── */
@keyframes sectionBorderPulse { 0%,100%{border-color:var(--border)} 50%{border-color:var(--accent-dim)} }
html[data-theme="aurora"] { --accent-dim: rgba(16,185,129,0.30); }
html[data-theme="ember"]   { --accent-dim: rgba(249,115,22,0.30); }
html[data-theme="tide"]   { --accent-dim: rgba(6,182,212,0.28); }
html[data-theme="aurora"]  .detail-section,
html[data-theme="ember"]   .detail-section,
html[data-theme="tide"]    .detail-section,
html[data-theme="storm"]   .detail-section,
html[data-theme="crimson"] .detail-section,
html[data-theme="void"]    .detail-section {
  animation: sectionBorderPulse 8s ease-in-out infinite;
}

/* ── Customise button shimmer on animated themes ─────────────── */
@keyframes btnBorderShimmer { 0%,100%{border-color:var(--border)} 50%{border-color:var(--accent)} }
html[data-theme="aurora"]  .customise-btn,
html[data-theme="ember"]   .customise-btn,
html[data-theme="tide"]    .customise-btn,
html[data-theme="storm"]   .customise-btn,
html[data-theme="crimson"] .customise-btn,
html[data-theme="void"]    .customise-btn {
  animation: btnBorderShimmer 5s ease infinite;
}

/* ── Active tab indicator glow ───────────────────────────────── */
@keyframes tabLineGlow { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

html[data-theme="void"] .tab-btn.active::after {
  background: linear-gradient(90deg, #818cf8, #c4b5fd, #818cf8);
  background-size: 200% 100%;
  height: 2px; animation: tabLineGlow 6s ease infinite;
  box-shadow: 0 0 10px rgba(129,140,248,0.6);
}
html[data-theme="aurora"] .tab-btn.active::after {
  background: linear-gradient(90deg, #10b981, #06b6d4, #10b981);
  background-size: 200% 100%;
  height: 2px; animation: tabLineGlow 3s ease infinite;
  box-shadow: 0 0 8px rgba(16,185,129,0.55);
}
html[data-theme="ember"] .tab-btn.active::after {
  background: linear-gradient(90deg, #f97316, #22d3ee, #f97316);
  background-size: 200% 100%;
  height: 2px; animation: tabLineGlow 2s ease infinite;
  box-shadow: 0 0 10px rgba(249,115,22,0.7);
}
html[data-theme="tide"] .tab-btn.active::after {
  background: linear-gradient(90deg, #f97316, #0891b2, #f97316);
  background-size: 200% 100%;
  height: 2px; animation: tabLineGlow 4s ease infinite;
  box-shadow: 0 0 8px rgba(249,115,22,0.55);
}
html[data-theme="storm"] .tab-btn.active::after {
  background: linear-gradient(90deg, #a855f7, #c084fc, #a855f7);
  background-size: 200% 100%;
  height: 2px; animation: tabLineGlow 3s ease infinite;
  box-shadow: 0 0 10px rgba(168,85,247,0.65);
}
html[data-theme="crimson"] .tab-btn.active::after {
  background: linear-gradient(90deg, #e11d48, #f43f5e, #e11d48);
  background-size: 200% 100%;
  height: 2px; animation: tabLineGlow 4s ease infinite;
  box-shadow: 0 0 10px rgba(225,29,72,0.65);
}

/* ── Tab badge animated ──────────────────────────────────────── */
@keyframes badgePop { 0%,100%{box-shadow:0 0 0 0 var(--badge-glow)} 50%{box-shadow:0 0 0 4px var(--badge-glow)} }

html[data-theme="aurora"]  .tab-badge { --badge-glow: rgba(16,185,129,0.3);   animation: badgePop 3s ease infinite; }
html[data-theme="ember"]   .tab-badge { --badge-glow: rgba(249,115,22,0.4);   animation: badgePop 2s ease infinite; }
html[data-theme="tide"]    .tab-badge { --badge-glow: rgba(6,182,212,0.35);   animation: badgePop 3.5s ease infinite; }
html[data-theme="void"]    .tab-badge { --badge-glow: rgba(129,140,248,0.45); animation: badgePop 4.5s ease infinite; }
html[data-theme="storm"]   .tab-badge { --badge-glow: rgba(168,85,247,0.45);  animation: badgePop 3s ease infinite; }
html[data-theme="crimson"] .tab-badge { --badge-glow: rgba(225,29,72,0.45);   animation: badgePop 3.5s ease infinite; }

/* ── Primary button glow ─────────────────────────────────────── */
@keyframes btnGlow { 0%,100%{box-shadow:0 2px 8px var(--btn-glow)} 50%{box-shadow:0 2px 20px var(--btn-glow)} }

html[data-theme="aurora"]  .btn-primary { --btn-glow: rgba(16,185,129,0.45);  animation: btnGlow 3s ease infinite; }
html[data-theme="ember"]   .btn-primary { --btn-glow: rgba(249,115,22,0.55);  animation: btnGlow 2s ease infinite; }
html[data-theme="tide"]    .btn-primary { --btn-glow: rgba(6,182,212,0.45);   animation: btnGlow 3.5s ease infinite; }
html[data-theme="void"]    .btn-primary { --btn-glow: rgba(129,140,248,0.55); animation: btnGlow 4s ease infinite; }
html[data-theme="storm"]   .btn-primary { --btn-glow: rgba(168,85,247,0.55);  animation: btnGlow 3s ease infinite; }
html[data-theme="crimson"] .btn-primary { --btn-glow: rgba(225,29,72,0.55);   animation: btnGlow 3.5s ease infinite; }

/* ── Stat values sparkle ─────────────────────────────────────── */
@keyframes statGlow { 0%,100%{text-shadow:none} 50%{text-shadow:0 0 12px var(--stat-glow)} }

html[data-theme="aurora"]  .stat-value { --stat-glow: rgba(16,185,129,0.7);  animation: statGlow 4s ease infinite; }
html[data-theme="ember"]   .stat-value { --stat-glow: rgba(249,115,22,0.8);  animation: statGlow 2.5s ease infinite; }
html[data-theme="tide"]    .stat-value { --stat-glow: rgba(6,182,212,0.7);   animation: statGlow 4.5s ease infinite; }
html[data-theme="void"]    .stat-value { --stat-glow: rgba(129,140,248,0.8); animation: statGlow 5s ease infinite; }
html[data-theme="storm"]   .stat-value { --stat-glow: rgba(168,85,247,0.8);  animation: statGlow 3s ease infinite; }
html[data-theme="crimson"] .stat-value { --stat-glow: rgba(225,29,72,0.8);   animation: statGlow 4s ease infinite; }

/* ── Scrollbar tinting for animated themes ───────────────────── */
html[data-theme="aurora"] { scrollbar-color: rgba(16,185,129,0.35) rgba(8,18,30,0.5); }
html[data-theme="ember"]   { scrollbar-color: rgba(249,115,22,0.35) rgba(7,0,15,0.5); }
html[data-theme="tide"]   { scrollbar-color: rgba(6,182,212,0.35) rgba(26,8,24,0.5); }

/* ── Logo SVG icon color for animated themes ─────────────────── */
html[data-theme="aurora"]  .logo-svg { color: #34d399; }
html[data-theme="ember"]   .logo-svg { color: #f97316; }
html[data-theme="tide"]    .logo-svg { color: #06b6d4; }
html[data-theme="void"]    .logo-svg { color: #818cf8; }
html[data-theme="storm"]   .logo-svg { color: #a855f7; }
html[data-theme="crimson"] .logo-svg { color: #e11d48; }

/* ── Dash card shimmer border ────────────────────────────────── */
@keyframes dashCardBorder { 0%,100%{border-color:var(--border)} 50%{border-color:var(--accent-dim)} }
html[data-theme="aurora"]  .dash-card,
html[data-theme="ember"]   .dash-card,
html[data-theme="tide"]    .dash-card,
html[data-theme="storm"]   .dash-card,
html[data-theme="crimson"] .dash-card,
html[data-theme="void"]    .dash-card {
  animation: dashCardBorder 10s ease-in-out infinite;
}
html[data-theme="ember"]   .dash-card { animation-delay: 2s; }
html[data-theme="tide"]    .dash-card { animation-delay: 4s; }
html[data-theme="void"]    .dash-card { animation-delay: 1s; }
html[data-theme="storm"]   .dash-card { animation-delay: 3s; }
html[data-theme="crimson"] .dash-card { animation-delay: 5s; }

/* ── Activity item hover glow ────────────────────────────────── */
html[data-theme="aurora"] .activity-item,
html[data-theme="ember"]   .activity-item,
html[data-theme="tide"]   .activity-item,
html[data-theme="void"]   .activity-item {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="aurora"] .activity-item:hover { box-shadow: inset 3px 0 0 #10b981; }
html[data-theme="ember"]   .activity-item:hover { box-shadow: inset 3px 0 0 #f97316; }
html[data-theme="tide"]   .activity-item:hover { box-shadow: inset 3px 0 0 #06b6d4; }
html[data-theme="void"]   .activity-item:hover { box-shadow: inset 3px 0 0 #818cf8; }

/* ── Metric card float (animated themes) → colored pulse ──────── */
@keyframes metricGlowPulse {
  0%,100% { box-shadow: var(--shadow-sm); }
  50%     { box-shadow: var(--shadow-sm), 0 0 0 3px var(--mc-hglow), 0 4px 20px var(--mc-hglow); }
}
/* Hover pauses the pulse and lifts with a stronger glow */
html[data-theme="aurora"] { --mc-hglow: rgba(16,185,129,0.22); }
html[data-theme="ember"]   { --mc-hglow: rgba(249,115,22,0.25); }
html[data-theme="tide"]   { --mc-hglow: rgba(6,182,212,0.22); }
html[data-theme="void"]   { --mc-hglow: rgba(129,140,248,0.25); }
html[data-theme="aurora"] .metric-card,
html[data-theme="ember"]   .metric-card,
html[data-theme="tide"]   .metric-card,
html[data-theme="void"]   .metric-card {
  animation: metricIn 0.4s cubic-bezier(0.16,1,0.3,1) both, metricGlowPulse 4s ease-in-out 1s infinite;
}
html[data-theme="aurora"] .metric-card:nth-child(2),
html[data-theme="ember"]   .metric-card:nth-child(2),
html[data-theme="tide"]   .metric-card:nth-child(2),
html[data-theme="void"]   .metric-card:nth-child(2) { animation-delay: 0ms, 2s; }
html[data-theme="aurora"] .metric-card:nth-child(3),
html[data-theme="ember"]   .metric-card:nth-child(3),
html[data-theme="tide"]   .metric-card:nth-child(3),
html[data-theme="void"]   .metric-card:nth-child(3) { animation-delay: 0ms, 3s; }
html[data-theme="aurora"] .metric-card:nth-child(4),
html[data-theme="ember"]   .metric-card:nth-child(4),
html[data-theme="tide"]   .metric-card:nth-child(4),
html[data-theme="void"]   .metric-card:nth-child(4) { animation-delay: 0ms, 4s; }
html[data-theme="aurora"] .metric-card.clickable:hover,
html[data-theme="ember"]   .metric-card.clickable:hover,
html[data-theme="tide"]   .metric-card.clickable:hover,
html[data-theme="void"]   .metric-card.clickable:hover {
  animation-play-state: running, paused;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 24px 4px var(--mc-hglow) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── Metric icon box-shadow pulse (animated themes) ──────────────── */
@keyframes metricIconRing {
  0%,100% { box-shadow: 0 0 0 1.5px var(--icon-ring,rgba(255,255,255,0.15)); }
  50%     { box-shadow: 0 0 0 4px var(--icon-ring,rgba(255,255,255,0.08)), 0 0 12px var(--icon-ring,rgba(255,255,255,0.1)); }
}
html[data-theme="aurora"] .metric-icon-total    { --icon-ring: rgba(16,185,129,0.4); }
html[data-theme="aurora"] .metric-icon-open     { --icon-ring: rgba(16,185,129,0.4); }
html[data-theme="aurora"] .metric-icon-progress { --icon-ring: rgba(16,185,129,0.4); }
html[data-theme="aurora"] .metric-icon-resolved { --icon-ring: rgba(16,185,129,0.4); }
html[data-theme="ember"]   .metric-icon-total, html[data-theme="ember"] .metric-icon-open,
html[data-theme="ember"]   .metric-icon-progress, html[data-theme="ember"] .metric-icon-resolved { --icon-ring: rgba(249,115,22,0.45); }
html[data-theme="tide"]   .metric-icon-total, html[data-theme="tide"] .metric-icon-open,
html[data-theme="tide"]   .metric-icon-progress, html[data-theme="tide"] .metric-icon-resolved { --icon-ring: rgba(6,182,212,0.40); }
html[data-theme="void"]   .metric-icon-total, html[data-theme="void"] .metric-icon-open,
html[data-theme="void"]   .metric-icon-progress, html[data-theme="void"] .metric-icon-resolved { --icon-ring: rgba(129,140,248,0.45); }
html[data-theme="aurora"] .metric-icon,
html[data-theme="ember"]   .metric-icon,
html[data-theme="tide"]   .metric-icon,
html[data-theme="void"]   .metric-icon { animation: metricIconRing 4s ease-in-out infinite; }
html[data-theme="aurora"] .metric-card:nth-child(2) .metric-icon,
html[data-theme="ember"]   .metric-card:nth-child(2) .metric-icon,
html[data-theme="tide"]   .metric-card:nth-child(2) .metric-icon,
html[data-theme="void"]   .metric-card:nth-child(2) .metric-icon { animation-delay: 1s; }
html[data-theme="aurora"] .metric-card:nth-child(3) .metric-icon,
html[data-theme="ember"]   .metric-card:nth-child(3) .metric-icon,
html[data-theme="tide"]   .metric-card:nth-child(3) .metric-icon,
html[data-theme="void"]   .metric-card:nth-child(3) .metric-icon { animation-delay: 2s; }
html[data-theme="aurora"] .metric-card:nth-child(4) .metric-icon,
html[data-theme="ember"]   .metric-card:nth-child(4) .metric-icon,
html[data-theme="tide"]   .metric-card:nth-child(4) .metric-icon,
html[data-theme="void"]   .metric-card:nth-child(4) .metric-icon { animation-delay: 3s; }

/* ── Metric value count shimmer + accent color on animated themes ── */
@keyframes metricValGlow { 0%,100%{text-shadow:none} 50%{text-shadow:0 0 20px var(--mv-glow)} }
html[data-theme="aurora"] .metric-value { color: var(--accent); --mv-glow: rgba(16,185,129,0.65);  animation: metricValGlow 6s ease infinite; }
html[data-theme="ember"]   .metric-value { color: var(--accent); --mv-glow: rgba(249,115,22,0.75); animation: metricValGlow 4s ease infinite; }
html[data-theme="tide"]   .metric-value { color: var(--accent); --mv-glow: rgba(6,182,212,0.65);  animation: metricValGlow 7s ease infinite; }
html[data-theme="void"]   .metric-value { color: var(--accent); --mv-glow: rgba(129,140,248,0.75); animation: metricValGlow 8s ease infinite; }

/* ── Stats bar item hover glow ─────────────────────────────────── */
html[data-theme="aurora"] .stat-item,
html[data-theme="ember"]   .stat-item,
html[data-theme="tide"]   .stat-item,
html[data-theme="void"]   .stat-item { transition: background 0.3s ease, box-shadow 0.3s ease; }
html[data-theme="aurora"] .stat-item:hover { box-shadow: 0 2px 12px rgba(16,185,129,0.18); }
html[data-theme="ember"]   .stat-item:hover { box-shadow: 0 2px 12px rgba(249,115,22,0.22); }
html[data-theme="tide"]   .stat-item:hover { box-shadow: 0 2px 12px rgba(6,182,212,0.18); }
html[data-theme="void"]   .stat-item:hover { box-shadow: 0 2px 12px rgba(129,140,248,0.22); }
html[data-theme="aurora"] .stat-item.active { box-shadow: 0 2px 16px rgba(16,185,129,0.25); }
html[data-theme="ember"]   .stat-item.active { box-shadow: 0 2px 16px rgba(249,115,22,0.30); }
html[data-theme="tide"]   .stat-item.active { box-shadow: 0 2px 16px rgba(6,182,212,0.25); }
html[data-theme="void"]   .stat-item.active { box-shadow: 0 2px 16px rgba(129,140,248,0.30); }

/* ── Stats bar active indicator shimmer ─────────────────────────── */
@keyframes statLineGlow { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
html[data-theme="aurora"] .stat-item.active::after {
  background: linear-gradient(90deg, #10b981, #34d399, #10b981);
  background-size: 200% 100%; animation: statLineGlow 3s ease infinite;
}
html[data-theme="ember"] .stat-item.active::after {
  background: linear-gradient(90deg, #f97316, #22d3ee, #f97316);
  background-size: 200% 100%; animation: statLineGlow 2.5s ease infinite;
}
html[data-theme="tide"] .stat-item.active::after {
  background: linear-gradient(90deg, #f97316, #0891b2, #f97316);
  background-size: 200% 100%; animation: statLineGlow 4s ease infinite;
}
html[data-theme="void"] .stat-item.active::after {
  background: linear-gradient(90deg, #818cf8, #c4b5fd, #818cf8);
  background-size: 200% 100%; animation: statLineGlow 5s ease infinite;
}

/* ── Bug list: title hover accent glow ────────────────────────────── */
html[data-theme="aurora"] .bug-title-link:hover { text-shadow: 0 0 10px rgba(16,185,129,0.45); }
html[data-theme="ember"]   .bug-title-link:hover { text-shadow: 0 0 10px rgba(249,115,22,0.55); }
html[data-theme="tide"]   .bug-title-link:hover { text-shadow: 0 0 10px rgba(6,182,212,0.45); }
html[data-theme="void"]   .bug-title-link:hover { text-shadow: 0 0 12px rgba(129,140,248,0.55); }

/* ── Bug number shimmer on card hover ────────────────────────────── */
html[data-theme="aurora"] .bug-card:hover .bug-number,
html[data-theme="ember"]   .bug-card:hover .bug-number,
html[data-theme="tide"]   .bug-card:hover .bug-number,
html[data-theme="void"]   .bug-card:hover .bug-number {
  color: var(--accent);
  transition: color 0.4s ease;
}
html[data-theme="aurora"] .bug-number,
html[data-theme="ember"]   .bug-number,
html[data-theme="tide"]   .bug-number,
html[data-theme="void"]   .bug-number { transition: color 0.4s ease; }

/* ── Controls bar search glow ───────────────────────────────────── */
html[data-theme="aurora"] .search-input:focus { box-shadow: 0 0 0 2px rgba(16,185,129,0.30), 0 0 12px rgba(16,185,129,0.15); }
html[data-theme="ember"]   .search-input:focus { box-shadow: 0 0 0 2px rgba(249,115,22,0.35), 0 0 14px rgba(249,115,22,0.18); }
html[data-theme="tide"]   .search-input:focus { box-shadow: 0 0 0 2px rgba(6,182,212,0.30), 0 0 12px rgba(6,182,212,0.15); }
html[data-theme="void"]   .search-input:focus { box-shadow: 0 0 0 2px rgba(129,140,248,0.35), 0 0 14px rgba(129,140,248,0.18); }

/* ══ ANIMATIONS ══════════════════════════════════════════════ */
@keyframes cardEnter   { from{opacity:0;transform:translateY(16px) scale(0.98)} to{opacity:1;transform:none} }
@keyframes fadeIn      { from{opacity:0} to{opacity:1} }
@keyframes slideUp     { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:none} }
@keyframes slideRight  { from{opacity:0;transform:translateX(-12px)} to{opacity:1;transform:none} }
@keyframes tabEnter    { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }
@keyframes toastIn     { from{opacity:0;transform:translateY(16px) scale(0.95)} to{opacity:1;transform:none scale(1)} }
@keyframes toastOut    { from{opacity:1;transform:none} to{opacity:0;transform:translateY(8px)} }
@keyframes pulseBorder { 0%{box-shadow:0 0 0 0 var(--accent-glow)} 60%{box-shadow:0 0 0 8px transparent} 100%{box-shadow:0 0 0 0 transparent} }
@keyframes statPop     { 0%{transform:scale(1)} 45%{transform:scale(1.2)} 100%{transform:scale(1)} }
@keyframes barGrow     { from{transform:scaleX(0)} to{transform:scaleX(1)} }
@keyframes proofIn     { from{opacity:0;max-height:0} to{opacity:1;max-height:220px} }
@keyframes spin        { to{transform:rotate(360deg)} }
@keyframes livePulse   { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.7)} }
@keyframes lightboxIn  { from{opacity:0;transform:scale(0.92)} to{opacity:1;transform:scale(1)} }
@keyframes ripple      { from{transform:scale(0);opacity:0.5} to{transform:scale(2.5);opacity:0} }
@keyframes shimmerSlide{ from{background-position:-400px 0} to{background-position:400px 0} }
@keyframes metricIn    { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes thumbIn     { from{opacity:0;transform:scale(0.85)} to{opacity:1;transform:scale(1)} }
@keyframes dropIn      { from{opacity:0;transform:translateY(-8px) scale(0.97)} to{opacity:1;transform:none} }

/* ══ BASE ════════════════════════════════════════════════════ */
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; }

/* ══ STICKY TOP ══════════════════════════════════════════════ */
.sticky-top {
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* ══ HEADER ══════════════════════════════════════════════════ */
.site-header { background: var(--bg-header); border-bottom: 3px solid var(--accent); }
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 16px;
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  transition: opacity 0.15s;
}
.header-logo:hover { opacity: 0.85; }
.logo-img {
  width: 32px; height: 32px; object-fit: contain; flex-shrink: 0;
  border-radius: 6px;
}
.logo-svg { width: 22px; height: 22px; color: #e8a0a0; flex-shrink: 0; }
html[data-theme="slate"]  .logo-svg { color: #90c0f0; }
html[data-theme="forest"] .logo-svg { color: #90d090; }
html[data-theme="rose"]   .logo-svg { color: #f0a0b0; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 700; letter-spacing: 0.03em; color: var(--text-header);
}
.header-center { flex: 1; text-align: center; }
.header-date { font-size: 0.75rem; color: #5c6078; font-style: italic; }
html[data-theme="midnight"] .header-date { color: #3d4460; }
html[data-theme="slate"]    .header-date { color: #5a88b8; }
html[data-theme="forest"]   .header-date { color: #4a7a5a; }
html[data-theme="rose"]     .header-date { color: #7a5060; }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── Theme switcher (swatch dots) ─────────────────────────── */
.theme-switcher {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px; padding: 4px 6px; gap: 3px;
}
.theme-btn {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative; flex-shrink: 0;
  background: var(--swatch-color, rgba(255,255,255,0.3));
}
.theme-btn:hover { transform: scale(1.2); }
.theme-btn.active {
  border-color: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
  transform: scale(1.1);
}
.theme-btn[data-theme="parchment"] { --swatch-color: #c4aa8c; }
.theme-btn[data-theme="midnight"]  { --swatch-color: #e05555; }
.theme-btn[data-theme="slate"]     { --swatch-color: #4a8fd4; }
.theme-btn[data-theme="forest"]    { --swatch-color: #3da85a; }
.theme-btn[data-theme="rose"]      { --swatch-color: #c04868; }

/* ── User profile ──────────────────────────────────────────── */
.user-profile { position: relative; flex-shrink: 0; }
.user-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px; padding: 4px 10px 4px 5px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.user-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.user-avatar-sm {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  flex-shrink: 0; letter-spacing: 0.03em;
}
.user-name-sm { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.65); white-space: nowrap; max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.user-chevron { width: 10px; height: 10px; color: rgba(255,255,255,0.35); flex-shrink: 0; transition: transform 0.18s; }
.user-profile.open .user-chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 240px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 300;
  overflow: hidden;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.2s cubic-bezier(0.16,1,0.3,1),
              transform 0.2s cubic-bezier(0.16,1,0.3,1),
              visibility 0s 0.2s;
}
.user-dropdown.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 0.2s cubic-bezier(0.16,1,0.3,1),
              transform 0.2s cubic-bezier(0.16,1,0.3,1),
              visibility 0s;
}

/* Staggered child entry when dropdown opens */
@keyframes dropChildIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-dropdown.open .user-card-top     { animation: dropChildIn 0.22s 0.05s cubic-bezier(0.16,1,0.3,1) both; }
.user-dropdown.open .user-dropdown-nav { animation: dropChildIn 0.22s 0.1s cubic-bezier(0.16,1,0.3,1) both; }

/* Avatar pulse ring */
@keyframes avatarPulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.user-dropdown.open .user-card-avatar {
  animation: avatarPulse 1s 0.2s ease forwards;
}

.user-card-top {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 15px 12px;
  background: var(--bg-section); border-bottom: 1px solid var(--border-light);
}
.user-card-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; text-transform: uppercase;
  flex-shrink: 0; transition: transform 0.15s;
}
.user-card-avatar:hover { transform: scale(1.06); }
.user-card-info { min-width: 0; }
.user-card-name { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-role { font-size: 0.72rem; color: var(--text-light); font-style: italic; margin-top: 1px; }
.user-edit-section { padding: 12px 15px; }
.user-edit-section label { display: block; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); margin-bottom: 6px; }
.user-edit-section input {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-input);
  font-family: var(--font); font-size: 0.88rem; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.user-edit-section input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.user-save-btn {
  width: 100%; margin-top: 8px; padding: 7px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.82rem;
  font-weight: 600; cursor: pointer;
  position: relative; overflow: hidden;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.user-save-btn:hover { background: var(--accent-h); box-shadow: 0 3px 12px var(--accent-glow); transform: translateY(-1px); }
.user-save-btn:active { transform: scale(0.97); }
.user-save-btn::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.user-save-btn:hover::after { left: 160%; transition: left 0.5s ease; }
.user-card-footer {
  padding: 8px 15px 10px; border-top: 1px solid var(--border-light);
  font-size: 0.7rem; color: var(--text-light); font-style: italic;
  text-align: center;
}
.user-dropdown-nav {
  border-top: 1px solid var(--border-light);
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.user-nav-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  background: none; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.84rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; text-align: left;
  transition: background 0.13s, color 0.13s;
}
.user-nav-btn:hover { background: var(--bg-section); color: var(--text); }
.user-nav-btn svg { flex-shrink: 0; opacity: 0.7; }

/* ══ STATS BAR ════════════════════════════════════════════════ */
.stats-bar {
  background: var(--bg-header);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
  transition: max-height 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
}
.stats-bar--visible {
  max-height: 56px; opacity: 1; pointer-events: auto;
}
.stats-bar--hidden {
  max-height: 0 !important; opacity: 0 !important; pointer-events: none !important;
}
.stat-item {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 24px; background: none; border: none; cursor: pointer;
  font-family: var(--font); position: relative; transition: background 0.15s;
}
.stat-item::after {
  content: ''; position: absolute; bottom: 0; left: 12px; right: 12px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transition: transform 0.2s; border-radius: 2px 2px 0 0;
}
.stat-item:hover { background: rgba(255,255,255,0.04); }
.stat-item.active { background: rgba(255,255,255,0.06); }
.stat-item.active::after { transform: scaleX(1); }
.stat-progress-item { cursor: default; gap: 8px; }
.stat-progress-item::after, .stat-progress-item:hover { background: transparent; }
.resolution-bar-wrap { width: 72px; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.resolution-bar { height: 100%; background: var(--s-resolved); border-radius: 2px; transition: width 0.7s ease; }
.stat-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-open{background:#60a5fa} .dot-in-progress{background:#fbbf24} .dot-resolved{background:#4ade80} .dot-closed{background:#737373}
.stat-number { font-size: 1.25rem; font-weight: 700; color: #bcb5ad; font-family: var(--font-mono); min-width: 18px; text-align: center; }
.stat-item.active .stat-number { color: #e0d8d0; }
.stat-number.pop { animation: statPop 0.28s cubic-bezier(0.34,1.56,0.64,1); }
.stat-label { font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.1em; color: #4a4e62; }
.stat-item.active .stat-label { color: #807880; }
.stat-divider { width: 1px; height: 26px; background: rgba(255,255,255,0.06); flex-shrink: 0; }

/* ══ TAB BAR ══════════════════════════════════════════════════ */
.tab-bar {
  background: var(--tab-bg); border-bottom: 1px solid var(--tab-border);
  transition: background 0.25s;
}
.tabs-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: center; }
.tab-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 0 20px; height: 44px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); position: relative;
  transition: color 0.15s, background 0.12s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transition: transform 0.22s cubic-bezier(0.16,1,0.3,1);
  border-radius: 2px 2px 0 0;
}
.tab-btn:hover { color: var(--tab-active-fg); background: var(--bg-section); }
.tab-btn.active { color: var(--tab-active-fg); font-weight: 600; }
.tab-btn.active::after { transform: scaleX(1); }
.tab-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--accent); color: #fff;
  border-radius: 9px; font-size: 0.65rem; font-weight: 700;
  font-family: var(--font-mono); transition: background 0.2s;
}

/* ══ TAB PANES ════════════════════════════════════════════════ */
.tab-pane { animation: tabEnter 0.28s cubic-bezier(0.16,1,0.3,1); }
.pane-inner { max-width: 1240px; margin: 0 auto; padding: 22px 24px 80px; }
.dashboard-pane { padding-top: 24px; }

/* ══ DASHBOARD ════════════════════════════════════════════════ */
.metric-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; margin-bottom: 18px; }

/* ── Metric card idle pulse (all themes) ────────────────────────── */
@keyframes metricPulse {
  0%,100% { box-shadow: var(--shadow-sm); }
  50%     { box-shadow: var(--shadow-sm), 0 0 0 3px rgba(255,255,255,0.045); }
}
.metric-card {
  background: var(--bg-card); border: 1px solid var(--metric-border);
  border-radius: var(--radius); padding: 22px 16px 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 0;
  box-shadow: var(--shadow-sm);
  animation: metricIn 0.4s cubic-bezier(0.16,1,0.3,1) both, metricPulse 5s ease-in-out 1s infinite;
  animation-delay: calc(var(--i,0) * 70ms), calc(var(--i,0) * 1.2s + 1s);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  position: relative; overflow: hidden;
}
.metric-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.05) 0%, transparent 55%);
  pointer-events: none;
}
.metric-card.clickable { cursor: pointer; }
.metric-card.clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--accent); }
.metric-card.clickable:active { transform: translateY(-1px); }
.metric-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.metric-icon svg { width: 22px; height: 22px; }
.metric-icon-total   { background: rgba(139,148,255,0.15); color: #a5b4fc; box-shadow: 0 0 0 1.5px rgba(139,148,255,0.25); }
.metric-icon-open    { background: var(--b-open-bg); color: var(--b-open-fg); box-shadow: 0 0 0 1.5px rgba(var(--b-open-fg-raw,96,165,250),0.25); }
.metric-icon-progress{ background: var(--b-prog-bg); color: var(--b-prog-fg); box-shadow: 0 0 0 1.5px rgba(var(--b-prog-fg-raw,251,191,36),0.25); }
.metric-icon-resolved{ background: var(--b-res-bg);  color: var(--b-res-fg);  box-shadow: 0 0 0 1.5px rgba(var(--b-res-fg-raw,74,222,128),0.25); }
.metric-value { font-size: 2.6rem; font-weight: 800; line-height: 1; font-family: var(--font-mono); color: var(--text); letter-spacing: -0.02em; }
.metric-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-muted); margin-top: 8px; }
.metric-sub { font-size: 0.72rem; color: var(--text-light); margin-top: 4px; opacity: 0.85; }
/* Per-status value colors (non-animated themes) */
#mcOpen .metric-value     { color: var(--b-open-fg); }
#mcProgress .metric-value { color: var(--b-prog-fg); }
#mcResolved .metric-value { color: var(--b-res-fg); }

/* ── Critical metric card ───────────────────────────────────── */
.metric-icon-critical { background: var(--b-crit-bg); color: var(--b-crit-fg); box-shadow: 0 0 0 1.5px rgba(248,113,113,0.25); }
#mcCritical .metric-value { color: var(--b-crit-fg); }

/* ── Dashboard: extra row (Top Reporters + This Week) ─────────── */
.dash-extra-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; margin-top: 12px; }

/* ── Top Reporters list ─────────────────────────────────────── */
.top-reporter-row { display: grid; grid-template-columns: 18px 28px 1fr auto 36px; align-items: center; gap: 9px; padding: 6px 0; }
.top-reporter-row + .top-reporter-row { border-top: 1px solid var(--border-light); }
.top-reporter-rank { font-size: 0.7rem; color: var(--text-light); font-weight: 700; text-align: right; }
.top-reporter-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-section); color: var(--text-muted); font-size: 0.66rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.top-reporter-name { font-size: 0.83rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-reporter-bar-wrap { background: var(--bar-track-bg); height: 4px; border-radius: 2px; overflow: hidden; }
.top-reporter-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.6s cubic-bezier(0.16,1,0.3,1); }
.top-reporter-count { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-align: right; }

/* ── Week stats ─────────────────────────────────────────────── */
.week-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.week-stat-row:last-child { border-bottom: none; }
.week-stat-label { font-size: 0.8rem; color: var(--text-muted); }
.week-stat-count { font-size: 1.15rem; font-weight: 700; color: var(--text); font-family: var(--font-mono); }

/* ── My Reports button ──────────────────────────────────────── */
.my-reports-btn { display: flex; align-items: center; gap: 6px; padding: 0 12px; height: 34px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-section); color: var(--text-muted); font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; flex-shrink: 0; }
.my-reports-btn:hover { border-color: var(--accent); color: var(--accent); }
.my-reports-btn.active { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }
.my-reports-btn svg { width: 13px; height: 13px; }

/* ── Member delete confirm zone ─────────────────────────────── */
.member-delete-confirm-zone { margin-top: 14px; padding: 12px 14px; background: var(--b-crit-bg); border: 1px solid var(--b-crit-bd); border-radius: var(--radius); }
.member-delete-warning { display: flex; align-items: flex-start; gap: 10px; font-size: 0.83rem; color: var(--b-crit-fg); line-height: 1.4; }
.member-delete-warning svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.btn-danger-ghost { color: var(--b-crit-fg) !important; border-color: var(--b-crit-bd) !important; }
.btn-danger-ghost:hover { background: var(--b-crit-bg) !important; }

/* ── User chip (clickable username) ─────────────────────────── */
.user-chip { display: inline; background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; border-radius: 3px; transition: color 0.12s, text-decoration 0.12s; }
.user-chip:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.user-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── User popover card ───────────────────────────────────────── */
.user-popover { position: absolute; z-index: 1200; min-width: 220px; max-width: 280px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 12px 14px; animation: metricIn 0.15s cubic-bezier(0.16,1,0.3,1) both; }
.user-popover-inner { display: flex; align-items: flex-start; gap: 12px; }
.user-popover-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-section); color: var(--text-muted); font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.user-popover-info { flex: 1; min-width: 0; }
.user-popover-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-popover-you { font-weight: 400; font-size: 0.78rem; color: var(--text-light); }
.user-popover-role { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-top: 5px; }
.user-popover-bio { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
.user-popover-since { font-size: 0.72rem; color: var(--text-light); margin-top: 4px; }
.user-popover-footer { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-light); }
.user-popover-edit-btn { font-size: 0.78rem; padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-section); color: var(--text-muted); cursor: pointer; transition: all 0.12s; }
.user-popover-edit-btn:hover { border-color: var(--accent); color: var(--accent); }

.dashboard-charts { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 12px; }
.dash-card { background: var(--bg-card); border: 1px solid var(--metric-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; animation: metricIn 0.4s cubic-bezier(0.16,1,0.3,1) 0.15s both; }
.dash-card-feed { display: flex; flex-direction: column; }
.dash-card-title {
  display: flex; align-items: center; gap: 7px; padding: 11px 15px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light);
}
.dash-card-title svg { width: 12px; height: 12px; }
.dash-card-body { padding: 14px 15px; display: flex; flex-direction: column; gap: 11px; }

.bar-row { display: grid; grid-template-columns: 68px 1fr 26px; align-items: center; gap: 9px; }
.bar-label { font-size: 0.8rem; color: var(--text-muted); text-align: right; }
.bar-track { height: 7px; background: var(--bar-track-bg); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transform-origin: left; animation: barGrow 0.7s cubic-bezier(0.16,1,0.3,1) 0.25s both; transition: width 0.5s cubic-bezier(0.16,1,0.3,1); }
.bar-critical{background:var(--p-critical)} .bar-high{background:var(--p-high)} .bar-medium{background:var(--p-medium)} .bar-low{background:var(--p-low)}
.bar-status-open{background:var(--s-open)} .bar-status-prog{background:var(--s-progress)} .bar-status-res{background:var(--s-resolved)} .bar-status-closed{background:var(--s-closed)}
.bar-count { font-size: 0.75rem; font-family: var(--font-mono); color: var(--text-light); text-align: right; }

/* Activity feed */
.activity-live-dot { display: inline-block; width: 5px; height: 5px; background: #4ade80; border-radius: 50%; margin-left: 4px; animation: livePulse 2.2s ease infinite; }
.activity-feed { flex: 1; overflow-y: auto; max-height: 260px; background: var(--feed-bg); scrollbar-width: thin; }
.activity-loading { display: flex; align-items: center; justify-content: center; padding: 28px; }
.activity-item { display: flex; gap: 9px; padding: 9px 13px; border-bottom: 1px solid var(--feed-line); animation: activityIn 0.3s ease both; animation-delay: var(--ai,0ms); transition: background 0.1s; }
@keyframes activityIn { from{opacity:0;transform:translateX(-10px)} to{opacity:1;transform:none} }
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--bg-section); }
.activity-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-section); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; flex-shrink: 0; margin-top: 1px; }
.activity-main { flex: 1; min-width: 0; }
.activity-text { font-size: 0.8rem; color: var(--text); line-height: 1.4; }
.activity-text strong { font-weight: 600; }
.activity-text a { color: var(--accent); text-decoration: none; }
.activity-text a:hover { text-decoration: underline; }
.activity-preview { font-size: 0.75rem; color: var(--text-light); font-style: italic; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 0.7rem; color: var(--text-light); margin-top: 2px; }
.activity-badge { display: inline-flex; align-items: center; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 1px 5px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.ab-filed{background:var(--b-open-bg);color:var(--b-open-fg);border:1px solid var(--b-open-bd)}
.ab-updated{background:var(--bg-section);color:var(--text-muted);border:1px solid var(--border)}
.ab-comment{background:var(--b-med-bg);color:var(--b-med-fg);border:1px solid var(--b-med-bd)}
.ab-status{background:var(--b-res-bg);color:var(--b-res-fg);border:1px solid var(--b-res-bd)}

/* ══ BUGS TAB ════════════════════════════════════════════════ */
.controls-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 11px;
  animation: slideUp 0.3s ease 0.05s both;
  position: relative; z-index: 20;
}
.search-wrap { flex: 1; min-width: 220px; position: relative; }
.search-icon { width: 14px; height: 14px; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }
input.search-input {
  width: 100%; padding: 9px 32px 9px 38px !important;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); font-family: var(--font); font-size: 0.9rem; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input.search-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-clear { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 0.8rem; color: var(--text-light); cursor: pointer; padding: 2px 5px; font-family: sans-serif; transition: color 0.12s; }
.search-clear:hover { color: var(--text); }

/* ── Filter button + panel ─────────────────────────────────── */
.filter-wrap { position: relative; flex-shrink: 0; z-index: 30; }

.filter-toggle-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); font-family: var(--font); font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  position: relative;
}
.filter-toggle-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.filter-toggle-btn:hover { border-color: var(--text-light); color: var(--text); background: var(--bg-section); }
.filter-toggle-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.filter-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--accent); color: #fff;
  border-radius: 8px; font-size: 0.6rem; font-weight: 700;
  font-family: var(--font-mono); margin-left: 1px;
}
.filter-chevron { width: 10px; height: 10px; transition: transform 0.18s; }
.filter-wrap.open .filter-chevron { transform: rotate(180deg); }

.filter-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 280px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 400;
  padding: 14px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.18s cubic-bezier(0.16,1,0.3,1),
              transform 0.18s cubic-bezier(0.16,1,0.3,1),
              visibility 0s 0.18s;
}
.filter-panel.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 0.18s cubic-bezier(0.16,1,0.3,1),
              transform 0.18s cubic-bezier(0.16,1,0.3,1),
              visibility 0s;
}
.filter-panel-group { margin-bottom: 12px; }
.filter-panel-group:last-child { margin-bottom: 0; }
.filter-panel-label {
  font-size: 0.63rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--text-light); margin-bottom: 7px;
}
.filter-chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-chip {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-section); font-family: var(--font); font-size: 0.78rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  transition: all 0.13s;
}
.filter-chip:hover { border-color: var(--text-light); color: var(--text); background: var(--bg-card); }
.filter-chip.active {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
.filter-panel-divider { height: 1px; background: var(--border-light); margin: 12px 0; }

.result-meta { font-size: 0.77rem; color: var(--text-light); font-style: italic; margin-bottom: 12px; min-height: 18px; }

/* ══ BUG LIST ════════════════════════════════════════════════ */
.bug-list { display: flex; flex-direction: column; gap: 8px; }

.bug-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 4px 1fr auto; overflow: hidden;
  animation: cardEnter 0.35s cubic-bezier(0.16,1,0.3,1) both; animation-delay: var(--i,0ms);
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}
.bug-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--text-light); }
.bug-card.just-added { animation: cardEnter 0.4s cubic-bezier(0.16,1,0.3,1), pulseBorder 0.8s ease 0.35s; }

.bug-stripe { width: 4px; }
.bug-stripe.critical{background:var(--p-critical)} .bug-stripe.high{background:var(--p-high)} .bug-stripe.medium{background:var(--p-medium)} .bug-stripe.low{background:var(--p-low)}

.bug-card-body { padding: 13px 18px; min-width: 0; cursor: pointer; }
.bug-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.bug-number { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-light); flex-shrink: 0; }
.bug-title-link { font-size: 1.0rem; font-weight: 600; color: var(--text); text-decoration: none; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.18s; }
.bug-title-link:hover { color: var(--accent); text-decoration: underline; }

.bug-card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 7px; }
.bug-description-preview { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Screenshot thumbnails on cards */
.bug-screenshots { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bug-screenshot-thumb {
  width: 52px; height: 38px; object-fit: cover;
  border-radius: 3px; border: 1px solid var(--border);
  cursor: pointer; background: var(--bg-section);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  animation: thumbIn 0.25s ease both;
}
.bug-screenshot-thumb:hover { transform: scale(1.08); box-shadow: var(--shadow-md); border-color: var(--accent); }

.bug-card-footer { display: flex; align-items: center; gap: 11px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border-light); flex-wrap: wrap; }
.bug-footer-item { display: flex; align-items: center; gap: 4px; font-size: 0.74rem; color: var(--text-light); }
.bug-footer-item svg { width: 11px; height: 11px; flex-shrink: 0; }
.avatar { width: 19px; height: 19px; border-radius: 50%; background: var(--bg-section); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 0.56rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; flex-shrink: 0; }
.proof-count-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 0.68rem; color: var(--text-light); background: var(--bg-section); border: 1px solid var(--border-light); border-radius: 10px; padding: 1px 6px; }
.proof-count-chip svg { width: 9px; height: 9px; }

/* ══ BADGES ══════════════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 2px; font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.badge-priority-critical{background:var(--b-crit-bg);color:var(--b-crit-fg);border:1px solid var(--b-crit-bd)}
.badge-priority-high    {background:var(--b-high-bg);color:var(--b-high-fg);border:1px solid var(--b-high-bd)}
.badge-priority-medium  {background:var(--b-med-bg); color:var(--b-med-fg); border:1px solid var(--b-med-bd)}
.badge-priority-low     {background:var(--b-low-bg); color:var(--b-low-fg); border:1px solid var(--b-low-bd)}
.badge-status-open      {background:var(--b-open-bg);color:var(--b-open-fg);border:1px solid var(--b-open-bd)}
.badge-status-in-progress{background:var(--b-prog-bg);color:var(--b-prog-fg);border:1px solid var(--b-prog-bd)}
.badge-status-resolved  {background:var(--b-res-bg); color:var(--b-res-fg); border:1px solid var(--b-res-bd)}
.badge-status-closed    {background:var(--b-clo-bg); color:var(--b-clo-fg); border:1px solid var(--b-clo-bd)}
.badge-status-pending   {background:#fef3c7; color:#92400e; border:1px solid #fcd34d}

/* ══ CARD ACTIONS ════════════════════════════════════════════ */
.bug-card-actions { display: flex; flex-direction: column; justify-content: center; padding: 10px 12px; gap: 5px; border-left: 1px solid var(--border-light); }
.action-btn { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; cursor: pointer; color: var(--text-muted); text-decoration: none; transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.1s; position: relative; overflow: hidden; }
.action-btn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%); transform: scale(0); transition: transform 0.4s; pointer-events: none; }
.action-btn:active::after { transform: scale(2.5); transition: none; }
.action-btn:hover { transform: scale(1.1); }
.action-btn.view:hover   { background: var(--b-open-bg); color: var(--b-open-fg); border-color: var(--b-open-bd); }
.action-btn.edit:hover   { background: var(--bg-section); color: var(--text); border-color: var(--text-light); }
.action-btn.delete:hover { background: var(--b-crit-bg); color: var(--b-crit-fg); border-color: var(--b-crit-bd); }
.action-btn svg { width: 12px; height: 12px; }

/* ══ EMPTY STATE ══════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 80px 24px; animation: fadeIn 0.4s ease; }
.empty-art { width: 110px; height: 90px; margin: 0 auto 22px; opacity: 0.18; color: var(--text-muted); }
.empty-art svg { width: 100%; height: 100%; }
.empty-state h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 7px; }
.empty-state p  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; font-style: italic; }

/* ══ PENDING SECTION ══════════════════════════════════════════ */
.pending-section { margin-bottom: 16px; border: 1px solid #fcd34d; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 6px rgba(245,158,11,0.1); }
.pending-section-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(245,158,11,0.07); cursor: pointer; user-select: none; transition: background 0.15s; }
.pending-section-header:hover { background: rgba(245,158,11,0.13); }
.pending-section-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; color: #92400e; }
.pending-section-title svg { width: 15px; height: 15px; color: #f59e0b; }
.pending-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; flex-shrink: 0; animation: pulse-dot 1.8s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }
.pending-section-toggle { background: rgba(245,158,11,0.1); border: 1px solid #fcd34d; border-radius: 20px; padding: 4px 13px; font-size: 0.78rem; cursor: pointer; color: #92400e; font-weight: 600; transition: background 0.15s; }
.pending-section-toggle:hover { background: rgba(245,158,11,0.22); }
.pending-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-card); overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease; }
.pending-list.is-open { max-height: 4000px; opacity: 1; }
.pending-card { display: flex; align-items: stretch; border: 1px solid var(--border-light); border-left: 3px solid #f59e0b; border-radius: var(--radius-sm); background: var(--bg-section); overflow: hidden; transition: box-shadow 0.18s, transform 0.18s; }
.pending-card:hover { box-shadow: 0 3px 10px rgba(245,158,11,0.18); transform: translateY(-1px); }
.pending-card-body { flex: 1; padding: 11px 14px; cursor: pointer; transition: background 0.15s; }
.pending-card-body:hover { background: rgba(245,158,11,0.05); }
.pending-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.pending-card-title { font-weight: 600; font-size: 0.9rem; }
.pending-card-desc { font-size: 0.82rem; color: var(--text-muted); margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 600px; }
.pending-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.pending-proof-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 0.73rem; color: var(--text-light); background: var(--bg); border: 1px solid var(--border-light); border-radius: 10px; padding: 1px 7px; }
.pending-proof-chip svg { width: 10px; height: 10px; }
.pending-card .bug-card-actions { flex-direction: row; align-self: center; border-left: none; padding: 0 14px 0 4px; gap: 8px; flex-shrink: 0; }
.pending-card .action-btn { width: 32px; height: 32px; }

/* ══ PENDING DETAIL MODAL ════════════════════════════════════ */
.pd-text { font-size: 0.9rem; color: var(--text); white-space: pre-wrap; word-break: break-word; line-height: 1.55; background: var(--bg-section); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 14px; min-height: 40px; }
.pd-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; flex-wrap: wrap; }
.pd-proof-container { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-proof-img { max-width: 100%; max-height: 180px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); object-fit: cover; cursor: pointer; transition: opacity 0.15s; display: block; }
.pd-proof-img:hover { opacity: 0.82; }
.pd-proof-link { display: inline-flex; align-items: center; gap: 5px; font-size: 0.83rem; color: var(--accent); text-decoration: none; border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 5px 11px; background: var(--bg-section); transition: background 0.15s; word-break: break-all; }
.pd-proof-link:hover { background: var(--bg); text-decoration: underline; }
.pd-proof-link svg { width: 13px; height: 13px; flex-shrink: 0; }
.btn-danger.btn-outline { background: transparent; color: var(--b-crit-fg); border-color: var(--b-crit-bd); }
.btn-danger.btn-outline:hover { background: var(--b-crit-bg); filter: none; }

/* ══ ADMIN-ONLY FORM FIELDS ═══════════════════════════════════ */
.admin-section, .admin-field { display: none; }
.modal-overlay.is-edit .admin-section { display: block; }
.modal-overlay.is-edit .admin-field { display: block; }

/* ══ MODAL ════════════════════════════════════════════════════ */
.modal-overlay { position: fixed; inset: 0; background: rgba(8,8,18,0.65); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); animation: fadeIn 0.15s ease; }
.modal { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; animation: slideUp 0.22s cubic-bezier(0.16,1,0.3,1); border-top: 3px solid var(--accent); scrollbar-width: thin; }
.modal-sm { max-width: 420px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 24px 14px; border-bottom: 1px solid var(--border-light); position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-subtitle { font-size: 0.78rem; color: var(--text-light); font-style: italic; margin-top: 2px; }
.modal-close { background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--text-light); width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.12s, color 0.12s; flex-shrink: 0; font-family: sans-serif; }
.modal-close:hover { background: var(--bg-section); color: var(--text); }
.modal-body { padding: 18px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 12px 24px 18px; border-top: 1px solid var(--border-light); position: sticky; bottom: 0; background: var(--bg-card); }

/* ══ FORM ════════════════════════════════════════════════════ */
.form-section-label { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-light); padding-bottom: 8px; margin-bottom: 11px; border-bottom: 1px solid var(--border-light); margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.form-section-label:first-child { margin-top: 0; }
.form-row { margin-bottom: 11px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
label { font-size: 0.73rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.required { color: var(--accent); }
input[type="text"], textarea, select { font-family: var(--font); font-size: 0.9rem; color: var(--text); padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); width: 100%; transition: border-color 0.15s, box-shadow 0.15s, background 0.2s; }
input[type="text"]:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--bg-card); }
textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
input.error, textarea.error { border-color: var(--p-critical) !important; }

/* ══ PROOF ════════════════════════════════════════════════════ */
.proof-section-label { align-items: flex-start; }
.proof-add-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.proof-add-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; font-family: var(--font); font-size: 0.74rem; font-weight: 600; color: var(--text-muted); background: var(--bg-section); border: 1px dashed var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; }
.proof-add-btn svg { width: 11px; height: 11px; }
.proof-add-btn:hover { background: var(--bg-card); border-color: var(--text-light); border-style: solid; color: var(--text); }
.proof-hint { font-size: 0.76rem; color: var(--text-light); font-style: italic; text-align: center; padding: 12px; border: 1px dashed var(--border-light); border-radius: var(--radius-sm); margin-top: 4px; }
.proof-list { display: flex; flex-direction: column; gap: 7px; }
.proof-item { background: var(--bg-section); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; animation: proofIn 0.2s ease both; }
.proof-item-header { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-bottom: 1px solid var(--border-light); }
.proof-type-icon { width: 12px; height: 12px; color: var(--text-muted); flex-shrink: 0; }
.proof-type-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); flex: 1; }
.proof-remove-btn { background: none; border: none; cursor: pointer; color: var(--text-light); font-size: 0.75rem; padding: 1px 4px; border-radius: 2px; transition: color 0.12s, background 0.12s; font-family: sans-serif; }
.proof-remove-btn:hover { color: var(--p-critical); background: var(--b-crit-bg); }
.proof-item-body { padding: 8px 11px; display: flex; flex-direction: column; gap: 6px; }
.proof-input { width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.85rem; color: var(--text); background: var(--bg-card); transition: border-color 0.15s; }
.proof-input:focus-visible { outline: none; border-color: var(--accent); }
.proof-input.small { font-size: 0.78rem; color: var(--text-muted); }

/* Screenshot live preview in form */
.proof-img-preview { max-width: 100%; max-height: 120px; object-fit: cover; border-radius: 3px; border: 1px solid var(--border); display: none; margin-top: 2px; cursor: pointer; animation: thumbIn 0.2s ease; transition: opacity 0.15s; }
.proof-img-preview:hover { opacity: 0.85; }
.proof-img-preview.visible { display: block; }

/* ══ LIGHTBOX ════════════════════════════════════════════════ */
.lightbox { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.88); backdrop-filter: blur(8px); animation: fadeIn 0.2s ease; cursor: pointer; }
.lightbox-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: lightboxIn 0.25s cubic-bezier(0.16,1,0.3,1); max-width: 92vw; }
.lightbox-close { position: absolute; top: -14px; right: -14px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; transition: background 0.12s, transform 0.12s; }
.lightbox-close:hover { background: rgba(255,255,255,0.25); transform: scale(1.1); }
.lightbox-close svg { width: 14px; height: 14px; }
#lightboxImg { max-width: 90vw; max-height: 80vh; border-radius: 6px; box-shadow: 0 24px 64px rgba(0,0,0,0.6); object-fit: contain; display: block; }
.lightbox-caption { color: rgba(255,255,255,0.7); font-size: 0.85rem; text-align: center; font-style: italic; max-width: 500px; }

/* ══ BUTTONS ══════════════════════════════════════════════════ */
.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn-danger:focus-visible,
.tab-btn:focus-visible, .action-btn:focus-visible, .filter-chip:focus-visible,
.filter-toggle-btn:focus-visible, .theme-opt:focus-visible, .customise-btn:focus-visible,
.stat-item:focus-visible, .user-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn-primary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 8px 17px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  position: relative; overflow: hidden;
}
.btn-primary svg, .btn-danger svg { width: 13px; height: 13px; flex-shrink: 0; }
.btn-primary:active, .btn-ghost:active, .btn-danger:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-h); box-shadow: 0 3px 12px var(--accent-glow); }
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}
.btn-primary:hover::after {
  left: 160%;
  transition: left 0.5s ease;
}
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-section); color: var(--text); border-color: var(--text-light); }
.btn-danger { background: var(--p-critical); color: #fff; border-color: var(--p-critical); }
.btn-danger:hover { filter: brightness(0.9); }
.btn-delete-all {
  padding: 7px 12px; font-size: 0.8rem; opacity: 0.75;
}
.btn-delete-all:hover { opacity: 1; }

/* ══ TOAST ════════════════════════════════════════════════════ */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: var(--radius); font-family: var(--font); font-size: 0.85rem; font-weight: 600; color: #fff; box-shadow: var(--shadow-lg); animation: toastIn 0.25s cubic-bezier(0.16,1,0.3,1) both; max-width: 290px; }
.toast svg { width: 13px; height: 13px; flex-shrink: 0; }
.toast.dismissing { animation: toastOut 0.22s ease forwards; }
.toast-success{background:#166534} .toast-error{background:var(--p-critical)} .toast-info{background:#1e40af}

/* ══ SPINNER ══════════════════════════════════════════════════ */
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ══ CONFIRM TEXT ════════════════════════════════════════════ */
.confirm-text { color: var(--text-muted); font-style: italic; line-height: 1.65; font-size: 0.9rem; }

/* ══ SCROLLBAR ════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ══════════════════════════════════════════════════════════════
   BUG DETAIL PAGE
══════════════════════════════════════════════════════════════ */
.detail-header { background: var(--bg-header); border-bottom: 3px solid var(--accent); }
.detail-header-inner { max-width: 980px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.35); text-decoration: none; font-size: 0.82rem; font-style: italic; transition: color 0.15s; }
.back-link:hover { color: rgba(255,255,255,0.7); }
.back-link svg { width: 12px; height: 12px; }
.detail-header-actions { display: flex; align-items: center; gap: 7px; }

.btn-sm { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; font-family: var(--font); font-size: 0.78rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; transition: all 0.15s; white-space: nowrap; }
.btn-sm svg { width: 11px; height: 11px; }
.btn-sm.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm.primary:hover { background: var(--accent-h); }
.btn-sm.ghost { background: transparent; color: rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.12); }
.btn-sm.ghost:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.75); }
.btn-sm.danger { background: transparent; color: #f87171; border-color: rgba(248,113,113,0.3); }
.btn-sm.danger:hover { background: rgba(185,28,28,0.2); }

.detail-body { max-width: 980px; margin: 0 auto; padding: 32px 24px 80px; animation: fadeIn 0.3s ease; }
.detail-hero { margin-bottom: 28px; animation: slideUp 0.3s ease 0.05s both; }
.detail-bug-number { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-light); letter-spacing: 0.06em; margin-bottom: 7px; }
.detail-title { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; line-height: 1.25; margin-bottom: 14px; }
.detail-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; animation: slideUp 0.3s ease 0.1s both; }
.detail-main { display: flex; flex-direction: column; gap: 18px; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.detail-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.detail-section-header { padding: 10px 15px; background: var(--bg-section); border-bottom: 1px solid var(--border-light); font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-light); display: flex; align-items: center; justify-content: space-between; }
.detail-section-body { padding: 15px; }
.detail-text { font-size: 0.92rem; line-height: 1.75; white-space: pre-wrap; }
.detail-steps { font-size: 0.9rem; line-height: 1.75; white-space: pre-wrap; }
.detail-empty { font-style: italic; color: var(--text-light); font-size: 0.85rem; }
.detail-meta-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 15px; border-bottom: 1px solid var(--border-light); gap: 12px; }
.detail-meta-row:last-child { border-bottom: none; }
.detail-meta-key { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); white-space: nowrap; }
.detail-meta-val { font-size: 0.87rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.detail-meta-val .avatar { width: 20px; height: 20px; font-size: 0.58rem; }
.env-chip { display: inline-block; font-family: var(--font-mono); font-size: 0.74rem; background: var(--bg-section); border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px; color: var(--text-muted); }
.status-select-inline { font-family: var(--font); font-size: 0.82rem; font-weight: 600; padding: 5px 22px 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-section); color: var(--text); cursor: pointer; appearance: none; width: 100%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6460' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; transition: border-color 0.15s; }
.status-select-inline:focus-visible { outline: none; border-color: var(--accent); }

/* ── Status Picker ──────────────────────────────────────────── */
@keyframes statusPop  { 0%{transform:scale(1)} 40%{transform:scale(1.04)} 100%{transform:scale(1)} }
@keyframes statusPulse{ 0%,100%{opacity:1} 50%{opacity:0.55} }
@keyframes checkIn    { from{opacity:0;transform:scale(0.4) rotate(-20deg)} to{opacity:1;transform:scale(1) rotate(0deg)} }

.detail-section-status .detail-section-header {
  display: flex; align-items: center; gap: 6px;
}
.status-saving-indicator {
  margin-left: auto; display: flex; align-items: center; gap: 4px;
  font-size: 0.68rem; color: var(--text-light); font-style: italic;
  animation: statusPulse 1.2s ease infinite;
}
.status-saving-indicator svg { width: 11px; height: 11px; }

.status-picker-body { padding: 10px 11px !important; }

.status-picker {
  display: flex; flex-direction: column; gap: 5px;
  transition: opacity 0.2s;
}
.status-picker--loading { opacity: 0.45; pointer-events: none; }

.status-picker-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 11px;
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  background: var(--bg-section);
  font-family: var(--font); font-size: 0.84rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s, box-shadow 0.15s;
  position: relative; overflow: hidden;
}
/* ripple effect */
.status-picker-btn::before {
  content: ''; position: absolute; inset: 0;
  background: currentColor; opacity: 0;
  border-radius: inherit; transition: opacity 0.25s;
  pointer-events: none;
}
.status-picker-btn:active::before { opacity: 0.07; }
.status-picker-btn:hover { transform: translateX(2px); }
.status-picker-btn:active { transform: translateX(1px) scale(0.99); }

.status-picker-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.status-picker-label { flex: 1; }
.status-picker-check {
  width: 13px; height: 13px; flex-shrink: 0;
  animation: checkIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

/* Per-status colors */
.status-picker-btn--open          .status-picker-dot { background: var(--s-open); }
.status-picker-btn--in-progress   .status-picker-dot { background: var(--s-progress); }
.status-picker-btn--resolved      .status-picker-dot { background: var(--s-resolved); }
.status-picker-btn--closed        .status-picker-dot { background: var(--s-closed); }

.status-picker-btn--open:hover          { background: var(--b-open-bg); border-color: var(--b-open-bd); color: var(--b-open-fg); }
.status-picker-btn--in-progress:hover   { background: var(--b-prog-bg); border-color: var(--b-prog-bd); color: var(--b-prog-fg); }
.status-picker-btn--resolved:hover      { background: var(--b-res-bg);  border-color: var(--b-res-bd);  color: var(--b-res-fg); }
.status-picker-btn--closed:hover        { background: var(--b-clo-bg);  border-color: var(--b-clo-bd);  color: var(--b-clo-fg); }

/* Active (current) state */
.status-picker-btn--open.active          { background: var(--b-open-bg); border-color: var(--b-open-bd); color: var(--b-open-fg); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.08); animation: statusPop 0.3s ease; }
.status-picker-btn--in-progress.active   { background: var(--b-prog-bg); border-color: var(--b-prog-bd); color: var(--b-prog-fg); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.08); animation: statusPop 0.3s ease; }
.status-picker-btn--resolved.active      { background: var(--b-res-bg);  border-color: var(--b-res-bd);  color: var(--b-res-fg);  font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.08); animation: statusPop 0.3s ease; }
.status-picker-btn--closed.active        { background: var(--b-clo-bg);  border-color: var(--b-clo-bd);  color: var(--b-clo-fg);  font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.08); animation: statusPop 0.3s ease; }

.status-picker-btn.active .status-picker-dot { transform: scale(1.35); box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }

/* Proof in detail view */
.proof-items-list { display: flex; flex-direction: column; gap: 10px; }
.proof-view-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; animation: slideRight 0.3s ease both; animation-delay: var(--ai,0ms); }
.proof-view-header { display: flex; align-items: center; gap: 7px; padding: 7px 12px; background: var(--bg-section); border-bottom: 1px solid var(--border-light); }
.proof-view-header svg { width: 12px; height: 12px; color: var(--text-muted); flex-shrink: 0; }
.proof-view-type { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); flex: 1; }
.proof-view-label { font-size: 0.79rem; font-style: italic; color: var(--text-muted); }
.proof-view-body { padding: 11px 12px; }
.proof-img { max-width: 100%; max-height: 220px; border-radius: 3px; border: 1px solid var(--border); display: block; margin-bottom: 7px; object-fit: contain; background: var(--bg-section); cursor: pointer; transition: opacity 0.15s; }
.proof-img:hover { opacity: 0.88; }
.proof-link-anchor { display: inline-flex; align-items: center; gap: 5px; font-size: 0.86rem; color: var(--s-open); word-break: break-all; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.12s; }
.proof-link-anchor:hover { border-color: var(--s-open); }
.proof-link-anchor svg { width: 11px; height: 11px; flex-shrink: 0; }
.proof-note-text { font-size: 0.87rem; color: var(--text-muted); font-style: italic; line-height: 1.65; border-left: 3px solid var(--border); padding-left: 11px; white-space: pre-wrap; }
.proof-no-items { font-style: italic; color: var(--text-light); font-size: 0.85rem; text-align: center; padding: 14px; }

/* Comments */
.comments-list { display: flex; flex-direction: column; }
.comment-item { display: flex; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--border-light); animation: slideRight 0.25s ease both; animation-delay: var(--ci,0ms); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-section); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; flex-shrink: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-size: 0.83rem; font-weight: 600; }
.comment-time { font-size: 0.72rem; color: var(--text-light); font-style: italic; }
.comment-content { font-size: 0.87rem; line-height: 1.6; white-space: pre-wrap; color: var(--text-muted); }
.comment-form { padding: 12px 15px; border-top: 1px solid var(--border-light); background: var(--bg-section); display: flex; flex-direction: column; gap: 7px; }
.comment-form-row { display: flex; gap: 7px; }
.comment-author-input { flex: 1; padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.85rem; color: var(--text); background: var(--bg-card); transition: border-color 0.15s; }
.comment-author-input:focus-visible { outline: none; border-color: var(--accent); }
.comment-textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.85rem; color: var(--text); background: var(--bg-card); resize: vertical; min-height: 66px; line-height: 1.55; transition: border-color 0.15s; }
.comment-textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.no-comments { text-align: center; padding: 20px 15px; color: var(--text-light); font-style: italic; font-size: 0.85rem; }

/* Share button */
.share-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; font-family: var(--font); color: rgba(255,255,255,0.38); background: none; border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; padding: 4px 8px; cursor: pointer; transition: all 0.12s; }
.share-btn:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.24); }
.share-btn svg { width: 10px; height: 10px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 10px; padding: 7px 0; position: relative; }
.timeline-item:not(:last-child)::after { content: ''; position: absolute; left: 6px; top: 24px; bottom: -7px; width: 1px; background: var(--border-light); }
.timeline-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--bg-section); border: 2px solid var(--border); flex-shrink: 0; margin-top: 3px; }
.timeline-dot.accent  { border-color: var(--accent); background: var(--b-crit-bg); }
.timeline-dot.resolved{ border-color: var(--s-resolved); background: var(--b-res-bg); }
.timeline-text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.timeline-time { font-size: 0.71rem; color: var(--text-light); font-style: italic; }

/* Loading / error */
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px; gap: 12px; }
.loading-text { color: var(--text-light); font-style: italic; font-size: 0.87rem; }
.error-state { text-align: center; padding: 80px; color: var(--text-muted); }

/* ══ CUSTOMISE BUTTON & PANEL ════════════════════════════════ */
.customise-wrap { position: relative; flex-shrink: 0; }

.customise-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px; padding: 6px 13px;
  font-family: var(--font); font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.55); cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.customise-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.customise-btn:hover, .customise-btn.open {
  background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
}

.customise-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 264px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 300;
  padding: 14px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.2s cubic-bezier(0.16,1,0.3,1),
              transform 0.2s cubic-bezier(0.16,1,0.3,1),
              visibility 0s 0.2s;
}
.customise-panel.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 0.2s cubic-bezier(0.16,1,0.3,1),
              transform 0.2s cubic-bezier(0.16,1,0.3,1),
              visibility 0s;
}
.customise-section-label {
  font-size: 0.63rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--text-light); margin-bottom: 9px;
}
.theme-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
}
.theme-subsection-label {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.10em; color: var(--text-light);
  opacity: 0.65; margin: 8px 0 4px; padding-left: 1px;
}
.theme-opt {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-section);
  font-family: var(--font); font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: border-color 0.13s, background 0.13s, color 0.13s;
}
.theme-opt:hover { border-color: var(--text-light); color: var(--text); background: var(--bg-card); }
.theme-opt.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); font-weight: 600; }
.theme-opt-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
/* Animated theme buttons get a faint dashed border when not active */
.theme-opt[data-theme="aurora"],
.theme-opt[data-theme="void"],
.theme-opt[data-theme="ember"],
.theme-opt[data-theme="tide"],
.theme-opt[data-theme="storm"],
.theme-opt[data-theme="crimson"] { border-style: dashed; }
.theme-opt[data-theme="aurora"]:hover,
.theme-opt[data-theme="void"]:hover,
.theme-opt[data-theme="ember"]:hover,
.theme-opt[data-theme="tide"]:hover,
.theme-opt[data-theme="storm"]:hover,
.theme-opt[data-theme="crimson"]:hover { border-style: solid; }
.theme-opt[data-theme="aurora"].active,
.theme-opt[data-theme="void"].active,
.theme-opt[data-theme="ember"].active,
.theme-opt[data-theme="tide"].active,
.theme-opt[data-theme="storm"].active,
.theme-opt[data-theme="crimson"].active { border-style: solid; }

/* ══ DETAIL HERO META BAR ════════════════════════════════════ */
.detail-hero-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 13px; padding: 9px 13px;
  background: var(--bg-section); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}
.detail-bug-tag {
  font-family: var(--font-mono); font-weight: 700; color: var(--accent); letter-spacing: 0.04em;
}
.meta-sep { flex: 1; min-width: 4px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.78rem; color: var(--text-muted);
}
.meta-chip-dim { color: var(--text-light); font-size: 0.73rem; }
.detail-badge-env {
  background: var(--bg-section); color: var(--text-muted); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.64rem;
}

/* ══ PROOF SCREENSHOT GRID ═══════════════════════════════════ */
.proof-screenshot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px; margin-bottom: 8px;
}
.proof-screenshot-grid.single { grid-template-columns: minmax(0, 340px); }
.proof-screenshot-item {
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-section);
  animation: thumbIn 0.25s ease both; animation-delay: var(--ai, 0ms);
}
.proof-grid-img {
  width: 100%; height: 118px; object-fit: cover; display: block;
  cursor: pointer; transition: opacity 0.15s, transform 0.18s;
}
.proof-grid-img:hover { opacity: 0.85; transform: scale(1.025); }
.proof-screenshot-caption {
  padding: 5px 8px; font-size: 0.73rem; color: var(--text-muted);
  font-style: italic; background: var(--bg-section);
  border-top: 1px solid var(--border-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mt-8 { margin-top: 8px; }

/* ══ TAB PANE FADE ANIMATION ═════════════════════════════════ */
@keyframes paneEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.tab-pane.pane-enter { animation: paneEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ══ CARD STAGGER ENTRANCE ════════════════════════════════════ */
@keyframes bugCardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.sug-card { animation: bugCardIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--ci, 0) * 35ms); }

/* ══ SUGGESTIONS STATS BAR ════════════════════════════════════ */
.sug-stats-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0; border: 1px solid var(--border-light); border-radius: var(--radius); background: var(--bg-card); margin-bottom: 16px; overflow: hidden; }
.sug-stats-bar .stat-item { border-radius: 0; }
.sug-stats-bar .stat-item.active { background: var(--accent); color: #fff; }
.sug-stats-bar .stat-item.active .stat-dot { border: 2px solid rgba(255,255,255,0.6); }
.stat-add-wrap { margin-left: auto; padding: 6px 10px; }

/* ══ SUGGESTION CARD ACCENT ═══════════════════════════════════ */
.sug-card .bug-card-left-accent { background: var(--s-progress, #fbbf24); }
.sug-card.bug-card-full .bug-card-left-accent { background: linear-gradient(to bottom, #818cf8, #6366f1); }

/* ══ STATUS MOVE DROPDOWN ════════════════════════════════════ */
.status-move-dropdown {
  position: fixed; z-index: 1000;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 154px; overflow: hidden;
  animation: dropIn 0.15s cubic-bezier(0.16,1,0.3,1);
}
.status-move-label {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--text-light);
  padding: 7px 12px 5px; border-bottom: 1px solid var(--border-light);
}
.status-move-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  background: none; border: none; border-bottom: 1px solid var(--border-light);
  font-family: var(--font); font-size: 0.83rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; text-align: left;
  transition: background 0.1s, color 0.1s;
}
.status-move-item:last-child { border-bottom: none; }
.status-move-item:hover { background: var(--bg-section); color: var(--text); }
.status-move-item.current { font-weight: 700; color: var(--accent); pointer-events: none; opacity: 0.7; }
.status-move-item .stat-dot { flex-shrink: 0; }
.action-btn.move:hover    { background: var(--b-prog-bg); color: var(--b-prog-fg); border-color: var(--b-prog-bd); }
.action-btn.prio:hover    { background: var(--b-crit-bg); color: var(--b-crit-fg); border-color: var(--b-crit-bd); }
.action-btn.approve:hover { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.action-btn.deny:hover    { background: var(--b-crit-bg); color: var(--b-crit-fg); border-color: var(--b-crit-bd); }
.dot-pending { background: #f59e0b; }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ══ BUG CARD BODY — CLICK HINT ══════════════════════════════ */
.bug-card-body { cursor: pointer; }
.bug-card-body:hover .bug-description-preview { color: var(--text); }

/* ══ VISIBILITY TOGGLES ══════════════════════════════════════ */
.customise-section-divider {
  height: 1px; background: var(--border-light); margin: 12px 0;
}
.vis-list { display: flex; flex-direction: column; gap: 2px; }
.vis-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 2px; cursor: pointer; border-radius: var(--radius-sm);
  transition: background 0.1s;
}
.vis-row:hover { background: var(--bg-section); }
.vis-label { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }
.vis-toggle {
  appearance: none; -webkit-appearance: none;
  width: 34px; height: 20px; background: var(--border);
  border-radius: 10px; position: relative; cursor: pointer; flex-shrink: 0;
  transition: background 0.2s;
}
.vis-toggle::after {
  content: ''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.vis-toggle:checked { background: var(--accent); }
.vis-toggle:checked::after { transform: translateX(14px); }

/* ══ PLACEHOLDER PANES ═══════════════════════════════════════ */
.placeholder-pane-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 380px; padding: 60px 24px; text-align: center;
  animation: fadeIn 0.3s ease;
}
.placeholder-pane-icon {
  width: 72px; height: 72px; margin-bottom: 22px;
  opacity: 0.14; color: var(--text-muted);
}
.placeholder-pane-icon svg { width: 100%; height: 100%; }
.placeholder-pane-title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  margin-bottom: 9px; color: var(--text);
}
.placeholder-pane-desc {
  font-size: 0.92rem; color: var(--text-muted); font-style: italic;
  max-width: 380px; line-height: 1.65;
}
.placeholder-pane-badge {
  display: inline-block; margin-top: 18px; padding: 5px 14px;
  border-radius: 20px; background: var(--bg-section); border: 1px solid var(--border);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-light);
}

/* ══ CUSTOMISE PANEL — wider for visibility section ══════════ */
.customise-panel { min-width: 230px; }

/* ══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-title { font-size: 1.5rem; }
}
@media (max-width: 860px) {
  .metric-row { grid-template-columns: repeat(3,1fr); }
  .dashboard-charts { grid-template-columns: 1fr 1fr; }
  .dash-card-feed { grid-column: 1/-1; }
  .dash-extra-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .metric-row { grid-template-columns: repeat(2,1fr); }
  .dashboard-charts { grid-template-columns: 1fr; }
  .stat-label { display: none; }
  .controls-bar { flex-wrap: wrap; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .bug-card { grid-template-columns: 4px 1fr; }
  .bug-card-actions { grid-column: 1/-1; flex-direction: row; border-left: none; border-top: 1px solid var(--border-light); justify-content: flex-end; }
  .header-center { display: none; }
  .user-name-sm { display: none; }
  .stats-bar { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .stats-bar::-webkit-scrollbar { display: none; }
  .customise-panel { right: -60px; }
  .proof-screenshot-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media (max-width: 480px) {
  .header-inner { padding: 0 14px; gap: 10px; }
  .pane-inner { padding: 16px 14px 60px; }
  .metric-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-value { font-size: 1.5rem; }
  .detail-body { padding: 20px 14px 60px; }
  .detail-title { font-size: 1.3rem; }
  .detail-hero-meta { gap: 5px; padding: 8px 10px; }
  .modal { border-radius: var(--radius) var(--radius) 0 0; max-height: 96vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .tab-btn { padding: 0 13px; font-size: 0.82rem; }
  .btn-primary { padding: 7px 13px; }
}

/* ══ TAB BADGE — TASKS ═══════════════════════════════════════ */
.tab-badge-tasks { background: var(--accent); color: #fff; }

/* ══ TASKS PANE ═══════════════════════════════════════════════ */
.tasks-pane { padding: 0; display: flex; flex-direction: column; }

.task-controls-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px 10px; flex-shrink: 0;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}
.task-controls-bar .search-wrap { flex: 1; max-width: 300px; }

.task-filter-mine {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: 0.82rem; cursor: pointer;
  transition: all .15s;
}
.task-filter-mine svg { width: 14px; height: 14px; flex-shrink: 0; }
.task-filter-mine:hover { border-color: var(--accent); color: var(--accent); }
.task-filter-mine.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.task-view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.task-view-btn {
  padding: 5px 9px; background: transparent; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  transition: background .12s, color .12s;
}
.task-view-btn svg { width: 15px; height: 15px; }
.task-view-btn:hover { background: var(--bg-section); color: var(--text); }
.task-view-btn.active { background: var(--accent); color: #fff; }
.task-view-btn + .task-view-btn { border-left: 1px solid var(--border); }

.task-new-btn { flex-shrink: 0; margin-left: auto; }

/* ══ TASK BOARD ════════════════════════════════════════════════ */
.task-board {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; padding: 18px 22px 48px;
  align-items: start;
}

/* ══ TASK COLUMNS ══════════════════════════════════════════════ */
@keyframes colSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.task-column {
  background: var(--bg-section);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  min-height: 220px;
  animation: colSlideIn .3s cubic-bezier(.34,1.2,.64,1) both;
  transition: box-shadow .2s;
}
.task-column:nth-child(1) { animation-delay: 0ms; }
.task-column:nth-child(2) { animation-delay: 60ms; }
.task-column:nth-child(3) { animation-delay: 120ms; }

.col-todo     { border-top: 3px solid #6366f1; }
.col-progress { border-top: 3px solid #f59e0b; }
.col-done     { border-top: 3px solid #22c55e; }

.task-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px 9px; flex-shrink: 0;
  border-bottom: 1px solid var(--border-light);
}
.task-col-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); flex: 1;
}
.col-todo     .task-col-label { color: #6366f1; }
.col-progress .task-col-label { color: #f59e0b; }
.col-done     .task-col-label { color: #22c55e; }

.task-col-count {
  font-size: 0.7rem; font-weight: 700; min-width: 20px;
  text-align: center; border-radius: 10px; padding: 1px 7px;
}
.col-todo     .task-col-count { background: #6366f115; color: #6366f1; border: 1px solid #6366f130; }
.col-progress .task-col-count { background: #f59e0b15; color: #f59e0b; border: 1px solid #f59e0b30; }
.col-done     .task-col-count { background: #22c55e15; color: #22c55e; border: 1px solid #22c55e30; }

.task-col-add {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  cursor: pointer; color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s, color .12s, transform .12s;
  flex-shrink: 0;
}
.task-col-add svg { width: 12px; height: 12px; }
.task-col-add:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: scale(1.1);
}

.task-col-body {
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
  flex: 1; transition: background .18s;
}
.task-col-body.drag-over {
  background: var(--accent-glow);
  border-radius: 0 0 8px 8px;
  animation: dragPulse 1s ease infinite;
}
@keyframes dragPulse {
  0%, 100% { background: var(--accent-glow); }
  50% { background: color-mix(in srgb, var(--accent) 12%, transparent); }
}

.task-col-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 10px; color: var(--text-light); font-size: 0.8rem;
  opacity: 0.7;
}
.task-col-empty-add {
  font-size: 0.78rem; color: var(--accent); background: none;
  border: 1px dashed var(--accent); cursor: pointer; padding: 4px 14px;
  border-radius: var(--radius-sm); transition: background .12s;
}
.task-col-empty-add:hover { background: var(--accent-glow); }

/* ══ TASK CARDS ════════════════════════════════════════════════ */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes cardDone {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--prio-color, transparent);
  border-radius: 7px;
  padding: 12px 12px 9px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s cubic-bezier(.34,1.4,.64,1), box-shadow .18s, border-color .18s;
  animation: cardIn .28s cubic-bezier(.34,1.1,.64,1) both;
  animation-delay: var(--ci, 0ms);
  position: relative; overflow: hidden;
}
.task-card[data-prio="critical"] { --prio-color: #dc2626; }
.task-card[data-prio="high"]     { --prio-color: #f97316; }
.task-card[data-prio="medium"]   { --prio-color: #eab308; }
.task-card[data-prio="low"]      { --prio-color: #22c55e; }
.task-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.14), 0 0 0 1px var(--accent);
  border-color: var(--accent);
  border-left-color: var(--prio-color, var(--accent));
}
.task-card:hover::before { opacity: 1; }
.task-card.is-done { opacity: 0.55; }
.task-card.is-done:hover { transform: translateY(-1px); }
.task-card.dragging {
  opacity: 0.25; transform: rotate(2deg) scale(1.04);
  box-shadow: var(--shadow-lg);
}
.task-card.completing { animation: cardDone .25s ease; }

.task-card-title {
  font-size: 0.88rem; font-weight: 500;
  color: var(--text); line-height: 1.5;
  word-break: break-word;
  position: relative;
}
.task-card-title::after {
  content: ''; position: absolute;
  left: 0; right: 100%; top: 50%;
  height: 1.5px; background: var(--text-muted);
  transition: right .3s ease;
}
.task-card.is-done .task-card-title { color: var(--text-muted); }
.task-card.is-done .task-card-title::after { right: 0; }

.task-card-preview {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 2.9em;
  /* preserve inline font/color styles from editor */
}
.task-card-preview * { font-size: inherit !important; line-height: inherit !important; }
.task-card.is-done .task-card-preview { opacity: 0.6; }

.task-card-labels {
  display: flex; flex-wrap: wrap; gap: 4px;
}

.task-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding-top: 8px;
  border-top: 1px solid var(--border-light);
}
.task-card-foot-l {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.task-card-foot-r {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0; margin-left: auto;
}

.task-check {
  width: 16px; height: 16px; border: none; background: none;
  cursor: pointer; padding: 0; color: var(--text-light); flex-shrink: 0;
  transition: color .15s, transform .15s;
  display: flex; align-items: center; justify-content: center;
}
.task-check svg { width: 16px; height: 16px; display: block; }
.task-check:hover { color: var(--accent); transform: scale(1.2); }
.task-card.is-done .task-check { color: #22c55e; }

.task-prio-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.prio-critical { background: #dc2626; box-shadow: 0 0 4px #dc262670; }
.prio-high     { background: #f97316; box-shadow: 0 0 4px #f9731660; }
.prio-medium   { background: #eab308; }
.prio-low      { background: #22c55e; }

.task-due {
  font-size: 0.7rem; padding: 1px 6px; border-radius: 8px;
  background: var(--bg-section); color: var(--text-muted);
  border: 1px solid var(--border-light);
}
.task-due.overdue { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.task-due.today   { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.task-due.soon    { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }

.task-asgn {
  font-size: 0.65rem; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.task-lchip {
  font-size: 0.68rem; padding: 1px 6px; border-radius: 8px;
  border: 1px solid transparent; font-weight: 500;
}

/* ══ QUICK ADD ═════════════════════════════════════════════════ */
@keyframes qaSlideIn {
  from { opacity: 0; transform: translateY(-6px) scaleY(0.9); }
  to   { opacity: 1; transform: none; }
}
.task-qa-wrap {
  background: var(--bg-card);
  border: 1.5px solid var(--accent); border-radius: 7px; padding: 9px 10px;
  animation: qaSlideIn .18s cubic-bezier(.34,1.2,.64,1) both;
  box-shadow: 0 4px 16px rgba(0,0,0,.1), 0 0 0 3px var(--accent-glow);
}
.task-qa-input {
  width: 100%; border: none; background: transparent;
  font-size: 0.85rem; color: var(--text); outline: none;
  padding: 2px 0 7px;
}
.task-qa-row { display: flex; gap: 6px; margin-top: 2px; }
.task-qa-btn {
  font-size: 0.76rem; padding: 4px 13px; border-radius: 6px;
  border: 1px solid var(--border); cursor: pointer; transition: all .12s;
}
.task-qa-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.task-qa-btn.primary:hover { background: var(--accent-h); transform: scale(1.03); }
.task-qa-btn.cancel  { background: transparent; color: var(--text-muted); }
.task-qa-btn.cancel:hover { background: var(--bg-section); }

/* ══ TASK LIST VIEW ═══════════════════════════════════════════ */
.task-list-view { padding: 12px 20px 40px; }
.task-list-section { margin-bottom: 20px; }
.task-list-sec-header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0 8px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted);
  border-bottom: 1px solid var(--border-light); margin-bottom: 4px;
}
.col-todo-header     .task-col-count { color: #6366f1; }
.col-progress-header .task-col-count { color: #f59e0b; }
.col-done-header     .task-col-count { color: #22c55e; }

.task-list-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .1s;
}
.task-list-row:hover { background: var(--bg-section); }
.task-list-row.is-done .task-list-title { text-decoration: line-through; color: var(--text-muted); }
.task-check-sm svg { width: 16px; height: 16px; }

.task-list-title { flex: 1; font-size: 0.87rem; color: var(--text); }
.task-list-meta  { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.task-empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 60px 20px;
  color: var(--text-muted); text-align: center;
}
.task-empty-state p { font-size: 0.9rem; color: var(--text-light); }

/* ══ TASK PANEL BACKDROP ══════════════════════════════════════ */
.task-panel-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  z-index: 300; backdrop-filter: blur(2px);
  animation: fadeIn .18s ease;
}

/* ══ TASK SIDE PANEL ══════════════════════════════════════════ */
.task-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(540px, 100vw);
  background: var(--bg-card); z-index: 310;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  box-shadow: -8px 0 48px rgba(0,0,0,.22), -1px 0 0 var(--border);
}
.task-panel.open { transform: translateX(0); }

.task-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.task-panel-close {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.task-panel-close svg { width: 15px; height: 15px; }
.task-panel-close:hover { background: var(--bg-section); color: var(--text); }

.task-panel-num {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--text-light); background: var(--bg-section);
  padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border-light);
}

.task-panel-hactions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.task-panel-saved {
  font-size: 0.75rem; color: #22c55e; opacity: 0;
  transition: opacity .2s; pointer-events: none;
}
.task-panel-saved.visible { opacity: 1; }

.task-panel-delete {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  font-size: 0.78rem; color: var(--text-muted); cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.task-panel-delete svg { width: 13px; height: 13px; }
.task-panel-delete:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

.task-panel-body {
  flex: 1; overflow-y: auto; padding: 0 20px 20px;
  display: flex; flex-direction: column; gap: 0;
}

.task-panel-title {
  font-size: 1.25rem; font-weight: 700; color: var(--text);
  line-height: 1.3; padding: 18px 0 12px;
  outline: none; min-height: 2.5rem;
  border-bottom: 1px solid var(--border-light);
}
.task-panel-title:empty::before { content: attr(data-placeholder); color: var(--text-light); font-weight: 400; }
.task-panel-title:focus { border-bottom-color: var(--accent); }

/* ══ TASK PROPERTIES ══════════════════════════════════════════ */
.task-panel-props {
  display: flex; flex-direction: column; gap: 0;
  padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.task-prop-row {
  display: flex; align-items: center; gap: 12px;
  padding: 5px 0; min-height: 32px;
}
.task-prop-row-labels { align-items: flex-start; padding: 6px 0; }
.task-prop-key {
  font-size: 0.78rem; color: var(--text-light); font-weight: 500;
  width: 72px; flex-shrink: 0;
}
.task-prop-val { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; flex: 1; }
.task-labels-wrap { gap: 5px; }

.task-prop-input {
  font-size: 0.82rem; color: var(--text);
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 3px 7px;
  outline: none; transition: border-color .12s, background .12s;
  min-width: 0; width: 100%;
}
.task-prop-input:hover { border-color: var(--border); background: var(--bg-section); }
.task-prop-input:focus { border-color: var(--accent); background: var(--bg-input); }
.task-date-input { cursor: pointer; }

/* ══ SEGMENTED BUTTONS ════════════════════════════════════════ */
.panel-seg-btn {
  font-size: 0.76rem; padding: 3px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: all .12s;
}
.panel-seg-btn:hover { border-color: var(--text-muted); color: var(--text); }
.panel-seg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.prio-seg-low.active    { background: #22c55e; border-color: #22c55e; color: #fff; }
.prio-seg-medium.active { background: #eab308; border-color: #eab308; color: #fff; }
.prio-seg-high.active   { background: #f97316; border-color: #f97316; color: #fff; }
.prio-seg-critical.active { background: #dc2626; border-color: #dc2626; color: #fff; }

/* ══ LABEL BUTTONS ════════════════════════════════════════════ */
.panel-label-btn {
  font-size: 0.73rem; padding: 2px 9px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all .12s;
  font-weight: 500;
}
.panel-label-btn:hover { border-color: var(--text-muted); color: var(--text); }
.panel-label-btn.active { font-weight: 600; }

/* ══ TASK EDITOR ══════════════════════════════════════════════ */
.task-editor-section {
  border: 1px solid var(--border-light); border-radius: 8px;
  overflow: hidden; margin-top: 20px; flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.task-editor-section:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.task-editor-header {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-light);
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-light);
  cursor: default; user-select: none;
  transition: color .2s, background .2s;
}
.task-editor-header svg { width: 11px; height: 11px; flex-shrink: 0; }
.task-editor-section:focus-within .task-editor-header {
  color: var(--accent); background: var(--accent-glow);
  border-bottom-color: var(--accent);
}

@keyframes toolbarFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.editor-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  padding: 5px 7px; background: var(--bg-section);
  border-bottom: 1px solid var(--border-light);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .22s ease, opacity .18s ease;
}
.task-editor-section:focus-within .editor-toolbar {
  max-height: 44px; opacity: 1;
  animation: toolbarFadeIn .2s ease both;
}
.editor-sep {
  width: 1px; height: 16px; background: var(--border);
  margin: 0 3px; flex-shrink: 0;
}
.editor-tool-btn {
  min-width: 26px; height: 26px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent;
  cursor: pointer; font-size: 0.8rem; color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; transition: background .1s, color .1s, border-color .1s;
}
.editor-tool-btn svg { width: 13px; height: 13px; }
.editor-tool-btn:hover { background: var(--bg-card); border-color: var(--border); color: var(--text); }
.editor-tool-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

.editor-body {
  padding: 14px 16px; min-height: 120px; outline: none;
  font-size: 0.88rem; line-height: 1.65; color: var(--text);
  background: var(--bg-card); caret-color: var(--accent);
  transition: background .2s;
}
.task-editor-section:focus-within .editor-body { background: var(--bg-input); }
.editor-body:empty::before { content: attr(data-placeholder); color: var(--text-light); pointer-events: none; }
.editor-body h2 { font-size: 1.05rem; font-weight: 700; margin: 12px 0 6px; color: var(--text); }
.editor-body h3 { font-size: 0.95rem; font-weight: 600; margin: 10px 0 5px; color: var(--text); }
.editor-body p  { margin: 0 0 4px; }
.editor-body ul, .editor-body ol { padding-left: 20px; margin: 4px 0 8px; }
.editor-body li { margin: 2px 0; }
.editor-body code.ic {
  font-family: var(--font-mono); font-size: 0.82em;
  background: var(--bg-section); color: var(--accent);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 5px;
}
.editor-body a { color: var(--accent); text-decoration: underline; }

.task-panel-footer {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 0 0; font-size: 0.73rem; color: var(--text-light);
  border-top: 1px solid var(--border-light); margin-top: auto;
}

/* ══ TODO PANE (pane-todo — legacy board) ════════════════════ */
.todo-pane { padding: 0; display: flex; flex-direction: column; height: calc(100vh - var(--sticky-h, 140px)); overflow: hidden; }
.todo-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 10px; flex-shrink: 0; border-bottom: 1px solid var(--border-light); }
.todo-header-left { display: flex; align-items: center; gap: 10px; }
.todo-heading { font-size: 1.1rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.todo-heading svg { width: 18px; height: 18px; color: var(--accent); }
.todo-count-badge { font-size: 0.72rem; font-weight: 700; background: var(--accent); color: #fff; border-radius: 10px; padding: 2px 8px; }
.todo-header-right { display: flex; align-items: center; gap: 8px; }
.todo-view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.todo-view-btn { padding: 5px 9px; background: transparent; border: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; transition: background .12s, color .12s; }
.todo-view-btn svg { width: 15px; height: 15px; }
.todo-view-btn:hover { background: var(--bg-section); color: var(--text); }
.todo-view-btn.active { background: var(--accent); color: #fff; }
.todo-view-btn + .todo-view-btn { border-left: 1px solid var(--border); }
.todo-new-btn { flex-shrink: 0; }

.todo-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 20px; border-bottom: 1px solid var(--border-light); flex-shrink: 0; }
.todo-filter { font-size: 0.78rem; padding: 3px 11px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; transition: all .12s; }
.todo-filter:hover { border-color: var(--accent); color: var(--accent); }
.todo-filter.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.todo-filter-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }

.todo-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 16px 20px; flex: 1; overflow-y: auto; align-items: start; }
.todo-col { background: var(--bg-section); border-radius: var(--radius); border: 1px solid var(--border-light); display: flex; flex-direction: column; min-height: 200px; }
.todo-col[data-col="todo"]        { border-top: 3px solid #6366f1; }
.todo-col[data-col="in-progress"] { border-top: 3px solid #f59e0b; }
.todo-col[data-col="done"]        { border-top: 3px solid #22c55e; }

.todo-col-header { display: flex; align-items: center; gap: 7px; padding: 10px 12px 8px; border-bottom: 1px solid var(--border-light); }
.todo-col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.todo-col-dot.dot-todo        { background: #6366f1; }
.todo-col-dot.dot-in-progress { background: #f59e0b; }
.todo-col-dot.dot-done        { background: #22c55e; }
.todo-col-title { flex: 1; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.todo-col-count { font-size: 0.72rem; font-weight: 700; background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); border-radius: 10px; padding: 1px 7px; }
.todo-col-add { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: transparent; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: all .12s; flex-shrink: 0; }
.todo-col-add svg { width: 12px; height: 12px; }
.todo-col-add:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.todo-card-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.todo-list-view { padding: 16px 20px; overflow-y: auto; flex: 1; }
.todo-list-inner { display: flex; flex-direction: column; gap: 4px; }

/* ══ TODO TASK MODAL ══════════════════════════════════════════ */
.todo-modal { max-width: 640px; }
.todo-editor-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.todo-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 5px 8px; background: var(--bg-section); border-bottom: 1px solid var(--border-light); }
.todo-tb-btn { min-width: 28px; height: 26px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 0.82rem; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; transition: background .1s, color .1s; }
.todo-tb-btn svg { width: 14px; height: 14px; }
.todo-tb-btn:hover { background: var(--bg-card); color: var(--text); }
.todo-tb-btn.active { background: var(--accent-glow); color: var(--accent); }
.todo-tb-sep { width: 1px; height: 16px; background: var(--border); margin: 0 3px; flex-shrink: 0; }
.todo-tb-font, .todo-tb-size { font-size: 0.78rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text); padding: 2px 4px; cursor: pointer; }
.todo-tb-color { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; cursor: pointer; background: none; }
.todo-editor {
  padding: 12px 14px; min-height: 120px; max-height: 260px;
  overflow-y: auto; outline: none; font-size: 0.88rem; line-height: 1.65; color: var(--text); caret-color: var(--accent);
}
.todo-editor:empty::before { content: attr(data-placeholder); color: var(--text-light); pointer-events: none; }

.todo-assign-field { display: flex; align-items: center; gap: 6px; }
.todo-assign-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.todo-tags-input { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 5px 8px; background: var(--bg-input); cursor: text; min-height: 36px; }
.todo-tags-list { display: flex; flex-wrap: wrap; gap: 4px; }
.todo-tag-chip { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent); border-radius: 10px; padding: 1px 8px; }
.todo-tag-chip button { background: none; border: none; cursor: pointer; color: inherit; padding: 0; font-size: 0.8rem; line-height: 1; }
.todo-tag-entry { border: none; background: transparent; outline: none; font-size: 0.82rem; color: var(--text); min-width: 80px; flex: 1; }

.todo-checklist { display: flex; flex-direction: column; gap: 5px; }
.todo-check-item { display: flex; align-items: center; gap: 8px; }
.todo-check-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); flex-shrink: 0; }
.todo-check-input { flex: 1; border: none; border-bottom: 1px solid transparent; background: transparent; font-size: 0.85rem; color: var(--text); outline: none; padding: 2px 0; transition: border-color .12s; }
.todo-check-input:focus { border-bottom-color: var(--accent); }
.todo-check-item.checked .todo-check-input { text-decoration: line-through; color: var(--text-muted); }
.todo-check-remove { background: none; border: none; cursor: pointer; color: var(--text-light); padding: 2px; border-radius: 3px; font-size: 0.8rem; }
.todo-check-remove:hover { color: #dc2626; background: #fee2e2; }
.checklist-progress-wrap { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.checklist-progress-bar { flex: 1; height: 4px; background: var(--bar-track-bg); border-radius: 2px; overflow: hidden; }
.checklist-progress-bar::after { content: ''; display: block; height: 100%; background: #22c55e; width: var(--prog, 0%); transition: width .3s; }
.checklist-progress-label { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }

/* ══ DETAIL PAGE — HERO META ══════════════════════════════════ */
.detail-hero-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 16px; background: var(--bg-section);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem; color: var(--text-muted);
}
.meta-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  color: var(--text-muted); font-size: 0.78rem;
}
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }

.detail-bug-tag {
  display: inline-flex; align-items: center;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  background: var(--accent-glow); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px;
  padding: 2px 9px;
}

.status-current-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.8rem; font-weight: 600; padding: 4px 12px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
}

.section-header-count {
  font-size: 0.72rem; color: var(--text-light);
  background: var(--bg-section); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 1px 7px; margin-left: 4px;
}

/* ══ PROOF SCREENSHOT GRID ═══════════════════════════════════ */
.proof-screenshot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px; margin-bottom: 10px;
}
.proof-screenshot-grid.single { grid-template-columns: minmax(0, 340px); }
.proof-screenshot-item {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
  transition: box-shadow .12s;
}
.proof-screenshot-item:hover { box-shadow: var(--shadow-sm); }
.proof-grid-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.proof-screenshot-caption {
  padding: 4px 8px; font-size: 0.72rem; color: var(--text-muted);
  background: var(--bg-section); border-top: 1px solid var(--border-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ══ RESPONSIVE — TASKS ═══════════════════════════════════════ */
@media (max-width: 960px) {
  .task-board { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .task-board { grid-template-columns: 1fr; padding: 10px 12px 40px; gap: 10px; }
  .task-controls-bar { padding: 8px 12px; gap: 6px; }
  .task-filter-mine span { display: none; }
  .task-panel { width: 100vw; }
}

/* ══ PROFILE PANE ════════════════════════════════════════════ */
.profile-pane {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Hero Card ──────────────────────────────────────────────── */
.profile-hero-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: phSlideIn .55s cubic-bezier(.22,1,.36,1) both;
}
@keyframes phSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ph-glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
}
.ph-glow-1 { width: 360px; height: 360px; top: -120px; right: -80px; opacity: .55; }
.ph-glow-2 { width: 240px; height: 240px; bottom: -60px; left: 30px; opacity: .3; }

.ph-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 36px 36px 30px;
}

/* ── Avatar ─────────────────────────────────────────────────── */
.ph-avatar-wrap { position: relative; flex-shrink: 0; }

.ph-avatar-ring {
  width: 100px; height: 100px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--r1, #6366f1), var(--r2, #8b5cf6));
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 4px 24px color-mix(in srgb, var(--r1, #6366f1) 40%, transparent);
  transition: box-shadow .3s;
}
.ph-avatar-ring:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 6px 32px color-mix(in srgb, var(--r1, #6366f1) 60%, transparent);
}

.ph-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 3px solid var(--bg-card);
}
.ph-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ph-avatar-initials {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: rgba(255,255,255,.92);
  font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em;
}

.ph-online-dot {
  position: absolute; bottom: 5px; right: 5px;
  width: 15px; height: 15px; border-radius: 50%;
  background: #22c55e;
  border: 2.5px solid var(--bg-card);
  box-shadow: 0 0 10px rgba(34,197,94,.55);
  animation: onlinePulse 2.8s ease-in-out infinite;
}
@keyframes onlinePulse {
  0%,100% { box-shadow: 0 0 10px rgba(34,197,94,.55); }
  50%      { box-shadow: 0 0 18px rgba(34,197,94,.85); }
}

/* ── Info ───────────────────────────────────────────────────── */
.ph-info { flex: 1; min-width: 0; padding-top: 4px; }

.ph-name-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.ph-name {
  font-size: 1.7rem; font-weight: 800;
  color: var(--text); letter-spacing: -0.035em; line-height: 1.1;
}

.ph-role-badge {
  display: inline-flex; align-items: center;
  padding: 4px 13px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,.95);
  border: none; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  transition: transform .15s, box-shadow .15s;
  user-select: none;
}
.ph-role-badge:hover { transform: scale(1.06); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.ph-role-badge:active { transform: scale(.97); }

.ph-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 9px;
  padding: 5px 10px;
  background: var(--bg-section);
  border-radius: 8px;
  width: fit-content;
  border: 1px solid var(--border-light);
}
.ph-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  animation: statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .5; }
}

.ph-bio { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }
.ph-bio-empty { font-style: italic; color: var(--text-light); }

.ph-meta { display: flex; flex-wrap: wrap; gap: 14px; }
.ph-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: var(--text-light);
}
.ph-meta-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Action Buttons ─────────────────────────────────────────── */
.ph-actions {
  display: flex; flex-direction: column; gap: 9px; flex-shrink: 0;
  padding-top: 4px;
}
.ph-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 9px;
  font-size: 0.83rem; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer; color: var(--text-muted);
  transition: all .15s; white-space: nowrap;
}
.ph-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.ph-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* ── Stats Section ─────────────────────────────────────────── */
.profile-stats-section { animation: phSlideIn .55s .1s cubic-bezier(.22,1,.36,1) both; }

.profile-stats-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 14px;
}
.profile-stats-title svg { width: 15px; height: 15px; }

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ps-loading {
  grid-column: 1 / -1;
  display: flex; justify-content: center; padding: 48px;
}
.ps-error {
  grid-column: 1 / -1;
  text-align: center; padding: 28px;
  color: var(--text-muted); font-style: italic; font-size: 0.85rem;
}

.ps-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 18px 16px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: psCardIn .45s calc(var(--si,0) * 55ms) cubic-bezier(.22,1,.36,1) both;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: default;
}
@keyframes psCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ps-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--sc, var(--accent));
  border-radius: 14px 14px 0 0;
}
.ps-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 90% 0%, color-mix(in srgb, var(--sc, var(--accent)) 10%, transparent), transparent 55%);
  pointer-events: none;
  border-radius: 14px;
}

.ps-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.13), 0 0 0 1px var(--sc, var(--accent));
  border-color: transparent;
}

.ps-card-icon { width: 22px; height: 22px; margin-bottom: 8px; flex-shrink: 0; }
.ps-card-icon svg { width: 22px; height: 22px; display: block; }
.ps-card-val {
  font-size: 2.1rem; font-weight: 800;
  line-height: 1; letter-spacing: -0.05em;
  margin-bottom: 3px;
}
.ps-card-label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.ps-card-sub   { font-size: 0.72rem; color: var(--text-light); }

/* ── Responsive Profile ─────────────────────────────────────── */
@media (max-width: 860px) {
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .ph-inner { flex-wrap: wrap; padding: 24px 20px; }
  .ph-actions { flex-direction: row; width: 100%; }
  .ph-name { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .profile-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ph-avatar-ring { width: 78px; height: 78px; }
  .ph-avatar-initials { font-size: 1.2rem; }
}

/* ══ BUG VIEW MODE TOGGLE ════════════════════════════════════ */
.view-mode-wrap {
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  flex-shrink: 0;
}
.view-mode-btn {
  width: 34px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  border-right: 1px solid var(--border);
  cursor: pointer; color: var(--text-muted);
  transition: background .12s, color .12s;
}
.view-mode-btn:last-child { border-right: none; }
.view-mode-btn svg { width: 14px; height: 14px; }
.view-mode-btn:hover { background: var(--bg-section); color: var(--text); }
.view-mode-btn.active { background: var(--accent); color: #fff; }

/* ══ COMPACT VIEW ════════════════════════════════════════════ */
.bug-list.view-compact { display: flex; flex-direction: column; gap: 2px; }

.bug-crow {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  padding: 0 10px 0 0;
  min-height: 44px;
  animation: cardEnter .3s cubic-bezier(.16,1,.3,1) both;
  animation-delay: var(--i, 0ms);
  transition: background .12s, box-shadow .15s, border-color .15s;
}
.bug-crow:hover { box-shadow: var(--shadow-sm); border-color: var(--text-light); background: var(--bg-section); }
.bug-crow.just-added { animation: cardEnter .4s cubic-bezier(.16,1,.3,1), pulseBorder .8s ease .35s; }

.bug-crow-stripe {
  width: 4px; align-self: stretch; flex-shrink: 0;
}
.bug-crow-stripe.critical { background: var(--p-critical); }
.bug-crow-stripe.high     { background: var(--p-high); }
.bug-crow-stripe.medium   { background: var(--p-medium); }
.bug-crow-stripe.low      { background: var(--p-low); }

.bug-crow-num {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--text-light); flex-shrink: 0; min-width: 38px; padding-left: 10px;
}
.bug-crow-title {
  font-size: 0.88rem; font-weight: 500; color: var(--text);
  text-decoration: none; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.bug-crow-title:hover { color: var(--accent); }
.bug-crow-badges { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bug-crow-meta {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; margin-left: 4px;
}
.bug-crow-reporter { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.bug-crow-time { font-size: 0.71rem; color: var(--text-light); white-space: nowrap; }

.bug-crow .bug-card-actions {
  flex-direction: row; padding: 0; border-left: none; gap: 2px;
  flex-shrink: 0; margin-left: 2px;
}

/* ══ GRID VIEW ═══════════════════════════════════════════════ */
.bug-list.view-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bug-gcell {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  animation: cardEnter .35s cubic-bezier(.16,1,.3,1) both;
  animation-delay: var(--i, 0ms);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.bug-gcell:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); }
.bug-gcell.just-added { animation: cardEnter .4s cubic-bezier(.16,1,.3,1), pulseBorder .8s ease .35s; }

.bug-gcell-stripe { height: 4px; width: 100%; flex-shrink: 0; }
.bug-gcell-stripe.critical { background: var(--p-critical); }
.bug-gcell-stripe.high     { background: var(--p-high); }
.bug-gcell-stripe.medium   { background: var(--p-medium); }
.bug-gcell-stripe.low      { background: var(--p-low); }

.bug-gcell-body {
  padding: 12px 14px 10px; flex: 1; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.bug-gcell-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.bug-gcell-title {
  font-size: 0.92rem; font-weight: 600; color: var(--text);
  text-decoration: none; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bug-gcell-title:hover { color: var(--accent); }
.bug-gcell-desc {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.bug-gcell-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-light);
}
.bug-gcell-meta { display: flex; align-items: center; gap: 5px; }
.bug-gcell-time { font-size: 0.71rem; color: var(--text-light); }

.bug-gcell .bug-card-actions {
  flex-direction: row; padding: 7px 10px; border-left: none;
  border-top: 1px solid var(--border-light); gap: 4px;
  justify-content: flex-end;
}

/* ══ TABLE VIEW ══════════════════════════════════════════════ */
--bug-tcols: 50px 1fr 90px 92px 140px 128px 82px 148px;

.bug-table-head {
  display: grid;
  grid-template-columns: 50px 1fr 90px 92px 140px 128px 82px 148px;
  align-items: center;
  padding: 8px 12px 8px 16px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 2px solid var(--border);
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-light);
  animation: slideUp .3s ease .05s both;
}

.bug-list.view-table {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: none; overflow: hidden;
}

.bug-trow {
  display: grid;
  grid-template-columns: 50px 1fr 90px 92px 140px 128px 82px 148px;
  align-items: center;
  padding: 9px 12px 9px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  animation: cardEnter .28s cubic-bezier(.16,1,.3,1) both;
  animation-delay: var(--i, 0ms);
  transition: background .1s;
}
.bug-trow:last-child { border-bottom: none; }
.bug-trow:hover { background: var(--bg-section); }
.bug-trow.just-added { animation: cardEnter .4s cubic-bezier(.16,1,.3,1), pulseBorder .8s ease .35s; }

.btr-num { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-light); }
.btr-title {
  font-size: 0.86rem; font-weight: 500; color: var(--text);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.btr-title:hover { color: var(--accent); }
.btr-priority, .btr-status { display: flex; align-items: center; }
.btr-reporter, .btr-assignee { display: flex; align-items: center; gap: 6px; overflow: hidden; min-width: 0; }
.btr-rname { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btr-date { font-size: 0.74rem; color: var(--text-light); }
.btr-empty { color: var(--text-light); font-size: 0.8rem; }

.bug-trow .bug-card-actions {
  flex-direction: row; padding: 0; border-left: none; gap: 2px;
}

/* ══ RESPONSIVE — BUG VIEWS ══════════════════════════════════ */
@media (max-width: 1100px) {
  .bug-list.view-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .bug-table-head { display: none !important; }
  .bug-list.view-table { border-radius: var(--radius); border-top: 1px solid var(--border); }
  .bug-trow { grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; gap: 4px; padding: 10px 10px 10px 14px; }
  .btr-num  { grid-row: 1; grid-column: 1; }
  .btr-title { grid-row: 1; grid-column: 2; }
  .btr-priority { grid-row: 2; grid-column: 1 / 3; gap: 6px; }
  .btr-status  { display: none; }
  .btr-reporter { grid-row: 2; grid-column: 2; }
  .btr-assignee, .btr-date { display: none; }
  .bug-trow .bug-card-actions { grid-row: 1 / 3; grid-column: 3; flex-direction: column; }
}
@media (max-width: 640px) {
  .bug-list.view-grid { grid-template-columns: 1fr; }
  .bug-crow-reporter, .bug-crow-time { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   SUGGESTION CARDS — REDESIGNED
══════════════════════════════════════════════════════════════ */
@keyframes sugCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sug-list { display: flex; flex-direction: column; gap: 8px; }
.sug-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }

.sug-card-new {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  animation: sugCardIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--ci, 0) * 38ms);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.sug-card-new::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #818cf8, #6366f1);
  border-radius: 10px 0 0 10px;
}
.sug-card-new:hover {
  box-shadow: 0 6px 24px rgba(99,102,241,0.15), 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: #818cf8;
}
.sug-card-new.sug-highlight {
  animation: sugCardIn 0.4s cubic-bezier(0.16,1,0.3,1), pulseBorder 0.8s ease 0.35s;
}
.sug-card-new.sug-compact { min-height: 0; }
.sug-card-new.sug-grid-card { grid-template-columns: 56px 1fr; border-radius: 12px; }

/* Vote column */
.sug-vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 6px;
  background: rgba(99,102,241,0.05);
  border-right: 1px solid rgba(99,102,241,0.12);
}
.sug-vote-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.svi-up svg   { color: #4ade80; }
.svi-down svg { color: #f87171; }
.sug-vote-num {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  color: var(--text-muted);
}
.svi-up   .sug-vote-num { color: #4ade80; }
.svi-down .sug-vote-num { color: #f87171; }
.sug-vdiv { width: 18px; height: 1px; background: rgba(99,102,241,0.15); }

/* Card body */
.sug-card-body-inner {
  padding: 12px 14px 12px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sug-card-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sug-title-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s;
}
.sug-card-new:hover .sug-title-text { color: #818cf8; }
.sug-top-badges { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.sug-desc-preview {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.sug-card-foot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.sug-card-foot-row .avatar { width: 18px; height: 18px; font-size: 0.55rem; background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.25); color: #818cf8; }

/* Right side (actions + chevron) */
.sug-card-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  gap: 6px;
}
.sug-card-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.sug-card-new:hover .sug-card-btns { opacity: 1; transform: translateX(0); }
.sug-chevron {
  color: var(--text-light);
  transition: transform 0.18s ease, color 0.18s ease;
}
.sug-card-new:hover .sug-chevron { transform: translateX(3px); color: #818cf8; }
.sug-grid-card .sug-card-right { display: none; }

/* Grid card stacks vote row on top */
.sug-grid-card .sug-vote-col {
  flex-direction: row;
  justify-content: flex-start;
  padding: 10px 14px;
  border-right: none;
  border-bottom: 1px solid rgba(99,102,241,0.12);
  grid-column: 1 / 3;
  gap: 14px;
}
.sug-grid-card .sug-vote-item { flex-direction: row; gap: 4px; }
.sug-grid-card .sug-vdiv { width: 1px; height: 16px; }
.sug-grid-card .sug-card-body-inner { grid-column: 1 / 3; }

/* ══════════════════════════════════════════════════════════════
   SUGGESTION DETAIL PANEL
══════════════════════════════════════════════════════════════ */
.sug-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sug-panel-backdrop.visible { opacity: 1; pointer-events: auto; }

@keyframes sugModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes sugModalOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.94) translateY(10px); }
}

.sug-detail-panel {
  position: relative;
  width: min(520px, 96vw);
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 301;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.92) translateY(18px);
  transition: opacity 0.28s cubic-bezier(0.16,1,0.3,1), transform 0.28s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.sug-detail-panel.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.sug-panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(99,102,241,0.04);
  flex-shrink: 0;
}
.sug-panel-header-left { display: flex; align-items: center; gap: 10px; }
.sug-panel-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-light);
  background: var(--bg-section);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}
.sug-panel-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-light);
  padding: 4px;
  border-radius: 6px;
  display: flex; align-items: center;
  transition: background 0.15s, color 0.15s;
}
.sug-panel-close:hover { background: var(--bg-section); color: var(--text); }

.sug-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sug-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}
.sug-panel-votes {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 8px;
  font-size: 0.88rem;
}
.spv-up   { color: #4ade80; font-weight: 600; }
.spv-down { color: #f87171; font-weight: 600; }
.spv-sep  { color: var(--text-light); }
.spv-none { color: var(--text-light); font-style: italic; }
.sug-panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.sug-panel-meta .avatar { width: 22px; height: 22px; font-size: 0.6rem; background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.25); color: #818cf8; }
.sug-panel-section { display: flex; flex-direction: column; gap: 8px; }
.sug-panel-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}
.sug-panel-desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  background: var(--bg-section);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 14px;
}
.sug-comment {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.sug-comment:last-child { border-bottom: none; }
.sug-comment-author { font-weight: 600; font-size: 0.84rem; color: var(--text); }
.sug-comment-time   { font-size: 0.75rem; color: var(--text-light); margin-left: 6px; }
.sug-comment-body   { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0 0; line-height: 1.5; }

.sug-panel-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--bg-card);
}

/* Compact card */
.sug-card-new.sug-compact { min-height: 0; }
.sug-card-new.sug-compact .sug-vote-col { padding: 8px 6px; gap: 3px; }
.sug-card-new.sug-compact .sug-card-body-inner { padding: 8px 12px; gap: 3px; }
.sug-card-new.sug-compact .sug-title-text { font-size: 0.88rem; }
.sug-card-new.sug-compact .sug-card-foot-row { margin-top: 1px; }

/* Stats bar accent for suggestions */
.sug-stats-bar .stat-item.active { background: rgba(99,102,241,0.12); }
.sug-stats-bar .stat-item.active::after { background: #6366f1; }
.sug-stats-bar .stat-item.active .stat-number { color: #818cf8; }
.sug-stats-bar .stat-item.active .stat-label  { color: #818cf8; }
.dot-approved { background: #22c55e; }
.badge-status-approved { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* ── Approved Suggestions Section ─────────────────────────── */
.approved-section { margin-bottom: 16px; border: 1px solid #86efac; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 6px rgba(34,197,94,0.08); }
.approved-section-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(34,197,94,0.06); cursor: pointer; user-select: none; transition: background 0.15s; }
.approved-section-header:hover { background: rgba(34,197,94,0.12); }
.approved-section-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; color: #15803d; }
.approved-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; animation: pulse-dot 2.4s ease-in-out infinite; }
.approved-section-toggle { background: rgba(34,197,94,0.1); border: 1px solid #86efac; border-radius: 20px; padding: 4px 13px; font-size: 0.78rem; cursor: pointer; color: #15803d; font-weight: 600; transition: background 0.15s; }
.approved-section-toggle:hover { background: rgba(34,197,94,0.22); }
.approved-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-card); overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease; }
.approved-list.is-open { max-height: 4000px; opacity: 1; }
.approved-card { display: flex; align-items: stretch; border: 1px solid var(--border-light); border-left: 3px solid #22c55e; border-radius: var(--radius-sm); background: var(--bg-section); overflow: hidden; transition: box-shadow 0.18s; }
.approved-card:hover { box-shadow: 0 3px 10px rgba(34,197,94,0.14); }
.approved-card-body { flex: 1; padding: 10px 14px; }
.approved-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.approved-card-title { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.approved-vote-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 0.72rem; color: var(--text-light); background: var(--bg); border: 1px solid var(--border-light); border-radius: 10px; padding: 1px 7px; margin-left: auto; }
.tab-badge-green { background: #22c55e !important; color: #fff !important; }

/* ── btn-success ──────────────────────────────────────────── */
.btn-success { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:var(--radius); font-family:var(--font); font-size:0.88rem; font-weight:600; cursor:pointer; transition:background 0.18s,transform 0.1s,box-shadow 0.18s; background:#22c55e; color:#fff; border:none; position:relative; overflow:hidden; }
.btn-success:hover { background:#16a34a; box-shadow: 0 3px 14px rgba(34,197,94,0.4); }
.btn-success:active { transform:scale(0.97); }
.btn-success::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
}
.btn-success:hover::after {
  left: 160%;
  transition: left 0.5s ease;
}

@media (max-width: 700px) {
  .sug-detail-panel { width: 96vw; max-height: 88vh; border-radius: 12px; }
  .sug-list-grid { grid-template-columns: 1fr; }
}

/* ══ AUTH OVERLAY ═════════════════════════════════════════════ */
/* ── Auth Overlay ─────────────────────────────────────────── */
@keyframes authIn {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes authPaneIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.auth-box {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px var(--border);
  padding: 36px 32px 28px;
  animation: authIn 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative; overflow: hidden;
}
.auth-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--accent) 60%, transparent 100%);
}
.auth-brand {
  text-align: center; margin-bottom: 28px;
}
.auth-brand-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 14px;
}
.auth-brand-name {
  font-size: 1.18rem; font-weight: 700; color: var(--text);
  margin: 0 0 5px; font-family: var(--font);
}
.auth-brand-sub {
  font-size: 0.78rem; color: var(--text-muted); margin: 0; font-family: var(--font);
}
.auth-tabs {
  display: flex; background: var(--bg-section);
  border-radius: var(--radius-sm); padding: 3px; gap: 2px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; padding: 8px 12px; font-size: 0.84rem; font-weight: 600;
  background: transparent; border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  color: var(--text-muted); cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  font-family: var(--font);
}
.auth-tab.active {
  background: var(--bg-card); color: var(--text);
  box-shadow: 0 1px 6px rgba(0,0,0,0.28);
}
.auth-pane { animation: authPaneIn 0.2s ease; }
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block; font-size: 0.71rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px; font-family: var(--font);
}
.auth-input-wrap {
  position: relative; display: flex; align-items: center;
}
.auth-field-icon {
  position: absolute; left: 11px; width: 15px; height: 15px;
  color: var(--text-muted); pointer-events: none; flex-shrink: 0;
  transition: color 0.15s;
}
.auth-input-wrap:focus-within .auth-field-icon { color: var(--accent); }
.auth-input-wrap input {
  width: 100%;
  background: var(--bg-section); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: 0.9rem;
  padding: 10px 38px 10px 36px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.auth-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.auth-input-wrap input::placeholder { color: var(--text-light); }
.auth-pwd-toggle {
  position: absolute; right: 9px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px 3px;
  display: flex; align-items: center;
  border-radius: 4px; transition: color 0.15s;
}
.auth-pwd-toggle:hover { color: var(--text); }
.auth-pwd-toggle svg { width: 15px; height: 15px; display: block; }
.auth-pwd-toggle .icon-eye-slash { display: none; }
.auth-pwd-toggle.shown .icon-eye-open  { display: none; }
.auth-pwd-toggle.shown .icon-eye-slash { display: block; }
.auth-error {
  font-size: 0.82rem; color: var(--b-crit-fg);
  background: var(--b-crit-bg); border: 1px solid var(--b-crit-bd);
  border-radius: var(--radius-sm); padding: 9px 12px;
  margin-bottom: 12px;
}
.auth-submit {
  width: 100%; height: 44px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  margin-top: 6px;
}
.auth-submit:hover  { opacity: 0.88; box-shadow: 0 4px 14px var(--accent-glow); }
.auth-submit:active { transform: scale(0.98); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-submit svg { width: 16px; height: 16px; }
.auth-switch {
  text-align: center; font-size: 0.8rem; color: var(--text-muted);
  margin: 14px 0 0; font-family: var(--font);
}
.auth-switch a {
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Management Team View ─────────────────────────────────── */
.mgmt-pane { padding: 4px 0 40px; }
.mgmt-top-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.mgmt-heading { flex: 1; min-width: 0; }
.mgmt-title { font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 0 0 3px; }
.mgmt-sub   { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.mgmt-search-wrap {
  position: relative; display: flex; align-items: center; width: 220px;
}
.mgmt-search-icon {
  position: absolute; left: 9px; width: 15px; height: 15px;
  color: var(--text-muted); pointer-events: none;
}
.mgmt-search-wrap .search-input { padding-left: 30px; }
.mgmt-team-container { display: flex; flex-direction: column; gap: 28px; }
.mgmt-role-section {}
.mgmt-role-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.mgmt-role-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.mgmt-role-name { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.mgmt-role-count {
  margin-left: auto; font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); background: var(--bg-section);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 1px 8px; min-width: 24px; text-align: center;
}
.mgmt-member-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.mgmt-member-card {
  display: flex; align-items: center; gap: 11px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.mgmt-member-card:hover {
  border-color: var(--accent); box-shadow: 0 2px 10px var(--accent-glow);
}
.mgmt-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.mgmt-avatar-img { width: 36px; height: 36px; object-fit: cover; }
.mgmt-avatar-initials {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em;
  font-family: var(--font);
}
.mgmt-member-info { flex: 1; min-width: 0; overflow: hidden; }
.mgmt-member-name {
  display: block; font-size: 0.88rem; font-weight: 600;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mgmt-member-bio {
  display: block; font-size: 0.74rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.mgmt-role-btn {
  flex-shrink: 0; background: none; border: 1px solid var(--border);
  border-radius: 5px; color: var(--text-muted); cursor: pointer;
  padding: 4px 5px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.mgmt-member-card:hover .mgmt-role-btn { opacity: 1; }
.mgmt-role-btn:hover { color: var(--accent); border-color: var(--accent); }
.mgmt-empty {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted); font-size: 0.9rem;
}
select:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Management sub-tabs ─────────────────────────────────── */
.mgmt-subtab-bar {
  display: flex; gap: 4px; margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.mgmt-subtab {
  background: none; border: none; cursor: pointer;
  padding: 8px 16px; font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 0.15s, border-color 0.15s;
}
.mgmt-subtab:hover { color: var(--text); }
.mgmt-subtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.mgmt-subtab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 700; border-radius: 999px;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
}

/* ── Beta Applications ───────────────────────────────────── */
.apps-container { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.apps-filter-group {
  display: flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.apps-filter-btn {
  font-size: 0.78rem; padding: 5px 14px; background: none; border: none;
  border-right: 1px solid var(--border); color: var(--txt-2); cursor: pointer;
  transition: background 0.13s, color 0.13s; font-weight: 500;
}
.apps-filter-btn:last-child { border-right: none; }
.apps-filter-btn.active { background: var(--accent); color: #fff; }
.apps-filter-btn:hover:not(.active) { background: var(--hover); color: var(--text); }
.apps-clear-btn { font-size: 0.78rem; padding: 5px 12px; }
.app-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.app-card:hover { border-color: var(--border-hover, var(--accent)); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.app-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.app-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 700; color: var(--accent);
  border: 2px solid var(--border); overflow: hidden; position: relative;
}
.app-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; position: absolute; }
.app-avatar-initials { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.app-user-info { flex: 1; min-width: 0; }
.app-username { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.app-meta { font-size: 0.76rem; color: var(--txt-2); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 0; }
.app-meta-sep { margin: 0 5px; opacity: 0.4; }
.app-status-badge {
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em;
  flex-shrink: 0; display: flex; align-items: center; gap: 4px;
}
.app-status-badge.pending  { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.25); }
.app-status-badge.approved { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,.25); }
.app-status-badge.rejected { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,.25); }
/* Collapsible Q&A */
.app-qa-details { padding: 0; }
.app-qa-details[open] .app-qa { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.app-qa-summary {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; font-size: 0.8rem; font-weight: 600; color: var(--txt-2);
  cursor: pointer; list-style: none; border-bottom: 1px solid var(--border);
  transition: color 0.13s, background 0.13s; user-select: none;
}
.app-qa-summary:hover { color: var(--text); background: var(--hover); }
.app-qa-details[open] > .app-qa-summary svg { transform: rotate(90deg); }
.app-qa-summary svg { transition: transform 0.18s; }
.app-qa { display: flex; flex-direction: column; gap: 12px; }
.app-qa-item { padding: 2px 0; }
.app-qa-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 0.65rem; font-weight: 700; flex-shrink: 0;
  margin-right: 6px;
}
.app-qa-q { font-size: 0.79rem; font-weight: 600; color: var(--txt-2); margin-bottom: 4px; display: flex; align-items: flex-start; }
.app-qa-a { font-size: 0.875rem; color: var(--text); line-height: 1.55; padding-left: 24px; }
.app-actions {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
}
.app-btn-approve {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 6px; font-size: 0.81rem; font-weight: 600; cursor: pointer;
  background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.3);
  transition: background 0.15s;
}
.app-btn-approve:hover { background: rgba(16,185,129,0.25); }
.app-btn-reject {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 6px; font-size: 0.81rem; font-weight: 600; cursor: pointer;
  background: rgba(239,68,68,0.08); color: #ef4444; border: 1px solid rgba(239,68,68,0.25);
  transition: background 0.15s;
}
.app-btn-reject:hover { background: rgba(239,68,68,0.2); }
.app-btn-delete {
  margin-left: auto; padding: 6px 10px; border-radius: 6px; font-size: 0.81rem; cursor: pointer;
  background: none; color: var(--txt-3, var(--txt-2)); border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s; display: inline-flex; align-items: center;
}
.app-btn-delete:hover { color: #ef4444; border-color: #ef4444; }


/* ── Profile Settings Modal ──────────────────────────────── */
.ps-modal { max-width: 480px; }
.ps-identity-card {
  display: flex; align-items: stretch;
  background: var(--bg-section); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 10px;
}
.ps-id-field {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px 12px; text-align: center; gap: 4px;
}
.ps-id-label {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.ps-id-value {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  word-break: break-all;
}
.ps-id-role {
  font-size: 0.82rem; font-weight: 700;
}
.ps-id-divider {
  width: 1px; background: var(--border); flex-shrink: 0; margin: 10px 0;
}
.ps-readonly-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.76rem; color: var(--text-muted);
  background: var(--bg-section); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 20px;
}
.ps-section-label {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  margin: 0 0 10px; padding-top: 4px;
}
.ps-avatar-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.ps-avatar-preview {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 50%; background: var(--bg-section);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: var(--accent);
  overflow: hidden; font-family: var(--font);
}
.ps-avatar-fields { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.ps-avatar-fields label {
  font-size: 0.71rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.ps-optional {
  font-size: 0.7rem; font-weight: 400; color: var(--text-light);
  text-transform: none; letter-spacing: 0;
}
.ps-hint {
  font-size: 0.73rem; color: var(--text-muted);
}
.ps-url-input-wrap {
  position: relative; display: flex; align-items: center;
}
.ps-url-input-wrap input {
  width: 100%; padding: 9px 12px 9px 36px;
  background: var(--bg-section);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font); font-size: 0.88rem;
  outline: none; transition: box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.ps-url-input-wrap input:focus {
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.ps-url-input-wrap input::placeholder { color: var(--text-light); }
.ps-url-prefix-icon {
  position: absolute; left: 10px;
  color: var(--accent); pointer-events: none;
  display: flex; align-items: center;
}

/* ── Management search button ────────────────────────────── */
.mgmt-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mgmt-search-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; padding: 7px 12px;
  border: 1px solid var(--border);
}
.mgmt-search-btn.active {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-glow);
}
.mgmt-search-wrap { min-width: 210px; }

/* ── Management sub-tab pane fade ───────────────────────── */
#mgmtPaneTeam,
#mgmtPaneApplications,
#mgmtPaneMembers {
  transition: opacity 0.22s ease;
}

/* ── Member list ─────────────────────────────────────────── */
.members-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.member-card:hover { border-color: var(--accent); }
.member-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-info { flex: 1; min-width: 0; }
.member-username { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.member-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.member-role-badge {
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.members-role-filter { margin-bottom: 14px; }

/* ── Clickable member card ───────────────────────────────── */
.member-card--clickable { cursor: pointer; }
.member-card--clickable:hover { border-color: var(--accent); background: var(--accent-glow); }
.member-card--clickable:hover .member-edit-icon { opacity: 1; }
.member-edit-icon {
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
  margin-left: 4px;
}

/* ── Toggle switch ───────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--border); border-radius: 24px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.beta-settings-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
}

/* ── Modal fade transition ───────────────────────────────── */
.modal-overlay { transition: opacity 0.18s ease; }
#memberEditOverlay,
#betaSettingsOverlay { display: none; }

/* ── New Task Modal ──────────────────────────────────────── */
.ntm-modal {
  max-width: 680px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
}
.ntm-body { display: flex; flex-direction: column; gap: 14px; }
.ntm-title-input {
  width: 100%; font-size: 1.15rem; font-weight: 600;
  padding: 10px 14px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg); color: var(--text);
  outline: none; transition: border-color 0.15s;
}
.ntm-title-input:focus { border-color: var(--accent); }
.ntm-title-input.error { border-color: #f87171; animation: shake 0.3s ease; }
.ntm-props-row { display: flex; gap: 20px; flex-wrap: wrap; }
.ntm-prop-group { display: flex; flex-direction: column; gap: 5px; }
.ntm-prop-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.ntm-seg-row { display: flex; gap: 4px; flex-wrap: wrap; }
.ntm-seg-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 0.78rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--bg-section); color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.ntm-seg-btn:hover { border-color: var(--accent); color: var(--accent); }
.ntm-seg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.ntm-seg-btn.prio-seg-low.active    { background: var(--prio-low,#22c55e); border-color: var(--prio-low,#22c55e); }
.ntm-seg-btn.prio-seg-medium.active { background: var(--prio-med,#f59e0b); border-color: var(--prio-med,#f59e0b); }
.ntm-seg-btn.prio-seg-high.active   { background: var(--prio-hi,#ef4444); border-color: var(--prio-hi,#ef4444); }
.ntm-seg-btn.prio-seg-critical.active { background: #7c3aed; border-color: #7c3aed; }
.ntm-editor-wrap { border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.ntm-toolbar { border-bottom: 1px solid var(--border); background: var(--bg-section); padding: 4px 6px; }
.ntm-editor-body {
  min-height: 140px; max-height: 260px; overflow-y: auto;
  padding: 12px 14px; color: var(--text); font-size: 0.9rem; line-height: 1.6;
  outline: none;
}
.ntm-editor-body:empty::before, .ntm-editor-body[data-placeholder]:empty::before {
  content: attr(data-placeholder); color: var(--text-muted); pointer-events: none;
}

/* ── Send-to-Todo modal ──────────────────────────────────── */
.std-body { text-align: center; }
.std-status-grid { display: flex; gap: 12px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.std-col-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 24px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg-section);
  color: var(--text); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; min-width: 100px;
}
.std-col-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent)10; transform: translateY(-2px); }

/* ── Approved suggestion action buttons ──────────────────── */
.action-btn.sug-unpublish-btn { color: var(--text-muted); }
.action-btn.sug-unpublish-btn:hover { color: #f59e0b; background: #f59e0b18; }
.action-btn.sug-todo-btn { color: var(--text-muted); }
.action-btn.sug-todo-btn:hover { color: #34d399; background: #34d39918; }

/* ── Profile: password section ──────────────────────────── */
.ps-pwd-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.ps-pwd-section .ps-section-label { margin-bottom: 12px; }
.ps-password-fields { display: flex; flex-direction: column; gap: 12px; }
.ps-field-item { display: flex; flex-direction: column; gap: 5px; }
.ps-field-item label {
  font-size: 0.71rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.ps-pwd-field-wrap {
  position: relative; display: flex; align-items: center;
}
.ps-pwd-field-wrap input[type="password"] {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font); font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ps-pwd-field-wrap input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.ps-pwd-field-wrap input[type="password"]::placeholder { color: var(--text-light); }
.ps-pwd-prefix-icon {
  position: absolute; left: 10px;
  color: var(--text-muted); pointer-events: none;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.ps-pwd-field-wrap:focus-within .ps-pwd-prefix-icon { color: var(--accent); }
.ps-pwd-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600;
  font-family: var(--font); cursor: pointer; align-self: flex-start; margin-top: 2px;
  border: 1.5px solid var(--border); background: var(--bg-section); color: var(--text-muted);
  transition: all 0.15s;
}
.ps-pwd-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-glow);
}
