.kc-notif-panel {
  position: fixed;
  z-index: 11500;
  min-width: 360px;
  max-width: 480px;
  max-height: 70vh;
  background: linear-gradient(170deg,
    rgba(11,14,24,0.99) 0%,
    rgba(8,11,20,0.99) 100%);
  border: 1px solid rgba(160,120,32,0.30);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.50);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body[data-theme="light"] .kc-notif-panel {
  background: rgba(252,251,247,0.99);
  border-color: rgba(60,100,145,0.30);
  box-shadow: 0 12px 32px rgba(60,100,145,0.15);
}

.kc-notif-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(160,120,32,0.10);
  flex-shrink: 0;
}

.kc-notif-title {
  font-family: var(--f-display);
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--smoke);
  margin-bottom: 4px;
}

.kc-notif-summary {
  display: flex;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--smoke4);
}

.kc-notif-empty {
  padding: 32px 18px;
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--smoke3);
  text-align: center;
  letter-spacing: 0.01em;
}

.kc-notif-list {
  overflow-y: auto;
  flex: 1;
}

.kc-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(160,120,32,0.05);
  cursor: pointer;
  transition: background 0.15s;
}
.kc-notif-item:hover { background: rgba(160,120,32,0.05); }
body[data-theme="light"] .kc-notif-item:hover { background: rgba(60,100,145,0.05); }

.kc-notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.kc-notif-sev-red    .kc-notif-item-dot, .kc-notif-sev-red    .kc-attention-item-dot { background: var(--red-lt); }
.kc-notif-sev-amber  .kc-notif-item-dot, .kc-notif-sev-amber  .kc-attention-item-dot { background: var(--amber-lt); }
.kc-notif-sev-info   .kc-notif-item-dot, .kc-notif-sev-info   .kc-attention-item-dot { background: var(--gold-lt); }

.kc-notif-item-body {
  flex: 1;
  min-width: 0;
}

.kc-notif-item-title {
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--smoke);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.kc-notif-item-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--smoke3);
  letter-spacing: 0.06em;
}

.kc-notif-item-tile {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--smoke4);
  flex-shrink: 0;
}

/* ── "Needs your attention" banner on Today ──────────────────────── */
.kc-attention-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  margin: 18px 32px 8px;
  background: linear-gradient(135deg, rgba(160,120,32,0.06) 0%, rgba(160,120,32,0.02) 100%);
  border: 1px solid rgba(160,120,32,0.22);
  border-left-width: 3px;
  border-radius: 6px;
}
.kc-attention-red    { border-left-color: var(--red-lt);   background: linear-gradient(135deg, rgba(192,57,43,0.10) 0%, rgba(192,57,43,0.02) 100%); }
.kc-attention-amber  { border-left-color: var(--amber-lt); background: linear-gradient(135deg, rgba(204,144,0,0.10) 0%, rgba(204,144,0,0.02) 100%); }
.kc-attention-info   { border-left-color: var(--gold-lt); }
body[data-theme="light"] .kc-attention-info { background: linear-gradient(135deg, rgba(60,100,145,0.06) 0%, rgba(60,100,145,0.02) 100%); }

.kc-attention-icon {
  flex-shrink: 0;
  color: var(--gold-lt);
  padding-top: 2px;
}
.kc-attention-red    .kc-attention-icon { color: var(--red-lt); }
.kc-attention-amber  .kc-attention-icon { color: var(--amber-lt); }

.kc-attention-body {
  flex: 1;
  min-width: 0;
}

.kc-attention-title {
  font-family: var(--f-display);
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--smoke);
  margin-bottom: 8px;
}

.kc-attention-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kc-attention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 12px;
  transition: opacity 0.15s;
}
.kc-attention-item:hover { opacity: 0.75; }

.kc-attention-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kc-attention-item-title {
  font-family: var(--f-body);
  color: var(--smoke);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.kc-attention-item-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--smoke3);
  margin-left: 8px;
}

.kc-attention-more {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--smoke4);
  text-transform: uppercase;
  margin-top: 4px;
}

.kc-attention-view-all {
  flex-shrink: 0;
  background: rgba(160,120,32,0.10);
  border: 1px solid rgba(160,120,32,0.30);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gold-lt);
  cursor: pointer;
  transition: all 0.15s;
  align-self: center;
}
.kc-attention-view-all:hover {
  background: rgba(160,120,32,0.20);
  border-color: rgba(160,120,32,0.55);
  color: var(--smoke);
}

