/* /var/www/smvgrc-dev/static/styles/components.css */
/* Genbrugelige UI-komponenter: card, divider, flash, modal, auth, help-icon */

/* =========================================================
### 03 fælles komponenter ###
========================================================= */
.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px;
}

.card-title{
  font-weight: 700;
  margin-bottom: 8px;
}

.divider{
  height: 1px;
  background: var(--line);
  margin: 12px 0;
}

/* flash */
.flash-wrap{ margin: 0 0 14px 0; }
.flash{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

/* rightbar section headings */
.rb-section + .rb-section{ margin-top: 14px; }
.rb-title{
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 10px 0;
}
.rb-foot{ margin-top: 10px; color: var(--muted); font-size: 12px; }

/* =========================================================
### modal (public auth + app modals) ###
========================================================= */
.modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-y: auto;              /* V1: scroll på selve modal'en (page-scroll) */
  overscroll-behavior: contain;
}
.modal.is-open{ display: block; }
.modal-backdrop{ position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); }

.modal-panel{
  position: relative;
  z-index: 1;                    /* sikrer click-events over backdrop */
  max-width: 620px;
  margin: 4vh auto;              /* mindre margin → mere plads til content */
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
}

.modal-close{
  position:absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.modal-body{ min-height: 40px; }

/* =========================================================
### auth helpers ###
========================================================= */
.auth{ max-width: 560px; margin: 0 auto; }
.auth h2{ font-size: 18px; font-weight: 800; margin: 0 0 14px 0; }
.auth label{ display:block; font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.auth label input{ margin-top: 4px; }
.auth .plan-badge{ margin-bottom: 14px; }
.auth .muted{ font-size: 13px; line-height: 1.5; }

/* ── Signup card (apr 2026 redesign) ──────────────────── */
.signup-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 36px 36px 28px;
  max-width: 460px;
  width: 100%;
  margin: 48px auto;
  box-shadow: 0 8px 32px -16px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
}
.signup-card__header {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.signup-card__title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.signup-card__lead {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 22px;
}
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.signup-field {
  display: flex;
  flex-direction: column;
}
.signup-field__label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: lowercase;
  font-weight: 400;
}
.signup-field__input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  width: 100%;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.signup-field__input::placeholder { color: #94a3b8; }
.signup-field__input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}
.signup-field__input[readonly] {
  color: #64748b;
  cursor: not-allowed;
}
.signup-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 4px;
}
.signup-info__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.signup-info__text {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}
.signup-submit {
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  font-family: inherit;
  transition: background 0.15s;
}
.signup-submit:hover { background: #1e293b; }
.signup-submit:disabled { background: #94a3b8; cursor: not-allowed; }
.signup-footer {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin: 14px 0 0;
}
.signup-footer__link {
  color: #0f172a;
  font-weight: 600;
  text-decoration: underline;
}
@media (max-width: 520px) {
  .signup-card { padding: 28px 22px 22px; margin: 24px auto; border-radius: 14px; }
  .signup-card__title { font-size: 24px; }
}

/* =========================================================
### help icon (info tooltip) ###
========================================================= */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: var(--muted);
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  cursor: help;
  opacity: 0.5;
  margin-left: 4px;
  vertical-align: middle;
}
.help-icon:hover,
.help-icon:focus {
  opacity: 1;
}


/* ═══════════════════════════════════════════════════════════
   Gap-analyse + admin-table utility classes
   Tilfoejet PR #40 — flytter inline styles ud af templates
   ═══════════════════════════════════════════════════════════ */

/* ── Buttons ────────────────────────────────────────────── */
.btn-success-light {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-right: 4px;
}
.btn-success-light:hover { background: #bbf7d0; }

.btn-state-active {
  background: #d4edda;
  color: #155724;
  border: none;
  padding: 4px 10px;
  border-radius: 3px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.btn-state-inactive {
  background: #f8d7da;
  color: #721c24;
  border: none;
  padding: 4px 10px;
  border-radius: 3px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge-info     { background: #dbeafe; color: #1e40af; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-success  { background: #dcfce7; color: #16a34a; }
.badge-error    { background: #fee2e2; color: #dc2626; }
.badge-neutral  { background: #f1f5f9; color: #64748b; }
.badge-purple   { background: #f3e8ff; color: #7c3aed; }
.badge-soft-blue{ background: #e0e7ff; color: #3b5998; }
.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}
.badge-sm {
  padding: 2px 6px;
  font-size: 10px;
}

/* ── Tags / scope-chips ─────────────────────────────────── */
.tag {
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  display: inline-block;
}
.tag-primary {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

/* ── Card sections ──────────────────────────────────────── */
.card-section-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}
.card-tight    { padding: 16px 20px; margin-bottom: 16px; }
.card-padded   { padding: 20px; margin-bottom: 16px; }

/* ── Form rows ──────────────────────────────────────────── */
.form-row {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}
.form-row > .grow { flex: 1; min-width: 200px; }
.input-text {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
}
.input-text-sm {
  padding: 5px 8px;
  font-size: 13px;
  border: 1px solid #d0d0d5;
  border-radius: 4px;
  font: inherit;
}
.input-text:disabled,
.input-text[disabled] {
  background: #f5f5f7;
  color: #64748b;
}
.input-label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

/* ── Admin tables ───────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table thead tr {
  background: #f5f5f7;
  border-bottom: 1px solid #e0e0e5;
}
.admin-table th {
  text-align: left;
  padding: 10px;
  font-weight: 700;
}
.admin-table th.center { text-align: center; }
.admin-table th.right  { text-align: right; }
.admin-table tbody tr {
  border-bottom: 1px solid #f0f0f3;
}
.admin-table td {
  padding: 8px 10px;
  vertical-align: middle;
}
.admin-table td.center { text-align: center; }
.admin-table td.right  { text-align: right; }
.admin-table .row-disabled { opacity: 0.5; }

/* ── Children / drilldown table (gap detail) ────────────── */
.children-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.children-table thead tr { border-bottom: 1px solid var(--line); }
.children-table th {
  text-align: left;
  padding: 6px;
}
.children-table th.right { text-align: right; }
.children-table tbody tr { border-bottom: 1px solid #f0f0f3; }
.children-table tbody tr.removed { opacity: 0.5; }
.children-table td {
  padding: 6px;
  vertical-align: middle;
}
.children-table td.actions { text-align: right; white-space: nowrap; }

/* ── Misc text helpers ──────────────────────────────────── */
.text-tiny   { font-size: 11px; }
.text-small  { font-size: 12px; }
.text-mini   { font-size: 10px; }
.text-base   { font-size: 13px; }   /* BAS-198 */
.note-muted  { color: var(--muted); font-size: 11px; margin-top: 8px; }

/* BAS-198: vægt + display utilities */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.d-block  { display: block; }
.d-inline { display: inline; }

/* ── Aggregate panel (gap master) ───────────────────────── */
.aggregate-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.aggregate-cell {
  text-align: center;
}
.aggregate-cell .value {
  font-size: 28px;
  font-weight: 800;
}
.aggregate-cell .value.green   { color: #22c55e; }
.aggregate-cell .value.red     { color: #dc2626; }
.aggregate-cell .value.yellow  { color: #eab308; }
.aggregate-cell .value.muted   { color: var(--muted); }
.aggregate-cell .label {
  font-size: 12px;
  color: var(--muted);
}
.aggregate-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 8px;
}

/* ── Page containers ────────────────────────────────────── */
.page-narrow { max-width: 600px; margin: 0 auto; }
.page-medium { max-width: 800px; margin: 0 auto; }
.page-wide   { max-width: 1100px; margin: 0 auto; }
.page-xwide  { max-width: 1200px; margin: 0 auto; }

/* ── Inline code styling ────────────────────────────────── */
.code-mini { font-size: 11px; }
.code-small { font-size: 12px; }

/* ── Card variants ──────────────────────────────────────── */
.card-flush { padding: 0; overflow-x: auto; }
.card-sm    { padding: 14px 18px; }

/* ── Headers + utility ──────────────────────────────────── */
.h-page      { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.h-section   { font-size: 15px; font-weight: 700; margin: 24px 0 8px; }
.h-section:first-child { margin-top: 10px; }

.row-between  { display: flex; justify-content: space-between; align-items: center; }
.row-end      { display: flex; gap: 8px; align-items: end; }
.row-stack    { display: flex; flex-direction: column; gap: 8px; }
.row-wrap-md  { flex-wrap: wrap; }

.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* ── Number-input narrow (for inline-edit start_order) ──── */
.input-num-narrow {
  width: 64px;
  padding: 4px 6px;
  border: 1px solid #d0d0d5;
  border-radius: 4px;
}

/* ── Disabled e-mail-input (Min profil) ─────────────────── */
.input-readonly {
  background: #f5f5f7;
  color: #64748b;
}

/* ── Help text under forms ──────────────────────────────── */
.form-help {
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0 0;
}


/* ── Page containers ────────────────────────────────────── */
.page-narrow { max-width: 600px; margin: 0 auto; }
.page-medium { max-width: 800px; margin: 0 auto; }
.page-wide   { max-width: 1100px; margin: 0 auto; }
.page-xwide  { max-width: 1200px; margin: 0 auto; }

/* ── Inline code styling ────────────────────────────────── */
.code-mini  { font-size: 11px; }
.code-small { font-size: 12px; }

/* ── Card variants ──────────────────────────────────────── */
.card-flush { padding: 0; overflow-x: auto; }
.card-sm    { padding: 14px 18px; }

/* ── Headers + utility ──────────────────────────────────── */
.h-page      { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.h-section   { font-size: 15px; font-weight: 700; margin: 24px 0 8px; }
.h-section:first-child { margin-top: 10px; }

.row-between  { display: flex; justify-content: space-between; align-items: center; }
.row-end      { display: flex; gap: 8px; align-items: end; }
.row-stack    { display: flex; flex-direction: column; gap: 8px; }
.row-wrap-md  { flex-wrap: wrap; }

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* ── Form input variants ────────────────────────────────── */
.input-num-narrow {
  width: 64px;
  padding: 4px 6px;
  border: 1px solid #d0d0d5;
  border-radius: 4px;
}
.input-readonly {
  background: #f5f5f7;
  color: #64748b;
}

/* ── Help text under forms ──────────────────────────────── */
.form-help {
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0 0;
}


/* =========================================================
### BAS-197: assessment — ctrl-cards (asset_assessment.html)
========================================================= */
.ctrl-list { display: flex; flex-direction: column; gap: 8px; }
.ctrl-card {
  padding: 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); display: flex; flex-direction: column; gap: 10px;
}
.ctrl-card.scored { border-left: 3px solid; }
.ctrl-card.scored.green { border-left-color: var(--success); }
.ctrl-card.scored.yellow { border-left-color: var(--warning); }
.ctrl-card.scored.red { border-left-color: var(--danger); }
.ctrl-card.na { opacity: 0.5; border-left: 3px solid #94a3b8; }
.ctrl-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ctrl-title { font-size: 14px; font-weight: 700; }
.ctrl-key { font-size: 11px; color: var(--muted); font-family: monospace; }
.ctrl-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.ctrl-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctrl-scoring { display: flex; gap: 4px; }
.score-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .12s; color: var(--text);
}
.score-btn:hover { border-color: var(--text); }
.score-btn.active { background: var(--text); color: #fff; border-color: var(--text); }
.score-btn.active.s-neg3 { background: var(--danger); border-color: var(--danger); }
.score-btn.active.s-neg2 { background: var(--warning); border-color: var(--warning); }
.score-btn.active.s-neg1 { background: var(--warning); border-color: var(--warning); color: #000; }
.score-btn.active.s-0 { background: var(--success); border-color: var(--success); }
.score-btn.active.s-pos1 { background: var(--info); border-color: var(--info); }
.na-btn {
  font-size: 11px; color: var(--muted); cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; background: #fff; transition: all .12s;
}
.na-btn:hover { border-color: var(--text); color: var(--text); }
.na-btn.active { background: var(--line-solid); color: #64748b; border-color: #94a3b8; }
.ctrl-comment {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 12px; resize: vertical; min-height: 32px;
}
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
}
.badge.green { background: var(--success-bg); color: var(--success-dark); }
.badge.yellow { background: var(--warning-bg); color: var(--warning-dark); }
.badge.red { background: var(--danger-bg); color: var(--danger-dark); }
.back-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--text); }
.save-indicator {
  font-size: 11px; color: var(--success); font-weight: 600; opacity: 0; transition: opacity .3s;
}
.save-indicator.show { opacity: 1; }
.score-legend {
  display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted);
  margin-bottom: 16px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.score-legend span { white-space: nowrap; }
.score-legend strong { font-weight: 700; }


/* =========================================================
### BAS-197: assessment — overview (overview.html)
========================================================= */
/* ── totals bar ── */
.totals-bar {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px;
}
.total-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; text-align: center;
}
.total-num { font-size: 24px; font-weight: 900; }
.total-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.total-num.green { color: var(--success); }
.total-num.yellow { color: var(--warning); }
.total-num.red { color: var(--danger); }

/* ── category summary ── */
.cat-grid { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.cat-row {
  display: grid; grid-template-columns: 1fr 80px 80px 80px;
  align-items: center; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 13px;
}
.cat-name { font-weight: 700; }
.cat-val { text-align: center; }

/* ── asset list ── */
.assess-grid { display: flex; flex-direction: column; gap: 8px; }
.assess-asset {
  display: grid; grid-template-columns: 1fr 120px 80px 80px;
  align-items: center; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--text); transition: box-shadow .12s;
}
.assess-asset:hover { box-shadow: var(--shadow); }
.assess-name { font-weight: 700; font-size: 14px; }
.assess-type { font-size: 12px; color: var(--muted); }
.assess-progress { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.assess-bar { width: 100%; height: 6px; border-radius: 3px; background: var(--line-solid); overflow: hidden; }
.assess-bar-fill { height: 100%; border-radius: 3px; }
.assess-bar-fill.green { background: var(--success); }
.assess-bar-fill.yellow { background: var(--warning); }
.assess-bar-fill.red { background: var(--danger); }
.assess-bar-fill.gray { background: #94a3b8; }
.assess-pct { font-size: 11px; color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge.green { background: var(--success-bg); color: var(--success-dark); }
.badge.yellow { background: var(--warning-bg); color: var(--warning-dark); }
.badge.red { background: var(--danger-bg); color: var(--danger-dark); }
.badge.none { background: var(--line-solid); color: #64748b; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title { font-size: 15px; font-weight: 800; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.actions { display: flex; gap: 8px; }


/* =========================================================
### BAS-197: compliance — framework detail gap-cards
========================================================= */
.gap-totals { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.gap-total { padding:8px 14px; border-radius:10px; font-size:13px; font-weight:700; border:1px solid var(--line); }
.gap-total.green { background:var(--success-bg); color:var(--success-dark); border-color:#bbf7d0; }
.gap-total.yellow { background:var(--warning-bg); color:var(--warning-dark); border-color:#fde68a; }
.gap-total.red { background:var(--danger-bg); color:var(--danger-dark); border-color:#fecaca; }
.gap-total.gray { background:var(--line-solid); color:#64748b; }

.gap-group { margin-bottom:20px; }
.gap-group-title { font-size:15px; font-weight:800; margin:0 0 8px; text-decoration:underline; text-underline-offset:4px; }

.gap-card { padding:14px; background:var(--panel); border:1px solid var(--line); border-radius:var(--r); margin-bottom:8px; }
.gap-card.valgt { border-left:3px solid var(--success); }
.gap-card.na { border-left:3px solid #94a3b8; opacity:0.7; }
.gap-card.fravalgt { border-left:3px solid var(--danger); opacity:0.7; }

.gap-title { font-size:14px; font-weight:700; margin-bottom:4px; }
.gap-desc { font-size:12px; color:var(--muted); margin-bottom:10px; }

.gap-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:flex-start; }
.gap-btn { padding:6px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.gap-btn:hover { border-color:var(--text); }
.gap-btn.active-valgt { background:var(--success); color:#fff; border-color:var(--success); }
.gap-btn.active-na { background:#94a3b8; color:#fff; border-color:#94a3b8; }
.gap-btn.active-fravalgt { background:var(--danger); color:#fff; border-color:var(--danger); }

.gap-form { display:none; margin-top:10px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--bg-subtle); }
.gap-form.open { display:block; }
.gap-form label { display:block; font-size:12px; font-weight:600; color:var(--muted); margin-bottom:4px; margin-top:8px; }
.gap-form select, .gap-form input, .gap-form textarea {
  width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font:inherit; font-size:13px; margin-bottom:2px;
}
.gap-form textarea { min-height:40px; resize:vertical; }
.gap-form .gap-save { margin-top:10px; padding:8px 16px; background:var(--text); color:#fff; border:none; border-radius:8px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }

.gap-status { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; }
.gap-status.valgt { background:var(--success-bg); color:var(--success-dark); }
.gap-status.na { background:var(--line-solid); color:#64748b; }
.gap-status.fravalgt { background:var(--danger-bg); color:var(--danger-dark); }

.gap-maturity { font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; }
.gap-maturity.m-neg3 { background:var(--danger-bg); color:var(--danger-dark); }
.gap-maturity.m-neg2 { background:#ffedd5; color:var(--warning-dark); }
.gap-maturity.m-neg1 { background:var(--warning-bg); color:var(--warning-dark); }
.gap-maturity.m-0 { background:var(--success-bg); color:var(--success-dark); }
.gap-maturity.m-pos1 { background:var(--info-bg); color:var(--info-dark); }

.gap-info {
  display:inline-flex; align-items:center; justify-content:center;
  width:18px; height:18px; border-radius:50%; background:var(--line);
  color:var(--muted); font-size:11px; font-weight:700; cursor:pointer;
  position:relative; margin-left:6px; flex-shrink:0;
}
.gap-info:hover .gap-tooltip, .gap-info.open .gap-tooltip { display:block; }
.gap-tooltip {
  display:none; position:absolute; left:24px; top:-4px; z-index:20;
  width:320px; padding:12px; background:#fff; border:1px solid var(--line);
  border-radius:10px; box-shadow:var(--shadow); font-size:12px; font-weight:400;
  color:var(--text); line-height:1.5; white-space:normal;
}


/* =========================================================
### BAS-197: drift — dashboard
========================================================= */
/* Grid + cards — genbruger onboarding_v2.css stil */
    .d-omraade-grid {
      display:grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
      gap: 14px;
    }
    /* Områdekort: fast 2-kolonne (2x2 ved 4 områder) */
    .d-omraade-grid--omr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    @media (max-width: 520px) {
      .d-omraade-grid--omr { grid-template-columns: 1fr; }
    }
    .d-omraade {
      padding: 18px 20px; border-radius: 12px; background:#fff;
      border: 1px solid var(--line);
    }
    .d-omraade__head {
      display:flex; justify-content:space-between; align-items:flex-start;
      gap:10px; margin-bottom: 10px;
    }
    .d-omraade__title { font-size: 1.05rem; font-weight:700; }

    /* Områdets primære statustekst — plain sprog */
    .d-omraade__status {
      font-size: 1.1rem; font-weight:700; line-height:1.35;
      margin-top:4px; margin-bottom:12px;
    }
    .d-omraade__score-secondary {
      font-size: 0.85rem; font-weight:600; color:var(--muted);
      letter-spacing:.02em;
    }

    .d-bar-outer { height:10px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
    .d-bar-inner { height:100%; border-radius:999px; transition:width .3s; }
    .d-bar--ok      { background:#10b981; }
    .d-bar--partial { background:#f59e0b; }
    .d-bar--low     { background:var(--danger); }
    .d-bar--none    { background:#9ca3af; }

    .d-pills { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
    .d-pill {
      padding: 3px 10px; border-radius: 999px; font-size:12px; font-weight:600;
      display:inline-flex; align-items:center; gap:5px;
    }
    .d-pill--nej     { background:var(--danger-bg); color:var(--danger-dark); }
    .d-pill--delvist { background:var(--warning-bg); color:var(--warning-dark); }
    .d-pill--ja      { background:#d1fae5; color:#065f46; }

    .d-link { display:inline-block; margin-top:12px; font-size:13px; font-weight:600; color:var(--info); }

    /* Topboks — største risiko */
    .d-top-hero {
      padding: 22px 24px; border-radius: 12px; background:#fff;
      border: 1px solid var(--line); margin-bottom: 14px;
      display:flex; flex-direction:column; gap:8px;
    }
    .d-top-hero--kritisk { border-left: 5px solid var(--danger); }
    .d-top-hero--info    { border-left: 5px solid var(--info); }
    .d-top-hero--ok      { border-left: 5px solid #10b981; }
    .d-top-hero__label {
      font-size:11px; font-weight:700; text-transform:uppercase;
      letter-spacing:.06em; color:var(--muted);
    }
    .d-top-hero__primaer {
      font-size:1.35rem; font-weight:800; line-height:1.3;
    }
    .d-top-hero__forklaring {
      font-size:14px; color:var(--muted); margin-top:4px;
    }

    /* Opgave-rækker */
    .d-opgave {
      padding: 10px 14px; border-bottom: 1px solid var(--line);
      display:flex; gap:12px; align-items:center;
    }
    .d-opgave:last-child { border-bottom:none; }
    .d-opgave__prio {
      padding: 2px 9px; border-radius:999px; font-size:11px; font-weight:700;
      text-transform:uppercase; letter-spacing:.04em;
      min-width:58px; text-align:center;
    }
    .d-opgave__prio--høj    { background:var(--danger-bg); color:var(--danger-dark); }
    .d-opgave__prio--mellem { background:var(--warning-bg); color:var(--warning-dark); }
    .d-opgave__prio--lav    { background:#e5e7eb; color:#374151; }
    .d-opgave__title { flex:1; font-weight:600; font-size:14px; }

    /* Niveau-tabel (mindre prominent) */
    .d-fw-table { width:100%; margin-top:10px; font-size:12.5px; }
    .d-fw-table th, .d-fw-table td {
      padding:5px 4px; text-align:left; border-bottom:1px solid var(--line);
    }
    .d-fw-table th {
      font-size:10px; font-weight:700; text-transform:uppercase;
      letter-spacing:.04em; color:var(--muted);
    }

/* kpi: måletal-panel (aktiver & opgaver) — docs/v2-prep/issues-dashboard-kpi */
    .d-kpi-toggle { display:flex; gap:4px; }
    .d-kpi-tab {
      font-size:11px; padding:3px 10px; border-radius:999px; text-decoration:none;
      color:var(--muted); border:1px solid var(--line);
    }
    .d-kpi-tab.is-active { background:var(--text); color:#fff; border-color:var(--text); }
    .d-kpi-grid {
      display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap:10px; margin-top:6px;
    }
    .d-kpi {
      display:block; padding:12px 14px; border-radius:10px; background:#fff;
      border:1px solid var(--line); border-left:4px solid var(--line);
      text-decoration:none; color:inherit;
    }
    .d-kpi:hover { background:var(--bg-muted, #f8f9fa); }
    .d-kpi--green  { border-left-color: var(--success, #16a34a); }
    .d-kpi--yellow { border-left-color: var(--warning, #d97706); }
    .d-kpi--red    { border-left-color: var(--danger, #dc2626); }
    .d-kpi__value { font-size:1.35rem; font-weight:700; line-height:1.2; }
    .d-kpi__of    { font-size:.85rem; font-weight:400; color:var(--muted); }
    .d-kpi__label { font-size:12px; color:var(--text); margin-top:4px; }
    .d-kpi__hint  { color:var(--muted); font-size:11px; }
    .d-kpi__rag   { font-size:11px; font-weight:600; margin-top:6px; display:inline-flex; gap:4px; align-items:center; }
    .d-kpi__rag--green  { color:var(--success-dark, #166534); }
    .d-kpi__rag--yellow { color:var(--warning-dark, #92400e); }
    .d-kpi__rag--red    { color:var(--danger-dark, #991b1b); }
    .d-kpi-aggtable { margin-top:12px; }
    .d-kpi-cell--yellow { background:var(--warning-bg, #fef3c7); }
    .d-kpi-cell--red    { background:var(--danger-bg, #fee2e2); }
    /* kpi: ikke-klikbart kort (O2/O4 indtil F2-eksekveringsliste) */
    .d-kpi--static { cursor: default; }
    .d-kpi--static:hover { background:#fff; }
    /* kpi: filtreret aktivliste — aktiv filter-chip + modal-link */
    .is-active-chip { background:var(--text); color:#fff; }
    .u-link-pointer { cursor:pointer; color:var(--link, #2563eb); text-decoration:underline; }


/* =========================================================
### BAS-197: gap — execute
========================================================= */
.gap-req { padding:14px 16px; border-bottom:1px solid var(--line); }
  .gap-req:last-child { border-bottom:none; }
  .gap-req-title { font-size:14px; font-weight:600; margin:0 0 2px; }
  .gap-req-text { font-size:12px; color:var(--muted); margin:0 0 8px; line-height:1.5; }
  .gap-req-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
  .gap-select { padding:6px 10px; border:1px solid var(--line); border-radius:6px; font:inherit; font-size:13px; min-width:140px; }
  .gap-comment { padding:6px 10px; border:1px solid var(--line); border-radius:6px; font:inherit; font-size:12px; flex:1; min-width:120px; }
  .gap-status { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
  .gap-ok { background:var(--success); }
  .gap-notok { background:var(--danger); }
  .gap-none { background:#cbd5e1; }
  .gap-saving { opacity:0.5; }
  /* V1-bugfix issue 16: synlig markering hvis et svar ikke kunne gemmes. */
  .gap-save-error { box-shadow: inset 3px 0 0 var(--danger, #dc2626); background:#fef2f2; }
  .gap-req--hidden { display:none; }
  .gap-chapter { font-size:13px; font-weight:700; color:var(--muted); padding:10px 16px; background:var(--bg-subtle); border-bottom:1px solid var(--line); }
  .gap-summary { display:flex; gap:16px; font-size:13px; padding:12px 16px; background:var(--bg-subtle); border-top:1px solid var(--line); }
  .gap-summary b { font-weight:700; }

/* BAS-264 (CR-01c): ROPA edit-modal — toggle via .is-open class i stedet for
   inline display-manipulation. Inline base-styles bevares (style="..."). */
.ropa-edit-modal.is-open { display: flex !important; }

/* ─────────────────────────────────────────────────────────────────────
   BAS-262 (CR-02a): Admin-area utility-classes.
   Erstatter højfrekvente inline style="..." mønstre i templates/admin/*.
   ───────────────────────────────────────────────────────────────────── */

/* Tabel-celle padding (compact admin-tables) */
.admin-cell      { padding: 8px 6px; }    /* 63× i admin/ */
.admin-cell-sm   { padding: 6px; }         /* 43× */
.admin-cell-md   { padding: 10px 12px; }   /* tenant_detail rows */

/* Tekst-alignment helpers */
.text-center     { text-align: center; }
.text-right      { text-align: right; }
.text-left       { text-align: left; }

/* Border helpers */
.border-b        { border-bottom: 1px solid var(--line); }

/* Common admin font-size+weight combos */
.font-bold       { font-weight: 700; }
.font-semi       { font-weight: 600; }
.text-13         { font-size: 13px; }
.text-12         { font-size: 12px; }
.text-11         { font-size: 11px; }

/* Common spacing */
.no-margin       { margin: 0; }
.nowrap          { white-space: nowrap; }

/* ─────────────────────────────────────────────────────────────────────
   BAS-264 (CR-02c): Compliance-area utility-classes.
   ───────────────────────────────────────────────────────────────────── */
.form-label-sm   { font-size: 12px; font-weight: 600; display: block; margin-bottom: 4px; }  /* 14× */
.cell-center     { padding: 10px 8px; text-align: center; }                                    /* 13× */
.cell-pad-12     { padding: 12px; text-align: center; }                                        /* 12× */
.mb-14           { margin-bottom: 14px; }                                                       /* 11× */
.w-100           { width: 100%; }                                                               /* 8× */
.cell-pad-8c     { padding: 8px; text-align: center; }                                          /* 8× */
.flex-between    { display: flex; justify-content: space-between; align-items: center; }       /* 8× */
.h2-stat         { font-size: 22px; font-weight: 800; margin: 0; }                              /* 8× */
.muted-tiny      { font-size: 11px; color: var(--muted); margin-top: 2px; }                    /* 8× */
.th-bold-left    { padding: 10px 12px; text-align: left; font-weight: 700; }                   /* 7× */
.font-bold-13    { font-size: 13px; font-weight: 600; }                                         /* 7× */
.cell-pad-6      { padding: 6px 8px; }                                                          /* 6× */
.h1-stat         { font-size: 28px; font-weight: 900; }                                         /* 6× */

/* ─────────────────────────────────────────────────────────────────────
   BAS-265-267 (CR-02d/e/f): Globale utility-klasser for resterende
   højfrekvente inline-style-mønstre på tværs af templates/.
   ───────────────────────────────────────────────────────────────────── */
.font-semi-12     { font-size: 12px; font-weight: 600; }                                    /* 81× */
.input-sm-w-100   { width: 100%; margin-top: 4px; }                                         /* 67× */
.h2-stat-20       { font-size: 20px; font-weight: 800; margin: 0; }                          /* 31× */
.mb-16            { margin-bottom: 16px; }                                                   /* 29× same as .mb-4 */
.label-block-mb12 { display: block; margin-bottom: 12px; }                                  /* 29× */
.muted-13         { font-size: 13px; margin: 2px 0 0; }                                     /* 27× */
.label-block-mb10 { display: block; margin-bottom: 10px; }                                  /* 22× */
.cell-pad-10-14   { padding: 10px 14px; }                                                   /* 21× */
.flex-gap-8       { display: flex; gap: 8px; }                                              /* 21× */
.flex-1           { flex: 1; }                                                               /* 20× */
.no-deco          { text-decoration: none; }                                                /* 19× */
.scroll-x-pad-0   { padding: 0; overflow-x: auto; }                                         /* 19× */
.mb-10            { margin-bottom: 10px; }                                                   /* 17× */
.danger-color     { color: #b91c1c; }                                                       /* 17× */
.mt-8             { margin-top: 8px; }                                                       /* 11× */

/* ─────────────────────────────────────────────────────────────────────
   CR-02 final pass: color-utilities + status-badges + size-utilities.
   ───────────────────────────────────────────────────────────────────── */

/* Color utilities — inkluderer både CSS-vars og raw hex (legacy) */
.text-info        { color: var(--info); }
.text-warning     { color: var(--warning); }
.text-warning-dark { color: var(--warning-dark); }
.text-success     { color: var(--success); }
.text-success-dark { color: #16a34a; }
.text-danger      { color: var(--danger); }
.text-danger-dark { color: var(--danger-dark); }
.text-muted-soft  { color: #cbd5e1; }
.text-orange      { color: #ea580c; }
.text-yellow      { color: #ca8a04; }
.text-red         { color: #dc2626; }
.text-red-700     { color: #b91c1c; }

/* Status-badges — gentagne badge-mønstre */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.badge--sm   { padding: 1px 6px; font-size: 10px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: #e0e7ff; color: #3b5998; }
.badge-muted   { background: var(--line-solid); color: #64748b; }

/* Mere padding-utilities + size */
.mt-2-space   { margin-top: 8px; }     /* whitespace-variant af mt-2 */
.text-13-bold { font-size: 13px; font-weight: 600; }
.btn-tiny     { font-size: 11px; padding: 3px 8px; }
.h3-stat-24   { font-size: 24px; font-weight: 800; }
.h2-stat-margin-8-16 { font-size: 20px; font-weight: 800; margin: 8px 0 16px; }
.admin-table-sm { width: 100%; border-collapse: collapse; font-size: 12px; }
.ml-4         { margin-left: 4px; }

/* ══════════════════════════════════════════════════════════════════
   art30: Art. 30 / RoPA — Fase 1 (issues A–D)
   ══════════════════════════════════════════════════════════════════ */

/* art30: undertekst under side-titel (erstatter inline font/margin) */
.art30-subtitle { margin: 4px 0 0; }
/* V1-bugfix issue 17: klikbar Art. 30-række (åbner detalje via data-href). */
.art30-row { cursor: pointer; }
.art30-row:hover { background: var(--bg-subtle); }

/* art30 (issue B): detalje-side layout */
.art30-breadcrumb { font-size: 12px; }
.art30-card { padding: 16px; }
.grid-2col-50-50 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 960px) {
    .grid-2col-50-50 { grid-template-columns: 1fr; }
}
.ropa-fieldset {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.ropa-fieldset > legend {
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    padding: 0 6px;
}
.ropa-fieldset { padding: 14px 16px; }
.ropa-fieldset label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
/* Felt-kontroller fylder bredden + sidder under label-teksten */
.ropa-fieldset input[type="text"],
.ropa-fieldset input[type="date"],
.ropa-fieldset textarea,
.ropa-fieldset select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    font-weight: 400;
    color: var(--text);
    background: #fff;
}
.ropa-fieldset textarea {
    min-height: 64px;
    resize: vertical;
}
.ropa-fieldset input[type="date"] { max-width: 220px; }
/* art30 (issue E): multi-select listbox — strammere end enkelt-select */
.ropa-fieldset select.ropa-multi-select { padding: 4px; height: auto; }
.ropa-flag-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    color: var(--text);
}
.ropa-flag-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex: none;
}
.ropa-art9-block,
.ropa-cpr-block {
    margin-top: 6px;
    padding-left: 12px;
    border-left: 2px solid var(--line);
}

/* art30 (issue C): 'Tilknyt aktiv'-modal + node-detalje-modal */
.ropa-modal {
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 480px;
    max-width: 640px;
}
.ropa-modal::backdrop { background: rgba(0, 0, 0, 0.35); }
.ropa-link-input {
    width: 100%;
    padding: 8px 10px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
}
.ropa-link-results {
    list-style: none;
    padding: 0;
    margin: 8px 0;
    max-height: 280px;
    overflow-y: auto;
}
.ropa-link-results li {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
}
.ropa-link-results li:hover { background: var(--line-solid); }
.ropa-link-results li.selected {
    background: var(--info-bg);
    border-color: var(--info, #3b82f6);
}
.ropa-node-fields {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 12px;
    margin: 10px 0;
    font-size: 13px;
}
.ropa-node-fields dt { font-weight: 600; color: var(--muted); }
.ropa-node-fields dd { margin: 0; }
.ropa-overflow-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }

/* art30 4-grupper stjernegraf — kvadratisk SVG + faste klokkeslæts-positioner.
   Farver via --grp pr. gruppe-klasse. */
.ropa-star-svg { width: 100%; height: auto; max-height: 560px; display: block; }
.ropa-center-circle { fill: var(--success); stroke: var(--success); stroke-width: 3; }
.ropa-center-icon  { font-size: 26px; }
.ropa-center-label { font-size: 12px; font-weight: 700; fill: #fff; }
.ropa-group-icon   { font-size: 22px; }
.ropa-group-label  { font-size: 11px; font-weight: 600; fill: var(--muted); }
.ropa-empty-hint   { font-size: 13px; fill: var(--muted); }

.ropa-link-center, .ropa-link-node {
    stroke: var(--grp, var(--line));
    stroke-width: 1.5;
    opacity: 0.45;
}
.ropa-link-empty { opacity: 0.18; stroke-dasharray: 3 3; }

/* Lag-3 noder rundt om hver gruppe-bobbel */
.ropa-node-circle {
    fill: #fff;
    stroke: var(--grp, var(--muted));
    stroke-width: 2;
}
.ropa-node:hover .ropa-node-circle { fill: var(--grp, var(--muted)); fill-opacity: 0.15; }
.ropa-node-label { font-size: 11px; font-weight: 500; fill: var(--text); pointer-events: none; }

.ropa-overflow-circle {
    fill: var(--grp, var(--muted));
    fill-opacity: 0.20;
    stroke: var(--grp, var(--muted));
    stroke-width: 2;
}
.ropa-overflow-label { font-size: 12px; font-weight: 700; fill: var(--text); pointer-events: none; }

.ropa-group-anchor:hover .ropa-anchor-circle {
    fill-opacity: 0.30;
    stroke-width: 3;
}
.ropa-anchor-circle {
    fill: var(--grp, var(--muted));
    fill-opacity: 0.18;
    stroke: var(--grp, var(--muted));
    stroke-width: 2;
    transition: fill-opacity .12s ease, stroke-width .12s ease;
}
.ropa-anchor-empty .ropa-anchor-circle { fill-opacity: 0.06; stroke-opacity: 0.45; }
.ropa-anchor-empty .ropa-group-icon    { opacity: 0.45; }
.ropa-anchor-empty .ropa-group-label   { opacity: 0.55; }

/* Count-badge i øverste højre hjørne af bobbel. */
.ropa-count-badge {
    fill: var(--grp, var(--muted));
    stroke: #fff;
    stroke-width: 2;
}
.ropa-count-label {
    font-size: 11px;
    font-weight: 700;
    fill: #fff;
    pointer-events: none;
}

/* 4-gruppe-farver — matcher GROUP_META-nøgler i ropa_relations_service */
.ropa-grp-proces      { --grp: var(--success); }
.ropa-grp-system      { --grp: var(--info); }
.ropa-grp-dokument    { --grp: #7c3aed; }
.ropa-grp-leverandoer { --grp: var(--danger); }

/* Category-picker-modal — liste over aktiver pr. kategori */
.ropa-cat-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.ropa-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
}
.ropa-cat-row:last-child { border-bottom: 0; }
.ropa-cat-row.is-linked { background: var(--bg-subtle); }
.ropa-cat-row-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.ropa-cat-name { font-weight: 500; }
.ropa-cat-type { white-space: nowrap; }
.ropa-cat-linked-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex: none;
}
.ropa-cat-row-action { flex: none; }

/* art30 issue J: opret-nyt-aktiv inline i category-picker */
.ropa-cat-create {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.ropa-cat-create-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}
.ropa-cat-create-row .ropa-link-input { flex: 1; }
.ropa-cat-create-select { max-width: 40%; }
.ropa-cat-create-msg {
    color: var(--danger);
    min-height: 16px;
    margin: 4px 0 0;
}

/* art30 Fase 1 (issue I): multi-select pills + tilføj-anden + inline-form */
.ropa-multiselect {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.ropa-check-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    background: #fff;
}
.ropa-check-pill input { margin: 0; width: auto; flex: none; }
.ropa-check-pill:hover { background: var(--line-solid); }
.ropa-check-pill:has(input:checked) {
    background: var(--info-bg);
    border-color: var(--info);
}
.ropa-check-pill--custom:has(input:checked) {
    background: #ede9fe;
    border-color: #7c3aed;
}
.ropa-check-pill small { color: var(--muted); font-size: 10px; }
.ropa-add-other {
    display: flex;
    gap: 6px;
    align-items: center;
    /* art30 issue I-followup: afstand til efterfølgende felter
       (fx art. 9/10/§11-checkbokse under datakategori-pills) */
    margin-bottom: 16px;
}
.ropa-add-other-input { flex: 1; }
.ropa-inline-form {
    padding: 10px 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════════
 * gov: Governance · Aktivgrupper — IA-lag (K3-K5)
 * ═══════════════════════════════════════════════════════════════════ */

/* gov: layout (hub + sections) */
.gov-layout { display: flex; gap: 24px; align-items: flex-start; }
.gov-main { flex: 1 1 auto; min-width: 0; }

/* gov: venstre-nav (POC aside) */
.gov-nav {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 12px;
    background: var(--bg-subtle);
    border-radius: 12px;
}
.gov-nav-heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin: 16px 0 4px;
    padding: 0 10px;
}
.gov-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
}
.gov-nav-item:hover { background: var(--line-solid); }
.gov-nav-item.is-active {
    background: var(--info-bg);
    color: var(--info-dark);
    font-weight: 600;
}
/* #707: indlejret under-nav (aktivgrupper under "Aktiver") i sektions-venstremenuen. */
.gov-subnav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 14px;
    padding-left: 8px;
    border-left: 2px solid var(--line-solid);
}
.gov-subnav .gov-nav-item { font-size: 12px; padding: 6px 10px; }
.gov-nav-icon { width: 22px; text-align: center; flex: none; }
.gov-nav-label { flex: 1; }
.gov-nav-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
    background: var(--line-solid);
    border-radius: 10px;
    padding: 1px 8px;
    min-width: 22px;
    text-align: center;
}
.gov-nav-muted { color: var(--muted); }
.gov-nav-disabled {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: var(--muted);
    opacity: .55;
    font-size: 13px;
    cursor: not-allowed;
}
.gov-nav-badge {
    background: var(--info-bg);
    color: var(--info-dark);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* gov: hub-side */
.gov-hub-head { margin-bottom: 24px; }
.gov-hub-lede { max-width: 60ch; font-size: 14px; line-height: 1.55; }
.gov-hub-total { margin-top: 8px; }
.gov-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.gov-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color .12s ease, transform .12s ease;
}
.gov-card:hover {
    border-color: var(--info);
    transform: translateY(-1px);
}
.gov-card-icon { font-size: 22px; }
.gov-card-label { font-weight: 600; font-size: 14px; }
.gov-card-count { font-size: 24px; font-weight: 700; color: var(--info-dark); }
.gov-card-blurb { line-height: 1.4; }

/* ── K1 (#662): Risk-hub — spejler gov-hub-mønstret (.risk-* = .gov-*) ── */
.risk-layout { display: flex; gap: 24px; align-items: flex-start; }
.risk-main { flex: 1 1 auto; min-width: 0; }
.risk-nav {
    flex: 0 0 240px; display: flex; flex-direction: column; gap: 2px;
    padding: 16px 12px; background: var(--bg-subtle); border-radius: 12px;
}
.risk-nav-heading {
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); margin: 16px 0 4px; padding: 0 10px;
}
.risk-nav-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    border-radius: 8px; color: inherit; text-decoration: none; font-size: 13px;
}
.risk-nav-item:hover { background: var(--line-solid); }
.risk-nav-item.is-active { background: var(--info-bg); color: var(--info-dark); font-weight: 600; }
.risk-nav-icon { width: 22px; text-align: center; flex: none; }
.risk-nav-label { flex: 1; }
.risk-hub-head { margin-bottom: 24px; }
.risk-hub-lede { max-width: 64ch; font-size: 14px; line-height: 1.55; }
.risk-hub-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px; margin-top: 16px;
}
.risk-card {
    display: flex; flex-direction: column; gap: 6px; padding: 16px;
    border: 1px solid var(--line); border-radius: 12px; text-decoration: none;
    color: inherit; background: #fff; transition: border-color .12s ease, transform .12s ease;
}
.risk-card:hover { border-color: var(--info); transform: translateY(-1px); }
.risk-card-icon { font-size: 22px; }
.risk-card-label { font-weight: 600; font-size: 14px; }
.risk-card-blurb { line-height: 1.4; }
/* K2 (#663): konsekvens-matrix */
.risk-matrix-scroll { overflow-x: auto; margin: 8px 0 16px; }
.risk-matrix th, .risk-matrix td { white-space: nowrap; }
.risk-matrix select.form-control { min-width: 92px; }
/* K2 (#663): skabelon-admin (PR #664-review 2b — kompakt, aligned, section-gem) */
.ks-conseq .card { padding: 14px 16px; }
.ks-conseq .card-title { margin: 0 0 6px; }
.ks-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ks-inline-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ks-target-grid { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 8px 0 12px; }
.ks-target-grid label { display: inline-flex; align-items: center; gap: 6px; }
.ks-grid { width: 100%; margin: 6px 0 10px; }
.ks-grid td, .ks-grid th { padding: 4px 8px; vertical-align: middle; }
.ks-grid .form-control { width: 100%; }
.ks-c-key { width: 64px; }
.ks-c-flag { width: 56px; text-align: center; }
.ks-sel-head { margin: 18px 0 8px; }
/* K9 (#675): trusselskatalog — ét katalog + inline aktivtype-koblinger */
.tc-item { display: flex; align-items: flex-start; gap: 12px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tc-rel { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 320px; min-width: 0; }
.tc-title { font-weight: 500; }
.tc-couplings > summary.tc-toggle { list-style: none; cursor: pointer; }
.tc-couplings > summary.tc-toggle::-webkit-details-marker { display: none; }
.tc-edit { width: 100%; margin-top: 8px; padding: 8px 10px; background: var(--bg-subtle); border-radius: 8px; }
.tc-grp { margin: 4px 0; }
.tc-grp-sum { cursor: pointer; padding: 3px 0; font-weight: 600; }
.tc-grp .v6-table td, .tc-grp .v6-table th { padding: 3px 8px; }
/* K8 (#673): sårbarhed→aktivtype-chips (uden FITAR) */
.tc-types { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 0 6px; }
.tc-type-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }

/* gov(K4): section-side — callout, head, view-toggle, chips, list */
.gov-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--info-bg);
    border-left: 3px solid var(--info);
    border-radius: 6px;
    position: relative;
}
.gov-callout-icon { font-size: 20px; line-height: 1; flex: none; }
.gov-callout-body { flex: 1; }
.gov-callout-body strong { font-size: 13px; }
.gov-callout-body p { margin: 4px 0 0; }
.gov-callout-link {
    color: var(--info-dark);
    text-decoration: none;
    white-space: nowrap;
    align-self: center;
}
.gov-callout-link:hover { text-decoration: underline; }
.gov-callout-close {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    padding: 4px 8px;
    align-self: flex-start;
}
.gov-callout-close:hover { color: var(--info-dark); }

.gov-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.gov-section-head h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gov-section-icon { font-size: 24px; }

.gov-view-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-subtle);
}
.gov-view-btn {
    background: transparent;
    border: 0;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
}
.gov-view-btn:hover { background: var(--line-solid); }
.gov-view-btn.is-active {
    background: #fff;
    color: var(--info-dark);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.gov-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 16px;
}
.gov-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}
.gov-chip:hover { background: var(--line-solid); }
.gov-chip.is-active {
    background: var(--info-bg);
    border-color: var(--info);
    color: var(--info-dark);
}
.gov-chip-count {
    font-size: 11px;
    background: var(--line-solid);
    border-radius: 10px;
    padding: 1px 6px;
    color: var(--muted);
}
.gov-chip.is-active .gov-chip-count {
    background: #fff;
    color: var(--info-dark);
}

.gov-empty {
    padding: 32px 16px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 12px;
}

.gov-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
.gov-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
/* Type-filter (gov-chip) skjuler rækker via [hidden]; uden denne regel ville
   .gov-row { display:flex } overrule browserens [hidden]{display:none}, så filteret
   ikke virkede (chip blev markeret, men rækker forblev synlige). */
.gov-row[hidden] { display: none; }
.gov-row:last-child { border-bottom: 0; }
.gov-row:hover { background: var(--bg-subtle); }
.gov-row-type {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--info);
    flex: none;
}
.gov-row-name {
    flex: 0 0 auto;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
}
.gov-row-name:hover { color: var(--info-dark); text-decoration: underline; }
.gov-row-badge {
    background: var(--line-solid);
    padding: 2px 8px;
    border-radius: 10px;
    flex: none;
}
.gov-row-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: auto;
    align-items: center;
}
.gov-link-tag {
    background: var(--info-bg);
    color: var(--info-dark);
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
}
.gov-link-tag:hover {
    border-color: var(--info);
    text-decoration: none;
}

/* gov(K5): landskab-fragment (per-gruppe, opdelt i typer) */
.gov-landscape {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.gov-land-type {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
}
.gov-land-type-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.gov-land-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* gov(M1): KPI-rækker på sektion-side (fx flow-tæller på dataflow) */
.gov-kpis {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.gov-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 140px;
}
.gov-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--info-dark);
    line-height: 1;
}
.gov-kpi-label { font-size: 12px; color: var(--muted); }

/* gov(M2): dataflow kategori-katalog */
.gov-df-catalog {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.gov-df-catalog-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
}
.gov-df-catalog-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.gov-df-group {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 16px;
    background: #fff;
}
.gov-df-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin: 0 0 8px;
}
.gov-df-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gov-df-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 12px;
}
.gov-df-cat-name { font-weight: 500; }
.gov-df-cat-tag {
    background: #fff;
    padding: 1px 6px;
    border-radius: 8px;
}
.gov-df-cat-tag-custom {
    background: var(--info-bg);
    color: var(--info-dark);
}
.gov-df-add { margin-top: 16px; }
.gov-df-msg { color: var(--info-dark); margin: 4px 0 0; min-height: 16px; }

/* gov(M1-fix): låste nav-sektioner — sektioner brugeren ikke har plan-adgang til.
   Vises stadig så funktionen er synlig + giver en opgraderings-prompt. */
.gov-nav-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
}
.gov-nav-locked:hover { background: var(--info-bg); color: var(--info-dark); }
.gov-nav-locked .gov-nav-icon { opacity: .55; }
.gov-nav-badge-upgrade {
    background: var(--info-bg);
    color: var(--info-dark);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

/* gov(M3+M4+M5): flow-builder + ROPA-eksport + diagram */
.gov-df-flows { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.gov-df-proc-picker {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 12px 0;
}
.gov-df-proc-picker label { flex: 1; max-width: 360px; }
.gov-df-proc-picker select { width: 100%; }
.gov-df-tabs { margin: 12px 0; }

.gov-df-flows-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.gov-df-flow-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.gov-df-flow-summary { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; }
.gov-df-flow-leg { line-height: 1.4; }
.gov-df-flow-actions { display: flex; gap: 6px; flex: none; }
.gov-df-tct-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.gov-df-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 6px;
}
.gov-df-cols fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin: 0;
}
.gov-df-cols legend { font-size: 12px; font-weight: 700; padding: 0 6px; color: var(--muted); }
.gov-df-tct-row { display: flex; align-items: center; gap: 6px; font-weight: 500; }

.gov-df-msg { color: var(--info-dark); }

/* Diagram-fane */
.gov-df-diagram { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.gov-df-chain {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.gov-df-node {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-subtle);
    cursor: pointer;
    font-size: 13px;
    color: inherit;
}
.gov-df-node:hover { border-color: var(--info); }
.gov-df-node-process { background: var(--info-bg); border-color: var(--info); font-weight: 600; }
.gov-df-node-source   { border-color: #16a34a; }
.gov-df-node-recipient{ border-color: #dc2626; }
.gov-df-node-empty {
    color: var(--muted);
    font-style: italic;
    background: transparent;
    border-style: dashed;
    cursor: default;
}
.gov-df-node-icon { font-size: 14px; }
.gov-df-node-label { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gov-df-tct { margin-left: 4px; font-size: 14px; }
.gov-df-edge { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); }
.gov-df-edge-arrow { font-size: 18px; }
.gov-df-edge-label { font-size: 11px; max-width: 120px; text-align: center; }
.gov-df-chain-note { margin: 4px 0 0 8px; }

/* ROPA-eksport preview */
.gov-df-preview { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 8px 0; }
.gov-df-preview dt { font-weight: 600; }
.gov-df-preview dd { margin: 0; }

/* ────────────────────────────────────────────────────────────────
   V5 Metafelter — dynamiske felt-sektioner i aktiv-modalen.
   Mønster: meta-section (fieldset) → meta-field (label + input).
   Sektion-renderingen drives af modules/services/field_defs_service.
   ──────────────────────────────────────────────────────────────── */

/* meta: sektions-fieldset */
.meta-section {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 12px;
}
.meta-section-title {
    font-size: 12px;
    color: var(--muted);
    padding: 0 6px;
    font-weight: 600;
}

/* meta: én label-input-række */
.meta-field {
    margin-bottom: 12px;
}
.meta-field:last-child {
    margin-bottom: 4px;
}
.meta-label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

/* meta: input-kontroller — fælles look uden inline-styles */
.meta-input,
.meta-select,
.meta-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
}
.meta-textarea {
    min-height: 64px;
    resize: vertical;
}
.meta-input--readonly {
    background: #f1f5f9;
    color: var(--muted);
    cursor: not-allowed;
}

/* meta: checkbox-felt (boolean field_type) */
.meta-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}
.meta-checkbox {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

/* meta: pill-multiselect */
.meta-multiselect {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-subtle);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}
.meta-pill input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}
.meta-pill input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--info);
}
.meta-pill--custom {
    border-style: dashed;
}

/* meta: fritekst-tilføj for select/multiselect (allow_custom_options) */
.meta-custom-row {
    width: 100%;
    margin-top: 6px;
}
.meta-custom-input {
    font-size: 12px;
    padding: 6px 10px;
}

/* meta: hjælpetekst under felt */
.meta-help {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* ────────────────────────────────────────────────────────────────
   V5 Metafelter — GA/tenant-admin CRUD-side
   ──────────────────────────────────────────────────────────────── */

.meta-admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 0 32px;
}
.meta-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.meta-admin-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 8px;
    color: var(--text);
}
.meta-admin-create {
    padding: 16px;
    margin-bottom: 16px;
}
.meta-admin-create > summary {
    cursor: pointer;
    margin-bottom: 12px;
}
.meta-admin-row {
    padding: 10px 14px;
    margin-bottom: 8px;
}
.meta-admin-row-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
}
.meta-admin-row[open] > .meta-admin-row-summary {
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.meta-admin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 12px;
    align-items: end;
}
.meta-admin-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meta-admin-cell--wide {
    grid-column: span 2;
}
.meta-admin-flags {
    grid-column: span 4;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.meta-admin-actions {
    grid-column: span 4;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.meta-admin-delete {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}
.meta-badge {
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 10px;
    color: var(--muted);
}
.meta-badge--off {
    background: #fef9c3;
    border-color: #ca8a04;
    color: #854d0e;
}

/* meta: read-only standardfelt-rækker i tenant-admin (N5) */
.meta-admin-row--readonly {
    background: var(--bg-subtle);
    cursor: default;
    opacity: 0.85;
}

/* ────────────────────────────────────────────────────────────────
   V5 Aktiv-tjeklister — offer-modal + status-banner
   ──────────────────────────────────────────────────────────────── */

/* tjek: offer-modal når aktiv er oprettet og typen har en tjekliste */
.tjek-offer-body {
    padding: 4px 0 8px;
}
.tjek-offer-lead {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
}
.tjek-offer-options {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-subtle);
}
.tjek-offer-options li {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}
.tjek-offer-options li:last-child {
    border-bottom: 0;
}
.tjek-offer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.tjek-offer-form {
    display: inline;
    margin: 0;
}

/* tjek: status-banner på aktiv-detalje */
.tjek-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin: 0 0 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
}
.tjek-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.tjek-status-pending {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #ca8a04;
}
.tjek-status-progress {
    background: var(--info-bg);
    color: var(--info-dark);
    border: 1px solid var(--info);
}
.tjek-status-done {
    background: var(--success-bg);
    color: var(--success-dark);
    border: 1px solid var(--success);
}
.tjek-status-link {
    margin-left: auto;
    color: var(--info);
    text-decoration: none;
    font-weight: 600;
}
.tjek-status-link.primary {
    background: var(--info);
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
}
.tjek-status-link:hover { text-decoration: underline; }
.tjek-status-link.primary:hover {
    text-decoration: none;
    opacity: 0.9;
}
.tjek-status-form {
    margin: 0 0 0 auto;
}

/* ────────────────────────────────────────────────────────────────
   gov(P1): "+ Tilføj" på governance-gruppesider — knap eller
   dropdown afhængigt af antallet af plan-gatede typer i gruppen.
   ──────────────────────────────────────────────────────────────── */

.gov-add {
    margin: 8px 0 12px;
}
.gov-add-menu {
    position: relative;
    display: inline-block;
}
.gov-add-menu > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
/* Skjul standard-trekant på <summary> i Chrome/Safari/Firefox */
.gov-add-menu > summary::-webkit-details-marker { display: none; }
.gov-add-menu > summary::marker { content: ""; }

.gov-add-summary::after {
    content: " ▾";
    font-size: 10px;
    opacity: 0.7;
}

.gov-add-list {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 4px 0 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10);
    z-index: 50;
}
.gov-add-list li { margin: 0; }
.gov-add-item {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
.gov-add-item:hover {
    background: rgba(15, 23, 42, 0.05);
    text-decoration: none;
}

/* v1 (inline-CSS Fase 3): flyttet fra inline <style> i requirement_detail.html */
.fitar-dim {
    flex: 1; min-width: 100px; max-width: 140px;
    padding: 12px 8px; border-radius: 8px; text-align: center;
    border: 1px solid #e5e7eb;
}
.fitar-dim-label { font-size: 22px; font-weight: 800; line-height: 1; }
.fitar-dim-status { font-size: 11px; margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.fitar-dim--covered { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.fitar-dim--gap { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.fitar-dim--na { background: #fafafa; color: #94a3b8; }

/* v1 (inline-CSS Fase 2): klasser fra tenant/modals/asset_detail.html (modal-fragment, global CSS) */
.ad-fw-normal { font-weight: 400; }
.ad-txt       { color: var(--text); }
.ad-subline   { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }
.ad-fieldset  { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 12px; }
.ad-legend    { font-size: 12px; color: var(--muted); padding: 0 6px; }
.ad-assess-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.ad-bt        { border-top: 1px solid var(--line); }
.ad-minw-0    { min-width: 0; }
.ad-link-info { color: var(--info); font-weight: 600; text-decoration: none; }
.ad-note-11   { font-size: 11px; margin-top: 2px; }
.ad-pill      { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
.ad-pill--req        { background: var(--danger-bg); color: var(--danger-dark); }
.ad-pill--ok         { background: var(--success-bg); color: var(--success-dark); }
.ad-pill--incomplete { background: #e2e8f0; color: #475569; }
.ad-flabel    { font-size: 12px; margin-bottom: 4px; }
.ad-input-disabled { background: #f1f5f9; color: var(--muted); }
.ad-control   { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font: inherit; }
.ad-pa-box    { margin-bottom: 12px; padding: 10px 12px; background: var(--bg-subtle); border: 1px solid var(--line); border-radius: 10px; }
.ad-check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.ad-checkbox  { width: 16px !important; height: 16px; padding: 0 !important; margin: 0 !important; border-radius: 3px !important; flex-shrink: 0; cursor: pointer; }
.ad-pa-note   { font-size: 11px; margin-top: 6px; padding-left: 24px; }
.ad-rc-note   { font-size: 11px; margin-bottom: 8px; }
.ad-grid-2-6  { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ad-sec-box   { margin: 12px 0 8px; padding: 10px 12px; background: var(--bg-subtle); border-radius: 8px; }
.ad-sec-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ad-opt-row   { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.ad-opt-label { font-size: 14px; color: var(--text); }

/* #676: nestet to-niveau relations-accordion + foldet trussel/sårbarhed-visning (alt foldet ind). */
.ad-rel, .ad-reveal { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; }
.ad-rel > summary, .ad-reveal > summary {
  list-style: none; cursor: pointer; padding: 10px 12px; font-size: 13px; color: var(--text);
  display: flex; align-items: center; gap: 8px; user-select: none; }
.ad-rel > summary { font-weight: 700; background: var(--bg-subtle); border-radius: 10px 10px 0 0; }
.ad-reveal > summary { font-weight: 600; }
.ad-rel:not([open]) > summary { border-radius: 10px; }
.ad-rel > summary::-webkit-details-marker, .ad-reveal > summary::-webkit-details-marker { display: none; }
.ad-rel > summary::before, .ad-reveal > summary::before {
  content: "▸"; color: var(--muted); font-size: 11px; transition: transform .12s; }
.ad-rel[open] > summary::before, .ad-reveal[open] > summary::before { transform: rotate(90deg); }
.ad-rel-sel { font-weight: 600; font-size: 11px; color: var(--muted); }
.ad-rel-body { padding: 4px 12px 10px; }
.ad-rel-hint { font-size: 11px; margin: 4px 0 6px; }
.ad-rel-grp { border-top: 1px solid var(--line); }
.ad-rel-grp > summary {
  list-style: none; cursor: pointer; padding: 6px 0; font-size: 13px; font-weight: 600;
  color: var(--text); display: flex; align-items: center; gap: 6px; user-select: none; }
.ad-rel-grp > summary::-webkit-details-marker { display: none; }
.ad-rel-grp > summary::before { content: "+"; color: var(--muted); font-weight: 700; width: 12px; text-align: center; }
.ad-rel-grp[open] > summary::before { content: "\2212"; }
.ad-rel-grp > .ad-opt-row { padding-left: 18px; }
.ad-reveal-body { padding: 4px 12px 10px; }

/* #677: Risikovurdering — per-aktiv sandsynlighedsvurdering. */
.ra-h2 { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.ra-create { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ra-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ra-select { min-width: 240px; }
.ra-freq { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ra-table { width: 100%; }
.ra-help-sum { cursor: pointer; font-weight: 600; font-size: 13px; list-style: none; }
.ra-help-sum::-webkit-details-marker { display: none; }
.ra-help-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.ra-help-h { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.ra-help-list { margin: 0; padding-left: 18px; font-size: 13px; }
.ra-help-list li { margin: 2px 0; }
.ra-threat { margin-bottom: 12px; }
.ra-threat-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ra-q { margin: 4px 0 10px; }
.ra-dim { display: grid; grid-template-columns: 210px 190px 1fr; gap: 10px; align-items: center; padding: 4px 0; }
.ra-dim-label { font-size: 13px; color: var(--text); }
.ra-actions { margin-top: 14px; }
@media (max-width: 680px) {
  .ra-help-body { grid-template-columns: 1fr; }
  .ra-dim { grid-template-columns: 1fr; gap: 4px; }
}
/* K10 #683: Risikovurdering composite-orkestrering. */
.ro-create { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.ro-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ro-dims { display: flex; flex-wrap: wrap; gap: 12px; }
.ro-list { list-style: none; padding: 0; margin: 0; }
.ro-list li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.ad-upgrade-box   { margin: 12px 0; padding: 14px 16px; background: #fef9c3; border: 1px solid #ca8a04; border-radius: 10px; }
.ad-upgrade-title { font-size: 13px; font-weight: 700; color: #854d0e; margin-bottom: 6px; }
.ad-upgrade-text  { font-size: 12px; color: #78350f; line-height: 1.5; }

/* v1 (inline-CSS Fase 3): flyttet fra inline <style> i matrix_v2.html */
.matrix-table { width:100%; border-collapse:collapse; font-size:12px; }
.matrix-table th, .matrix-table td {
    border:1px solid var(--line); padding:6px 8px; text-align:left;
}
.matrix-table thead th {
    background: var(--bg-subtle); font-weight:600; vertical-align:bottom;
    position:sticky; top:0; z-index:1;
}
.matrix-table th.col-aktivtype { writing-mode: vertical-rl; transform: rotate(180deg); white-space:nowrap; min-width:30px; }
.matrix-table td.cell { text-align:center; min-width:30px; }
.matrix-cell-green  { background: var(--success-bg); color: var(--success-dark); }
.matrix-cell-yellow { background: var(--warning-bg); color: var(--warning-dark); }
.matrix-cell-red    { background: var(--danger-bg); color: var(--danger-dark); }
.matrix-cell-grey   { background: var(--line-solid); color: var(--muted); }
.matrix-req-code { font-family: ui-monospace, monospace; font-size:11px; color: var(--muted); }

/* #613: MFA-nudge-banner (diskret, ikke-blokerende) */
.mfa-nudge {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fffbeb; border: 1px solid #fcd34d; color: #92400e;
  border-radius: 8px; padding: 8px 14px; margin-bottom: 14px; font-size: 13px;
}
.mfa-nudge__cta {
  margin-left: auto; background: #2563eb; color: #fff; text-decoration: none;
  padding: 4px 12px; border-radius: 6px; font-weight: 600; white-space: nowrap;
}
.mfa-nudge__x {
  border: none; background: none; cursor: pointer; color: #92400e;
  font-size: 18px; line-height: 1; padding: 0 2px;
}

/* ============================================================
   #680: statiske inline-styles → klasser (kode-hygiejne).
   Dynamiske runtime-styles ({{ }}) bevares som dokumenteret undtagelse.
   ============================================================ */
/* score-modaler (hover + valgt-tilstand; afløser onmouseover/onmouseout). */
.score-hover-row:hover { background: var(--bg-muted, #f1f5f9); }
.score-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
  margin-bottom: 2px; border-radius: 6px; cursor: pointer; font-size: 12px;
  border: 1px solid transparent; }
.score-row.is-selected { background: var(--bg-muted, var(--line-solid));
  border-color: var(--border, #e2e8f0); }

/* delte utilities (inline-forms + data-tabeller). */
.u-inline-form { display: inline; margin: 0; }
.u-card-flush  { padding: 0; overflow: hidden; }
.u-data-table  { width: 100%; border-collapse: collapse; font-size: 13px; }
.u-data-table th, .u-data-table td { padding: 8px 12px; }
.u-data-table thead tr { text-align: left; color: var(--muted); background: var(--bg-subtle); }
.u-data-table tbody tr { border-top: 1px solid var(--line); }
.u-status-ok { color: var(--ok, green); }
.u-status-inherited { color: var(--accent, #0a7); }
.u-tag { display: inline-block; border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 6px; margin: 1px 4px 1px 0; }

/* svar-bibliotek (answers/list). */
.ans-head { margin-bottom: 4px; }
.ans-head-actions { display: flex; gap: 8px; }
.ans-lede { margin-bottom: 16px; }
.ans-filter { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ans-search { max-width: 280px; }
.ans-tag-input { max-width: 160px; }
.ans-tag { border: 1px solid var(--line); border-radius: 10px; padding: 1px 7px; margin-right: 3px; }
.ans-actions { text-align: right; white-space: nowrap; }
.ans-empty { padding: 16px; }

/* attest-kvittering (attest/done). */
.attest-done { max-width: 620px; margin: 0 auto; padding: 48px 20px; text-align: center; }
.attest-check { font-size: 40px; }
.attest-h1 { margin: 8px 0; }

/* comply-once overlays (overlays_index / overlays_detail). */
.ov-sub { margin-bottom: 4px; }
.ov-lede { margin-bottom: 16px; }
.ov-card-pad { padding: 16px; }
.ov-cards { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.ov-stat-card { padding: 14px 18px; }
.ov-stat { font-size: 22px; font-weight: 700; }
