/* Compliance compiler — Autofill collapsibles */
#sheetComplianceCompiler .compiler-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

#sheetComplianceCompiler .compiler-toggle .chev{
  opacity:0.7;
  transition: transform .15s ease;
}

#sheetComplianceCompiler .compiler-toggle.open .chev{
  transform: rotate(180deg);
}

#sheetComplianceCompiler .compiler-collapsible{
  margin-top:6px;
  padding-top:2px;
}

/* Export Center — IFTA artifact output (operator-first + audit layer) */
#sheetComplianceCompiler .ec-artifact{
  padding:14px;
}

#sheetComplianceCompiler .ec-artifact-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(15,23,42,0.10);
}

#sheetComplianceCompiler .ec-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

#sheetComplianceCompiler .ec-artifact-title{
  font-weight:800;
  letter-spacing:.2px;
}

#sheetComplianceCompiler .ec-artifact-sub{
  margin-top:3px;
  font-size:12px;
  color: rgba(71,85,105,0.92);
}

#sheetComplianceCompiler .ec-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.92);
  color: rgba(15,23,42,0.92);
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
  white-space:nowrap;
}

#sheetComplianceCompiler .ec-pill.ok{
  border-color: rgba(15,23,42,0.18);
}

#sheetComplianceCompiler .ec-pill.err{
  border-color: rgba(220,38,38,0.30);
  color: rgba(153,27,27,0.92);
}

#sheetComplianceCompiler .ec-pill.warn{
  border-color: rgba(245,158,11,0.34);
  color: rgba(146,64,14,0.94);
}

#sheetComplianceCompiler .ec-kpis{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}

@media (min-width: 720px){
  #sheetComplianceCompiler .ec-kpis{
    grid-template-columns:repeat(4, 1fr);
  }
}

#sheetComplianceCompiler .ec-kpi{
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.86);
  border-radius:14px;
  padding:10px 12px;
}

#sheetComplianceCompiler .ec-kpi .k{
  font-size:11px;
  color: rgba(71,85,105,0.92);
}

#sheetComplianceCompiler .ec-kpi .v{
  margin-top:4px;
  font-weight:800;
  color: rgba(15,23,42,0.92);
}

#sheetComplianceCompiler .ec-table{
  width:100%;
  border-collapse:collapse;
  margin-top:12px;
  overflow:hidden;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.10);
}

#sheetComplianceCompiler .ec-table th,
#sheetComplianceCompiler .ec-table td{
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,0.08);
  font-size:13px;
}

#sheetComplianceCompiler .ec-table th{
  text-align:left;
  font-size:12px;
  color: rgba(71,85,105,0.92);
  background: rgba(248,250,252,0.80);
}

#sheetComplianceCompiler .ec-table td:last-child,
#sheetComplianceCompiler .ec-table th:last-child{
  text-align:right;
}

#sheetComplianceCompiler .ec-foot{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(15,23,42,0.10);
  font-size:12px;
  color: rgba(71,85,105,0.92);
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
}

#sheetComplianceCompiler .ec-audit{
  margin-top:12px;
}

#sheetComplianceCompiler .ec-action-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

#sheetComplianceCompiler .ec-action-row .btn{
  flex:1 1 180px;
}

#sheetComplianceCompiler .ec-issues{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}

@media (max-width: 719px){
  #sheetComplianceCompiler .ec-issues{
    grid-template-columns:1fr;
  }
}

#sheetComplianceCompiler .ec-issue-card{
  border:1px solid rgba(15,23,42,0.10);
  border-radius:14px;
  padding:12px;
  background: rgba(255,255,255,0.86);
}

#sheetComplianceCompiler .ec-issue-card.err{
  border-color: rgba(220,38,38,0.18);
  background: rgba(254,242,242,0.92);
}

#sheetComplianceCompiler .ec-issue-card.warn{
  border-color: rgba(245,158,11,0.22);
  background: rgba(255,251,235,0.94);
}

#sheetComplianceCompiler .ec-issue-title{
  font-weight:800;
  color: rgba(15,23,42,0.92);
}