/* ── Role-distinctive header colors + scope badges ─────────────────── */
.kc-scope-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

.kc-scope-gold   { background: rgba(160,120,32,0.10); border: 1px solid rgba(160,120,32,0.35); color: var(--gold-lt); }
.kc-scope-blue   { background: rgba(60,100,145,0.10); border: 1px solid rgba(60,100,145,0.40); color: #7ba6dc; }
.kc-scope-green  { background: rgba(0,138,82,0.12);   border: 1px solid rgba(0,138,82,0.40);   color: var(--ok-lt); }

/* Role-distinctive module eyebrow color */
.kc-mod-role-gold  .kc-module-eyebrow { color: var(--gold-lt); }
.kc-mod-role-blue  .kc-module-eyebrow { color: #7ba6dc; }
.kc-mod-role-green .kc-module-eyebrow { color: var(--ok-lt); }

/* Role-distinctive top accent line */
.kc-mod-role-gold  .kc-module-head { border-top: 2px solid rgba(160,120,32,0.30); }
.kc-mod-role-blue  .kc-module-head { border-top: 2px solid rgba(60,100,145,0.40); }
.kc-mod-role-green .kc-module-head { border-top: 2px solid rgba(0,138,82,0.40); }

/* ── Inline row Kait chips ─────────────────────────────────────────── */
.kc-row-kait-host {
  margin-top: 6px;
}

.kc-kait-rowchips .kc-kait-chip-row {
  margin-top: 0;
}

/* Inline chips on rows — smaller to not overwhelm */
.kc-kait-rowchips .kc-kait-chip {
  padding: 2px 8px;
  font-size: 9px;
  letter-spacing: 0.10em;
}

/* Prevent row click bubbling — chips have their own click stop in JS, but
   give the wrapper a bit of padding to keep the click target separate */
.kc-row-kait-host {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   USER MANAGEMENT — list rows, sortable header, selection, bulk bar
   ═══════════════════════════════════════════════════════════════════════ */

.kc-umm-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(160,120,32,0.18);
  background: rgba(160,120,32,0.03);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--smoke4);
}
body[data-theme="light"] .kc-umm-header-row {
  background: rgba(60,100,145,0.03);
  border-bottom-color: rgba(60,100,145,0.18);
}

.kc-umm-sort {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.kc-umm-sort:hover { color: var(--gold-lt); }

.kc-umm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(160,120,32,0.06);
  cursor: pointer;
  transition: background 0.15s;
}
.kc-umm-row:last-child { border-bottom: none; }
.kc-umm-row:hover { background: rgba(160,120,32,0.04); }
body[data-theme="light"] .kc-umm-row:hover { background: rgba(60,100,145,0.04); }
.kc-umm-row-selected {
  background: rgba(160,120,32,0.08) !important;
}
body[data-theme="light"] .kc-umm-row-selected {
  background: rgba(60,100,145,0.08) !important;
}

.kc-umm-row-check  { flex-shrink: 0; width: 28px; display: flex; align-items: center; justify-content: center; }
.kc-umm-row-main   { flex: 2; min-width: 0; }
.kc-umm-row-role   { flex-shrink: 0; width: 160px; }
.kc-umm-row-dept   { flex-shrink: 0; width: 140px; font-family: var(--f-mono); font-size: 11px; color: var(--smoke3); letter-spacing: 0.06em; }
.kc-umm-row-loc    { flex-shrink: 0; width: 90px; font-family: var(--f-mono); font-size: 11px; color: var(--smoke3); letter-spacing: 0.06em; }

.kc-umm-row-name {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--smoke);
  letter-spacing: 0.01em;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.kc-umm-row-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--smoke3);
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-umm-cb {
  cursor: pointer;
}

/* Bulk action bar in toolbar */
#kc-umm-bulk-bar {
  display: none;
  gap: 8px;
  align-items: center;
}

