/* =========================================
   AI Agent Workspace (aiws-*) - NEW CLASSES
   Append only (do not edit existing classes)
   ========================================= */

.aiws-wrap {
  width: 100%;
  padding: 14px 14px 24px;
}

.aiws-topRow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.aiws-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.aiws-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

.aiws-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
}

.aiws-btnLight {
  background: #fff;
}
.aiws-btnDark {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.aiws-btnGhost {
  background: transparent;
}
.aiws-btn i {
  font-size: 12px;
}

.aiws-metaRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  margin-bottom: 12px;
}

.aiws-metaLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aiws-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}

.aiws-metaText {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  flex-wrap: wrap;
}

.aiws-dot {
  opacity: 0.6;
}

.aiws-metaRight {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aiws-metaLabel {
  font-size: 12px;
  color: #6b7280;
}

.aiws-select {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  background: #fff;
  min-width: 120px;
}

.aiws-briefCard {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.aiws-briefLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.aiws-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.aiws-briefHello {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aiws-roleTag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 600;
  background: #f3f4f6;
}

.aiws-briefSub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.aiws-briefStats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.aiws-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
}

.aiws-statDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.aiws-dotGreen {
  background: #22c55e;
}
.aiws-dotBlue {
  background: #3b82f6;
}
.aiws-dotPurple {
  background: #a855f7;
}
.aiws-dotOrange {
  background: #f59e0b;
}
.aiws-dotRed {
  background: #ef4444;
}
.aiws-dotAmber {
  background: #f59e0b;
}

.aiws-briefRight {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.aiws-focusRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.aiws-focusLabel {
  font-size: 11px;
  color: #6b7280;
}

.aiws-chipRow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.aiws-chipRowWrap {
  flex-wrap: wrap;
}

.aiws-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.aiws-chipGreen {
  background: rgba(34, 197, 94, 0.1);
}
.aiws-chipPurple {
  background: rgba(168, 85, 247, 0.1);
}
.aiws-chipBlue {
  background: rgba(59, 130, 246, 0.1);
}
.aiws-chipOrange {
  background: rgba(245, 158, 11, 0.1);
}

.aiws-assetsRow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #6b7280;
  font-size: 12px;
}

.aiws-sectionHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 10px 0 10px;
}

.aiws-sectionHeadSpace {
  margin-top: 14px;
}

.aiws-sectionTitle {
  font-size: 13px;
  font-weight: 800;
}

.aiws-sectionHint {
  font-size: 11px;
  color: #6b7280;
}

.aiws-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 1100px) {
  .aiws-grid2 {
    grid-template-columns: 1fr;
  }
}

.aiws-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.aiws-cardHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.aiws-cardTitle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 12.5px;
}

.aiws-cardTitle i {
  opacity: 0.85;
}
.aiws-cardMeta {
  font-size: 11px;
  color: #9ca3af;
}

.aiws-cardSub {
  margin-top: 4px;
  font-size: 11.5px;
  color: #6b7280;
}

.aiws-miniTitle {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #374151;
}

.aiws-kpiRow {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.aiws-kpiBox {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 10px;
  background: #fafafa;
}

.aiws-kpiLabel {
  font-size: 11px;
  color: #6b7280;
}
.aiws-kpiVal {
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}
.aiws-kpiBar {
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  margin-top: 8px;
  overflow: hidden;
}
.aiws-kpiFill {
  height: 100%;
  background: #111827;
  border-radius: 999px;
}

.aiws-split {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .aiws-split {
    grid-template-columns: 1fr;
  }
}

.aiws-evChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  user-select: none;
}

