/* ═══════════════════════════════════════════
   pages.css  —  ATS · AI · Sourcing · Compliance
   ═══════════════════════════════════════════ */

/* ── ATS Kanban ── */
.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 11px;
}

.kcol {
  border-radius: 12px;
  min-height: 500px;
  padding: 0 1px;
  border: 1px dashed transparent;
  transition: all .15s;
}
.kcol.dov { background: var(--accentg); border-color: var(--accent); }

.kch {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 11px; padding: 0 3px;
}
.kct { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.kcd { width: 7px; height: 7px; border-radius: 50%; }

.cc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  cursor: grab;
  transition: all .15s;
  user-select: none;
  margin-bottom: 8px;
}
.cc:hover     { background: var(--cardh); }
.cc.dragging  { opacity: .5; }

.cct { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.cci { flex: 1; min-width: 0; }
.ccn { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccr { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccm { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sb  { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.src-pill { font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* Job filter dropdown */
.job-filter {
  padding: 10px 14px; 
  border-radius: 9px;
  border: 1px solid var(--border); 
  background: var(--card);
  color: var(--text); 
  font-size: 13px; 
  cursor: pointer;
  transition: all .15s;
}
.job-filter:hover {
  background: var(--cardh);
  border-color: var(--accent);
}
.job-filter:focus {
  border-color: var(--accent);
  background: var(--cardh);
}

/* ── AI Matching ── */
.aig {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}

.jc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
}
.jc:hover { background: var(--cardh); }
.jc.sel   { background: var(--accentg); border-color: var(--accent); }

.rb {
  width: 100%; padding: 13px;
  border-radius: 10px; border: none;
  cursor: pointer; font-weight: 700; font-size: 14px; color: #fff;
  transition: all .2s; margin-top: 4px;
}
.rb:disabled    { background: var(--border); cursor: wait; color: var(--muted); }
.rb:not(:disabled) { background: linear-gradient(135deg, #4F80F7, #8B5CF6); box-shadow: 0 4px 20px rgba(79,128,247,.25); }

.ae {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 50px;
  text-align: center;
}

.mc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: all .15s;
}
.mc:hover { background: var(--cardh); }
.mc.top   { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(79,128,247,.2); }
.mr       { display: flex; align-items: center; gap: 13px; }

.mex         { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: none; }
.mex.open    { display: block; }
.ef          { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
.ebs         { display: flex; gap: 8px; }
.ebs button  { flex: 1; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }

/* ── Sourcing module ── */
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.platform-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: all .15s;
}
.platform-card.connected { border-color: rgba(16,192,126,.35); }

.plat-head  { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.plat-logo  {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
}
.plat-name  { font-size: 15px; font-weight: 700; }
.plat-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; }

.plat-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.plat-stat        { background: var(--surface); border-radius: 8px; padding: 10px 12px; }
.plat-stat-val    { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.plat-stat-lbl    { font-size: 10px; color: var(--muted); }

.sync-row   { display: flex; align-items: center; justify-content: space-between; }
.sync-status{ display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.sync-dot   { width: 7px; height: 7px; border-radius: 50%; }
.sync-dot.live { background: var(--success); box-shadow: 0 0 6px rgba(16,192,126,.5); }
.sync-dot.off  { background: var(--border); }

/* Toggle switch */
.toggle       { position: relative; display: inline-flex; align-items: center; cursor: pointer; gap: 8px; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { width: 36px; height: 20px; background: var(--border); border-radius: 10px; transition: background .2s; flex-shrink: 0; }
.toggle input:checked + .toggle-track { background: var(--success); }
.toggle-thumb {
  position: absolute; left: 3px;
  width: 14px; height: 14px;
  background: #fff; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(16px); }

/* Import search */
.import-search-row { display: flex; gap: 10px; margin-bottom: 16px; }
.import-search {
  flex: 1; padding: 10px 14px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); font-size: 13px;
}
.platform-select {
  padding: 10px 14px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); font-size: 13px; cursor: pointer;
}

.import-result { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 15px; margin-bottom: 9px; transition: all .15s; }
.import-result.importing { border-color: var(--accent); background: var(--accentg); }
.import-result.imported  { border-color: rgba(16,192,126,.4); }

.ir-row  { display: flex; align-items: center; gap: 12px; }
.ir-info { flex: 1; }
.ir-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.ir-meta { font-size: 11px; color: var(--muted); }
.ir-skills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.ir-action { flex-shrink: 0; }

.progress-bar      { height: 3px; background: var(--border); border-radius: 99px; margin-top: 10px; overflow: hidden; display: none; }
.progress-bar.show { display: block; }
.progress-fill     { height: 100%; background: var(--accent); border-radius: 99px; width: 0%; transition: width .4s ease; }

.import-summary      { background: var(--successbg); border: 1px solid rgba(16,192,126,.3); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; display: none; }
.import-summary.show { display: flex; align-items: center; gap: 12px; }

/* Auto-update cards */
.update-card   { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 15px; margin-bottom: 9px; }
.update-row    { display: flex; align-items: center; justify-content: space-between; }
.update-info   { flex: 1; }
.update-name   { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.update-detail { font-size: 11px; color: var(--muted); }

/* Duplicate detection */
.dup-card          { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 12px; transition: all .15s; }
.dup-card.reviewing{ border-color: var(--purple); }

.dup-head    { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dup-pct     { font-size: 22px; font-weight: 800; color: var(--warning); }
.dup-pct.high{ color: var(--danger); }
.dup-lbl     { font-size: 11px; color: var(--muted); }

.dup-profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.dup-profile  {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px; padding: 13px;
}
.dup-profile.merged { background: var(--successbg); border-color: rgba(16,192,126,.3); }

.dup-pname   { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.dup-pmeta   { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.dup-field   { display: flex; justify-content: space-between; font-size: 11px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.dup-field:last-child { border-bottom: none; }
.dup-field-lbl { color: var(--muted); }
.dup-field-val { color: var(--text); font-weight: 600; text-align: right; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dup-field-val.match { color: var(--warning); }
.dup-field-val.exact { color: var(--danger); }

.dup-actions        { display: flex; gap: 8px; }
.dup-actions button { flex: 1; padding: 9px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }

/* ── Post Job Modal ── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Form Styles */
.form-section {
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.15s;
}

.form-input:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--cardh);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-input textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

/* Sourcing Options */
.source-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s;
}

.source-option:hover {
  background: var(--cardh);
  border-color: var(--accent);
}

.source-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
}

.source-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.source-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.source-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #3F70E7;
  opacity: 0.9;
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--cardh);
  border-color: var(--mutedl);
}

/* Stage Options */
.stage-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s;
}

.stage-option:hover {
  background: var(--cardh);
  border-color: var(--accent);
}

.stage-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
}

.stage-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.stage-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── AI Agents ── */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

.agent-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.15s;
}

.agent-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(79, 128, 247, 0.1);
}

.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.agent-info {
  flex: 1;
}

.agent-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.agent-desc {
  font-size: 12px;
  color: var(--muted);
}

.agent-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.agent-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(16, 192, 126, 0.1);
}

.agent-status.inactive {
  background: rgba(107, 114, 128, 0.1);
}

.agent-workflow {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.workflow-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.workflow-stages {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workflow-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 120px;
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stage-info {
  flex: 1;
  min-width: 0;
}

.stage-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.stage-action {
  font-size: 10px;
  color: var(--muted);
}

.stage-arrow {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Create Agent Modal Styles */
.stage-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stage-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(79, 128, 247, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
}

.stage-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s;
}

.stage-remove:hover {
  background: rgba(242, 84, 84, 0.1);
}

.stage-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stage-content .form-group {
  margin-bottom: 0;
}

.stage-content .form-input {
  font-size: 12px;
  padding: 8px 10px;
}

.agents-builder {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.agents-builder-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.agents-builder-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workflow-designer-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.builder-helper {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.stage-library {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.stage-library-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
  cursor: grab;
  transition: all .15s;
}

.stage-library-item:hover,
.stage-library-item.dragging {
  border-color: var(--accent);
  background: var(--cardh);
  transform: translateY(-1px);
}

.stage-library-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.stage-library-name {
  font-size: 13px;
  font-weight: 700;
}

.stage-library-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(79,128,247,.12);
  color: var(--accent);
}

.stage-library-desc {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.workflow-canvas-panel {
  min-height: 520px;
}

.workflow-canvas-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.workflow-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--mutedl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
}

.workflow-canvas {
  min-height: 420px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(12,18,32,.8), rgba(7,11,20,.9));
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .15s;
}

.workflow-canvas.drag-over {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(79,128,247,.08), rgba(7,11,20,.92));
}

.workflow-empty {
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  padding: 24px;
}

.designer-stage {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  cursor: grab;
  transition: all .15s;
}

.designer-stage:hover,
.designer-stage.dragging {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(79,128,247,.12);
}

.designer-stage.drop-before {
  border-top: 2px solid var(--accent);
}

.designer-stage.drop-after {
  border-bottom: 2px solid var(--accent);
}

.designer-stage-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.designer-stage-index {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}

.designer-stage-copy {
  min-width: 0;
}

.designer-stage-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.designer-stage-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.designer-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.designer-stage-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--mutedl);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.designer-remove {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(242,84,84,.12);
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }

  .agent-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .agent-actions {
    justify-content: flex-end;
  }

  .workflow-stages {
    flex-direction: column;
    align-items: stretch;
  }

  .workflow-stage {
    justify-content: flex-start;
  }

  .stage-arrow {
    display: none;
  }

  .agents-builder-top {
    flex-direction: column;
    align-items: stretch;
  }

  .workflow-designer-grid {
    grid-template-columns: 1fr;
  }

  .workflow-canvas-head {
    flex-direction: column;
  }

  .designer-stage {
    flex-direction: column;
    align-items: stretch;
  }

  .designer-stage-actions {
    justify-content: space-between;
  }
}

.btn-secondary:hover {
  background: var(--cardh);
  border-color: var(--mutedl);
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.merge-complete      { background: var(--successbg); border: 1px solid rgba(16,192,126,.3); border-radius: 9px; padding: 14px; text-align: center; display: none; }
.merge-complete.show { display: block; }

.similarity-bar  { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sim-label       { font-size: 11px; color: var(--muted); width: 100px; flex-shrink: 0; }
.sim-track       { flex: 1; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.sim-fill        { height: 100%; border-radius: 99px; }

/* ── Compliance table ── */
.cstats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 13px;
  margin-bottom: 20px;
}
.cst  { background: var(--card); border-radius: 12px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; }
.csi  { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; flex-shrink: 0; }

.cfilt  { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.csrch  { flex: 1; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; }
.fb     { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; transition: all .15s; }
.fb.active { border-color: var(--accent); background: var(--accentg); color: var(--accent); }

.ctbl   { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cth    { display: grid; grid-template-columns: 210px repeat(5,1fr); padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.cthc   { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; text-align: center; }
.cthc:first-child { text-align: left; }
.crow   { display: grid; grid-template-columns: 210px repeat(5,1fr); padding: 11px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.crow:last-child { border-bottom: none; }
.ds     { display: flex; justify-content: center; }
.db     { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.dv     { background: var(--successbg); color: var(--success); }
.dp     { background: var(--warnbg);    color: var(--warning); }
.de     { background: var(--dangerbg);  color: var(--danger); }