/* Mobile / narrow — collapse dept and loc columns */
@media (max-width: 900px) {
  .kc-umm-row-dept,
  .kc-umm-header-row > .kc-umm-row-dept { display: none; }
  .kc-umm-row-loc,
  .kc-umm-header-row > .kc-umm-row-loc { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   REGULATORY RESPONSE — findings list, tier badges, escalation modal
   ═══════════════════════════════════════════════════════════════════════ */

.kc-drawer-wide {
  /* Reg-response detail drawers are wider — more content per page */
  width: min(720px, 100%);
}

/* Tier badges — visual hierarchy */
.kc-rrw-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  border: 2px solid;
}
.kc-rrw-tier-crit { background: rgba(192,57,43,0.10); border-color: rgba(192,57,43,0.45); }
.kc-rrw-tier-imp  { background: rgba(204,144,0,0.10); border-color: rgba(204,144,0,0.45); }
.kc-rrw-tier-info { background: rgba(0,138,82,0.08);  border-color: rgba(0,138,82,0.40); }

.kc-rrw-tier-inline {
  display: inline-block;
  margin-right: 8px;
}

/* Findings rows */
.kc-rrw-row,
.kc-rrw-resp-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(160,120,32,0.06);
  cursor: pointer;
  transition: background 0.15s;
}
.kc-rrw-row:last-child, .kc-rrw-resp-row:last-child { border-bottom: none; }
.kc-rrw-row:hover, .kc-rrw-resp-row:hover { background: rgba(160,120,32,0.04); }
body[data-theme="light"] .kc-rrw-row:hover, body[data-theme="light"] .kc-rrw-resp-row:hover { background: rgba(60,100,145,0.04); }

.kc-rrw-row-tier    { flex-shrink: 0; width: 48px; }
.kc-rrw-row-main    { flex: 1; min-width: 0; }
.kc-rrw-row-status  { flex-shrink: 0; width: 140px; text-align: right; }

.kc-rrw-row-title {
  font-family: var(--f-display);
  font-size: 15px;
  color: var(--smoke);
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-rrw-row-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--smoke3);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.kc-rrw-row-summary {
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--smoke2);
  letter-spacing: 0.01em;
  line-height: 1.4;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kc-rrw-resp-progress {
  flex-shrink: 0;
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kc-rrw-resp-progress-text {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--smoke4);
  text-align: right;
}

/* Department block inside finding detail */
.kc-rrw-dept-block {
  background: rgba(160,120,32,0.04);
  border: 1px solid rgba(160,120,32,0.15);
  border-left: 3px solid rgba(160,120,32,0.40);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
body[data-theme="light"] .kc-rrw-dept-block {
  background: rgba(60,100,145,0.04);
  border-color: rgba(60,100,145,0.20);
  border-left-color: rgba(60,100,145,0.45);
}

.kc-rrw-dept-name {
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--gold-lt);
  margin-bottom: 4px;
}

.kc-rrw-dept-owner {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--smoke3);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.kc-rrw-dept-impact {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--smoke);
  letter-spacing: 0.01em;
  line-height: 1.55;
}

/* "What changed" structured block */
.kc-rrw-changed {
  background: rgba(160,120,32,0.04);
  border-left: 3px solid rgba(160,120,32,0.30);
  border-radius: 0 4px 4px 0;
  padding: 12px 14px;
}
body[data-theme="light"] .kc-rrw-changed {
  background: rgba(60,100,145,0.04);
  border-left-color: rgba(60,100,145,0.35);
}

/* Source quote */
.kc-rrw-quote {
  margin: 0;
  padding: 12px 16px;
  background: rgba(0,0,0,0.20);
  border-left: 3px solid var(--gold-lt);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--smoke2);
  line-height: 1.55;
  letter-spacing: 0.01em;
  border-radius: 0 4px 4px 0;
}
body[data-theme="light"] .kc-rrw-quote {
  background: rgba(60,100,145,0.06);
  border-left-color: var(--gold-lt);
}

/* Escalation modal */
.kc-rrw-esc-summary {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--smoke);
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}

.kc-rrw-esc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .kc-rrw-esc-grid { grid-template-columns: 1fr; }
}

.kc-rrw-esc-cell {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: rgba(160,120,32,0.04);
  border: 1px solid rgba(160,120,32,0.15);
  border-radius: 4px;
}
body[data-theme="light"] .kc-rrw-esc-cell {
  background: rgba(60,100,145,0.04);
  border-color: rgba(60,100,145,0.18);
}

.kc-rrw-esc-cell-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(160,120,32,0.25);
  color: var(--gold-lt);
  font-family: var(--f-display);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.kc-rrw-esc-cell-text {
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--smoke);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.kc-rrw-esc-depts {
  margin-top: 14px;
}