#sheetComplianceCompiler .ec-issue-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}

#sheetComplianceCompiler .ec-issue-row{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px 0;
  border-top:1px solid rgba(15,23,42,0.08);
}

#sheetComplianceCompiler .ec-issue-row:first-child{
  border-top:none;
  padding-top:0;
}

#sheetComplianceCompiler .ec-issue-row strong{
  font-size:11px;
  letter-spacing:.04em;
  text-transform:uppercase;
}

#sheetComplianceCompiler .ec-issue-row span{
  font-size:12px;
  color: rgba(71,85,105,0.92);
}

#sheetComplianceCompiler .ec-issue-action{
  align-self:flex-start;
  margin-top:8px;
}

#sheetComplianceCompiler .ec-issue-resolution{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin-top:4px;
  font-size:11px;
}

#sheetComplianceCompiler .ec-issue-resolution em{
  font-style:normal;
  font-weight:700;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(248,250,252,0.92);
  color: rgba(51,65,85,0.92);
}

#sheetComplianceCompiler .ec-issue-resolution small{
  color: rgba(71,85,105,0.92);
}

#sheetComplianceCompiler .ec-issue-resolution.in-progress em{
  border-color: rgba(245,158,11,0.34);
  background: rgba(255,251,235,0.98);
  color: rgba(146,64,14,0.94);
}

#sheetComplianceCompiler .ec-issue-resolution.resolved em{
  border-color: rgba(22,163,74,0.28);
  background: rgba(240,253,244,0.98);
  color: rgba(21,128,61,0.94);
}

#sheetComplianceCompiler .ec-recalc-impact{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(248,250,252,0.88);
  font-size:12px;
  color: rgba(51,65,85,0.94);
}

#sheetComplianceCompiler .ec-recalc-impact strong{
  color: rgba(15,23,42,0.92);
}

#sheetComplianceCompiler .ec-record{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,0.10);
  background: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(255,255,255,0.92));
}

#sheetComplianceCompiler .ec-record-head{
  margin-bottom:10px;
}

#sheetComplianceCompiler .ec-record-title{
  font-weight:800;
  color: rgba(15,23,42,0.92);
}

#sheetComplianceCompiler .ec-record-sub{
  margin-top:3px;
  font-size:12px;
  color: rgba(71,85,105,0.92);
}

#sheetComplianceCompiler .ec-record-grid,
#sheetComplianceCompiler .ec-source-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

@media (max-width: 719px){
  #sheetComplianceCompiler .ec-record-grid,
  #sheetComplianceCompiler .ec-source-grid{
    grid-template-columns:1fr;
  }
}

#sheetComplianceCompiler .ec-record-item,
#sheetComplianceCompiler .ec-source-card{
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.92);
  border-radius:14px;
  padding:10px 12px;
  min-width:0;
  overflow:hidden;
}

#sheetComplianceCompiler .ec-record-item span,
#sheetComplianceCompiler .ec-source-label{
  display:block;
  font-size:11px;
  color: rgba(71,85,105,0.92);
}

#sheetComplianceCompiler .ec-record-item strong{
  display:block;
  margin-top:4px;
  font-size:13px;
  color: rgba(15,23,42,0.92);
  overflow-wrap:anywhere;
}

#sheetComplianceCompiler .ec-source-grid{
  margin-top:10px;
}

#sheetComplianceCompiler .ec-lineage{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.88);
}

#sheetComplianceCompiler .ec-lineage-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:10px;
}

#sheetComplianceCompiler .ec-lineage-group{
  border:1px solid rgba(15,23,42,0.10);
  border-radius:14px;
  background: rgba(248,250,252,0.72);
  padding:12px;
}

#sheetComplianceCompiler .ec-lineage-group-head,
#sheetComplianceCompiler .ec-lineage-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

#sheetComplianceCompiler .ec-lineage-group-title{
  font-weight:800;
  color: rgba(15,23,42,0.92);
}