.aiws-evChipOk {
  background: #fff;
}
.aiws-evChipMissing {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

.aiws-evMeta {
  color: #9ca3af;
  font-size: 10px;
  margin-left: 2px;
}

.aiws-issueList {
  margin-top: 6px;
  display: grid;
  gap: 8px;
}
.aiws-issueItem {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.aiws-issueDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 5px;
  flex: 0 0 8px;
  background: #3b82f6;
}
.aiws-issueText {
  min-width: 0;
}
.aiws-issueTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.aiws-issueTitle {
  font-size: 11.5px;
  font-weight: 700;
}
.aiws-issueDue {
  font-size: 10.5px;
  color: #9ca3af;
  white-space: nowrap;
}
.aiws-issueSub {
  font-size: 11px;
  color: #6b7280;
  margin-top: 1px;
}

.aiws-confGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.aiws-confBox {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 10px;
  background: #fafafa;
}

.aiws-confWarn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.22);
}
.aiws-confLabel {
  font-size: 10.5px;
  color: #6b7280;
}
.aiws-confVal {
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.aiws-badgeRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.aiws-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.aiws-cardFooter {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.aiws-summaryGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.aiws-summaryBox {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #fafafa;
  padding: 10px;
}

.aiws-summaryNum {
  font-size: 16px;
  font-weight: 900;
}
.aiws-summaryLabel {
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
}
.aiws-summarySub {
  font-size: 11px;
  color: #6b7280;
  margin-top: 1px;
}

.aiws-bullets {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #6b7280;
  font-size: 11.5px;
}

.aiws-miniTableWrap {
  margin-top: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.aiws-miniTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.aiws-miniTable thead th {
  text-align: left;
  padding: 10px;
  background: #f9fafb;
  color: #6b7280;
  font-weight: 800;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.aiws-miniTable tbody td {
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.aiws-tdStrong {
  font-weight: 700;
  color: #111827;
}

.aiws-noteBox {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 10px;
  background: #fafafa;
  margin-top: 8px;
}

.aiws-noteLine {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11.5px;
  color: #6b7280;
}
.aiws-noteDot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #111827;
  margin-top: 6px;
}

.aiws-period {
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}
.aiws-paragraph {
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.45;
}

.aiws-scopeRow {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.aiws-scopeBox {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #fafafa;
  padding: 10px;
}

.aiws-scopeWarn {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.18);
}
.aiws-scopeTop {
  font-size: 10.5px;
  color: #6b7280;
}
.aiws-scopeVal {
  font-size: 13px;
  font-weight: 900;
  margin-top: 2px;
}
.aiws-scopeSub {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

/* Pills */
.aiws-pillSmall {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-weight: 800;
}

.aiws-pillDanger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
}
.aiws-pillWarn {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
}
.aiws-pillInfo {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}
.aiws-pillMuted {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Queue */
.aiws-queueCard {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.aiws-queueTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fbfbfb;
  flex-wrap: wrap;
}

.aiws-queueFilters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aiws-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.aiws-queueBadges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.aiws-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.aiws-tab {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
}

.aiws-tab.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.aiws-queueBody {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.aiws-groupHead {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 11.5px;
  color: #374151;
  margin-bottom: 8px;
}

.aiws-groupCaret {
  opacity: 0.75;
}
.aiws-groupCount {
  margin-left: auto;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 800;
}

.aiws-actionList {
  display: grid;
  gap: 10px;
}

.aiws-actionItem {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: flex;
  gap: 12px;
}

.aiws-railRed::before,
.aiws-railAmber::before,
.aiws-railBlue::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
}

.aiws-railRed::before {
  background: #ef4444;
}
.aiws-railAmber::before {
  background: #f59e0b;
}
.aiws-railBlue::before {
  background: #3b82f6;
}

.aiws-actionLeft {
  padding-top: 2px;
}
.aiws-check {
  width: 16px;
  height: 16px;
}

.aiws-actionMain {
  flex: 1;
  min-width: 0;
}

.aiws-actionTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.aiws-actionTitle {
  font-weight: 900;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aiws-actionMeta {
  display: inline-flex;
  gap: 10px;
  color: #9ca3af;
  font-size: 11px;
  flex-wrap: wrap;
}

.aiws-metaLine {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aiws-actionDesc {
  margin-top: 6px;
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.4;
}

.aiws-actionFoot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.aiws-actionFrom {
  font-size: 11px;
  color: #6b7280;
}
.aiws-fromLabel {
  font-weight: 800;
  margin-right: 6px;
  color: #374151;
}

.aiws-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.aiws-tagDoc {
  background: rgba(0, 0, 0, 0.03);
}
.aiws-tagRed {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}
.aiws-tagAmber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
}
.aiws-tagBlue {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}

.aiws-queueFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fbfbfb;
  flex-wrap: wrap;
}

.aiws-queueHint {
  font-size: 11px;
  color: #9ca3af;
}

.aiws-footerNote {
  margin-top: 10px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

/* =========================
   AIWS Agent Card (scroll body + fixed footer)
   ========================= */
.aiws-agentCard {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 16px;
  box-shadow: 0 14px 45px rgba(17, 24, 39, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 620px; /* keeps size stable */
}

.aiws-agentHead {
  padding: 14px 14px 8px 14px;
}

.aiws-agentHeadLeft {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.aiws-agentIcon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.06);
  display: grid;
  place-items: center;
  color: rgba(17, 24, 39, 0.9);
  flex: 0 0 auto;
}

.aiws-agentTitle {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
  line-height: 1.2;
}

.aiws-agentDesc {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 650;
  color: rgba(107, 114, 128, 0.9);
  line-height: 1.35;
}

.aiws-agentMeta {
  padding: 0 14px 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 650;
  color: rgba(107, 114, 128, 0.95);
}

.aiws-pillBadge {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(17, 24, 39, 0.75);
  font-size: 10px;
  font-weight: 800;
}

.aiws-agentBody {
  flex: 1;
  padding: 0 14px 14px 14px;
  overflow-y: auto; /* ✅ inner scroll */
  max-height: 600px; /* ✅ keep card stable */
}

.aiws-block {
  margin-bottom: 14px;
}

.aiws-blockTitle {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(107, 114, 128, 0.85);
  margin-bottom: 10px;
}

/* Bars */
.aiws-bars {
  display: grid;
  gap: 10px;
}

.aiws-barRow {
  display: grid;
  grid-template-columns: 220px 1fr 52px;
  grid-auto-rows: auto;
  align-items: center;
  gap: 10px;
}

.aiws-barLabel {
  font-size: 11px;
  font-weight: 650;
  color: rgba(107, 114, 128, 0.95);
}

.aiws-barTrack {
  height: 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  overflow: hidden;
}

.aiws-barFill {
  height: 100%;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
}

.aiws-barPct {
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: rgba(17, 24, 39, 0.8);
}

.aiws-barNote {
  grid-column: 2 / 4;
  margin-top: -6px;
  font-size: 10px;
  font-weight: 650;
  color: rgba(107, 114, 128, 0.85);
}

/* Tables */
.aiws-tableWrap {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.aiws-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.aiws-table thead tr {
  background: rgba(17, 24, 39, 0.04);
  color: rgba(107, 114, 128, 0.95);
}

.aiws-table th,
.aiws-table td {
  padding: 9px 10px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.aiws-table thead th {
  border-top: 0;
  font-weight: 800;
}

.aiws-table .tl {
  text-align: left;
}
.aiws-table .tr {
  text-align: right;
}

.aiws-chipTag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(107, 114, 128, 0.95);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

/* Evidence chips */
.aiws-evGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aiws-evBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: rgba(17, 24, 39, 0.85);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.aiws-evBtn .aiws-evLabel {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aiws-evMeta {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.06);
  font-size: 9px;
  font-weight: 900;
  color: rgba(17, 24, 39, 0.75);
}

.aiws-evOut {
  font-size: 10px;
  opacity: 0.55;
}

.aiws-evBtn.isMissing {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
  color: rgba(239, 68, 68, 0.95);
}

.aiws-evBtn.isMissing .aiws-evMeta {
  background: rgba(239, 68, 68, 0.12);
  color: rgba(239, 68, 68, 0.95);
}

/* Status pills */
.aiws-pillStatus {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(107, 114, 128, 0.95);
}

.aiws-pillStatus.isBad {
  background: rgba(239, 68, 68, 0.1);
  color: rgba(239, 68, 68, 0.95);
}

/* Accordion */
.aiws-acc {
  margin-top: 10px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding-top: 10px;
}

.aiws-accBtn {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(107, 114, 128, 0.95);
  text-transform: uppercase;
}

.aiws-accPanel {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.aiws-outTitle {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(107, 114, 128, 0.85);
  margin-bottom: 6px;
}

.aiws-outList {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  font-weight: 650;
  color: rgba(17, 24, 39, 0.78);
  line-height: 1.5;
}

.aiws-outBox {
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(17, 24, 39, 0.03);
  border-radius: 12px;
  padding: 10px;
  font-size: 11px;
  font-weight: 650;
  color: rgba(17, 24, 39, 0.78);
  line-height: 1.45;
}

.aiws-nextList {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.aiws-nextRow {
  display: grid;
  grid-template-columns: 54px 1fr 140px 60px;
  gap: 10px;
  padding: 9px 10px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 11px;
  font-weight: 650;
  color: rgba(17, 24, 39, 0.78);
}

.aiws-nextRow:first-child {
  border-top: 0;
}

.aiws-pri {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(17, 24, 39, 0.75);
}

.aiws-pri.isHigh {
  background: rgba(239, 68, 68, 0.1);
  color: rgba(239, 68, 68, 0.95);
}
.aiws-pri.isMed {
  background: rgba(245, 158, 11, 0.14);
  color: rgba(180, 83, 9, 1);
}

.aiws-nextOwner {
  text-align: right;
  color: rgba(107, 114, 128, 0.95);
}
.aiws-nextDue {
  text-align: right;
  font-weight: 900;
  color: rgba(239, 68, 68, 0.95);
}

/* Footer fixed at end */
.aiws-agentFooter {
  padding: 12px 14px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
}

/* ===== Card shell ===== */
.aiws-card {
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aiws-cardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.aiws-cardHeadLeft {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.aiws-cardIcon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.06);
  display: grid;
  place-items: center;
  color: #111827;
  flex: 0 0 auto;
}
.aiws-cardHeadText {
  min-width: 0;
}
.aiws-cardTitleText {
  font-weight: 900;
  color: #111827;
  font-size: 14px;
}
.aiws-cardSubText {
  color: #6b7280;
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.3;
}

.aiws-cardHeadMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 10px;
  white-space: nowrap;
}
.aiws-metaSmall {
  opacity: 0.9;
}

.aiws-pillTag {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.06);
  color: #374151;
  font-weight: 800;
  font-size: 10px;
}
.aiws-pillTagDanger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ===== Scroll body (IMPORTANT) ===== */
.aiws-cardBodyScroll {
  padding: 0 14px 14px 14px;
  overflow: auto;
  max-height: 600px; /* ✅ card height fixed, inner scroll */
}

/* ===== Footer pinned ===== */
.aiws-cardFooter {
  padding: 12px 14px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  background: #fff;
}

/* ===== Blocks / titles ===== */
.aiws-block {
  margin-top: 10px;
}
.aiws-blockTitle {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(17, 24, 39, 0.55);
  margin-bottom: 8px;
}

/* ===== Progress ===== */
.aiws-progressRow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  padding: 6px 0;
}
.aiws-progressLabel {
  width: 220px;
  color: #6b7280;
  font-size: 11px;
}
.aiws-progressBar {
  flex: 1;
  height: 6px;
  background: rgba(17, 24, 39, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.aiws-progressFill {
  height: 100%;
  background: rgba(17, 24, 39, 0.55);
  border-radius: 999px;
}
.aiws-progressPct {
  width: 48px;
  text-align: right;
  font-weight: 800;
  color: #111827;
}
.aiws-progressNote {
  margin-left: 230px;
  font-size: 10px;
  color: #9ca3af;
  margin-top: -2px;
}

/* ===== Table ===== */
.aiws-tableWrap {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 12px;
  overflow: hidden;
}
.aiws-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.aiws-table thead tr {
  background: rgba(17, 24, 39, 0.04);
  color: #6b7280;
}
.aiws-table th,
.aiws-table td {
  padding: 8px 10px;
}
.aiws-table tbody tr {
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}
.tr {
  text-align: right;
}
.fw {
  font-weight: 900;
}
.aiws-miniTag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.06);
  color: #6b7280;
  white-space: nowrap;
}

/* ===== Chips ===== */
.aiws-chipWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.aiws-chipBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  max-width: 100%;
}
.aiws-chipText {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aiws-chipMeta {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.06);
  color: #6b7280;
}
.aiws-chipOut {
  font-size: 10px;
  opacity: 0.55;
  margin-left: 2px;
}
.aiws-chipBtnOk:hover {
  background: rgba(17, 24, 39, 0.03);
}
.aiws-chipBtnMissing {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
  color: #ef4444;
}
.aiws-chipBtnMissing .aiws-chipMeta {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ===== Accordion ===== */
.aiws-accordion {
  margin-top: 10px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding-top: 10px;
}
.aiws-accordionBtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: rgba(17, 24, 39, 0.6);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 0;
}
.aiws-rot90 {
  transform: rotate(90deg);
  transition: transform 150ms ease;
}
.aiws-accordionBody {
  padding: 8px 0 2px 0;
}

.aiws-bullets {
  margin: 0;
  padding-left: 16px;
  color: #6b7280;
  font-size: 11px;
}
.aiws-callout {
  background: rgba(17, 24, 39, 0.03);
  border-radius: 12px;
  padding: 10px;
  font-size: 11px;
  color: #111827;
  font-weight: 600;
}

/* ===== Gaps & actions ===== */
.aiws-gapList {
  display: grid;
  gap: 8px;
}
.aiws-gapItem {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #6b7280;
}
.aiws-gapIcon {
  color: #ef4444;
}
.aiws-gapText {
  flex: 1;
}
.aiws-gapOwner {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.06);
  color: #6b7280;
  white-space: nowrap;
}

.aiws-nextList {
  display: grid;
  gap: 8px;
}
.aiws-nextItem {
  display: grid;
  grid-template-columns: 44px 1fr 140px 50px;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  padding-top: 8px;
}
.aiws-sev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
}
.aiws-sevHigh {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.aiws-sevMed {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}
.aiws-sevLow {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.aiws-nextOwner {
  color: #9ca3af;
  font-size: 10px;
  text-align: right;
}
.aiws-nextDue {
  color: #ef4444;
  font-weight: 800;
  font-size: 10px;
  text-align: right;
}

/* ===== Responsibility list ===== */
.aiws-respList {
  display: grid;
  gap: 8px;
}
.aiws-respRow {
  display: grid;
  grid-template-columns: 1fr 90px 160px;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  padding-top: 8px;
}
.aiws-respArea {
  color: #6b7280;
  font-size: 11px;
}
.aiws-respParty {
  color: #111827;
  font-weight: 800;
  font-size: 11px;
  text-align: right;
}
.aiws-respNote {
  color: #9ca3af;
  font-size: 10px;
  text-align: right;
}

/* ===== Risk flags ===== */
.aiws-flagList {
  display: grid;
  gap: 8px;
}
.aiws-flagItem {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 11px;
  color: #6b7280;
}
.aiws-flagDot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-top: 6px;
}
.aiws-flagDot-warn {
  background: #f59e0b;
}
.aiws-flagDot-bad {
  background: #ef4444;
}
.aiws-flagDot-neutral {
  background: #9ca3af;
}

/* ===== Buttons ===== */
.aiws-btn {
  border-radius: 10px;
  height: 34px;
  padding: 0 12px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}
.aiws-btnDark {
  background: #111827;
  color: #fff;
  border: 1px solid #111827;
}
.aiws-btnDark:hover {
  opacity: 0.92;
}
.aiws-btnGhost {
  background: #fff;
  color: #111827;
  border: 1px solid rgba(17, 24, 39, 0.14);
}
.aiws-btnGhost:hover {
  background: rgba(17, 24, 39, 0.03);
}

/* ===== AIWS reusable card scrolling + accordion ===== */
.aiws-cardTall {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.aiws-cardBodyScroll {
  flex: 1;
  overflow: auto;
  padding-right: 6px;
}
.aiws-cardFooterPinned {
  margin-top: auto;
}

.aiws-alertBox {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #eee;
  background: #fafafa;
}
.aiws-alertWarn {
  border-color: rgba(255, 0, 0, 0.18);
  background: rgba(255, 0, 0, 0.03);
}
.aiws-alertText {
  font-size: 12px;
  line-height: 1.4;
}

.aiws-tableWrap {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}
.aiws-tableSimple {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.aiws-tableSimple th {
  background: #f7f7f7;
  color: #666;
  font-weight: 600;
  padding: 10px;
  text-align: left;
}
.aiws-tableSimple td {
  padding: 10px;
  border-top: 1px solid #eee;
  vertical-align: top;
}
.aiws-tdCenter {
  text-align: center;
}
.aiws-tdRight {
  text-align: right;
}
.aiws-tdSub {
  font-size: 11px;
  color: #777;
  margin-top: 4px;
}
.aiws-trTotal td {
  background: #f7f7f7;
  font-weight: 600;
}

.aiws-accordion {
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 12px;
}
.aiws-accordionBtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  background: transparent;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aiws-accordionBody {
  padding-top: 8px;
}

.aiws-runRow {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: #777;
  margin-bottom: 6px;
}
.aiws-tagSoft {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f2f2f2;
  font-size: 11px;
  color: #666;
}

.aiws-recoBox {
  background: #f7f7f7;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.aiws-miniTitleTiny {
  font-size: 11px;
  font-weight: 700;
  color: #666;
  margin-top: 8px;
  text-transform: none;
  letter-spacing: 0;
}

.aiws-nextList {
  margin-top: 6px;
}
.aiws-nextItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
}
.aiws-nextItem:last-child {
  border-bottom: 0;
}
.aiws-nextText {
  flex: 1;
}
.aiws-nextDue {
  color: #c00;
  font-weight: 600;
  font-size: 11px;
}

.aiws-pillTiny {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
}
.aiws-pillRed {
  background: rgba(255, 0, 0, 0.08);
  color: #c00;
}
.aiws-pillAmber {
  background: rgba(255, 170, 0, 0.12);
  color: #8a5b00;
}

.aiws-periodStrong {
  font-size: 14px;
  font-weight: 700;
}
.aiws-paragraphSoft {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #666;
}

.aiws-scopeRow3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.aiws-scopeBoxSoft {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 10px;
}
.aiws-scopeTop {
  font-size: 12px;
  font-weight: 700;
  color: #666;
}
.aiws-scopeValBig {
  font-size: 16px;
  font-weight: 800;
  margin-top: 4px;
}
.aiws-scopeSub {
  font-size: 11px;
  font-weight: 700;
  color: #444;
  margin-top: 2px;
}
.aiws-scopeSubWarn {
  font-size: 11px;
  font-weight: 700;
  color: #c00;
  margin-top: 2px;
}

.aiws-footNote {
  font-size: 11px;
  color: #888;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-style: italic;
}

/* --- AIWS: fixed-height card with internal scroller (NEW) --- */
.aiws-cardFixed {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0; /* important for nested scroll in flex */
}

/* Set a consistent max height for cards (tweak 660px if needed) */
.aiws-cardFixed--h650 {
  max-height: 650px;
}

/* This area scrolls; card height stays fixed */
.aiws-cardScrollFixed {
  flex: 1;
  min-height: 0; /* IMPORTANT: allows overflow to work in flex */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px; /* optional: room for scrollbar */
}

/* Footer always at bottom */
.aiws-cardFooterPinned {
  margin-top: auto;
}

/* Optional: smoother scroll */
.aiws-scrollSmooth {
  scroll-behavior: smooth;
}

/* Optional: stop accordion from causing layout jumps */
.aiws-accBodyCompact {
  margin-top: 8px;
}

/* ✅ paste into <style scoped> */

/* wrapper */
.aiwsHead {
  display: grid;
  gap: 12px;
}

/* top row */
.aiwsTopRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.aiwsTopLeft {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.aiwsIcon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
  color: rgba(17, 24, 39, 0.75);
}

.aiwsTitle {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: #111827;
}

.aiwsSubTitle {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(17, 24, 39, 0.6);
}

/* refresh button */
.aiwsBtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 900;
  color: #111827;
  white-space: nowrap;
}

.aiwsBtnLight {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

/* meta card */
.aiwsMetaCard {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aiwsMetaLeft {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.aiwsPropPill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
}

.aiwsMetaText {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(17, 24, 39, 0.55);
  font-weight: 650;
  font-size: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.aiwsSep {
  width: 1px;
  height: 14px;
  background: rgba(17, 24, 39, 0.12);
  display: inline-block;
}

.aiwsMetaRight {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.aiwsMetaLabel {
  font-size: 12px;
  font-weight: 800;
  color: rgba(17, 24, 39, 0.55);
}

.aiwsSelect {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 24, 39, 0.12);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
  font-weight: 800;
  color: #111827;
  outline: none;
}

/* brief card */
/* ✅ Brief card UI like screenshot (paste into <style scoped>) */
.aiwsBriefCard {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.aiwsBriefLeft {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.aiwsAvatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;

  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 24, 39, 0.1);
  color: rgba(17, 24, 39, 0.75);
  flex: 0 0 auto;
}

.aiwsBriefBody {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aiwsNameRow {
  display: flex; /* ✅ no inline-flex */
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap; /* ✅ keeps name + tag together */
  min-width: 0;
}

.aiwsName {
  font-weight: 950;
  color: #111827;
  line-height: 1.15;
  white-space: nowrap; /* ✅ prevents collapse */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

.aiwsRoleTag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 11px;
  font-weight: 900;
  color: rgba(17, 24, 39, 0.7);
}

.aiwsOrg {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(17, 24, 39, 0.55);
}

/* right side */
.aiwsBriefRight {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.aiwsLocRow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: right;
}

.aiwsLocIcon {
  margin-top: 2px;
  color: rgba(17, 24, 39, 0.55);
  flex: 0 0 auto;
}

.aiwsLocText {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}

.aiwsLocTitle {
  font-weight: 950;
  color: #111827;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.aiwsLocSub {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.55);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .aiwsBriefCard {
    flex-direction: column;
    align-items: flex-start;
  }
  .aiwsBriefRight {
    width: 100%;
    justify-content: flex-start;
  }
  .aiwsLocRow {
    text-align: left;
  }
  .aiwsLocText {
    align-items: flex-start;
  }
  .aiwsLocTitle {
    max-width: 100%;
  }
}

/* ================================
   AIWS: Card 3 "Next Actions" list (NEW)
   Matches screenshot: pill | title | owner | due
   ================================ */

.aiws-naList {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.06);
  background: #fff;
}

.aiws-naRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(17, 24, 39, 0.06);
}

.aiws-naRow:first-child {
  border-top: 0;
}

.aiws-naSev {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 22px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(17, 24, 39, 0.04);
  color: rgba(17, 24, 39, 0.75);
  text-transform: capitalize;
}

.aiws-naSev.isHigh {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
  color: rgba(239, 68, 68, 0.95);
}

.aiws-naSev.isMed {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
  color: rgba(180, 83, 9, 1);
}

.aiws-naSev.isLow {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
  color: rgba(37, 99, 235, 0.95);
}

.aiws-naTitle {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 650;
  color: rgba(17, 24, 39, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aiws-naRight {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.aiws-naOwner {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(107, 114, 128, 0.95);
  background: rgba(17, 24, 39, 0.04);
  border: 1px solid rgba(17, 24, 39, 0.06);
  white-space: nowrap;
}

.aiws-naDue {
  font-size: 11px;
  font-weight: 900;
  color: rgba(239, 68, 68, 0.95);
  white-space: nowrap;
}

/* =========================
   Action Queue (aiws-aq-*)
   ========================= */

.aiws-aqCard {
  background: #fff;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 16px;
  padding: 18px;
}

.aiws-aqHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.aiws-aqHeadLeft {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 280px;
}

.aiws-aqIcon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, 0.06);
  color: #111827;
  flex: 0 0 auto;
}

.aiws-aqTitle {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
  line-height: 1.2;
}
.aiws-aqSub {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.aiws-aqStats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  color: #6b7280;
}

.aiws-aqStat {
  text-align: center;
  min-width: 44px;
}
.aiws-aqStatNum {
  font-size: 11px;
  font-weight: 700;
  color: #111827;
}
.aiws-aqStatNumRisk {
  color: #e11d48;
}
.aiws-aqStatNumSoon {
  color: #111827;
}
.aiws-aqStatLbl {
  margin-top: 2px;
}

.aiws-aqStatSep {
  width: 1px;
  height: 22px;
  background: rgba(16, 24, 40, 0.12);
}

.aiws-aqFiltersRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.1);
  margin-bottom: 12px;
}

.aiws-aqFilterIcon {
  font-size: 12px;
  color: #6b7280;
  margin-right: 2px;
}

.aiws-aqSelect {
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(16, 24, 40, 0.14);
  background: #fff;
  font-size: 12px;
  color: #111827;
  padding: 0 10px;
  outline: none;
}

.aiws-aqReportingToggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aiws-aqToggleLbl {
  font-size: 10px;
  color: #6b7280;
}

.aiws-aqYearPill {
  font-size: 10px;
  color: #6b7280;
  background: rgba(16, 24, 40, 0.06);
  padding: 2px 6px;
  border-radius: 8px;
}

/* switch */
.aiws-aqSwitch {
  position: relative;
  width: 42px;
  height: 22px;
  display: inline-block;
}
.aiws-aqSwitch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.aiws-aqSlider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.12);
  transition: all 0.2s ease;
}
.aiws-aqSlider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}
.aiws-aqSwitch input:checked + .aiws-aqSlider {
  background: #111827;
}
.aiws-aqSwitch input:checked + .aiws-aqSlider:before {
  transform: translateX(20px);
}

/* Tabs */
.aiws-aqTabs {
  display: flex;
  gap: 10px;
  background: rgba(16, 24, 40, 0.06);
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 12px;
}

.aiws-aqTab {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.aiws-aqTab.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.aiws-aqTabCount {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.08);
  color: #111827;
}

/* Group header */
.aiws-aqGroupHead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
}

.aiws-aqGroupIcon {
  font-size: 12px;
  color: #6b7280;
}
.aiws-aqGroupTitle {
  font-size: 11px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.aiws-aqGroupPill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.06);
  color: #6b7280;
}