.kc-rrw-esc-dept-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.kc-rrw-warn {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(204,144,0,0.06);
  border: 1px solid rgba(204,144,0,0.30);
  border-left: 3px solid var(--amber-lt);
  border-radius: 4px;
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--smoke);
  letter-spacing: 0.01em;
  line-height: 1.55;
}

/* Print styles for regulatory log */
@media print {
  .kc-rrw-row, .kc-rrw-resp-row {
    page-break-inside: avoid;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   NEW COMPONENTS — added in batch build
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Evidence upload during audit walking ─────────────────────────────── */
.kc-walk-evidence-section {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(160,120,32,0.04);
  border: 1px solid rgba(160,120,32,0.18);
  border-radius: 6px;
}
.kc-walk-evidence-label {
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: 0.08em;
  color: var(--smoke4);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.kc-q-evidence-req { color: var(--amber-lt); font-size: 10px; }
.kc-walk-evidence-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.kc-walk-ev-file {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--smoke);
}
.kc-walk-ev-icon { font-size: 14px; flex-shrink: 0; }
.kc-walk-ev-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-walk-ev-size { font-family: var(--f-mono); font-size: 10px; color: var(--smoke4); flex-shrink: 0; }
.kc-walk-evidence-btns { display: flex; gap: 8px; align-items: center; }
.kc-walk-ev-status {
  font-size: 11px;
  color: var(--green-lt);
  font-family: var(--f-mono);
}

/* ── Audit instantiation ────────────────────────────────────────────── */
.kc-inst-loc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
}
.kc-inst-loc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.kc-inst-loc-item:hover { background: rgba(160,120,32,0.06); }
.kc-inst-loc-name { flex: 1; }
.kc-inst-loc-city { font-size: 11px; color: var(--smoke4); font-family: var(--f-mono); }

/* ── Inline question editing ────────────────────────────────────────── */
.kc-q-row-editable:hover { background: rgba(160,120,32,0.03); }
.kc-q-edit-btn {
  opacity: 0;
  transition: opacity 0.15s;
}
.kc-q-row-editable:hover .kc-q-edit-btn { opacity: 1; }
.kc-q-edit-form { animation: kc-fade-in 0.15s ease; }

/* ── Bulk action item modal ─────────────────────────────────────────── */
.kc-bulk-loc-list { display: flex; flex-direction: column; gap: 2px; }
.kc-bulk-loc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.kc-bulk-loc-item:hover { background: rgba(160,120,32,0.06); }
.kc-bulk-loc-name { flex: 1; }
.kc-bulk-loc-city { font-size: 10px; color: var(--smoke4); font-family: var(--f-mono); }

/* ── Comment threads ─────────────────────────────────────────────────── */
.kc-comment-section { border-top: 1px solid rgba(160,120,32,0.10); padding-top: 16px; }
.kc-comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.kc-comment-row {
  padding: 10px 12px;
  background: rgba(160,120,32,0.04);
  border: 1px solid rgba(160,120,32,0.12);
  border-radius: 6px;
}
.kc-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.kc-comment-author {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--gold-lt);
  letter-spacing: 0.05em;
}
.kc-comment-time {
  font-size: 10px;
  color: var(--smoke4);
  font-family: var(--f-mono);
  margin-left: auto;
}
.kc-comment-body {
  font-size: 13px;
  color: var(--smoke);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.kc-comment-compose { display: flex; flex-direction: column; gap: 6px; }

/* ── Kait streaming cursor ──────────────────────────────────────────── */
.kc-kait-cursor {
  display: inline-block;
  width: 2px;
  animation: kc-blink 1s step-end infinite;
  color: var(--gold-lt);
  margin-left: 2px;
}
@keyframes kc-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Sparklines in KPI cards ────────────────────────────────────────── */
.kc-rep-sparkline {
  display: block;
  width: 80px;
  height: 24px;
  margin: 4px 0;
  color: currentColor;
}

/* ── Reports location filter active indicator ───────────────────────── */
.kc-rep-heatmap-row:hover { background: rgba(160,120,32,0.06); }
.kc-rep-heatmap-row td:first-child { font-weight: 500; }

/* ── Store manager Today view ───────────────────────────────────────── */
.kc-today-store { animation: kc-fade-in 0.2s ease; }
.kc-prio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(160,120,32,0.06);
  transition: background 0.1s;
}
.kc-prio-row:last-child { border-bottom: none; }
.kc-prio-row:hover { background: rgba(160,120,32,0.04); }
.kc-prio-row-main { flex: 1; min-width: 0; }
.kc-prio-row-title { font-size: 13px; color: var(--smoke); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-prio-row-meta { font-size: 11px; color: var(--smoke4); font-family: var(--f-mono); }

/* ── Print mode for PDF export ──────────────────────────────────────── */
@media print {
  .kc-module-head,
  .kc-tabs,
  .kc-toolbar,
  #kc-rep-pdf,
  #kc-rep-tr,
  #kc-rep-loc,
  .kc-kait-chip-row,
  .kc-row-kait-host,
  .kc-kait-pane,
  .tools-sidebar,
  .kc-notif-bell,
  .tools-back-btn {
    display: none !important;
  }
  .kc-rep-section { page-break-inside: avoid; }
  .kc-rep-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  body { background: white; color: black; }
}

/* ── Kait welcome dynamic context badge ─────────────────────────────── */
.kc-kait-welcome-eyebrow {
  font-size: 10px;
  font-family: var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 6px;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════════
   REGULATORY FEED — source rows
   ═══════════════════════════════════════════════════════════════════════ */

.kc-rrw-source-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(160,120,32,0.06);
  transition: background 0.15s;
}
.kc-rrw-source-row:last-child { border-bottom: none; }
.kc-rrw-source-row:hover { background: rgba(160,120,32,0.03); }

.kc-rrw-source-state {
  flex-shrink: 0;
  width: 52px;
}

.kc-rrw-source-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── State Filter Bar ─────────────────────────────────────────── */
.kc-state-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 0 10px 0;
  margin-bottom: 4px;
}
.kc-sf-label {
  font-size: 11px;
  color: var(--smoke4);
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 2px;
  flex-shrink: 0;
}
.kc-sf-chip {
  background: transparent;
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-family: var(--f-mono);
  color: var(--smoke3);
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
  white-space: nowrap;
}
.kc-sf-chip:hover { border-color: var(--gold); color: var(--gold-lt); }
.kc-sf-chip.kc-sf-active {
  background: rgba(160,120,32,0.15);
  border-color: var(--gold);
  color: var(--gold-lt);
}

