/* PORTED VERBATIM from vo-app-marketing-hub/apps/Marketing-Hub/marketing-hub-governance.css, minus 0 rule(s)
   whose selectors name a class crm.css / ax-containers.css already own.
   DO NOT EDIT — node tools/port-marketing-hub.cjs */
/* ============================================================
   Governance Engine — Marketing Hub Settings
   Asset Schemas, Rule Packs, QA Pipeline, Approval Matrix,
   Status & Workflow, Audit & Learning, + populated settings
   ============================================================ */

/* ── Governance panel (reuses cs-panel base) ── */
.gov-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 16px;
}

.gov-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.gov-panel-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gov-panel-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  flex-shrink: 0;
}

.gov-panel-icon svg { width: 18px; height: 18px; }

.gov-panel-title {
  font-size: 15px; font-weight: 700; color: #1e293b;
}

.gov-panel-sub {
  font-size: 12px; color: #64748b; margin-top: 1px;
}

/* ── Schema / Rule Table ── */
.gov-table-wrap {
  overflow-x: auto;
}

.gov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gov-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.gov-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.gov-table tr:last-child td { border-bottom: none; }

.gov-table tr:hover td { background: #f8fafc; }

/* ── Pill badges in tables ── */
.gov-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.gov-badge-green  { background: #defbe6; color: #198038; }

.gov-badge-yellow { background: #fef3c7; color: #b45309; }

.gov-badge-red    { background: #fee2e2; color: #dc2626; }

.gov-badge-blue   { background: #dbeafe; color: #2563eb; }

.gov-badge-purple { background: #eef2ff; color: #6366f1; }

.gov-badge-grey   { background: #f1f5f9; color: #64748b; }

/* ── Toggle inline ── */
.gov-toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  vertical-align: middle;
}

.gov-toggle input {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.gov-toggle-track {
  width: 36px; height: 20px;
  border-radius: 10px;
  background: #cbd5e1;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  padding: 2px;
}

.gov-toggle-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: transform 0.2s;
}

.gov-toggle input:checked + .gov-toggle-track { background: #6366f1; }

.gov-toggle input:checked + .gov-toggle-track .gov-toggle-thumb { transform: translateX(16px); }

/* ── Section inside panels ── */
.gov-section {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.gov-section:last-of-type { border-bottom: none; }

.gov-section-title {
  font-size: 12px; font-weight: 700; color: #334155;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ── Form grid ── */
.gov-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gov-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.gov-field { display: flex; flex-direction: column; gap: 4px; }

.gov-field label {
  font-size: 12px; font-weight: 600; color: #475569;
}

.gov-field input,
.gov-field select,
.gov-field textarea {
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  background: #f8fafc;
  font-family: inherit;
}

.gov-field input:focus,
.gov-field select:focus,
.gov-field textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.gov-field textarea {
  min-height: 60px;
  resize: vertical;
}

.gov-field-hint {
  font-size: 11px; color: #94a3b8;
}

/* ── Slider control ── */
.gov-slider-row {
  display: flex; align-items: center; gap: 10px;
}

.gov-range {
  flex: 1;
  -webkit-appearance: none; appearance: none;
  height: 5px; border-radius: 3px;
  background: #e2e8f0; outline: none;
}

.gov-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #6366f1; cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.gov-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #6366f1; cursor: pointer;
  border: 2px solid #fff;
}

.gov-range-val {
  min-width: 36px; text-align: right;
  font-size: 14px; font-weight: 700; color: #6366f1;
  font-variant-numeric: tabular-nums;
}

/* ── Approval matrix tiers ── */
.gov-matrix-tier {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.gov-matrix-tier:last-child { margin-bottom: 0; }

.gov-tier-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.gov-tier-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}

.gov-tier-name {
  font-size: 14px; font-weight: 600; color: #1e293b;
}

.gov-tier-desc {
  font-size: 12px; color: #64748b; margin-left: auto;
}

.gov-tier-body {
  padding: 12px 16px;
}

.gov-tier-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.gov-tier-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.gov-tier-tag-remove {
  cursor: pointer;
  opacity: 0.5;
  font-size: 14px;
  line-height: 1;
}

.gov-tier-tag-remove:hover { opacity: 1; }

/* ── Status flow ── */
.gov-status-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
}

.gov-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}

.gov-status-arrow {
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Tag input ── */
.gov-tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  min-height: 36px;
  align-items: center;
  cursor: text;
}

.gov-tag-input-wrap:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.gov-tag-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #334155;
  flex: 1;
  min-width: 80px;
  padding: 2px 0;
  font-family: inherit;
}

.gov-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  background: #eef2ff;
  color: #4f46e5;
  white-space: nowrap;
}

.gov-tag-chip-x {
  cursor: pointer;
  opacity: 0.6;
  font-size: 13px;
  line-height: 1;
}

.gov-tag-chip-x:hover { opacity: 1; }

/* ── Save bar ── */
.gov-save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.gov-save-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #6366f1;
  color: #fff;
  transition: background 0.15s;
}

.gov-save-btn:hover { background: #4f46e5; }

.gov-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gov-save-msg {
  font-size: 12px; color: #16a34a; font-weight: 500;
}

.gov-save-msg.error { color: #dc2626; }

/* ── Add-row button ── */
.gov-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px dashed #cbd5e1;
  background: transparent;
  color: #6366f1;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 10px;
}

.gov-add-btn:hover {
  border-color: #6366f1;
  background: #eef2ff;
}

/* ── QA step list ── */
.gov-qa-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.gov-qa-step:last-child { border-bottom: none; }

.gov-qa-num {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: #eef2ff;
  color: #6366f1;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gov-qa-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.gov-qa-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 1px;
  font-weight: 400;
}

.gov-qa-severity {
  flex-shrink: 0;
}

.gov-qa-severity select {
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
}

@media (max-width: 700px) {
.gov-grid,
  .gov-grid-3 { grid-template-columns: 1fr; }

.gov-tier-desc { display: none; }

.gov-status-flow { flex-direction: column; align-items: flex-start; }

.gov-bv-split { flex-direction: column; }
}

/* ── Brand Voice ── */
.gov-bv-split {
  display: flex;
  gap: 16px;
}

.gov-bv-col {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.gov-bv-col-do { border-color: #bbf7d0; }

.gov-bv-col-dont { border-color: #fecaca; }

.gov-bv-col-head {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.gov-bv-col-do .gov-bv-col-head { background: #f0fdf4; }

.gov-bv-col-dont .gov-bv-col-head { background: #fef2f2; }

.gov-bv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #334155;
  border-top: 1px solid #f1f5f9;
}

.gov-bv-item-do::before {
  content: '✓';
  color: #16a34a;
  font-weight: 700;
  flex-shrink: 0;
}

.gov-bv-item-dont::before {
  content: '✗';
  color: #dc2626;
  font-weight: 700;
  flex-shrink: 0;
}

.gov-bv-item-text {
  flex: 1;
}

.gov-bv-item-remove {
  cursor: pointer;
  color: #94a3b8;
  font-size: 15px;
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 0;
  line-height: 1;
}

.gov-bv-item-remove:hover { color: #dc2626; }

.gov-bv-add {
  padding: 8px 14px;
  border-top: 1px solid #f1f5f9;
}

.gov-tag-chip-purple {
  background: #eef2ff;
  color: #6366f1;
  border-color: #6366f133;
}

.gov-bv-example {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.gov-bv-example-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gov-bv-example-row {
  display: flex;
  gap: 12px;
}

.gov-bv-example-good,
.gov-bv-example-bad {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

.gov-bv-example-good {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.gov-bv-example-bad {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.gov-bv-example-badge {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ── Sender Persona Cards ── */
.gov-persona-card .gov-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.gov-persona-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