.aiws-aqList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Item card */
.aiws-aqItem {
  position: relative;
  display: flex;
  gap: 12px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-left-width: 4px; /* rail */
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  transition: background 0.15s ease;
}

.aiws-aqItem:hover {
  background: rgba(16, 24, 40, 0.04);
}

.aiws-aqCheckCol {
  padding-top: 2px;
}
.aiws-aqCheck {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  appearance: none;
  border: 1.5px solid rgba(17, 24, 39, 0.55);
  background: #fff;
  cursor: pointer;
}
.aiws-aqCheck:checked {
  background: #111827;
  border-color: #111827;
}

.aiws-aqMain {
  flex: 1;
  min-width: 0;
}

.aiws-aqTitleLine {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aiws-aqItemTitle {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.aiws-aqBlocking {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  letter-spacing: 0.04em;
}

.aiws-aqReason {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
}

.aiws-aqReasonStrong {
  color: #111827;
  font-weight: 600;
}
.aiws-aqReasonText {
  color: #111827;
}

.aiws-aqPills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.aiws-aqPill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.06);
  color: #6b7280;
}

.aiws-aqPillPriority {
  font-weight: 700;
  text-transform: capitalize;
}
.aiws-aqPillTagRisk {
  font-weight: 700;
  color: #e11d48;
  background: rgba(225, 29, 72, 0.1);
}
.aiws-aqPillMuted {
  background: rgba(16, 24, 40, 0.06);
  color: #6b7280;
}