#sheetComplianceCompiler .ec-lineage-group-count{
  min-width:28px;
  padding:4px 8px;
  border-radius:999px;
  text-align:center;
  font-size:11px;
  border:1px solid rgba(15,23,42,0.12);
  color: rgba(71,85,105,0.92);
  background: rgba(255,255,255,0.9);
}

#sheetComplianceCompiler .ec-lineage-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

#sheetComplianceCompiler .ec-lineage-item{
  border:1px solid rgba(15,23,42,0.10);
  border-radius:12px;
  background: rgba(255,255,255,0.92);
  padding:10px 12px;
  min-width:0;
  overflow:hidden;
}

#sheetComplianceCompiler .ec-lineage-top strong{
  font-size:13px;
  color: rgba(15,23,42,0.92);
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}

#sheetComplianceCompiler .ec-lineage-top span{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color: rgba(71,85,105,0.92);
  overflow-wrap:anywhere;
  word-break:break-word;
}

#sheetComplianceCompiler .ec-lineage-meta,
#sheetComplianceCompiler .ec-lineage-empty{
  margin-top:6px;
  font-size:12px;
  color: rgba(71,85,105,0.92);
  overflow-wrap:anywhere;
  word-break:break-word;
}

#sheetComplianceCompiler .ec-lineage-focus{
  margin-top:8px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  color: rgba(146,64,14,0.96);
}

#sheetComplianceCompiler .ec-lineage-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}

#sheetComplianceCompiler .ec-lineage-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

#sheetComplianceCompiler .ec-lineage-action{
  align-self:flex-start;
}

#sheetComplianceCompiler .ec-lineage-tags span{
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(248,250,252,0.9);
  color: rgba(15,23,42,0.82);
}

#sheetComplianceCompiler .ec-lineage-ids{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
  min-width:0;
}

#sheetComplianceCompiler .ec-lineage-ids code{
  display:inline-block;
  max-width:100%;
  padding:5px 8px;
  border-radius:10px;
  background: rgba(248,250,252,0.92);
  border:1px solid rgba(15,23,42,0.08);
  font-size:11px;
  color: rgba(15,23,42,0.88);
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
}

#sheetComplianceCompiler .ec-lineage-item.is-focus-target{
  border-color: rgba(245,158,11,0.38);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.18), 0 12px 26px rgba(15,23,42,0.08);
}

#sheetComplianceCompiler .ec-source-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:8px;
}

#sheetComplianceCompiler .ec-source-list code{
  display:block;
  width:100%;
  padding:7px 9px;
  border-radius:10px;
  background: rgba(248,250,252,0.92);
  border:1px solid rgba(15,23,42,0.08);
  font-size:11px;
  color: rgba(15,23,42,0.88);
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
}

@media (max-width: 520px){
  #sheetComplianceCompiler .ec-lineage{
    overflow:hidden;
  }

  #sheetComplianceCompiler .ec-lineage-group-head,
  #sheetComplianceCompiler .ec-lineage-top{
    flex-direction:column;
    align-items:flex-start;
  }

  #sheetComplianceCompiler .ec-lineage-top span,
  #sheetComplianceCompiler .ec-lineage-group-count{
    max-width:100%;
  }

  #sheetComplianceCompiler .ec-lineage-actions,
  #sheetComplianceCompiler .ec-lineage-action{
    width:100%;
  }
}

#sheetComplianceCompiler .ec-source-empty,
#sheetComplianceCompiler .ec-source-more{
  margin-top:8px;
  font-size:12px;
  color: rgba(71,85,105,0.92);
}

#sheetComplianceCompiler .ec-audit-toggle{
  width:100%;
  justify-content:space-between;
}

