/* ══════════════════════════════════════════════════════
   ICC Debug Audit — Steampunk canon (forged-iron + brass)
   Aligned з alerts-style-adc.css / shared/dt-panels.css
   debug-report-style-adc.css
══════════════════════════════════════════════════════ */
.dev-tools-scope.al-page,
.al-page {
  /* Backgrounds — SSOT forge */
  --bg:            var(--bg-base, #14100c);
  --bg-elevated:   var(--bg-elevated, #2a2018);
  --bg-card:       var(--bg-surface, #1f1812);
  --bg-card-hover: var(--bg-hover, #332618);
  --bg-glass:      var(--bg-surface, #1f1812);
  --bg-form:       var(--bg-surface, #1f1812);

  /* Borders — metal */
  --border:        rgba(92, 68, 48, 0.28);
  --border-md:     var(--border-metal, #5c4430);
  --border-strong: var(--border-bright, #8c6b46);
  --border-accent: rgba(197, 139, 58, 0.45);

  /* Text — SSOT */
  --text:          var(--text-bright);
  --text-sec:      var(--text-body);
  --text-label:    var(--text-muted);

  /* Accent — brass canon */
  --accent:        var(--accent-brass, #c58b3a);
  --accent-dim:    rgba(197, 139, 58, 0.10);
  --accent-glow:   rgba(197, 139, 58, 0.22);
  --accent-cyan:   var(--info, #7c8f88);
  --accent-green:  var(--mod-observer);

  /* Semantic colors */
  --green:         var(--mod-observer);
  --red:           var(--log-error);
  --orange:        var(--accent-ember);
  --yellow:        var(--mod-publisher);
  --blue:          var(--mod-applicant);
  --brass:         var(--accent-brass);

  /* Severity */
  --critical:      var(--log-critical, #c14418);
  --important:     var(--accent-ember,  #e36f3d);
  --medium:        var(--log-warn,      #e0c489);
  --minor:         var(--text-muted,    #7a6a54);

  /* Status */
  --s-open:        var(--accent-brass);
  --s-fixed:       var(--mod-observer);
  --s-intent:      var(--info, #7c8f88);
  --s-false:       var(--text-muted);
  --s-updated:     var(--accent-brass);
  --s-duplicate:   var(--border-dim, #3a2e22);

  /* Forge framing — як у alerts */
  --forge-radius:  2px;
  --forge-shadow:  0 4px 12px rgba(0, 0, 0, 0.55);
  --forge-inset:   inset 0 2px 6px rgba(0, 0, 0, 0.65), inset 0 -1px 0 rgba(232, 219, 178, 0.05);
  --forge-bevel:   inset 0 1px 0 rgba(232, 219, 178, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.55);
}

/* Сумісність з legacy селектором (HTML body тримає обидва класи) */
.dev-tools-scope.devtools-body { /* fallback alias — root tokens вище покривають .al-page */ }

/* ── Ambient background — DISABLED для SSOT-когезії ──
   Балка-сторінка тепер рендерить фон спільним шаром:
   dt-primitives.css (forge texture + corner gears) +
   devtools-style-adc.css .al-page::before/::after (scene) +
   <div class="al-bg-scene"> SVG. Власні body::before/::after
   перекривали той шар (вища специфічність body.al-page),
   тому вимкнені через content:none. */
body.devtools-body.al-page::before,
body.devtools-body.al-page::after {
  content: none;
}

.dev-tools-scope * { box-sizing: border-box; }
.dev-tools-scope body { margin: 0; padding: 0; }
.dev-tools-scope h1, .dev-tools-scope h2, .dev-tools-scope h3,
.dev-tools-scope h4, .dev-tools-scope h5, .dev-tools-scope h6,
.dev-tools-scope p, .dev-tools-scope ul, .dev-tools-scope ol,
.dev-tools-scope figure { margin: 0; padding: 0; }
.dev-tools-scope button { font-family: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; }

/* ── Header meta plate (#icc-header-meta) ── */
.devtools-header-meta {
  display: inline-block;
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-body, #bfa37a);
  background: rgba(31, 24, 18, 0.85);
  border: 1px solid var(--border-metal, #5c4430);
  border-radius: 2px;
  padding: var(--sp-space-1) var(--sp-space-2);
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
/* 🔧 cc-708: scoped to avoid global style leak */
.dev-tools-scope body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-ui, 'Barlow', sans-serif);
  font-size: 13px; line-height: 1.6; min-height: 100vh;
}
/* .wrap видалено — секції тепер прямі діти <body> у кованих .al-module-panel (alerts canon) */

/* ══════════════════════════════════════════════════════
   ICC panels — forged-iron frames навколо контентних секцій
══════════════════════════════════════════════════════ */
.dev-tools-scope.al-page .al-module-panel.icc-panel--stats,
.dev-tools-scope.al-page .al-module-panel.icc-panel--modules,
.dev-tools-scope.al-page .al-module-panel.icc-panel--sys,
.dev-tools-scope.al-page .al-module-panel.icc-panel--content {
  padding: var(--sp-space-4) var(--sp-space-4);
  margin-bottom: var(--sp-space-4);
  /* max-width не задаємо — успадковуємо канонічні max-width:1400px + margin:0 auto
     з devtools-style-adc.css (.al-module-panel), як на еталонній alerts-сторінці */
}
.dev-tools-scope.al-page .al-module-panel.icc-panel--sys {
  margin-top: var(--sp-space-2);
}
.dev-tools-scope.al-page .al-module-panel .modules-collapse-bar {
  margin: 0 0 8px;
}
.dev-tools-scope.al-page .icc-panel--stats > .stats-bar,
.dev-tools-scope.al-page .icc-panel--modules > .modules-grid {
  margin-bottom: 0;
}

/* ── ICC Boot overlay — forge fade ── */
.icc-boot {
  position: fixed; inset: 0;
  background: var(--bg-base, #14100c);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; pointer-events: none;
  animation: iccBootFade 0.4s ease 0.6s forwards;
}
.icc-boot-text {
  font-family: 'Cinzel', var(--font-dt-title, 'Oswald', serif);
  font-size: 13px; letter-spacing: 0.30em;
  color: var(--accent-brass, #c58b3a);
  
  text-transform: uppercase;
  animation: iccBootExpand 0.7s ease forwards;
}
@keyframes iccBootExpand {
  from { letter-spacing: 0.10em; opacity: 0; }
  30%  { opacity: 1; }
  to   { letter-spacing: 0.42em; opacity: 1; }
}
@keyframes iccBootFade {
  from { opacity: 1; }
  to   { opacity: 0; pointer-events: none; }
}

/* ── Glass panel utility ── */
.glass-panel {
  border: 1px solid var(--border-metal, #5c4430);
  border-radius: 2px;
  box-shadow: var(--forge-bevel, inset 0 1px 0 rgba(232, 219, 178, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.55));
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════
   STATS — DNA .dt-stats-row (forged iron tiles)
══════════════════════════════════════════════════════ */
.stats-bar {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.stat {
  flex: 1; min-width: 180px;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(92, 68, 48, 0.30);
  border-radius: 0;
  padding: var(--sp-space-2) var(--sp-space-4);
  text-align: center; position: relative; overflow: hidden;
  transition: background 0.2s;
}
.stat:last-child { border-right: none; }
.stat:hover { background: rgba(160, 133, 53, 0.04); }
.stat.stat-expanded { flex: 1.6; min-width: 240px; }

/* ── Metric bar (horizontal forged-bar) ── */
@property --gauge-pct {
  syntax: '<number>';
  initial-value: 0;
  inherits: false;
}

.gauge-wrap {
  position: relative; width: 100%; height: 4px;
  margin: var(--sp-space-2) auto 0;
  background: rgba(0, 0, 0, 0.40);
  border-top: 1px solid rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(232, 219, 178, 0.05);
  overflow: hidden;
}
.gauge-ring {
  position: absolute; inset: 0;
  width: calc(var(--gauge-pct) * 1%);
  background: var(--gauge-color, var(--accent-brass));
  transition: width 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}
.gauge-center { display: none; }
.stat-num {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  margin-bottom: var(--sp-space-1);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.stat-lbl {
  font-family: 'Oswald', var(--font-dt-status, monospace);
  color: rgba(240, 232, 216, 0.50);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-top: 0;
}
.stat-hex { display: none; }

.stat.s-open     .gauge-ring { --gauge-color: var(--accent-brass, #c58b3a); }
.stat.s-open     .stat-num   { color: var(--accent-brass, #c58b3a); }
.stat.s-critical .gauge-ring { --gauge-color: var(--log-critical, #c14418); }
.stat.s-critical .stat-num   { color: var(--log-critical, #c14418); }
.stat.s-closed   .gauge-ring { --gauge-color: var(--mod-observer); }
.stat.s-closed   .stat-num   { color: var(--mod-observer); }

/* ── Closed breakdown (вбудований у stat-expanded) ── */
.closed-breakdown {
  display: flex; flex-wrap: wrap; gap: var(--sp-gap, 4px 8px); margin-top: 10px;
  justify-content: center;
}
.cb-item {
  font-size: 10px; font-family: var(--font-mono, 'JetBrains Mono', 'Consolas', monospace);
  padding: 2px var(--sp-space-2); border-radius: var(--radius-ui, 4px);
  white-space: nowrap; cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
}
.cb-item:hover { opacity: 0.8; }
.cb-item.active { box-shadow: 0 0 0 1px currentColor; }
.cb-item.zero { opacity: 0.3; pointer-events: none; }
.cb-fixed       { background: rgba(86, 163, 166, 0.12);  color: var(--success); border-color: rgba(86, 163, 166, 0.2); }
.cb-intentional { background: rgba(122, 106, 84, 0.12); color: var(--text-muted); border-color: rgba(122, 106, 84, 0.2); }
.cb-false       { background: rgba(197, 139, 58, 0.12);  color: var(--log-warn); border-color: rgba(197, 139, 58, 0.2); }
.cb-duplicate   { background: rgba(197, 139, 58, 0.12); color: var(--accent-brass); border-color: rgba(197, 139, 58, 0.2); }
.cb-deferred    { background: rgba(90, 130, 153, 0.12);  color: var(--mod-applicant); border-color: rgba(90, 130, 153, 0.2); }

/* ══════════════════════════════════════════════════════
   TABS — Steampunk metal tabs (DNA: .dt-tab)
══════════════════════════════════════════════════════ */
.tab-nav-wrap {
  background: transparent;
  border-bottom: 1px solid var(--border-metal, #5c4430);
  padding: 0; margin-bottom: 16px;
  display: inline-flex; gap: 4px;
}
.tab-nav { display: contents; }
.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: 2px 2px 0 0;
  background: transparent;
  color: rgba(240, 232, 216, 0.50);
  font-family: 'Oswald', var(--font-dt-status, 'IBM Plex Mono', monospace);
  font-size: 11px; letter-spacing: 0.09em; font-weight: 500;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  position: relative;
}
.tab-btn::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
  background: var(--accent-brass, #c58b3a);
  box-shadow: 0 0 8px rgba(197, 139, 58, 0.35);
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform 0.20s ease-out;
}
.tab-btn:hover {
  color: rgba(240, 232, 216, 0.80);
  background: rgba(160, 133, 53, 0.06);
  border-color: rgba(92, 68, 48, 0.40);
}
.tab-btn.active {
  color: var(--accent-brass, #c58b3a);
  background: rgba(160, 133, 53, 0.10);
  border-color: rgba(160, 133, 53, 0.45);
  
}
.tab-btn.active::after { transform: scaleX(1); }
.tab-count {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(92, 68, 48, 0.5);
  border-radius: 2px;
  padding: 1px var(--sp-space-2);
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0;
}
.tab-btn.active .tab-count {
  background: rgba(197, 139, 58, 0.12);
  border-color: rgba(197, 139, 58, 0.40);
  color: var(--accent-brass, #c58b3a);
}

/* ══════════════════════════════════════════════════════
   TOOLBAR — Forged-iron command panel (sticky)
══════════════════════════════════════════════════════ */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-surface, #1f1812);
  border: 2px solid var(--border-metal, #5c4430);
  border-radius: 2px;
  padding: var(--sp-space-3) var(--sp-space-4) var(--sp-space-2);
  margin-bottom: var(--sp-space-4);
  position: sticky; top: var(--header-h, 96px); z-index: 40; width: 100%;
  will-change: transform;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 4px 14px rgba(0, 0, 0, 0.5);
}
.toolbar::before { display: none; }

.search-box {
  flex: 1; min-width: 180px;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(92, 68, 48, 0.55);
  border-radius: 2px;
  padding: var(--sp-space-2) var(--sp-space-3);
  color: var(--text-bright);
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus {
  outline: none;
  border-color: var(--accent-brass, #c58b3a);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(197, 139, 58, 0.40);
}
.search-box::placeholder { color: var(--text-muted); font-style: italic; }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Filter pill chips (DNA: .dt-tab steampunk) ── */
.f-btn {
  padding: var(--sp-space-1) var(--sp-space-3);
  border-radius: 2px;
  border: 1px solid rgba(92, 68, 48, 0.45);
  background: transparent;
  color: rgba(240, 232, 216, 0.55);
  font-family: 'Oswald', var(--font-dt-status, 'IBM Plex Mono', monospace);
  font-size: 10px; font-weight: 500;
  cursor: pointer; transition: color 0.15s, background 0.15s, border-color 0.15s;
  text-transform: uppercase; letter-spacing: 0.09em;
  display: inline-flex; align-items: center; gap: 5px;
}
.f-btn::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted); opacity: 0.4;
  transition: background 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.f-btn:hover {
  border-color: rgba(160, 133, 53, 0.55);
  color: var(--text-bright);
  background: rgba(160, 133, 53, 0.06);
}
.f-btn.active {
  background: rgba(197, 139, 58, 0.10);
  border-color: rgba(197, 139, 58, 0.55);
  color: var(--accent-brass, #c58b3a);
  
}
.f-btn.active::before {
  background: var(--accent-brass, #c58b3a);
  opacity: 1;
  box-shadow: 0 0 5px var(--accent-brass, #c58b3a);
}

/* Severity pill colors */
.f-btn.fc::before { background: var(--critical); }
.f-btn.fc { border-color: rgba(163, 71, 27, 0.2); }
.f-btn.fc.active { background: rgba(163, 71, 27, 0.08); border-color: rgba(163, 71, 27, 0.4); color: var(--critical); box-shadow: 0 0 12px rgba(163, 71, 27, 0.1); }
.f-btn.fi::before { background: var(--important); }
.f-btn.fi { border-color: rgba(197, 139, 58, 0.2); }
.f-btn.fi.active { background: rgba(197, 139, 58, 0.08); border-color: rgba(197, 139, 58, 0.4); color: var(--important); box-shadow: 0 0 12px rgba(197, 139, 58, 0.1); }
.f-btn.fm::before { background: var(--medium); }
.f-btn.fm { border-color: rgba(197, 139, 58, 0.2); }
.f-btn.fm.active { background: rgba(197, 139, 58, 0.08); border-color: rgba(197, 139, 58, 0.4); color: var(--medium); box-shadow: 0 0 12px rgba(197, 139, 58, 0.1); }
.f-btn.fn::before { background: var(--minor); }
.f-btn.fn { border-color: rgba(122, 106, 84, 0.2); }
.f-btn.fn.active { background: rgba(122, 106, 84, 0.08); border-color: rgba(122, 106, 84, 0.4); color: var(--minor); box-shadow: 0 0 12px rgba(122, 106, 84, 0.1); }

/* ══════════════════════════════════════════════════════
   SEVERITY SECTIONS — Forged-iron headers
══════════════════════════════════════════════════════ */
.sev-section {
  margin-bottom: var(--sp-space-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-metal, #5c4430);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.45);
}
.sev-header {
  display: flex; align-items: center; gap: 10px;
  padding: var(--sp-space-2) var(--sp-space-3);
  background: linear-gradient(to bottom, rgba(232, 219, 178, 0.04) 0%, transparent 100%);
  border-bottom: 1px solid rgba(92, 68, 48, 0.45);
  border-left: 3px solid transparent;
  cursor: pointer; user-select: none;
  transition: background 0.15s;
  position: relative; overflow: hidden;
}
.sev-header:hover { background: rgba(160, 133, 53, 0.05); }
.sev-section.collapsed .sev-header { border-bottom-color: transparent; }
.sev-label {
  font-family: 'Cinzel', var(--font-dt-title, 'Oswald', serif);
  font-size: 13px; letter-spacing: 0.10em;
  font-weight: 700; text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.threat-label { display: none; }
.sev-cnt {
  border-radius: 2px;
  padding: 2px var(--sp-space-2);
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px; font-weight: 700;
  border: 1px solid;
}
.sev-arrow {
  margin-left: auto; color: var(--text-muted);
  transition: transform 0.3s ease;
  font-size: 11px;
}
.sev-section.collapsed .sev-arrow { transform: rotate(-90deg); }
/* ICC: Material Symbols замість текстових ▼ / emoji у заголовках */
.sev-arrow.material-symbols-outlined,
.arc-arrow.material-symbols-outlined { font-size: 18px; }
.sev-ico { font-size: 16px; vertical-align: -3px; color: var(--text-muted); }
.sev-section.s-critical  .sev-ico { color: var(--log-critical, #c14418); }
.sev-section.s-important .sev-ico { color: var(--accent-ember, #e36f3d); }
.sev-section.s-medium    .sev-ico { color: var(--log-warn, #e0c489); }
.sev-section.s-minor     .sev-ico { color: var(--text-body, #bfa37a); }
.sev-section.s-deferred  .sev-ico { color: var(--info, #7c8f88); }
.t-action-btn .material-symbols-outlined,
.tasks-action-btn .material-symbols-outlined,
.toolbar-more-btn .material-symbols-outlined,
.modules-collapse-btn .material-symbols-outlined,
.sprint-clear-btn .material-symbols-outlined { font-size: 15px; vertical-align: -3px; }

/* Critical section — forge pulse */
.sev-section.s-critical {
  border-color: rgba(193, 68, 24, 0.55);
}
.sev-section.s-critical .sev-header {
  border-left-color: var(--log-critical, #c14418);
  box-shadow: inset 3px 0 14px rgba(193, 68, 24, 0.10);
}
.sev-section.s-critical .sev-header::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--log-critical, #c14418);
  animation: forge-pulse 2.5s ease-in-out infinite;
}
@keyframes forge-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(193, 68, 24, 0.35); }
  50%      { box-shadow: 0 0 14px rgba(193, 68, 24, 0.65); }
}
.sev-section[style*="display: none"] .sev-header::after,
.sev-section.collapsed .sev-header::after { animation: none; }
.sev-section.s-critical .sev-label { color: var(--log-critical, #c14418); }
.sev-section.s-critical .sev-cnt {
  background: rgba(193, 68, 24, 0.14);
  color: var(--log-critical, #c14418);
  border-color: rgba(193, 68, 24, 0.45);
}

.sev-section.s-important .sev-header { border-left-color: var(--accent-ember, #e36f3d); }
.sev-section.s-important .sev-label  { color: var(--accent-ember, #e36f3d); }
.sev-section.s-important .sev-cnt {
  background: rgba(227, 111, 61, 0.12);
  color: var(--accent-ember, #e36f3d);
  border-color: rgba(227, 111, 61, 0.42);
}

.sev-section.s-medium .sev-header { border-left-color: var(--log-warn, #e0c489); }
.sev-section.s-medium .sev-label  { color: var(--log-warn, #e0c489); }
.sev-section.s-medium .sev-cnt {
  background: rgba(224, 196, 137, 0.10);
  color: var(--log-warn, #e0c489);
  border-color: rgba(224, 196, 137, 0.36);
}

.sev-section.s-minor .sev-header { border-left-color: rgba(122, 106, 84, 0.85); }
.sev-section.s-minor .sev-label  { color: var(--text-body, #bfa37a); }
.sev-section.s-minor .sev-cnt {
  background: rgba(122, 106, 84, 0.14);
  color: var(--text-body, #bfa37a);
  border-color: rgba(122, 106, 84, 0.40);
}

.sev-section.s-deferred .sev-header { border-left-color: var(--info, #7c8f88); }
.sev-section.s-deferred .sev-label  { color: var(--info, #7c8f88); }
.sev-section.s-deferred .sev-cnt {
  background: rgba(124, 143, 136, 0.12);
  color: var(--info, #7c8f88);
  border-color: rgba(124, 143, 136, 0.40);
}

@keyframes rowSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.issue-row.animating {
  animation: rowSlideIn 0.3s ease forwards;
}

.sev-body { display: block; }
.sev-section.collapsed .sev-body { display: none; }

/* ══════════════════════════════════════════════════════
   ISSUE TABLE — Forged-metal plates
══════════════════════════════════════════════════════ */
.issue-table {
  width: 100%; border-collapse: separate; border-spacing: 0 4px;
  background: transparent; border: none;
  padding: 0 10px 10px;
}
.sev-section.s-critical .issue-table,
.sev-section.s-important .issue-table,
.sev-section.s-medium .issue-table,
.sev-section.s-minor .issue-table,
.sev-section.s-deferred .issue-table { border-left-color: transparent; }
.issue-table thead th {
  background: var(--bg-elevated, #2a2018);
  color: rgba(240, 232, 216, 0.50);
  font-family: 'Oswald', var(--font-dt-status, 'IBM Plex Mono', monospace);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.10em;
  padding: var(--sp-space-2) var(--sp-space-3);
  text-align: center;
  border-bottom: 1px solid var(--border-metal, #5c4430);
  white-space: nowrap;
}
.issue-table thead th:first-child { min-width: 80px; width: auto; }
.issue-table tbody tr {
  background: rgba(31, 24, 18, 0.85);
  border-radius: 2px;
  transition: background 0.15s, box-shadow 0.2s;
}
.issue-table tbody tr:hover {
  background: var(--bg-hover, #332618);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}
.issue-table tbody tr td:first-child {
  border-radius: 2px 0 0 2px;
  border-left: 3px solid transparent;
}
.issue-table tbody tr td:last-child { border-radius: 0 2px 2px 0; }

/* Severity strip на рядку */
.sev-section.s-critical  .issue-table tbody tr td:first-child { border-left-color: var(--log-critical, #c14418); }
.sev-section.s-important .issue-table tbody tr td:first-child { border-left-color: var(--accent-ember, #e36f3d); }
.sev-section.s-medium    .issue-table tbody tr td:first-child { border-left-color: var(--log-warn,    #e0c489); }
.sev-section.s-minor     .issue-table tbody tr td:first-child { border-left-color: rgba(122, 106, 84, 0.85); }
.sev-section.s-deferred  .issue-table tbody tr td:first-child { border-left-color: var(--info,        #7c8f88); }

.issue-table td {
  padding: var(--sp-space-2) var(--sp-space-3);
  vertical-align: middle;
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  color: var(--text-body, #bfa37a);
  border-top: 1px solid rgba(92, 68, 48, 0.18);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}
.issue-table td:first-child {
  color: var(--accent-brass, #c58b3a);
  font-weight: 700;
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
}

/* ── Layer tags (forged stamps) ── */
.layer {
  display: inline-block;
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 9px;
  padding: 2px var(--sp-space-2);
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 2px;
  border: 1px solid;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.layer.bot      { background: rgba(86, 163, 166, 0.10);  color: var(--mod-observer);   border-color: rgba(86, 163, 166, 0.40); }
.layer.backend  { background: rgba(90, 130, 153, 0.10);  color: var(--mod-applicant);  border-color: rgba(90, 130, 153, 0.40); }
.layer.frontend { background: rgba(197, 139, 58, 0.10);  color: var(--accent-brass);   border-color: rgba(197, 139, 58, 0.40); }
.layer.mismatch { background: rgba(193, 68, 24, 0.10);   color: var(--log-critical);   border-color: rgba(193, 68, 24, 0.45); }

.file-cell  { color: var(--text-body, #bfa37a); font-family: 'JetBrains Mono', monospace; font-size: 11px; word-break: break-all; min-width: 140px; max-width: 180px; text-align: left; }
.desc-cell  { color: var(--text-body, #bfa37a); text-align: left; }
.risk-cell  { color: var(--text-muted);          font-size: 11px; text-align: left; }
.fix-cell   { color: var(--info, #7c8f88);       font-size: 11px; text-align: left; }
.date-cell  { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 10px; white-space: nowrap; }

/* ── Severity badge (steampunk stamps) ── */
.sev-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 9px; font-weight: 700;
  padding: var(--sp-space-1) var(--sp-space-2);
  border-radius: 2px;
  letter-spacing: 0.10em;
  white-space: nowrap;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  user-select: none;
  border: 1px solid;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.sev-badge:hover { opacity: 0.85; box-shadow: 0 0 8px currentColor; }
.sev-badge.critical  { background: rgba(193, 68, 24, 0.16); color: var(--log-critical, #c14418); border-color: rgba(193, 68, 24, 0.45); }
.sev-badge.important { background: rgba(227, 111, 61, 0.14); color: var(--accent-ember, #e36f3d); border-color: rgba(227, 111, 61, 0.42); }
.sev-badge.medium    { background: rgba(224, 196, 137, 0.10); color: var(--log-warn, #e0c489);    border-color: rgba(224, 196, 137, 0.38); }
.sev-badge.minor     { background: rgba(122, 106, 84, 0.14);  color: var(--text-body, #bfa37a);   border-color: rgba(122, 106, 84, 0.42); }
.sev-badge.security  { background: rgba(193, 68, 24, 0.16);   color: var(--log-critical, #c14418); border-color: rgba(193, 68, 24, 0.45); }
.sev-badge.major     { background: rgba(224, 196, 137, 0.10); color: var(--log-warn, #e0c489);    border-color: rgba(224, 196, 137, 0.38); }
.fix-badge   { background: rgba(86, 163, 166, 0.12);  color: var(--mod-observer);    border: 1px solid rgba(86, 163, 166, 0.35); }
.open-badge  { background: rgba(224, 196, 137, 0.10); color: var(--log-warn, #e0c489); border: 1px solid rgba(224, 196, 137, 0.38); }
.badge {
  display: inline-block;
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 9px; padding: 3px 8px; border-radius: 2px;
  font-weight: 700; letter-spacing: 0.10em;
  border: 1px solid;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.badge.open  { background: rgba(227, 111, 61, 0.12); color: var(--accent-ember, #e36f3d); border-color: rgba(227, 111, 61, 0.40); }
.noissue-badge { background: rgba(124, 143, 136, 0.10); color: var(--info, #7c8f88); border: 1px solid rgba(124, 143, 136, 0.40); }

/* ── Confidence / Effort мета-бейджі (мала панель під desc) ── */
.issue-meta-row {
  display: flex;
  gap: var(--sp-space-2);
  margin-top: var(--sp-space-2);
  flex-wrap: wrap;
}
.conf-badge, .effort-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-1);
  font-size: 9px;
  padding: 2px var(--sp-space-2);
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-family: 'Oswald', var(--font-dt-status, monospace);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.conf-badge.conf-high     { background: rgba(86, 163, 166, 0.12); color: var(--green, var(--mod-observer)); border: 1px solid rgba(86, 163, 166, 0.3); }
.conf-badge.conf-medium   { background: rgba(197, 139, 58, 0.10);  color: var(--log-warn, #e0c489); border: 1px solid rgba(197, 139, 58, 0.25); }
.conf-badge.conf-low      { background: rgba(122, 106, 84, 0.10); color: var(--minor, #7a6a54); border: 1px solid rgba(122, 106, 84, 0.25); }
.effort-badge.effort-quick   { background: rgba(90, 130, 153, 0.10); color: var(--mod-applicant, #5a8299);     border: 1px solid rgba(90, 130, 153, 0.25); }
.effort-badge.effort-medium  { background: rgba(197, 139, 58, 0.10); color: var(--important, var(--accent-brass-hover, var(--accent-brass))); border: 1px solid rgba(197, 139, 58, 0.25); }
.effort-badge.effort-complex { background: rgba(163, 71, 27, 0.10);  color: var(--critical, var(--log-error)); border: 1px solid rgba(163, 71, 27, 0.25); }

/* ══════════════════════════════════════════════════════
   ARCHIVE — Forge timeline + metal panel headers
══════════════════════════════════════════════════════ */
.arc-tab { position: relative; padding-left: 28px; }
.arc-empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-space-7) var(--sp-space-4);
  color: var(--text-muted);
}
.arc-tab::before {
  content: '';
  position: absolute; left: 9px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(to bottom,
    rgba(197, 139, 58, 0.55) 0%,
    rgba(197, 139, 58, 0.20) 50%,
    transparent 100%);
  box-shadow: 0 0 6px rgba(197, 139, 58, 0.12);
}
.arc-session { margin-bottom: 14px; position: relative; }
.arc-session::before {
  content: '';
  position: absolute; left: -20px; top: 15px;
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sp-brass-light), var(--sp-brass) 60%, var(--sp-brass-shadow));
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(197, 139, 58, 0.15), 0 0 10px rgba(197, 139, 58, 0.30);
  z-index: 1;
  transition: box-shadow 0.3s;
}
.arc-session.collapsed::before {
  background: var(--bg-surface, #1f1812);
  box-shadow: 0 0 0 3px rgba(92, 68, 48, 0.30);
}
.arc-session-header {
  display: flex; align-items: center; gap: 12px;
  padding: var(--sp-space-2) var(--sp-space-3);
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-metal, #5c4430);
  border-left: 3px solid var(--accent-brass, #c58b3a);
  border-radius: 2px;
  cursor: pointer; user-select: none;
  transition: background 0.2s, border-left-color 0.2s;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.arc-session-header:hover {
  background: var(--bg-hover, #332618);
  border-left-color: var(--accent-brass, #c58b3a);
}
.arc-session.collapsed .arc-session-header { border-left-color: rgba(92, 68, 48, 0.55); }
.arc-session-title {
  font-family: 'Cinzel', var(--font-dt-title, 'Oswald', serif);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-bright);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.arc-session-meta  {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  color: var(--text-muted);
  font-size: 11px;
}
.arc-cnt {
  background: rgba(197, 139, 58, 0.12);
  border: 1px solid rgba(197, 139, 58, 0.40);
  border-radius: 2px;
  padding: 2px var(--sp-space-2);
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-brass, #c58b3a);
}
.arc-arrow {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  font-size: 11px;
}
.arc-session.collapsed .arc-arrow { transform: rotate(-90deg); }
.arc-body { display: block; }
.arc-session.collapsed .arc-body { display: none; }

.arc-table {
  width: 100%; border-collapse: separate; border-spacing: 0 3px;
  background: transparent; border: none;
  padding: var(--sp-space-2) var(--sp-space-2) var(--sp-space-2);
}
.arc-table thead th {
  background: var(--bg-elevated, #2a2018);
  color: rgba(240, 232, 216, 0.45);
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.10em;
  padding: var(--sp-space-2) var(--sp-space-3);
  text-align: left;
  border-bottom: 1px solid var(--border-metal, #5c4430);
  white-space: nowrap;
}
.arc-table thead th:first-child { width: 32px; text-align: center; }
.arc-table tbody tr {
  background: rgba(31, 24, 18, 0.78);
  border-radius: 2px;
  transition: background 0.12s;
}
.arc-table tbody tr:hover { background: var(--bg-hover, #332618); }
.arc-table td {
  padding: var(--sp-space-2) var(--sp-space-3);
  vertical-align: middle;
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  color: var(--text-body, #bfa37a);
}
.arc-table td:first-child {
  color: var(--accent-brass, #c58b3a);
  font-weight: 700;
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
}
.arc-table .desc-cell, .arc-table .risk-cell, .arc-table .fix-cell { text-align: left; }
.arc-table .sev-badge { opacity: 0.45; }
.arc-table .status-tag { opacity: 1; font-weight: 700; }
.arc-table thead th { text-align: center; }

.archive-session { margin-bottom: 16px; }
.arch-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border-md);
  border-left: 3px solid rgba(197, 139, 58,0.3);
  border-radius: var(--radius-ui, 4px);
}
.arch-tool { color: var(--text-muted); font-size: 10px; }
.arch-mod  { color: var(--text-sec); }
.arch-date { margin-left: auto; color: var(--text-muted); font-size: 11px; }
.tbl {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden; margin-top: 8px;
}
.tbl thead th {
  background: rgba(197, 139, 58,0.04); color: var(--text-muted);
  font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  padding: var(--sp-card-pad, 8px 11px); text-align: left; border-bottom: 1px solid var(--border);
}
.tbl tbody tr { border-bottom: 1px solid var(--border); }
.tbl tbody tr:hover { background: var(--bg-card-hover); }
.tbl tbody tr:last-child { border-bottom: none; }
.tbl td { padding: var(--sp-card-pad, 8px 11px); font-size: 12px; line-height: 1.5; vertical-align: top; }

/* ══════════════════════════════════════════════════════
   FOOTER — Gradient line
══════════════════════════════════════════════════════ */
.rpt-footer {
  text-align: center; margin-top: 48px; padding: var(--sp-card-pad, 20px);
  color: var(--text-muted); font-size: 11px;
  border-top: 1px solid var(--border);
  position: relative;
}
.rpt-footer::before {
  content: '';
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ══════════════════════════════════════════════════════
   MODULE CARDS — Fortified frame з brass top + rivets
══════════════════════════════════════════════════════ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-space-3);
  margin-bottom: 0;
}

.cc-summary-card {
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-metal, #5c4430);
  border-top-width: 3px;
  border-radius: 2px;
  padding: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s ease;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.55);
}
.cc-summary-card::before,
.cc-summary-card::after {
  content: '';
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sp-brass-light), var(--sp-brass) 60%, var(--sp-brass-shadow));
  border: 0.5px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  z-index: 2;
  pointer-events: none;
}
.cc-summary-card::before { top: 6px; left: 6px; }
.cc-summary-card::after  { top: 6px; right: 6px; }
.cc-summary-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright, #8c6b46);
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 6px 20px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(197, 139, 58, 0.08);
}
.cc-card-inner { display: flex; flex-direction: column; gap: 0; padding: 0; position: relative; }
.cc-card-header { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px 8px; }
.cc-summary-card-icon { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.cc-summary-card-icon.material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  color: var(--accent-brass);
}
.cc-summary-card-label {
  font-family: 'Cinzel', var(--font-dt-title, 'Oswald', serif);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* ── ICC: data-driven module-color (steampunk токени замість inline hex) ── */
.dev-tools-scope { --mod-cc: var(--text-bright); --mod-sys: var(--brass); }
.cc-summary-card[data-mod="cc"]  { --mc-color: var(--mod-cc); }
.cc-summary-card[data-mod="obs"] { --mc-color: var(--mod-observer); }
.cc-summary-card[data-mod="pub"] { --mc-color: var(--mod-publisher); }
.cc-summary-card[data-mod="exc"] { --mc-color: var(--mod-executor); }
.cc-summary-card[data-mod="apl"] { --mc-color: var(--mod-applicant); }
.cc-summary-card[data-mod="nex"] { --mc-color: var(--mod-nexus); }
.cc-summary-card[data-mod="chl"] { --mc-color: var(--mod-challenger); }
.cc-summary-card[data-mod="pay"] { --mc-color: var(--mod-paymaster); }
.cc-summary-card[data-mod="sys"] { --mc-color: var(--mod-sys); }
.cc-summary-card[data-mod] { border-top-color: var(--mc-color, var(--border-metal)); }
.cc-summary-card[data-mod] .cc-summary-card-label { color: var(--mc-color, var(--text-bright)); }
.cc-summary-card[data-mod] .cc-summary-card-icon.material-symbols-outlined { color: var(--mc-color, var(--accent-brass)); }

/* Material Symbols всередині badge "В розробці" */
.cc-wip-badge .cc-wip-ico { font-size: 12px; vertical-align: -2px; }

.cc-summary-card-desc {
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 11px;
  color: var(--text-body, #bfa37a);
  line-height: 1.45;
  padding: 0 16px 10px;
}
.cc-summary-card-stats {
  display: flex; align-items: center;
  padding: var(--sp-space-2) var(--sp-space-3);
  border-top: 1px solid rgba(92, 68, 48, 0.45);
  background: rgba(0, 0, 0, 0.18);
}
.cc-stats-group { display: flex; gap: 10px; }
.cc-stats-divider {
  width: 1px; height: 26px;
  background: rgba(92, 68, 48, 0.55);
  margin: 0 10px 0 auto;
  flex-shrink: 0;
}
.cc-stat { text-align: center; min-width: 32px; }
.cc-stat-num {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 18px; font-weight: 700;
  line-height: 1;
}
.cc-stat-lbl {
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 9px;
  color: rgba(240, 232, 216, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-top: var(--sp-space-1);
  font-weight: 500;
}
.cc-stat-num.open   { color: var(--log-warn,   #e0c489); }
.cc-stat-num.closed { color: var(--mod-observer); }
.cc-stat-num.check  { color: var(--info,       #7c8f88); }
.cc-stat-num.zero   { color: var(--text-muted) !important; opacity: 0.32; text-shadow: none !important; }

.cc-progress-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border-top: 1px solid rgba(92, 68, 48, 0.5);
}
.cc-progress-fill {
  height: 100%;
  background: var(--mc-color, var(--accent-brass));
  width: var(--mc-progress, 0%);
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s;
}

.cc-summary-card.reveal-pending { opacity: 0; transform: translateY(8px); }
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cc-summary-card.revealing { animation: cardReveal 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* ── Stamp effect ── */
@keyframes stampPulse {
  0%   { transform: scale(1.2) rotate(-2deg); }
  60%  { transform: scale(0.96) rotate(0.5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.status-tag.stamping { animation: stampPulse 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* ── Module tags (forged stamps) ── */
.mod-tag {
  display: inline-block;
  padding: 2px var(--sp-space-2);
  border-radius: 2px;
  font-family: 'JetBrains Mono', var(--font-dt-digits, 'Consolas', monospace);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.mod-tag.cc    { background: rgba(232, 219, 178, 0.08); border: 1px solid rgba(232, 219, 178, 0.20); color: var(--text-bright); }
.mod-tag.obs   { background: rgba(86, 163, 166, 0.08); border: 1px solid rgba(86, 163, 166, 0.2); color: var(--mod-observer); }
.mod-tag.pub   { background: rgba(197, 139, 58, 0.08); border: 1px solid rgba(197, 139, 58, 0.2); color: var(--mod-publisher); }
.mod-tag.exc   { background: rgba(163, 71, 27, 0.08); border: 1px solid rgba(163, 71, 27, 0.2); color: var(--mod-executor); }
.mod-tag.apl   { background: rgba(90, 130, 153, 0.08); border: 1px solid rgba(90, 130, 153, 0.2); color: var(--mod-applicant); }
.mod-tag.nex   { background: rgba(74, 149, 144, 0.08); border: 1px solid rgba(74, 149, 144, 0.2); color: var(--mod-nexus); }
.mod-tag.chl   { background: rgba(227, 111, 61, 0.08); border: 1px solid rgba(227, 111, 61, 0.2); color: var(--mod-challenger); }
.mod-tag.pay   { background: rgba(45, 74, 107, 0.08); border: 1px solid rgba(45, 74, 107, 0.2); color: var(--mod-paymaster); }
.mod-tag.sys   { background: rgba(197, 139, 58, 0.08); border: 1px solid rgba(197, 139, 58, 0.2); color: var(--brass); }
.mod-tag.cross { background: rgba(197, 139, 58,0.08); border: 1px solid rgba(197, 139, 58,0.2); color: var(--accent); }

/* ── Status tags ── */
.status-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px var(--sp-space-2); border-radius: var(--radius-ui, 4px);
  font-size: 9px; font-weight: 500; letter-spacing: 0.3px;
  opacity: 0.7; border: 1px solid transparent;
  cursor: pointer; transition: all 0.15s;
}
.status-tag:hover { opacity: 1; transform: scale(1.03); }
.status-tag::before {
  content: ''; display: inline-block; width: 12px; height: 12px; flex-shrink: 0;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.status-tag.open { color: var(--medium); border-color: rgba(197, 139, 58, 0.15); }
.status-tag.open::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23e0c489' stroke-width='1.5'/%3E%3C/svg%3E"); }
.status-tag.fixed { color: var(--green); border-color: rgba(86, 163, 166, 0.15); }
.status-tag.fixed::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5L6.5 11.5L12.5 4.5' fill='none' stroke='%2356a3a6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.status-tag.intentional { color: var(--blue); border-color: rgba(90, 130, 153, 0.15); }
.status-tag.intentional::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%235a8299' stroke-width='1.5'/%3E%3Cline x1='8' y1='5' x2='8' y2='9' stroke='%235a8299' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.5' r='0.8' fill='%235a8299'/%3E%3C/svg%3E"); }
.status-tag.false { color: var(--minor); border-color: rgba(122, 106, 84, 0.12); }
.status-tag.false::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%237a6a54' stroke-width='1.5'/%3E%3Cline x1='5.5' y1='5.5' x2='10.5' y2='10.5' stroke='%237a6a54' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.status-tag.invalid { color: var(--accent-ember); border-color: rgba(192, 120, 48, 0.15); }
.status-tag.invalid::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23c07830' stroke-width='1.5'/%3E%3Cline x1='8' y1='5' x2='8' y2='9' stroke='%23c07830' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.5' r='0.8' fill='%23c07830'/%3E%3C/svg%3E"); }
.status-tag.updated { color: var(--brass); border-color: rgba(197, 139, 58, 0.15); }
.status-tag.updated::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12 8A4 4 0 1 1 8 4' fill='none' stroke='%23c58b3a' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M8 2L10 4L8 6' fill='none' stroke='%23c58b3a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.status-tag.duplicate { color: var(--s-duplicate); border-color: rgba(71, 85, 105, 0.12); }
.status-tag.duplicate::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='4' width='8' height='8' rx='1.5' fill='none' stroke='%237a6a54' stroke-width='1.3'/%3E%3Crect x='6' y='2' width='8' height='8' rx='1.5' fill='none' stroke='%237a6a54' stroke-width='1.3'/%3E%3C/svg%3E"); }
.status-tag.deferred { color: var(--mod-applicant); border-color: rgba(90, 130, 153, 0.15); }
.status-tag.deferred::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%235a8299' stroke-width='1.5'/%3E%3Cpath d='M8 5v3l2 2' fill='none' stroke='%235a8299' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.status-tag.wont-fix { color: color-mix(in srgb, var(--log-error) 60%, var(--text-bright)); border-color: rgba(227, 111, 61, 0.15); }
.status-tag.wont-fix::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23a3471b' stroke-width='1.5'/%3E%3Cline x1='5' y1='5' x2='11' y2='11' stroke='%23a3471b' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='11' y1='5' x2='5' y2='11' stroke='%23a3471b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.status-tag.false_positive { color: var(--log-warn); border-color: rgba(197, 139, 58, 0.15); }
.status-tag.false_positive::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23e0c489' stroke-width='1.5'/%3E%3Cline x1='5.5' y1='5.5' x2='10.5' y2='10.5' stroke='%23e0c489' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.status-tag.verified-ok { color: var(--mod-nexus); border-color: rgba(45, 212, 191, 0.15); }
.status-tag.verified-ok::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%234a9590' stroke-width='1.5'/%3E%3Cpath d='M5.5 8L7 9.5L10.5 6' fill='none' stroke='%234a9590' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ── WIP badge ── */
.cc-wip-badge {
  display: inline-block; font-size: 9px; padding: var(--sp-card-pad, 2px 8px); border-radius: var(--radius-ui, 4px);
  background: rgba(197, 139, 58, 0.1); border: 1px solid rgba(197, 139, 58, 0.25);
  color: var(--important); margin-left: 8px; vertical-align: middle;
  animation: wipPulse 3s ease-in-out infinite;
}
@keyframes wipPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

/* ── Module/Layer filter rows ── */
.filter-row-sep { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--border); }
.f-btn.f-mod { border-color: rgba(197, 139, 58,0.1); }
/* ICC: --mod-c зі steampunk-токенів за data-fm (замість inline hex) */
.f-btn.f-mod[data-fm="cc"]  { --mod-c: var(--mod-cc); }
.f-btn.f-mod[data-fm="obs"] { --mod-c: var(--mod-observer); }
.f-btn.f-mod[data-fm="pub"] { --mod-c: var(--mod-publisher); }
.f-btn.f-mod[data-fm="exc"] { --mod-c: var(--mod-executor); }
.f-btn.f-mod[data-fm="apl"] { --mod-c: var(--mod-applicant); }
.f-btn.f-mod[data-fm="nex"] { --mod-c: var(--mod-nexus); }
.f-btn.f-mod[data-fm="chl"] { --mod-c: var(--mod-challenger); }
.f-btn.f-mod[data-fm="pay"] { --mod-c: var(--mod-paymaster); }
.f-btn.f-mod[data-fm="sys"] { --mod-c: var(--mod-sys); }
.f-btn .f-ico { font-size: 15px; vertical-align: -3px; color: inherit; }
.f-btn.f-mod::before { background: var(--mod-c, var(--accent)); }
.f-btn.f-mod:hover { border-color: var(--mod-c, rgba(197, 139, 58,0.3)); color: var(--mod-c, var(--text-sec)); }
.f-btn.f-mod.active { background: rgba(197, 139, 58,0.06); border-color: var(--mod-c, var(--border-accent)); color: var(--mod-c, var(--accent)); box-shadow: 0 0 12px rgba(197, 139, 58,0.08); }
.f-btn.f-lay { border-color: rgba(197, 139, 58,0.1); }
.f-btn.f-lay::before { background: var(--lay-c, var(--accent)); }
.f-btn.f-lay:hover { border-color: var(--lay-c, rgba(197, 139, 58,0.3)); color: var(--lay-c, var(--text-sec)); }
.f-btn.f-lay.active { background: rgba(197, 139, 58,0.06); border-color: var(--lay-c, var(--border-accent)); color: var(--lay-c, var(--accent)); box-shadow: 0 0 12px rgba(197, 139, 58,0.08); }

/* ── Debug Test Button ── */
.debug-test-btn {
  background: transparent; border: 1px solid rgba(90, 130, 153, 0.3);
  color: var(--blue); padding: var(--sp-card-pad, 2px 8px); border-radius: var(--radius-ui, 4px);
  font-size: 10px;
  cursor: pointer;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  transition: all 0.15s; margin-top: 4px; display: inline-block;
}
.debug-test-btn:hover { background: rgba(90, 130, 153, 0.1); border-color: var(--blue); }

/* ── Debug Registry Button (deeplink до реєстру логів) ── */
.debug-registry-btn {
  background: transparent; border: 1px solid rgba(197, 139, 58, 0.3);
  color: color-mix(in srgb, var(--mod-applicant) 50%, var(--accent-ember)); padding: var(--sp-card-pad, 2px 8px); border-radius: var(--radius-ui, 4px);
  font-size: 10px;
  cursor: pointer;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  transition: all 0.15s; margin-top: 4px; display: inline-block;
  text-decoration: none;
}
.debug-registry-btn:hover { background: rgba(197, 139, 58, 0.1); border-color: color-mix(in srgb, var(--mod-applicant) 40%, var(--accent-ember)); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .wrap { padding: var(--sp-card-pad, 12px 8px); }
  /* 🔧 E1: не ламати табличний layout — скрол через контейнери секцій */
  .issue-table, .arc-table { display: table; }
  .sev-body, .arc-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { display: block; overflow-x: auto; }
  .stats-bar { flex-wrap: wrap; }
  .stat { min-width: calc(50% - 6px); }
  .arc-tab { padding-left: 0; }
  .arc-tab::before { display: none; }
  .arc-session::before { display: none; }
}
@media (max-width: 600px) {
  .modules-grid { grid-template-columns: 1fr; }
  .stat { min-width: 100%; }
  .tab-nav-wrap { display: flex; width: 100%; }
  .tab-btn { flex: 1; justify-content: center; }
}

/* ══════════════════════════════════════════════════════
   NEXUS GRID v6.0 — Extended Features
══════════════════════════════════════════════════════ */

/* ── Today counter ── */
#icc-today-counter {
  background: rgba(86, 163, 166, 0.1); border: 1px solid rgba(86, 163, 166, 0.2);
  color: var(--green); font-size: 10px; padding: var(--sp-card-pad, 2px 10px); border-radius: var(--radius-ui, 4px);
  margin-left: var(--sp-space-2);
}

/* ── Toolbar action buttons (DNA: forged-iron .dt-tab) ── */
.toolbar-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  width: 100%; padding-top: 10px; margin-top: 6px;
  border-top: 1px solid rgba(92, 68, 48, 0.40);
}
.t-action-btn {
  padding: var(--sp-space-1) var(--sp-space-3);
  border-radius: 2px;
  border: 1px solid var(--border-metal, #5c4430);
  background: var(--bg-elevated, #2a2018);
  color: var(--text-body, #bfa37a);
  box-shadow: var(--forge-bevel, inset 0 1px 0 rgba(232,219,178,0.08), inset 0 -1px 0 rgba(0,0,0,0.55));
  font-family: 'Oswald', var(--font-dt-status, 'IBM Plex Mono', monospace);
  font-size: 10px; font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  text-transform: uppercase; letter-spacing: 0.09em;
}
.t-action-btn:hover {
  border-color: rgba(160, 133, 53, 0.55);
  color: var(--text-bright);
  background: rgba(160, 133, 53, 0.06);
}
.t-action-btn.active {
  background: rgba(197, 139, 58, 0.12);
  border-color: rgba(197, 139, 58, 0.55);
  color: var(--accent-brass, #c58b3a);
  
}
.t-action-btn--help {
  margin-left: auto;
  background: rgba(197, 139, 58, 0.14);
  border-color: rgba(197, 139, 58, 0.50) !important;
  color: var(--accent-brass, #c58b3a) !important;
  font-weight: 700;
  
}

/* ── Sprint panel ── */
#icc-sprint-panel {
  background: var(--bg-card); border: 1px solid rgba(197, 139, 58,0.12);
  border-radius: var(--radius-ui, 4px);
  display: flex; align-items: center; gap: var(--sp-gap, 14px);
}
.sprint-label { font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.sprint-num { font-size: 13px; font-weight: 700; color: var(--text); }
.sprint-bar { flex: 1; height: 4px; background: rgba(232, 219, 178,0.06); border-radius: var(--radius-ui, 2px); overflow: hidden; }
.sprint-bar-fill { height: 100%; background: var(--accent-green); border-radius: var(--radius-ui, 2px); transition: width 0.5s; width: 0%; box-shadow: 0 0 8px rgba(86, 163, 166, 0.3); }
.sprint-clear-btn {
  font-size: 10px; color: var(--text-muted); background: none; border: none;
  cursor: pointer;
  padding: 2px var(--sp-space-2);
  font-family: inherit;
}
.sprint-clear-btn:hover { color: var(--critical); }

/* ── Sprint star ── */
.sprint-star {
  cursor: pointer; color: var(--text-muted); font-size: 13px;
  opacity: 0; transition: opacity 0.15s, color 0.15s; margin-right: 3px;
}
.issue-row:hover .sprint-star, .sprint-star.active { opacity: 1; }
.sprint-star.active { color: var(--accent); }

/* ── Sortable column headers ── */
.sortable { cursor: pointer; user-select: none; position: relative; }
.sortable:hover { color: var(--text-sec) !important; }
.sortable::after { content: ' \2195'; font-size: 8px; opacity: 0.35; }
.sort-asc::after  { content: ' \2191'; opacity: 0.9; color: var(--accent); }
.sort-desc::after { content: ' \2193'; opacity: 0.9; color: var(--accent); }

/* ── Hover actions ── */
.row-actions {
  display: inline-flex; gap: var(--sp-gap, 3px); margin-left: 4px;
  opacity: 0; transition: opacity 0.15s; vertical-align: middle;
}
.issue-row:hover .row-actions { opacity: 1; }
.row-act-btn {
  background: rgba(197, 139, 58,0.04); border: 1px solid rgba(197, 139, 58,0.18);
  color: var(--text-muted); border-radius: var(--radius-ui, 4px); padding: var(--sp-card-pad, 1px 5px);
  font-size: 11px; cursor: pointer; line-height: 1.4; transition: all 0.1s;
  font-family: inherit;
}
.row-act-btn:hover { color: var(--accent); border-color: rgba(197, 139, 58,0.4); background: rgba(197, 139, 58,0.1); }

/* ── Status dropdown ── */
.icc-status-dropdown {
  background: var(--bg-card); border: 1px solid var(--border-md);
  border-radius: var(--radius-ui, 4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.icc-sd-item {
  padding: var(--sp-space-2) var(--sp-space-4); font-size: var(--sp-space-3); cursor: pointer;
  transition: background 0.1s; display: flex; align-items: center; gap: var(--sp-gap, 6px);
  font-family: inherit;
}
.icc-sd-item:hover { background: rgba(197, 139, 58,0.07); }
.icc-sd-item.open        { color: var(--medium); }
.icc-sd-item.fixed       { color: var(--green); }
.icc-sd-item.intentional { color: var(--blue); }
.icc-sd-item.false       { color: var(--minor); }
.icc-sd-item.updated     { color: var(--brass); }
.icc-sd-item.duplicate   { color: var(--s-duplicate); }

/* ── Note indicator ── */
.note-indicator { color: var(--accent); opacity: 0.7; font-size: 13px; cursor: pointer; margin-left: 2px; }
.row-note-wrap td { background: rgba(197, 139, 58,0.03); }
.row-note-inner { padding: var(--sp-card-pad, 10px 14px); border-top: 1px solid var(--border); }
.row-note-label { font-size: 10px; color: var(--text-muted); display: block; margin-bottom: 6px; }
.row-note-textarea {
  width: 100%; min-height: 70px; padding: var(--sp-card-pad, 8px); font-family: inherit;
  font-size: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-md);
  border-radius: 4px; color: var(--text); resize: vertical;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.row-note-textarea:focus { outline: none; border-color: var(--border-accent); }
.row-note-actions { display: flex; gap: 8px; margin-top: 8px; }
.row-note-save, .row-note-del, .row-note-close {
  padding: var(--sp-card-pad, 4px 12px); border-radius: var(--radius-ui, 4px); border: 1px solid var(--border-md);
  font-family: inherit; font-size: 11px; 
  cursor: pointer; background: transparent;
}
.row-note-save  { color: var(--green); border-color: rgba(86, 163, 166, 0.3); }
.row-note-save:hover  { background: rgba(86, 163, 166, 0.1); }
.row-note-del   { color: var(--critical); border-color: rgba(163, 71, 27, 0.3); }
.row-note-del:hover   { background: rgba(163, 71, 27, 0.1); }
.row-note-close { color: var(--text-muted); }
.row-note-close:hover { color: var(--text-sec); }

/* ── Due-date ── */
.due-btn {
  cursor: pointer; font-size: 11px; margin-left: 3px; opacity: 0;
  transition: opacity 0.15s; vertical-align: middle;
}
.issue-row:hover .due-btn { opacity: 0.45; }
.issue-row.due-soon .due-btn,
.issue-row.due-urgent .due-btn,
.issue-row.due-overdue .due-btn { opacity: 1; }
.due-btn:hover { opacity: 1 !important; }
.issue-row.due-soon    td:first-child { border-left-color: var(--medium) !important; }
.issue-row.due-urgent  td:first-child { border-left-color: var(--important) !important; }
.issue-row.due-overdue td:first-child { border-left-color: var(--critical) !important; }
.icc-due-picker {
  background: var(--bg-card); border: 1px solid var(--border-md);
  border-radius: var(--radius-ui, 4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.icc-dp-label { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.icc-dp-input {
  width: 100%; padding: var(--sp-card-pad, 6px 10px); background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-md); border-radius: 4px;
  color: var(--text); font-family: inherit; font-size: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.icc-dp-input:focus { outline: none; border-color: var(--border-accent); }
.icc-dp-actions { display: flex; gap: var(--sp-gap, 6px); margin-top: 8px; }
.icc-dp-save, .icc-dp-clear, .icc-dp-close {
  padding: var(--sp-card-pad, 4px 10px); border-radius: var(--radius-ui, 4px); border: 1px solid var(--border-md);
  font-family: inherit; font-size: 11px; 
  cursor: pointer; background: transparent;
}
.icc-dp-save  { color: var(--green); border-color: rgba(86, 163, 166, 0.3); }
.icc-dp-save:hover  { background: rgba(86, 163, 166, 0.1); }
.icc-dp-clear { color: var(--critical); border-color: rgba(163, 71, 27, 0.3); }
.icc-dp-clear:hover { background: rgba(163, 71, 27, 0.1); }
.icc-dp-close { color: var(--text-muted); margin-left: auto; }
.icc-dp-close:hover { color: var(--text); }

/* ── Bulk action bar — Glassmorphic ── */
#icc-bulk-bar {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-md);
  border-radius: 4px; padding: var(--sp-card-pad, 12px 20px);
  display: flex; align-items: center; gap: var(--sp-gap, 14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 8000; min-width: 360px;
}
.bulk-count { font-size: 12px; color: var(--text-sec); white-space: nowrap; }
#icc-bulk-status-select {
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-md);
  border-radius: 4px; padding: var(--sp-card-pad, 5px 10px); color: var(--text);
  font-family: inherit; font-size: 11px; 
  cursor: pointer;
}
#icc-bulk-apply {
  padding: var(--sp-card-pad, 6px 16px); border-radius: 4px; border: 1px solid var(--border-accent);
  background: var(--accent-dim); color: var(--accent);
  font-family: inherit; font-size: 11px; 
  cursor: pointer; transition: all 0.15s;
}
#icc-bulk-apply:hover { background: rgba(197, 139, 58,0.2); }
#icc-bulk-cancel {
  padding: var(--sp-card-pad, 6px 16px); border-radius: 4px; border: 1px solid var(--border-md);
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
#icc-bulk-cancel:hover { color: var(--text-sec); }

/* ── Keyboard focus ── */
.icc-focused { outline: 2px solid var(--border-accent); outline-offset: -2px; border-radius: 4px; }

/* ── Hotkey overlay ── */
.icc-hotkey-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
  z-index: 9500; display: flex; align-items: center; justify-content: center;
}
.icc-hotkey-panel {
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-md);
  border-radius: 4px; padding: var(--sp-card-pad, 24px); min-width: 380px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.icc-hp-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.icc-hp-grid {
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-gap, 8px 16px); align-items: center;
}
kbd {
  background: var(--accent-dim); border: 1px solid rgba(197, 139, 58,0.2);
  border-radius: var(--radius-ui, 4px);
  font-family: inherit; color: var(--accent); white-space: nowrap;
}
.icc-hp-grid span { font-size: 11px; color: var(--text-sec); }
.icc-hp-close {
  margin-top: var(--sp-space-5); padding: var(--sp-space-2) var(--sp-space-5); border-radius: var(--sp-space-2);
  background: var(--accent-dim); border: 1px solid rgba(197, 139, 58,0.2);
  color: var(--accent);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  display: block; width: 100%; transition: background 0.15s;
}
.icc-hp-close:hover { background: rgba(197, 139, 58,0.2); }

/* ── Info-strip — forge accent bar ── */
.icc-info-strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-space-4);
  max-width: var(--max-content, 1440px);
  margin: 0 auto;
  padding: var(--sp-space-2) var(--sp-space-4);
  background: rgba(31, 24, 18, 0.55);
  border-bottom: 1px solid var(--border-metal, #5c4430);
  border-top: 1px solid rgba(0, 0, 0, 0.5);
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 11px; color: var(--text-body, #bfa37a);
  letter-spacing: 0.02em;
  position: relative; overflow: hidden; z-index: 1;
  flex-wrap: wrap;
}
.icc-info-strip::before {
  content: ''; position: absolute; bottom: 0; left: 0; height: 1px;
  width: 100px;
  background: linear-gradient(90deg, var(--accent-brass, #c58b3a), transparent);
  box-shadow: 0 0 8px rgba(197, 139, 58, 0.4);
  animation: header-line-slide 8s ease-in-out infinite;
}
@keyframes header-line-slide {
  0%, 100% { left: 0; opacity: 0.6; }
  50%      { left: calc(100% - 100px); opacity: 0.3; }
}
.icc-info-text { flex: 1; min-width: 0; }
.icc-info-badges { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.icc-info-badge {
  background: rgba(197, 139, 58, 0.12);
  border: 1px solid rgba(197, 139, 58, 0.40);
  border-radius: 2px;
  padding: 2px var(--sp-space-2);
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px; font-weight: 700;
  color: var(--accent-brass, #c58b3a);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.icc-info-date {
  color: var(--text-bright, #f3efdc) !important;
  background: rgba(232, 219, 178, 0.06) !important;
  border-color: rgba(232, 219, 178, 0.25) !important;
}

/* ── Секція #sys ── */
.modules-sys-section {
  margin: 0 0 18px;
  padding-top: 0;
  border-top: none;
}
.modules-sys-label {
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--sp-space-2);
  font-weight: 500;
}
.cc-summary-card--sys { max-width: 320px; }
.cc-summary-card--sys .cc-card-header { opacity: 0.8; }

/* ── Toolbar extended (sticky + compact) ── */
.toolbar-top-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px;
}
.filter-btns--sev { display: flex; gap: 4px; flex-wrap: wrap; }
.toolbar-more-btn {
  background: none; border: 1px solid var(--border-md); border-radius: 4px;
  color: var(--text-sec); font-family: inherit; font-size: 10px; padding: var(--sp-card-pad, 4px 10px);
  cursor: pointer; white-space: nowrap; display: none; transition: all 0.15s;
}
.toolbar-more-btn:hover { background: rgba(197, 139, 58,0.04); color: var(--text); }
.toolbar.compact .toolbar-more-btn { display: inline-flex; }
.toolbar-extra-rows { display: block; }
.toolbar.compact .toolbar-extra-rows { display: none; }
.toolbar.compact .toolbar-extra-rows.open { display: block; }

/* ── Status dot в картках модулів ── */
.cc-card-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-left: auto;
  background: var(--text-muted); transition: background 0.3s, box-shadow 0.3s;
  margin-top: var(--sp-space-1);
}
.cc-card-status-dot.online  { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--success) 80%, white), var(--success) 60%, color-mix(in srgb, var(--success) 80%, black)); box-shadow: 0 0 6px rgba(86, 163, 166, 0.5); }
.cc-card-status-dot.offline { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--danger) 80%, white), var(--danger) 60%, color-mix(in srgb, var(--danger) 80%, black)); }

/* ── Open detail у картках ── */
.cc-card-open-detail {
  font-size: 9px; color: var(--text-muted); padding: var(--sp-card-pad, 2px 0 4px); letter-spacing: 0.3px;
}

/* ── Changelog banner ── */
.icc-changelog-banner {
  position: fixed; bottom: 72px; right: 20px; z-index: 8500;
  background: var(--bg-surface, #1f1812);
  border: 1px solid rgba(197, 139, 58,0.25);
  border-radius: var(--radius-ui, 4px);
  display: flex; align-items: center; gap: var(--sp-gap, 10px); flex-wrap: wrap;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  animation: bannerSlideIn 0.3s ease;
  font-size: 11px; color: var(--text-sec); max-width: 360px;
}
@keyframes bannerSlideIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.icc-changelog-banner.hiding { animation: bannerSlideOut 0.4s ease forwards; }
@keyframes bannerSlideOut { to { transform: translateX(16px); opacity: 0; } }
.icc-cl-link { color: var(--accent-green); text-decoration: none; font-weight: 600; white-space: nowrap; }
.icc-cl-link:hover { text-decoration: underline; }
.icc-cl-close {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 12px; padding: var(--sp-card-pad, 0 4px); line-height: 1; margin-left: auto;
}
.icc-cl-close:hover { color: var(--text-sec); }

/* ── Severity dropdown ── */
.sev-dropdown {
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-ui, 4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.sev-dd-item {
  padding: var(--sp-card-pad, 7px 14px); font-size: 11px; cursor: pointer; color: var(--text-sec);
  font-family: var(--font-mono, 'JetBrains Mono', 'Consolas', monospace); /* 🔧 sys-1011 */ transition: background 0.1s;
}
.sev-dd-item:hover   { background: rgba(197, 139, 58,0.06); color: var(--text); }
.sev-dd-item.active  { color: var(--accent); }

/* ── Drag-and-drop ── */
.drag-handle {
  cursor: grab; color: var(--text-muted); font-size: 12px; opacity: 0;
  margin-right: var(--sp-space-1); user-select: none; display: inline-block; vertical-align: middle;
  transition: opacity 0.15s; line-height: 1; letter-spacing: -1px;
}
.issue-row:hover .drag-handle { opacity: 0.35; }
.drag-handle:hover             { opacity: 0.7 !important; }
.drag-handle:active            { cursor: grabbing; }
.issue-row.dragging  { opacity: 0.4; outline: 1px dashed var(--border-md); border-radius: 4px; }
.issue-row.drag-over { background: rgba(197, 139, 58,0.05); outline: 1px solid rgba(197, 139, 58,0.2); border-radius: 4px; }

/* ── ServerSync кнопка ── */
#btn-sync-server { color: var(--blue) !important; border-color: rgba(90, 130, 153, 0.25) !important; }
#btn-sync-server:hover { background: rgba(90, 130, 153, 0.08) !important; }

/* ── Status breakdown pills (legacy — тепер вбудовано в stat-expanded) ── */
.icc-status-breakdown { display: none; }

/* ══════════════════════════════════════════════════════
   v6.1 — Skeleton · Card Color Coding · Hash · Sync
══════════════════════════════════════════════════════ */

/* Skeleton loading для великих стат-блоків (поки API не відповів) */
@keyframes statSkeleton {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.55; }
}
.stat-num.loading {
  animation: statSkeleton 1.2s ease-in-out infinite;
  color: var(--text-muted) !important;
  text-shadow: none !important;
}

/* Колірне кодування карток по кількості відкритих багів */
.cc-summary-card.bugs-none .cc-card-open-detail { color: var(--green);    font-weight: 600; }
.cc-summary-card.bugs-low  .cc-card-open-detail { color: var(--important); font-weight: 600; }
.cc-summary-card.bugs-high .cc-card-open-detail { color: var(--critical);  font-weight: 700; }
@keyframes bugPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.cc-summary-card.bugs-high { animation: bugPulse 2.5s ease-in-out infinite; }

/* Gauge мін. ширина — навіть 1% виглядає як рядок */
.gauge-ring { min-width: 0; }
.gauge-ring[style*="max("] { min-width: 3px; }

/* Hash highlight — підсвітка рядка при переході по URL #pay-18 тощо */
@keyframes hashFlash {
  0%   { background: rgba(197, 139, 58, 0.2); box-shadow: inset 0 0 0 1px rgba(197, 139, 58, 0.4); }
  100% { background: transparent; box-shadow: none; }
}
.issue-row.hash-highlight { animation: hashFlash 2.5s ease-out forwards; }

/* Відносний час оновлення */
.icc-updated-ago {
  display: inline-block;
  font-family: 'JetBrains Mono', var(--font-dt-digits, 'Consolas', monospace);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(92, 68, 48, 0.40);
  border-radius: 2px;
  padding: 2px var(--sp-space-2);
  margin-left: 2px;
  vertical-align: middle;
}

/* Force Sync кнопка — neutral стиль як інші toolbar кнопки */
#btn-force-sync { /* без окремого кольору — inherit від .t-action-btn */ }
@keyframes syncRotate { to { transform: rotate(360deg); } }
#btn-force-sync.syncing { pointer-events: none; opacity: 0.6; }
#btn-force-sync.syncing .sync-icon { display: inline-block; animation: syncRotate 1s linear infinite; }

/* Bulk bar: hidden attribute має пріоритет над display:flex */
#icc-bulk-bar[hidden] { display: none !important; }

/* Desc-cell truncation + expand */
.desc-cell {
  max-height: 3.6em; overflow: hidden; position: relative;
  cursor: pointer; transition: max-height 0.28s ease;
}
.desc-cell::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 60px; height: 1.4em;
  background: linear-gradient(to right, transparent, var(--bg-surface, #1f1812));
  pointer-events: none;
}
.desc-cell.expanded { max-height: 24em; cursor: default; }
.desc-cell.expanded::after { display: none; }

/* Compact module pills — відображаються у sticky toolbar */
.toolbar-mod-pills {
  display: none; align-items: center; gap: 4px;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%;
  padding: var(--sp-pad, 2px 0);
}
.toolbar.compact .toolbar-mod-pills { display: flex; }
.mod-pill {
  flex-shrink: 0; font-size: 10px; font-family: var(--font-mono, 'JetBrains Mono', 'Consolas', monospace); /* 🔧 sys-1011 */
  padding: var(--sp-card-pad, 2px 8px); border-radius: var(--radius-ui, 4px); border: 1px solid var(--border-md);
  background: rgba(232, 219, 178,0.04); color: var(--text-sec);
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.mod-pill:hover { background: rgba(232, 219, 178,0.08); color: var(--text); }
.mod-pill.active { background: rgba(232, 219, 178,0.12); color: var(--text); border-color: var(--border-accent); }
.mod-pill .pill-open { font-weight: 700; margin-left: 3px; }
.mod-pill-zero { opacity: 0.4; }

/* Date-upd dot — мінімальний індикатор що є дата оновлення (повна у title) */
.date-upd-dot { color: var(--border-accent); font-size: 10px; cursor: help; }

/* ─── DEPTH EFFECTS ──────────────────────────────
   Raised (випуклі) і Inset (вгнуті) елементи     */

/* Stat tiles — raised */
.stat {
  box-shadow:
    0 2px 10px rgba(0,0,0,0.45),
    0 0 0 1px rgba(232, 219, 178,0.04),
    inset 0 1px 0 rgba(232, 219, 178,0.06);
}

/* Module cards — raised */
.module-card {
  box-shadow:
    0 2px 8px rgba(0,0,0,0.4),
    0 0 0 1px rgba(232, 219, 178,0.035),
    inset 0 1px 0 rgba(232, 219, 178,0.05);
}

/* Gauge track — inset */
.gauge-track {
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.5);
}

/* Info strip — subtle inset */
.icc-info-strip {
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.2), 0 1px 0 rgba(232, 219, 178,0.02);
}

/* ═══════════════════════════════════════════════════
   TASKS TAB
═══════════════════════════════════════════════════ */

.tasks-tab { padding: 16px 0; }
.tasks-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-space-4);
}
.tasks-new-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-1);
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: 2px;
  border: 1px solid rgba(197, 139, 58, 0.55);
  background: rgba(197, 139, 58, 0.14);
  color: var(--accent-brass, #c58b3a);
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.tasks-new-btn:hover {
  background: rgba(197, 139, 58, 0.22);
  border-color: rgba(197, 139, 58, 0.85);
  
}
.tasks-hotkey-hint {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.tasks-action-btn {
  padding: var(--sp-space-1) var(--sp-space-3);
  border-radius: 2px;
  border: 1px solid rgba(92, 68, 48, 0.45);
  background: transparent;
  color: rgba(240, 232, 216, 0.55);
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.tasks-action-btn:hover {
  border-color: rgba(160, 133, 53, 0.55);
  color: var(--text-bright);
  background: rgba(160, 133, 53, 0.06);
}
.tasks-action-btn--warn {
  border-color: rgba(227, 111, 61, 0.40);
  color: var(--accent-ember, #e36f3d);
}
.tasks-action-btn--warn:hover {
  background: rgba(227, 111, 61, 0.10);
  border-color: rgba(227, 111, 61, 0.65);
}
.tasks-filter-row {
  display: flex;
  gap: var(--sp-space-1);
  margin-left: auto;
}
.tasks-filter {
  padding: var(--sp-space-1) var(--sp-space-3);
  border-radius: 2px;
  border: 1px solid rgba(92, 68, 48, 0.45);
  background: transparent;
  color: rgba(240, 232, 216, 0.55);
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.tasks-filter:hover {
  background: rgba(160, 133, 53, 0.06);
  color: var(--text-bright);
  border-color: rgba(160, 133, 53, 0.55);
}
.tasks-filter.active {
  background: rgba(197, 139, 58, 0.12);
  border-color: rgba(197, 139, 58, 0.55);
  color: var(--accent-brass, #c58b3a);
  
}

.tasks-section { margin-bottom: 24px; }
.tasks-section-header {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: var(--sp-space-2);
  padding-bottom: var(--sp-space-2);
  border-bottom: 1px solid rgba(232, 219, 178,0.06);
}
.tasks-section-header--done { color: var(--text-muted, #6a6a8a); }
.tasks-section-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.tasks-section-dot--active { background: var(--success); box-shadow: 0 0 8px rgba(86, 163, 166, 0.5); }
.tasks-section-dot--done   { background: var(--text-muted, #6a6a8a); }
.tasks-section-count {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  padding: 1px var(--sp-space-2);
  border-radius: 4px;
  background: rgba(232, 219, 178,0.06);
  margin-left: auto;
}

.tasks-empty {
  text-align: center;
  padding: var(--sp-space-5);
  color: var(--text-muted, #6a6a8a);
  font-size: 12px;
}

.task-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-space-2);
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: 2px;
  border: 1px solid var(--border-metal, #5c4430);
  background: rgba(31, 24, 18, 0.85);
  margin-bottom: var(--sp-space-1);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.task-row:hover {
  background: var(--bg-hover, #332618);
  border-color: var(--border-bright, #8c6b46);
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 3px 10px rgba(0, 0, 0, 0.45);
}
.task-row--done { opacity: 0.45; }
.task-row--done:hover { opacity: 0.65; }
.task-row--done .task-title { text-decoration: line-through; color: var(--text-muted); }

.task-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.task-info { flex: 1; min-width: 0; }
.task-title {
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 13px; font-weight: 500;
  color: var(--text-bright);
  line-height: 1.35;
}
.task-meta {
  display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap;
}
.task-tool-tag {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px; font-weight: 700;
  padding: 2px var(--sp-space-2);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(92, 68, 48, 0.45);
  color: var(--text-muted);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.task-sev {
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}
.task-date {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px;
  color: var(--text-muted);
}
.task-desc {
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 11px;
  color: var(--text-body);
  line-height: 1.5;
  margin-top: var(--sp-space-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.task-actions {
  display: flex; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s;
}
.task-row:hover .task-actions { opacity: 1; }
.task-act {
  width: 26px; height: 26px;
  border-radius: 2px;
  border: 1px solid rgba(92, 68, 48, 0.45);
  background: rgba(0, 0, 0, 0.30);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.task-act--done:hover   { background: rgba(86, 163, 166, 0.15); border-color: rgba(86, 163, 166, 0.55); color: var(--mod-observer); }
.task-act--reopen:hover { background: rgba(90, 130, 153, 0.15); border-color: rgba(90, 130, 153, 0.55); color: var(--mod-applicant); }
.task-act--del:hover    { background: rgba(193, 68, 24, 0.15);  border-color: rgba(193, 68, 24, 0.55);  color: var(--log-critical); }

/* ═══════════════════════════════════════════════════
   TASKS TAB — Розширення v2 (8 фіч)
═══════════════════════════════════════════════════ */

/* ── B1: Progress bar сесії (forge bar) ── */
.tasks-progress {
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-metal, #5c4430);
  border-radius: 2px;
  padding: var(--sp-space-3) var(--sp-space-4);
  margin-bottom: var(--sp-space-3);
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.tasks-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-body);
  margin-bottom: var(--sp-space-2);
}
.tasks-progress-pct {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 12px;
  color: var(--accent-brass, #c58b3a);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  
}
.tasks-progress-track {
  height: 5px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  margin-bottom: var(--sp-space-2);
  border-top: 1px solid rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(232, 219, 178, 0.06);
}
.tasks-progress-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--log-critical, #c14418) 0%,
    var(--accent-ember,  #e36f3d) 40%,
    var(--log-warn,      #e0c489) 70%,
    var(--mod-observer,  #7a9e5a) 100%);
  background-size: 100% 100%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.tasks-progress-breakdown {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── B2: Статистична панель (4 forge-tiles, DNA .dt-stat) ── */
.tasks-stat-row {
  display: flex;
  gap: 0;
  margin-bottom: var(--sp-space-4);
  flex-wrap: wrap;
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-metal, #5c4430);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.tasks-stat-card {
  flex: 1;
  min-width: 120px;
  padding: var(--sp-space-3) var(--sp-space-4);
  background: transparent;
  border: none;
  border-right: 1px solid rgba(92, 68, 48, 0.35);
  border-radius: 0;
  text-align: center;
  transition: background 0.15s;
}
.tasks-stat-card:last-child { border-right: none; }
.tasks-stat-card:hover { background: rgba(160, 133, 53, 0.05); }
.tasks-stat-num {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-brass, #c58b3a);
  line-height: 1.1;
  margin-bottom: var(--sp-space-1);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.tasks-stat-num--green  { color: var(--mod-observer); }
.tasks-stat-num--blue   { color: var(--info, #7c8f88); }
.tasks-stat-num--brass  { color: var(--accent-brass); }
.tasks-stat-num--ac { color: var(--accent-brass); }
.tasks-stat-label {
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(240, 232, 216, 0.45);
  font-weight: 500;
}

/* ── B4: Empty state ── */
.tasks-empty-state {
  text-align: center;
  padding: var(--sp-space-7) var(--sp-space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-space-3);
}
.tasks-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, var(--text-bright));
}
.tasks-empty-sub {
  font-size: 12px;
  color: var(--text-muted, #6a6a8a);
}
.tasks-empty-action {
  margin-top: var(--sp-space-2);
  padding: var(--sp-space-2) var(--sp-space-5);
  border-radius: var(--radius-ui, 4px);
  border: 1px solid rgba(197, 139, 58, 0.35);
  background: rgba(197, 139, 58, 0.1);
  color: var(--accent-brass-hover, var(--accent-brass));
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.tasks-empty-action:hover {
  background: rgba(197, 139, 58, 0.2);
  box-shadow: 0 0 12px rgba(197, 139, 58, 0.2);
}

/* ── B5: Hotkey hint ── */
.tasks-hotkey-hint {
  font-size: 10px;
  color: var(--text-muted, #6a6a8a);
  border: 1px solid rgba(232, 219, 178,0.07);
  border-radius: var(--radius-ui, 4px);
  padding: 2px var(--sp-space-2);
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.04em;
  align-self: center;
}

/* ── B6: Дедлайн badges ── */
.task-due {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  padding: 1px var(--sp-space-2);
  border-radius: var(--radius-ui, 4px);
  border: 1px solid currentColor;
  letter-spacing: 0.03em;
}
.task-due--future  { color: var(--text-muted); border-color: rgba(122, 106, 84, 0.3); background: rgba(122, 106, 84, 0.05); }
.task-due--soon    { color: var(--log-error); border-color: rgba(251,146,60,0.35);  background: rgba(251,146,60,0.08); }
.task-due--today   { color: var(--log-warn); border-color: rgba(250,204,21,0.35);  background: rgba(250,204,21,0.08); }
.task-due--overdue {
  color: var(--log-error); border-color: rgba(163, 71, 27, 0.4); background: rgba(163, 71, 27, 0.08);
  animation: task-due-pulse 1.8s ease-in-out infinite;
}
@keyframes task-due-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ── B7: Кнопка конвертації deferred→задача ── */
.deferred-to-task-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: var(--sp-space-1);
  padding: 2px var(--sp-space-2);
  border-radius: var(--radius-ui, 4px);
  border: 1px solid rgba(197, 139, 58, 0.3);
  background: rgba(197, 139, 58, 0.08);
  color: var(--accent-brass);
  font-size: 11px;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.15s;
  line-height: 1;
}
.deferred-to-task-btn:hover {
  background: rgba(197, 139, 58, 0.2);
  border-color: rgba(197, 139, 58, 0.5);
  box-shadow: 0 0 8px rgba(197, 139, 58, 0.2);
}

/* ═══════════════════════════════════════════════════
   TASKS TAB — v3 additions (top-3, tool-filter, pip, bars)
   Рендер з debug-report-logic-adc.js використовує ці класи,
   стилі раніше були відсутні — блок відновлює консистентність.
═══════════════════════════════════════════════════ */

/* ── .tasks-action-btn — canon block defined above at Phase 3 ── */

/* ── Top-3 "Зробити зараз" — пріоритетні картки (forge frame) ── */
.top3-wrap {
  background: var(--bg-surface, #1f1812);
  border: 1px solid var(--border-metal, #5c4430);
  border-left: 3px solid var(--accent-brass, #c58b3a);
  border-radius: 2px;
  padding: var(--sp-space-3) var(--sp-space-4);
  margin-bottom: var(--sp-space-4);
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.45);
}
.top3-header {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  margin-bottom: var(--sp-space-3);
}
.top3-header-icon {
  font-size: 16px;
  color: var(--accent-brass, #c58b3a);
  
}
.top3-header-title {
  font-family: 'Cinzel', var(--font-dt-title, 'Oswald', serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-brass, #c58b3a);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.top3-header-sub {
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
  font-style: italic;
}
.top3-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-space-3);
}
.top3-tile {
  position: relative;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border-metal, #5c4430);
  border-left: 3px solid var(--tile-accent, var(--accent-brass));
  border-radius: 2px;
  padding: var(--sp-space-3) var(--sp-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-space-2);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.top3-tile:hover {
  background: rgba(0, 0, 0, 0.42);
  border-color: var(--border-bright, #8c6b46);
  box-shadow:
    inset 0 1px 0 rgba(232, 219, 178, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 4px 14px rgba(0, 0, 0, 0.45);
}
.top3-tile-head {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px;
}
.top3-tile-sev {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}
.top3-tile-score {
  margin-left: auto;
  padding: 2px var(--sp-space-2);
  background: rgba(197, 139, 58, 0.14);
  border: 1px solid rgba(197, 139, 58, 0.45);
  border-radius: 2px;
  color: var(--accent-brass, #c58b3a);
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.top3-tile-src { font-size: 12px; opacity: 0.8; }
.top3-tile-title {
  font-family: 'IBM Plex Mono', var(--font-dt-status, monospace);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-bright);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.top3-tile-file {
  font-family: 'JetBrains Mono', var(--font-dt-digits, monospace);
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top3-tile-actions { display: flex; gap: 6px; margin-top: 4px; }
.top3-tile-btn {
  flex: 1;
  padding: var(--sp-space-1) var(--sp-space-3);
  border-radius: 2px;
  border: 1px solid var(--border-metal, #5c4430);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-body);
  font-family: 'Oswald', var(--font-dt-status, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.top3-tile-btn:hover {
  background: rgba(160, 133, 53, 0.10);
  color: var(--text-bright);
  border-color: rgba(160, 133, 53, 0.55);
}
.top3-tile-btn--take {
  border-color: rgba(197, 139, 58, 0.55);
  background: rgba(197, 139, 58, 0.14);
  color: var(--accent-brass, #c58b3a);
  
}
.top3-tile-btn--take:hover {
  background: rgba(197, 139, 58, 0.22);
  border-color: rgba(197, 139, 58, 0.75);
}
.top3-tile-btn--defer { flex: 0 0 auto; padding: 6px 12px; }

/* ── Tool filter row (Усі джерела 63, Моя 1, Усі сканери 62, Bot 12...) ── */
.tasks-filter-row--tool {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-space-2);
  margin-top: var(--sp-space-3);
  margin-bottom: var(--sp-space-4);
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: 4px;
  background: rgba(232, 219, 178,0.02);
  border: 1px solid rgba(232, 219, 178,0.05);
}
.tasks-filter-row--tool .tasks-filter {
  font-size: 10px;
  padding: var(--sp-space-1) var(--sp-space-3);
}

/* ── Tool filter кнопки (.tfr-btn з лічильником) ── */
.tfr-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  padding: var(--sp-space-1) var(--sp-space-3);
  border-radius: var(--radius-ui, 4px);
  border: 1px solid rgba(232, 219, 178,0.08);
  background: rgba(232, 219, 178,0.02);
  color: var(--text-body, #bfa37a);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tfr-btn:hover {
  background: rgba(232, 219, 178,0.05);
  color: var(--text-bright, #f3efdc);
}
.tfr-btn.active {
  background: rgba(197, 139, 58, 0.14);
  border-color: rgba(197, 139, 58, 0.4);
  color: var(--accent-brass-hover, var(--accent-brass));
  box-shadow: inset 0 0 6px rgba(197, 139, 58, 0.15);
}
.tfr-btn--manual.active {
  background: rgba(122, 106, 84, 0.12);
  border-color: rgba(122, 106, 84, 0.35);
  color: var(--text-body);
}
.tfr-btn--scan-all.active {
  background: rgba(197, 139, 58, 0.18);
  border-color: rgba(197, 139, 58, 0.5);
  color: color-mix(in srgb, var(--mod-applicant) 30%, var(--text-bright));
}
.tfr-btn--scan {
  border-left: 2px solid var(--tfr-color, color-mix(in srgb, var(--mod-applicant) 40%, var(--accent-ember)));
}
.tfr-btn--scan.active {
  background: color-mix(in srgb, var(--tfr-color, color-mix(in srgb, var(--mod-applicant) 40%, var(--accent-ember))) 15%, transparent);
  border-color: var(--tfr-color, color-mix(in srgb, var(--mod-applicant) 40%, var(--accent-ember)));
  color: var(--tfr-color, color-mix(in srgb, var(--mod-applicant) 30%, var(--text-bright)));
}
.tfr-btn-cnt {
  display: inline-block;
  min-width: 18px;
  padding: 1px var(--sp-space-2);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  border-radius: var(--radius-ui, 2px);
  background: rgba(0,0,0,0.25);
  color: var(--text-muted, #6a6a8a);
  text-align: center;
}
.tfr-btn.active .tfr-btn-cnt {
  background: rgba(232, 219, 178,0.15);
  color: inherit;
}

/* ── Bulk-dismiss модалка (F5) ── */
.bulk-dismiss-overlay { z-index: 10050; }
.bulk-dismiss-modal {
  max-width: 640px;
  width: 90vw;
}
.bulk-dismiss-preview {
  margin-top: var(--sp-space-3);
  padding: var(--sp-space-3) var(--sp-space-3);
  border-radius: 4px;
  background: rgba(197, 139, 58, 0.04);
  border: 1px solid rgba(197, 139, 58, 0.2);
  max-height: 320px;
  overflow-y: auto;
}
.bulk-dismiss-preview-summary {
  font-size: 12px;
  color: var(--text-bright, #f3efdc);
  margin-bottom: var(--sp-space-2);
}
.bulk-dismiss-preview-summary strong {
  color: var(--log-error);
  font-family: var(--font-mono, monospace);
}
.bulk-dismiss-preview-list {
  margin: 0;
  padding-left: var(--sp-space-5);
  font-size: 11px;
  color: var(--text-body, #bfa37a);
  line-height: 1.5;
}
.bulk-dismiss-preview-list li {
  padding: var(--sp-pad, 2px 0);
  border-bottom: 1px dotted rgba(232, 219, 178,0.05);
}
.bulk-dismiss-preview-list li:last-child { border-bottom: none; }

/* ── Pip-індикатор джерела (agent/manual) зліва біля task-row ── */
.task-tool-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-ui, 4px);
  background: rgba(232, 219, 178,0.03);
  border: 1px solid rgba(232, 219, 178,0.08);
  border-left: 2px solid var(--pip-color, color-mix(in srgb, var(--mod-applicant) 40%, var(--accent-ember)));
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: transform 0.15s;
}
.task-tool-pip--scan {
  background: rgba(197, 139, 58, 0.08);
  border-color: rgba(197, 139, 58, 0.2);
}
.task-tool-pip--manual {
  background: rgba(122, 106, 84, 0.05);
  border-color: rgba(122, 106, 84, 0.15);
}
.task-row:hover .task-tool-pip { transform: scale(1.08); }

/* ── Seen-count badge (×N разів зустрічали) ── */
.task-seen-badge {
  display: inline-flex;
  align-items: center;
  margin-left: var(--sp-space-2);
  padding: 1px var(--sp-space-2);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  border-radius: var(--radius-ui, 4px);
  background: rgba(90, 130, 153, 0.12);
  border: 1px solid rgba(90, 130, 153, 0.28);
  color: var(--mod-applicant);
  letter-spacing: 0.02em;
}

/* ── ROI score badge (⚡ число) ── */
.task-score-badge {
  display: inline-flex;
  align-items: center;
  margin-left: var(--sp-space-2);
  padding: 1px var(--sp-space-2);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  border-radius: var(--radius-ui, 4px);
  background: rgba(250,204,21,0.1);
  border: 1px solid rgba(250,204,21,0.28);
  color: var(--log-warn);
  letter-spacing: 0.02em;
}

/* ── Dual-bar: confidence + effort сегменти ── */
.task-bars {
  display: flex;
  gap: var(--sp-space-4);
  margin-top: var(--sp-space-2);
  align-items: center;
}
.task-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-space-1);
  font-size: 10px;
  color: var(--text-muted, #6a6a8a);
}
.task-bar-lbl {
  font-size: 10px;
  margin-right: 2px;
  opacity: 0.7;
}
.task-bar-seg {
  display: inline-block;
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: rgba(232, 219, 178,0.06);
  transition: background 0.15s;
}
.task-bar-seg.on.conf-high     { background: var(--success); box-shadow: 0 0 4px rgba(86, 163, 166, 0.3); }
.task-bar-seg.on.conf-medium   { background: var(--log-warn); box-shadow: 0 0 4px rgba(250,204,21,0.3); }
.task-bar-seg.on.conf-low      { background: var(--text-muted); }
.task-bar-seg.on.effort-quick  { background: var(--mod-applicant); box-shadow: 0 0 4px rgba(90, 130, 153, 0.3); }
.task-bar-seg.on.effort-medium { background: var(--log-error); box-shadow: 0 0 4px rgba(251,146,60,0.3); }
.task-bar-seg.on.effort-complex{ background: var(--log-error); box-shadow: 0 0 4px rgba(163, 71, 27, 0.3); }

/* ═══════════════════════════════════════════════════
   PHASE 2-4: Modal A1/A3/A4, tasks-drafts (B1),
   evidence (B2), assignee badge (C1), timeline (C3),
   sub-tasks (X3), unfurl (X1), commit-refs (X2)
═══════════════════════════════════════════════════ */

/* A1: fuzzy similar matches під title */
.task-similar-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-brass-hover, var(--accent-brass));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-space-2);
}
.task-similar-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-space-1);
}
.task-similar-item {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  padding: var(--sp-space-2) var(--sp-space-2);
  border-radius: var(--radius-ui, 4px);
  border: 1px solid rgba(197, 139, 58, 0.15);
  background: rgba(197, 139, 58, 0.04);
  color: var(--text-body, #bfa37a);
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}
.task-similar-item:hover {
  background: rgba(197, 139, 58, 0.1);
  border-color: rgba(197, 139, 58, 0.35);
  color: var(--text-bright);
  transform: translateX(2px);
}
.task-similar-sev { font-size: 10px; flex-shrink: 0; }
.task-similar-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-similar-meta {
  font-size: 9px;
  color: var(--text-muted, #6a6a8a);
  font-family: var(--font-mono, monospace);
  flex-shrink: 0;
}

/* A3: severity AI suggest hint */
.cm-issue-sev-suggest {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  margin-top: var(--sp-space-2);
  padding: var(--sp-space-1) var(--sp-space-3);
  font-size: 10px;
  color: var(--log-warn);
  border-radius: var(--radius-ui, 4px);
  background: rgba(250,204,21,0.08);
  border: 1px solid rgba(250,204,21,0.25);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-mono, monospace);
}
.cm-issue-sev-suggest:hover {
  background: rgba(250,204,21,0.16);
  border-color: rgba(250,204,21,0.45);
}

/* A4: collapsible sections у модалці */
.cm-issue-section {
  border-bottom: 1px solid rgba(232, 219, 178,0.04);
  margin-bottom: var(--sp-space-3);
}
.cm-issue-section:last-child { border-bottom: none; }
.cm-issue-section-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  width: 100%;
  padding: var(--sp-space-2) 0;
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}
.cm-issue-section-toggle:hover { color: var(--accent-brass-hover, var(--accent-brass)); }
.cm-issue-section-toggle .cm-issue-chevron {
  font-size: 14px;
  transition: transform 0.2s;
}
.cm-issue-section.collapsed .cm-issue-chevron { transform: rotate(-90deg); }
.cm-issue-section-body { padding-bottom: 10px; }
.cm-issue-section.collapsed .cm-issue-section-body { display: none; }

/* B1: drafts секція над "В роботі" */
.tasks-drafts-section {
  margin-bottom: var(--sp-space-5);
  padding: var(--sp-space-3) var(--sp-space-3);
  border-radius: var(--radius-ui, 4px);
  background: linear-gradient(180deg, rgba(250,204,21,0.06) 0%, rgba(232, 219, 178,0.01) 100%);
  border: 1px solid rgba(250,204,21,0.22);
}
.tasks-drafts-header {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  margin-bottom: var(--sp-space-3);
}
.tasks-drafts-icon { font-size: 16px; color: var(--log-warn); }
.tasks-drafts-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-bright);
}
.tasks-drafts-sub {
  font-size: 10px;
  color: var(--text-muted, #6a6a8a);
  margin-left: auto;
  font-style: italic;
}
.tasks-drafts-list { display: flex; flex-direction: column; gap: var(--sp-gap, 6px); }
.task-draft-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-space-3);
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: var(--radius-ui, 4px);
  border: 1px solid rgba(232, 219, 178,0.06);
  border-left: 3px solid var(--log-warn);
  background: rgba(0,0,0,0.15);
}
.task-draft-body { flex: 1; min-width: 0; }
.task-draft-title { font-size: 12px; color: var(--text-bright); }
.task-draft-meta {
  font-size: 10px;
  color: var(--text-muted, #6a6a8a);
  font-family: var(--font-mono, monospace);
  margin-top: var(--sp-space-1);
}
.task-draft-actions { display: flex; gap: 4px; flex-shrink: 0; }
.task-draft-btn {
  padding: var(--sp-space-1) var(--sp-space-3);
  font-size: 11px;
  border-radius: var(--radius-ui, 4px);
  border: 1px solid rgba(232, 219, 178,0.08);
  background: rgba(232, 219, 178,0.03);
  color: var(--text-body, #bfa37a);
  cursor: pointer;
  transition: all 0.15s;
}
.task-draft-btn--confirm {
  border-color: rgba(86, 163, 166, 0.3);
  background: rgba(86, 163, 166, 0.08);
  color: var(--success);
}
.task-draft-btn--confirm:hover {
  background: rgba(86, 163, 166, 0.18);
  border-color: rgba(86, 163, 166, 0.55);
}
.task-draft-btn--dismiss:hover {
  background: rgba(163, 71, 27, 0.12);
  border-color: rgba(163, 71, 27, 0.35);
  color: var(--log-error);
}

/* B2: evidence блок у task-row */
.task-evidence {
  margin-top: var(--sp-space-2);
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: var(--radius-ui, 4px);
  background: rgba(197, 139, 58, 0.05);
  border: 1px solid rgba(197, 139, 58, 0.15);
  font-size: 10px;
}
.task-evidence-summary {
  font-size: 10px;
  color: var(--accent-brass-hover, var(--accent-brass));
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.task-evidence-summary::-webkit-details-marker { display: none; }
.task-evidence-summary::before { content: '▸ '; transition: transform 0.2s; display: inline-block; }
.task-evidence[open] .task-evidence-summary::before { content: '▾ '; }
.task-evidence-body {
  margin-top: var(--sp-space-2);
  font-family: var(--font-mono, monospace);
  color: var(--text-body, #bfa37a);
  line-height: 1.5;
}
.task-evidence-line {
  padding: var(--sp-space-1) 0;
  border-bottom: 1px dotted rgba(232, 219, 178,0.05);
}
.task-evidence-line:last-child { border-bottom: none; }
.task-evidence-key { color: var(--accent-brass-hover, var(--accent-brass)); font-weight: 600; margin-right: 6px; }
.task-evidence-copy {
  display: inline-block;
  margin-top: var(--sp-space-2);
  padding: 2px var(--sp-space-2);
  font-size: 9px;
  border-radius: var(--radius-ui, 2px);
  border: 1px solid rgba(197, 139, 58, 0.3);
  background: rgba(197, 139, 58, 0.08);
  color: var(--accent-brass-hover, var(--accent-brass));
  cursor: pointer;
}
.task-evidence-copy:hover { background: rgba(197, 139, 58, 0.18); }

/* C1: assignee badge */
.task-assignee-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-1);
  padding: 1px var(--sp-space-2);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-ui, 4px);
  font-family: var(--font-mono, monospace);
  background: rgba(197, 139, 58, 0.12);
  border: 1px solid rgba(197, 139, 58, 0.32);
  color: var(--accent-brass-hover, var(--accent-brass));
}
.task-assignee-badge::before { content: 'smart_toy'; font-family: 'Material Symbols Outlined'; font-size: 12px; vertical-align: middle; margin-right: 3px; }

/* C3: timeline (розгортається у detail view) */
.task-timeline {
  margin-top: var(--sp-space-2);
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: var(--radius-ui, 4px);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(232, 219, 178,0.05);
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  max-height: 200px;
  overflow-y: auto;
}
.task-timeline-row {
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  gap: var(--sp-space-2);
  padding: var(--sp-space-1) 0;
  border-bottom: 1px dotted rgba(232, 219, 178,0.04);
  color: var(--text-body, #bfa37a);
}
.task-timeline-row:last-child { border-bottom: none; }
.task-timeline-ts { color: var(--text-muted, #6a6a8a); }
.task-timeline-actor { color: var(--accent-brass-hover, var(--accent-brass)); font-weight: 600; }
.task-timeline-note { color: var(--text-bright); overflow: hidden; text-overflow: ellipsis; }

/* X3: sub-tasks checklist */
.task-subtasks {
  margin-top: var(--sp-space-2);
  padding: var(--sp-space-2) var(--sp-space-3);
  border-radius: var(--radius-ui, 4px);
  background: rgba(232, 219, 178,0.02);
  border: 1px solid rgba(232, 219, 178,0.06);
}
.task-subtasks-progress {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  margin-bottom: var(--sp-space-2);
  font-size: 10px;
  color: var(--text-muted, #6a6a8a);
  font-family: var(--font-mono, monospace);
}
.task-subtasks-bar {
  flex: 1;
  height: 4px;
  background: rgba(232, 219, 178,0.05);
  border-radius: 2px;
  overflow: hidden;
}
.task-subtasks-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mod-applicant), var(--success));
  transition: width 0.3s;
}
.task-subtask-item {
  display: flex;
  align-items: center;
  gap: var(--sp-space-2);
  padding: var(--sp-space-1) 0;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-body, #bfa37a);
}
.task-subtask-item.done { text-decoration: line-through; opacity: 0.5; }
.task-subtask-box {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-ui, 2px);
  border: 1px solid rgba(232, 219, 178,0.2);
  flex-shrink: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.task-subtask-item.done .task-subtask-box {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg-void);
}

/* X1: unfurl reference cards */
.task-unfurl-previews {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-space-2);
  margin-top: var(--sp-space-2);
}
.task-unfurl-card {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  padding: var(--sp-space-1) var(--sp-space-2);
  font-size: 10px;
  border-radius: var(--radius-ui, 4px);
  border: 1px solid rgba(90, 130, 153, 0.25);
  background: rgba(90, 130, 153, 0.06);
  color: var(--mod-applicant);
  cursor: pointer;
  font-family: var(--font-mono, monospace);
  transition: all 0.15s;
}
.task-unfurl-card:hover {
  background: rgba(90, 130, 153, 0.14);
  border-color: rgba(90, 130, 153, 0.5);
}

/* X2: commit refs badge */
.task-commit-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-1);
  padding: 1px var(--sp-space-2);
  font-size: 10px;
  border-radius: var(--radius-ui, 4px);
  background: rgba(86, 163, 166, 0.1);
  border: 1px solid rgba(86, 163, 166, 0.28);
  color: var(--success);
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  text-decoration: none;
}
.task-commit-badge:hover { background: rgba(86, 163, 166, 0.2); }

/* ── B8: Зв'язок задача↔баг ── */
.task-linked-bug {
  cursor: pointer;
  font-size: 10px;
  color: var(--accent-brass);
  font-family: var(--font-mono, monospace);
  padding: 1px var(--sp-space-2);
  border-radius: var(--radius-ui, 4px);
  background: rgba(197, 139, 58, 0.07);
  border: 1px solid rgba(197, 139, 58, 0.2);
  transition: all 0.15s;
}
.task-linked-bug:hover {
  text-decoration: underline;
  background: rgba(197, 139, 58, 0.14);
  border-color: rgba(197, 139, 58, 0.4);
}

/* ── date input темна тема ── */
#taskDueDate {
  color-scheme: dark;
}

/* ═══════════════════════════════════════════════════════════
   AFK Scan enhancements (2026-04-18)
   V2 pip · V3 dual-bar · V4 modules-collapse · F3 tool-filter
   · F4 sort toggle · F5 bulk-dismiss · A2 seen-count · A3 top-3
═══════════════════════════════════════════════════════════ */

/* V2: Pip-індикатор джерела задачі */
.task-tool-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  background: color-mix(in srgb, var(--pip-color, var(--text-muted)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--pip-color, var(--text-muted)) 55%, transparent);
  color: var(--pip-color, var(--text-muted));
  flex-shrink: 0;
  margin-right: var(--sp-space-2);
  cursor: help;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.task-tool-pip:hover { transform: scale(1.15); box-shadow: 0 0 10px color-mix(in srgb, var(--pip-color) 50%, transparent); }
.task-tool-pip--scan { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pip-color) 35%, transparent); }
.task-tool-pip--manual { opacity: 0.85; }

/* A2: seen_count бейдж */
.task-seen-badge {
  display: inline-block;
  margin-left: var(--sp-space-2);
  padding: 1px var(--sp-space-2);
  font-size: 10px;
  font-weight: 600;
  color: var(--log-error);
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: var(--radius-ui, 4px);
  vertical-align: middle;
  cursor: help;
}

/* F4: score-badge */
.task-score-badge {
  display: inline-block;
  margin-left: var(--sp-space-2);
  padding: 1px var(--sp-space-2);
  font-size: 10px;
  font-weight: 600;
  color: var(--log-warn);
  background: rgba(197, 139, 58, 0.14);
  border: 1px solid rgba(197, 139, 58, 0.35);
  border-radius: var(--radius-ui, 4px);
  vertical-align: middle;
  cursor: help;
}

/* V3: Dual-bar confidence/effort */
.task-bars {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-space-3);
  margin-top: var(--sp-space-2);
  font-size: 11px;
  color: var(--text-muted);
}
.task-bar { display: inline-flex; align-items: center; gap: var(--sp-gap, 3px); cursor: help; }
.task-bar-lbl { margin-right: 4px; font-size: 10px; opacity: 0.75; }
.task-bar-seg {
  width: 14px; height: 5px; border-radius: 2px;
  background: rgba(122, 106, 84, 0.18);
}
.task-bar-seg.on.conf-high    { background: var(--mod-observer); }
.task-bar-seg.on.conf-medium  { background: var(--accent-brass-hover, var(--accent-brass)); }
.task-bar-seg.on.conf-low     { background: var(--text-muted); }
.task-bar-seg.on.effort-quick   { background: color-mix(in srgb, var(--mod-applicant) 70%, var(--text-bright)); }
.task-bar-seg.on.effort-medium  { background: var(--mod-challenger); }
.task-bar-seg.on.effort-complex { background: var(--log-error); }

/* F3: Tool filter row — duplicate definitions consolidated into Phase 3-7 canon blocks above */

/* F5: Bulk-dismiss модалка */
.bulk-dismiss-modal { max-width: 520px; }
.bulk-dismiss-preview {
  margin-top: var(--sp-space-3); padding: var(--sp-space-3);
  background: rgba(251, 146, 60, 0.05);
  border: 1px solid rgba(251, 146, 60, 0.25); border-radius: var(--radius-ui, 4px);
  font-size: 12px;
}
.bulk-dismiss-preview-summary {
  font-weight: 600; color: var(--log-error);
  margin-bottom: var(--sp-space-2); padding-bottom: var(--sp-space-2);
  border-bottom: 1px dashed rgba(251, 146, 60, 0.2);
}
.bulk-dismiss-preview-list {
  margin: 0; padding-left: 18px; max-height: 220px; overflow-y: auto;
  font-size: 11px; line-height: 1.5; color: var(--text-muted);
}
.bulk-dismiss-preview-list li { margin-bottom: 3px; }

/* V4: Modules collapse bar */
.modules-collapse-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-space-3);
  padding: var(--sp-space-3) var(--sp-space-4);
  margin: var(--sp-space-2) 0 var(--sp-space-4);
  background: rgba(20, 16, 12, 0.92);
  border: 1px solid rgba(92, 68, 48, 0.55);
  border-radius: 4px;
  font-size: 13px;
}
.modules-collapse-bar[hidden] { display: none; }
.modules-collapse-text { color: var(--text-bright); letter-spacing: 0.01em; }
.modules-collapse-btn {
  padding: var(--sp-space-2) var(--sp-space-3); font-size: var(--sp-space-3); font-weight: 500;
  color: var(--text-bright); background: rgba(122, 106, 84, 0.1);
  border: 1px solid rgba(92, 68, 48, 0.50); border-radius: var(--radius-ui, 4px);
  cursor: pointer; transition: all 120ms ease;
}
.modules-collapse-btn:hover { background: rgba(122, 106, 84, 0.2); }

/* task-row стиль з pip (AFK vs ручна) */
.task-row[data-scan="1"] { border-left: 2px solid color-mix(in srgb, var(--pip-color, var(--text-muted)) 70%, transparent); }
.task-row[data-scan="0"] { border-left: 2px solid rgba(122, 106, 84, 0.35); }

/* ══════════════════════════════════════════════════════
   ACCESSIBILITY — Reduced Motion (Canon Rule I)
══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Button accessibility — focus-visible (Canon Rule G) ── */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
button:active { opacity: 0.85; }
button:disabled, [disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ══════════════════════════════════════════════════════
   HEADER CLUSTER + DECOR FIX (screenshot bugs #1,#4,#7,#10)
   Канон: класи зони (.al-*, токени .dev-tools-scope), без нових токенів.
══════════════════════════════════════════════════════ */

/* #4 — декор не перехоплює кліки/курсор над кластером і контентом */
.dev-tools-scope.al-page .al-bg-scene,
.dev-tools-scope.al-page .al-crest .al-frame-svg,
.dev-tools-scope.al-page .al-sv-bg-gear,
.dev-tools-scope.al-page .al-sv-fg-gear,
.dev-tools-scope.al-page .al-sv-lamp,
.dev-tools-scope.al-page .al-crest-lamp,
.dev-tools-scope.al-page .al-scan-line {
  pointer-events: none;
}

/* #1 — кластер дій над декором балки, клікабельний, не накладається на герб */
.dev-tools-scope.al-page .al-header-left-cluster {
  position: relative;
  z-index: 3;
  flex-wrap: nowrap;
}
.dev-tools-scope.al-page .al-header-left-cluster .al-hdr-btn:focus-visible {
  outline: 2px solid var(--accent-brass, #c58b3a);
  outline-offset: 2px;
}

/* #7 — картки модулів рівні по висоті, стабільна сітка */
.dev-tools-scope.al-page .modules-grid { align-items: stretch; }
.dev-tools-scope.al-page .cc-summary-card { height: 100%; }

/* #1/#10 — щоб кластер не наїжджав на центральний герб на вузьких екранах:
   компактний icon-only режим (label-текст ховається font-size:0,
   icon і aria-label лишаються; доступність збережена) */
@media (max-width: 1024px) {
  .dev-tools-scope.al-page .al-header-left-cluster .al-hdr-btn {
    font-size: 0;
    padding: var(--sp-space-1) var(--sp-space-2);
    gap: 0;
  }
  .dev-tools-scope.al-page .al-header-left-cluster .al-hdr-btn .material-symbols-outlined {
    font-size: 16px;
  }
}

/* #10 — жодного горизонтального overflow body на мобільному */
@media (max-width: 600px) {
  body.devtools-body.al-page { overflow-x: hidden; }
  .dev-tools-scope.al-page .al-header-left-cluster { gap: var(--sp-space-1); }
}