.aiws-aqChips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 8px;
}

.aiws-aqChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  background: #fff;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: #111827;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.aiws-aqChip:hover {
  background: rgba(16, 24, 40, 0.06);
}

.aiws-aqChip.is-missing {
  border-color: rgba(225, 29, 72, 0.3);
  background: rgba(225, 29, 72, 0.06);
  color: #e11d48;
}

.aiws-aqChipText {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aiws-aqChipMeta {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(16, 24, 40, 0.06);
  color: #111827;
}
.aiws-aqChipMeta.is-missing {
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
}

.aiws-aqExt {
  font-size: 10px;
  opacity: 0.55;
}

.aiws-aqMore {
  font-size: 10px;
  color: #6b7280;
  align-self: center;
}

.aiws-aqMetaRow {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #6b7280;
}

.aiws-aqMeta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aiws-aqDue {
  font-weight: 600;
  color: #6b7280;
}

/* Hover actions (right) */
.aiws-aqHoverActions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
  padding-top: 2px;
}

.aiws-aqItem:hover .aiws-aqHoverActions {
  opacity: 1;
}

.aiws-aqBtnStart {
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.aiws-aqBtnStart:hover {
  background: rgba(16, 24, 40, 0.08); /* grey hover like screenshot */
}

.aiws-aqBtnDetail {
  border: 1px solid rgba(16, 24, 40, 0.18);
  background: #fff;
  color: #111827;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.aiws-aqBtnDetail:hover {
  background: rgba(16, 24, 40, 0.08);
}

.aiws-aqFootnote {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(16, 24, 40, 0.1);
  font-size: 11px;
  color: #6b7280;
}

/* rails (keep using your railClass()) - add these helpers if your railClass returns these */
.aiws-aqRailHigh {
  border-left-color: #e11d48;
}
.aiws-aqRailMed {
  border-left-color: #f59e0b;
}
.aiws-aqRailLow {
  border-left-color: rgba(16, 24, 40, 0.2);
}

/* =========================
   AIWS Dropdown (pill + menu)
   ========================= */
.aiws-dd {
  position: relative;
  display: inline-flex;
}
.aiws-ddBtn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #111827;
  cursor: pointer;
}
.aiws-ddBtnTight {
  padding: 0 10px;
}
.aiws-ddBtn:hover {
  background: #f9fafb;
}