#sheetComplianceCompiler .ec-json{
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(248,250,252,0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  line-height:1.35;
  max-height:280px;
  overflow:auto;
  white-space:pre;
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-artifact-head,
body.dark-mode #sheetComplianceCompiler .ec-artifact-head{
  border-bottom-color: rgba(148,163,184,0.18);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-artifact-title,
body.dark-mode #sheetComplianceCompiler .ec-artifact-title{
  color: rgba(241,245,249,0.96);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-artifact-sub,
html[data-theme="dark"] #sheetComplianceCompiler .ec-foot,
html[data-theme="dark"] #sheetComplianceCompiler .ec-record-sub,
html[data-theme="dark"] #sheetComplianceCompiler .ec-record-item span,
html[data-theme="dark"] #sheetComplianceCompiler .ec-source-label,
html[data-theme="dark"] #sheetComplianceCompiler .ec-source-empty,
html[data-theme="dark"] #sheetComplianceCompiler .ec-source-more,
body.dark-mode #sheetComplianceCompiler .ec-artifact-sub,
body.dark-mode #sheetComplianceCompiler .ec-foot,
body.dark-mode #sheetComplianceCompiler .ec-record-sub,
body.dark-mode #sheetComplianceCompiler .ec-record-item span,
body.dark-mode #sheetComplianceCompiler .ec-source-label,
body.dark-mode #sheetComplianceCompiler .ec-source-empty,
body.dark-mode #sheetComplianceCompiler .ec-source-more{
  color: rgba(148,163,184,0.92);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-pill,
body.dark-mode #sheetComplianceCompiler .ec-pill{
  border-color: rgba(148,163,184,0.22);
  background: rgba(20,20,22,0.92);
  color: rgba(226,232,240,0.96);
  box-shadow: 0 12px 26px rgba(0,0,0,0.32);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-pill.ok,
body.dark-mode #sheetComplianceCompiler .ec-pill.ok{
  border-color: rgba(96,165,250,0.28);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-pill.err,
body.dark-mode #sheetComplianceCompiler .ec-pill.err{
  border-color: rgba(248,113,113,0.34);
  color: rgba(254,202,202,0.96);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-pill.warn,
body.dark-mode #sheetComplianceCompiler .ec-pill.warn{
  border-color: rgba(251,191,36,0.34);
  color: rgba(253,230,138,0.96);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-kpi,
html[data-theme="dark"] #sheetComplianceCompiler .ec-record,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage,
html[data-theme="dark"] #sheetComplianceCompiler .ec-record-item,
html[data-theme="dark"] #sheetComplianceCompiler .ec-source-card,
html[data-theme="dark"] #sheetComplianceCompiler .ec-json,
body.dark-mode #sheetComplianceCompiler .ec-kpi,
body.dark-mode #sheetComplianceCompiler .ec-record,
body.dark-mode #sheetComplianceCompiler .ec-lineage,
body.dark-mode #sheetComplianceCompiler .ec-record-item,
body.dark-mode #sheetComplianceCompiler .ec-source-card,
body.dark-mode #sheetComplianceCompiler .ec-json{
  border-color: rgba(148,163,184,0.16);
  background: rgba(24,24,27,0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-record,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage,
body.dark-mode #sheetComplianceCompiler .ec-record{
  background: linear-gradient(180deg, rgba(28,28,31,0.94), rgba(14,14,16,0.94));
}

body.dark-mode #sheetComplianceCompiler .ec-lineage{
  background: linear-gradient(180deg, rgba(28,28,31,0.94), rgba(14,14,16,0.94));
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-kpi .k,
body.dark-mode #sheetComplianceCompiler .ec-kpi .k{
  color: rgba(148,163,184,0.92);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-kpi .v,
html[data-theme="dark"] #sheetComplianceCompiler .ec-record-title,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-group-title,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-top strong,
html[data-theme="dark"] #sheetComplianceCompiler .ec-record-item strong,
html[data-theme="dark"] #sheetComplianceCompiler .ec-issue-title,
body.dark-mode #sheetComplianceCompiler .ec-kpi .v,
body.dark-mode #sheetComplianceCompiler .ec-record-title,
body.dark-mode #sheetComplianceCompiler .ec-lineage-group-title,
body.dark-mode #sheetComplianceCompiler .ec-lineage-top strong,
body.dark-mode #sheetComplianceCompiler .ec-record-item strong,
body.dark-mode #sheetComplianceCompiler .ec-issue-title{
  color: rgba(241,245,249,0.96);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-issue-card,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-group,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-item,
body.dark-mode #sheetComplianceCompiler .ec-issue-card{
  border-color: rgba(148,163,184,0.16);
  background: rgba(24,24,27,0.82);
}