/* ── Reg Radar Dashboard — Alert Operations Feed ─────────────────── */
.kc-rrw-dash-feed {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line1);
}
.kc-rrw-dash-card {
  background: var(--ink1);
  padding: 22px 32px;
}
body[data-theme="light"] .kc-rrw-dash-card { background: #fff; }
.kc-rrw-dash-card-closed { opacity: 0.6; }
.kc-rrw-dash-card-closed:hover { opacity: 1; transition: opacity .2s; }

/* Card header */
.kc-rrw-dash-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.kc-rrw-dash-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--smoke1);
  flex: 1;
  min-width: 200px;
}
.kc-rrw-dash-card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  font-family: var(--f-mono);
  color: var(--smoke4);
  letter-spacing: .04em;
}
.kc-rrw-dash-card-badges { display: flex; gap: 6px; }

/* Trigger line */
.kc-rrw-dash-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--smoke4);
  font-family: var(--f-mono);
  letter-spacing: .03em;
}
.kc-rrw-dash-trigger-by strong { color: var(--smoke2); font-weight: 500; }
.kc-rrw-dash-trigger-ts { color: var(--smoke5); }

/* Summary */
.kc-rrw-dash-summary {
  font-size: 12px;
  color: var(--smoke3);
  line-height: 1.55;
  margin-bottom: 14px;
  max-width: 720px;
}

/* Progress */
.kc-rrw-dash-progress-wrap {
  margin-bottom: 16px;
}
.kc-rrw-dash-progress-label {
  font-size: 10px;
  font-family: var(--f-mono);
  color: var(--smoke4);
  letter-spacing: .06em;
  margin-top: 5px;
}

/* Section labels */
.kc-rrw-dash-section { margin-bottom: 16px; }
.kc-rrw-dash-section-lbl {
  font-size: 9px;
  font-family: var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--smoke5);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line2);
}