.aiws-ddBtnText {
  white-space: nowrap;
}
.aiws-ddCaret {
  font-size: 12px;
  opacity: 0.7;
}

.aiws-ddMenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 9999;
}
.aiws-ddMenuRight {
  right: 0;
  left: auto;
}

.aiws-ddMenuScroll {
  max-height: 260px;
  overflow: auto;
}

.aiws-ddItem {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.aiws-ddItem:hover {
  background: #f3f4f6;
}
.aiws-ddItem.is-selected {
  background: #f3f4f6;
}

.aiws-ddCheck {
  width: 14px;
  font-size: 12px;
  color: #111827;
}
.aiws-ddItemText {
  font-size: 13px;
  color: #111827;
}

/* Reporting Year pill */
.aiws-yearPill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #eef0f3;
}
.aiws-yearLabel {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

/* =============== AIWS Dropdown (pill + popup list) =============== */
.aiws-dd {
  position: relative;
  display: inline-block;
}
.aiws-ddBtn {
  height: 28px;
  min-width: 140px;
  padding: 0 10px;
  border: 1px solid #e6e6ea;
  background: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.aiws-ddBtnText {
  font-size: 12px;
  color: #2d2d31;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aiws-ddCaret {
  font-size: 12px;
  color: #6b6b75;
}

.aiws-ddMenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  background: #fff;
  border: 1px solid #e6e6ea;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  padding: 8px;
  z-index: 200;
}
.aiws-ddMenuScroll {
  max-height: 280px;
  overflow: auto;
}

.aiws-ddItem {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}
.aiws-ddItem:hover {
  background: rgba(0, 0, 0, 0.04);
}
.aiws-ddItem.is-selected {
  background: rgba(0, 0, 0, 0.03);
}
.aiws-ddCheck {
  font-size: 12px;
  color: #111;
  width: 16px;
}
.aiws-ddItemText {
  font-size: 13px;
  color: #1f1f23;
}

/* ===== AIWS: Tight dropdown menu (prevents overflow) ===== */
.aiws-ddMenuTight {
  right: 0;
  left: auto;
  min-width: 100%;
  width: max-content;
  max-width: 220px; /* keeps it concise like your 3rd screenshot */
  overflow-x: hidden;
}

.aiws-ddTight {
  position: relative;
}