body.dark-mode #sheetComplianceCompiler .ec-lineage-group,
body.dark-mode #sheetComplianceCompiler .ec-lineage-item{
  border-color: rgba(148,163,184,0.16);
  background: rgba(24,24,27,0.82);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-issue-card.err,
body.dark-mode #sheetComplianceCompiler .ec-issue-card.err{
  border-color: rgba(248,113,113,0.24);
  background: rgba(60,18,18,0.46);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-issue-card.warn,
body.dark-mode #sheetComplianceCompiler .ec-issue-card.warn{
  border-color: rgba(251,191,36,0.22);
  background: rgba(66,45,9,0.42);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-issue-row,
body.dark-mode #sheetComplianceCompiler .ec-issue-row{
  border-top-color: rgba(148,163,184,0.10);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-issue-row span,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-top span,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-meta,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-empty,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-group-count,
body.dark-mode #sheetComplianceCompiler .ec-issue-row span{
  color: rgba(203,213,225,0.88);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-focus,
body.dark-mode #sheetComplianceCompiler .ec-lineage-focus{
  color: rgba(253,230,138,0.96);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-item.is-focus-target,
body.dark-mode #sheetComplianceCompiler .ec-lineage-item.is-focus-target{
  border-color: rgba(251,191,36,0.34);
  box-shadow: 0 0 0 1px rgba(251,191,36,0.16), 0 12px 26px rgba(0,0,0,0.22);
}

body.dark-mode #sheetComplianceCompiler .ec-lineage-top span,
body.dark-mode #sheetComplianceCompiler .ec-lineage-meta,
body.dark-mode #sheetComplianceCompiler .ec-lineage-empty,
body.dark-mode #sheetComplianceCompiler .ec-lineage-group-count{
  color: rgba(203,213,225,0.88);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-group-count,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-tags span,
html[data-theme="dark"] #sheetComplianceCompiler .ec-lineage-ids code,
body.dark-mode #sheetComplianceCompiler .ec-lineage-group-count,
body.dark-mode #sheetComplianceCompiler .ec-lineage-tags span,
body.dark-mode #sheetComplianceCompiler .ec-lineage-ids code{
  background: rgba(36,36,40,0.88);
  border-color: rgba(148,163,184,0.12);
  color: rgba(226,232,240,0.9);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-table,
body.dark-mode #sheetComplianceCompiler .ec-table{
  border-color: rgba(148,163,184,0.16);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-table th,
html[data-theme="dark"] #sheetComplianceCompiler .ec-table td,
body.dark-mode #sheetComplianceCompiler .ec-table th,
body.dark-mode #sheetComplianceCompiler .ec-table td{
  border-bottom-color: rgba(148,163,184,0.10);
  color: rgba(226,232,240,0.94);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-table th,
body.dark-mode #sheetComplianceCompiler .ec-table th{
  background: rgba(33,33,36,0.96);
  color: rgba(148,163,184,0.96);
}

html[data-theme="dark"] #sheetComplianceCompiler .ec-source-list code,
body.dark-mode #sheetComplianceCompiler .ec-source-list code{
  background: rgba(36,36,40,0.88);
  border-color: rgba(148,163,184,0.12);
  color: rgba(226,232,240,0.9);
}

/* Export Center (Exports & Compliance) */
#sheetComplianceCompiler .ec-chipbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding-bottom:10px;
  border-bottom:1px dashed rgba(15,23,42,0.18);
}