/* Department rows */
.kc-rrw-dash-dept-list { display: flex; flex-direction: column; gap: 0; }
.kc-rrw-dash-dept-row {
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(160,120,32,0.05);
  font-size: 12px;
}
.kc-rrw-dash-dept-row:last-child { border-bottom: none; }
.kc-rrw-dash-dept-name {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--smoke2);
  letter-spacing: .04em;
}
.kc-rrw-dash-dept-assignee {
  color: var(--smoke3);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.kc-rrw-dash-email-addr {
  font-size: 10px;
  font-family: var(--f-mono);
  color: var(--smoke5);
  letter-spacing: .02em;
}
.kc-rrw-dash-dept-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--smoke3);
}
.kc-rrw-dash-due {
  font-size: 10px;
  font-family: var(--f-mono);
  color: var(--smoke5);
  margin-left: 4px;
}

/* Status dots */
.kc-rrw-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kc-rrw-dot-ok   { background: var(--ok-lt); }
.kc-rrw-dot-open { background: var(--amber-lt); }
.kc-rrw-dot-mute { background: var(--smoke5); }

/* Email rows */
.kc-rrw-dash-email-list { display: flex; flex-direction: column; gap: 0; }
.kc-rrw-dash-email-empty {
  font-size: 11px;
  color: var(--smoke5);
  font-family: var(--f-mono);
  padding: 4px 0;
}
.kc-rrw-dash-email-row {
  display: grid;
  grid-template-columns: 110px 1fr 160px 120px;
  gap: 12px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(160,120,32,0.04);
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: .03em;
}
.kc-rrw-dash-email-row:last-child { border-bottom: none; }
.kc-rrw-dash-email-type { color: var(--smoke4); }
.kc-rrw-dash-email-to { color: var(--smoke2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-rrw-dash-email-status { display: flex; align-items: center; gap: 5px; }
.kc-rrw-dash-email-ok   { color: var(--ok-lt); }
.kc-rrw-dash-email-fail { color: var(--red-lt); }
.kc-rrw-dash-email-pending { color: var(--smoke4); }
.kc-rrw-dash-resend-id { color: var(--smoke5); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Audit trail rows */
.kc-rrw-dash-hist-list { display: flex; flex-direction: column; gap: 0; }
.kc-rrw-dash-hist-row {
  display: grid;
  grid-template-columns: 130px 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 4px 0;
  font-size: 11px;
  font-family: var(--f-mono);
  border-bottom: 1px solid rgba(160,120,32,0.04);
}
.kc-rrw-dash-hist-row:last-child { border-bottom: none; }
.kc-rrw-dash-hist-ts { color: var(--smoke5); letter-spacing: .03em; }
.kc-rrw-dash-hist-actor { color: var(--smoke3); }
.kc-rrw-dash-hist-action { color: var(--smoke2); }

@media (max-width: 700px) {
  .kc-rrw-dash-dept-row { grid-template-columns: 1fr; gap: 2px; }
  .kc-rrw-dash-email-row { grid-template-columns: 1fr 1fr; }
  .kc-rrw-dash-card { padding: 16px 16px; }
}

/* ──────────────────────────────────────────────────────────────────────
   FIX — confirm/prompt dialog visibility (openModal)
   ──────────────────────────────────────────────────────────────────────
   openModal() builds the dialog as `.kc-modal` NESTED inside
   `.kc-modal-scrim`, and toggles `kc-modal-open` on the SCRIM. A later
   `.kc-modal` block (the full-screen "card" modal layer, where `.kc-modal`
   is a SIBLING of its scrim and holds a `.kc-modal-card`) redefined the
   bare `.kc-modal` as position:fixed; inset:0; opacity:0;
   pointer-events:none — revealed only by `.kc-modal.kc-modal-open`, a class
   the scrim-based dialog never sets. Net effect: every confirm/prompt
   dialog rendered only its dim scrim, with the box invisible and
   unclickable (publish, discard, etc. "dimmed and did nothing").

   Scope by descendant — `.kc-modal-scrim .kc-modal` matches ONLY the nested
   dialog box; the card modal's `.kc-modal` is a sibling of its scrim, so it
   is untouched. The 2- and 3-class specificity here also beats the bare
   `.kc-modal` rule regardless of source order. */
.kc-modal-scrim .kc-modal {
  position: static;
  inset: auto;
  display: block;
  width: min(440px, 100%);
  padding: 0;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(8px) scale(0.985);
}
.kc-modal-scrim.kc-modal-open .kc-modal {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