@media (max-width: 520px){
  #sheetComplianceCompiler .ec-chipbar{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  #sheetComplianceCompiler .ec-chip{
    min-width: 0;
    width: 100%;
    padding: 9px 10px;
    font-size: 12px;
    border-radius: 12px;
  }

  #sheetComplianceCompiler .ec-chip.lean-chip{
    border-radius: 12px;
    transform: skewX(-10deg);
    -webkit-transform: skewX(-10deg);
  }

  #sheetComplianceCompiler .ec-chip.lean-chip .lean-inner{
    width: 100%;
    transform: skewX(10deg);
    -webkit-transform: skewX(10deg);
    text-align: center;
    white-space: nowrap;
  }

  #sheetComplianceCompiler .ec-chip.lean-chip:hover{
    transform: skewX(-10deg) translateY(-1px);
    -webkit-transform: skewX(-10deg) translateY(-1px);
  }

  #sheetComplianceCompiler .ec-chip.lean-chip:active{
    transform: skewX(-10deg) translateY(1px);
    -webkit-transform: skewX(-10deg) translateY(1px);
  }
}

#sheetComplianceCompiler .ec-chip{
  appearance:none;
  border:1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.92);
  color: rgba(15,23,42,0.92);
  padding:10px 14px;
  border-radius:999px;
  font-size:13px;
  line-height:1;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
  cursor:pointer;
}

#sheetComplianceCompiler .ec-chip:hover{
  border-color: rgba(15,23,42,0.22);
  box-shadow: 0 12px 24px rgba(15,23,42,0.08);
}

#sheetComplianceCompiler .ec-chip.active{
  background: linear-gradient(180deg, rgba(2,6,23,0.92), rgba(15,23,42,0.92));
  color: rgba(255,255,255,0.94);
  border-color: rgba(2,6,23,0.24);
}

#sheetComplianceCompiler .ec-chip.lean-chip{
  border-radius: 14px;
  overflow: hidden;
  transform: skewX(-18deg);
  -webkit-transform: skewX(-18deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#sheetComplianceCompiler .ec-chip.lean-chip .lean-inner{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: skewX(18deg);
  -webkit-transform: skewX(18deg);
}

#sheetComplianceCompiler .ec-chip.lean-chip:hover{
  transform: skewX(-18deg) translateY(-1px);
  -webkit-transform: skewX(-18deg) translateY(-1px);
}

#sheetComplianceCompiler .ec-chip.lean-chip:active{
  transform: skewX(-18deg) translateY(1px);
  -webkit-transform: skewX(-18deg) translateY(1px);
}

#sheetComplianceCompiler .ec-seg{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

#sheetComplianceCompiler .ec-seg-btn{
  border:1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.92);
  color: rgba(15,23,42,0.92);
  padding:10px 12px;
  border-radius:14px;
  font-size:13px;
  cursor:pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}

#sheetComplianceCompiler .ec-seg-btn:hover{
  border-color: rgba(15,23,42,0.22);
}

#sheetComplianceCompiler .ec-seg-btn.active{
  background: rgba(15,23,42,0.95);
  color: rgba(255,255,255,0.94);
  border-color: rgba(15,23,42,0.25);
}

#sheetComplianceCompiler .ec-pack-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width: 720px){
  #sheetComplianceCompiler .ec-pack-grid{
    grid-template-columns:1fr 1fr;
  }
}

#sheetComplianceCompiler .ec-pack{
  position:relative;
  text-align:left;
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.92);
  border-radius:16px;
  padding:14px;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(15,23,42,0.07);
}

#sheetComplianceCompiler .ec-pack:hover{
  border-color: rgba(15,23,42,0.20);
  box-shadow: 0 14px 30px rgba(15,23,42,0.09);
}

#sheetComplianceCompiler .ec-pack.active{
  border:2px solid rgba(15,23,42,0.92);
  background: rgba(255,255,255,0.92);
  color: rgba(15,23,42,0.92);
  box-shadow: 0 14px 30px rgba(15,23,42,0.10);
}

#sheetComplianceCompiler .ec-pack.active .muted{
  color: rgba(71,85,105,0.90) !important;
}

#sheetComplianceCompiler select{
  width:100%;
}

body:not(.light) #sheetComplianceCompiler select{
  background:rgba(12,16,22,0.92);
  color:rgba(241,245,249,0.96);
  border-color:rgba(148,163,184,0.22);
}

body:not(.light) #sheetComplianceCompiler select option{
  background:#0f141b;
  color:rgba(241,245,249,0.96);
}

#sheetComplianceCompiler #btnECToggleAdvanced{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
}

#sheetComplianceCompiler #btnECToggleAdvanced .chev{
  opacity:0.75;
  transition: transform .15s ease;
}

#sheetComplianceCompiler #btnECToggleAdvanced.open .chev{
  transform: rotate(180deg);
}

#sheetComplianceCompiler .check-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.90);
  border-radius:14px;
}

#sheetComplianceCompiler .ec-run-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.90);
  border-radius:14px;
  margin-bottom:10px;
}

#sheetComplianceCompiler .ec-run-main{
  display:flex;
  flex-direction:column;
  gap:4px;
}

#sheetComplianceCompiler .ec-run-title{
  font-size:14px;
  color: rgba(15,23,42,0.92);
}

body:not(.light) #sheetComplianceCompiler .ec-seg-btn{
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.90);
  box-shadow: none;
}

body:not(.light) #sheetComplianceCompiler .ec-seg-btn:hover{
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

body:not(.light) #sheetComplianceCompiler .ec-seg-btn.active{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.95);
}

body:not(.light) #sheetComplianceCompiler .ec-chip{
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.90);
  box-shadow: none;
}

body:not(.light) #sheetComplianceCompiler .ec-chip:hover{
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

body:not(.light) #sheetComplianceCompiler .ec-chip.active{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.95);
}

body:not(.light) #sheetComplianceCompiler .ec-chip.lean-chip{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.38),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

body:not(.light) #sheetComplianceCompiler .ec-chip.lean-chip:hover{
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.22);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.44),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

body:not(.light) #sheetComplianceCompiler .ec-chip.lean-chip.active{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.26);
  box-shadow:
    0 16px 34px rgba(0,0,0,0.50),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

body:not(.light) #sheetComplianceCompiler .ec-chip.lean-chip:active{
  transform: skewX(-18deg) translateY(1px);
  -webkit-transform: skewX(-18deg) translateY(1px);
}

body:not(.light) #sheetComplianceCompiler .ec-pack-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

@media (min-width: 720px){
  body:not(.light) #sheetComplianceCompiler .ec-pack-grid{
    grid-template-columns:1fr 1fr;
  }
}

body:not(.light) #sheetComplianceCompiler .ec-pack{
  position:relative;
  text-align:left;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  border-radius:16px;
  padding:14px;
  cursor:pointer;
}

body:not(.light) #sheetComplianceCompiler .ec-pack.active{
  border:2px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.94);
}

body:not(.light) #sheetComplianceCompiler .ec-pack.active .muted{
  color: rgba(255,255,255,0.70) !important;
}

body:not(.light) #sheetComplianceCompiler #btnECToggleAdvanced .chev{
  opacity:0.7;
  transition: transform .15s ease;
}

body:not(.light) #sheetComplianceCompiler .check-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius:12px;
}

body:not(.light) #sheetComplianceCompiler .ec-run-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,0.06);
}

body:not(.light) #sheetComplianceCompiler .ec-run-row:last-child{
  border-bottom:none;
}

body:not(.light) #sheetComplianceCompiler .ec-run-title{
  font-size:14px;
}

/* Compliance action rows – ensure clean spacing on all browsers */
#sheetComplianceCompiler .compiler-collapsible .row{
  display:flex;
  gap:10px;
}

#sheetComplianceCompiler .compiler-collapsible .row .btn + .btn{
  margin-left:10px;
}

@media (max-width: 720px){
  #sheetComplianceCompiler .compiler-collapsible .row{
    flex-direction: column;
    gap:12px !important;
  }

  #sheetComplianceCompiler .compiler-collapsible .row .btn + .btn{
    margin-left:0;
    margin-top:12px;
  }

  #sheetComplianceCompiler .compiler-collapsible .row .btn{
    width:100%;
  }
}
