/* ===================== Level 76 — Third parties (vendor management) — all themes, via theme variables ===================== */
.tprm-intro { font-size: 13.5px; color: var(--dim); margin: 0 0 14px; max-width: 860px; }
.tprm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tprm-kpis .ropa-kpi { padding: 14px 16px; }
.tprm-kpis .n { font-size: 24px; font-weight: 700; }
.tprm-kpis .l { color: var(--dim); font-size: 12.5px; }
.tprm-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: start; }
.tprm-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.tprm-row:first-of-type { border-top: 0; }
.tprm-sub { font-weight: 400; color: var(--dim); font-size: 12.5px; margin-left: 6px; }
.tprm-dim { color: var(--dim); font-size: 13px; }
.tprm-small { color: var(--dim); font-size: 12px; margin-top: 2px; }
.tprm-amber { color: var(--amber-ink, var(--amber)); }
.tprm-warn { background: var(--amber-soft); color: var(--amber-ink, var(--ink)); border: 1px solid var(--amber-soft-line, var(--line)); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }
.tprm-warn ul { margin: 6px 0 0 18px; padding: 0; }
.tprm-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 14px; }
.tprm-list { list-style: none; margin: 6px 0 0; padding: 0; }
.tprm-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.tprm-list li:first-child { border-top: 0; }
.tprm-list li > span { display: flex; flex-direction: column; min-width: 0; }
.tprm-list small { color: var(--dim); font-size: 12px; }
.tprm-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.tprm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.tprm-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-size: 13.5px; }
.tprm-checks label { display: flex; gap: 8px; align-items: flex-start; }
.tprm-form section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.tprm-form section:first-of-type { border-top: 0; margin-top: 4px; padding-top: 0; }
.tprm-form h4 { margin: 0 0 10px; font-size: 14.5px; }
.tprm-form .field { display: block; margin-bottom: 10px; }
.tprm-form .field input, .tprm-form .field select, .tprm-form .field textarea { width: 100%; box-sizing: border-box; }
.tprm-head { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tprm-linkadd { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.tprm-dim-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.tprm-dim-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.tprm-dim-i { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; }
.tprm-dim-i textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.tprm-riskout { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, transparent); }
.tprm-dup { background: var(--info-soft, var(--surface-2)); border: 1px solid var(--info-soft-line, var(--line)); border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.tprm-dup ul { margin: 6px 0 8px 18px; padding: 0; }
.link-btn.tprm-open { background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.link-btn.tprm-open:hover strong { text-decoration: underline; }
.danger-text { color: var(--red) !important; }
@media (max-width: 1100px) { .tprm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tprm-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .tprm-kpis, .tprm-grid, .tprm-checks { grid-template-columns: minmax(0, 1fr); } .tprm-dim-i, .tprm-linkadd { grid-template-columns: minmax(0, 1fr); } }

/* ---- Level 77 — vendor portal (public page) and the reviewer workspace ---- */
.vp-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; }
.vp-top .brand { display: flex; gap: 10px; align-items: center; }
.vp-main { max-width: 920px; margin: 18px auto 60px; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.vp-intro { padding: 20px 22px; } .vp-intro h1 { font-size: 22px; margin: 0 0 6px; }
.vp-group { padding: 18px 22px; } .vp-group h2 { font-size: 16px; margin: 0 0 8px; }
.vp-q { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.vp-q:first-of-type { border-top: 0; }
.vp-qh { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.vp-id { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.vp-choices { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.vp-q textarea, .vp-q select { width: 100%; box-sizing: border-box; }
.vp-ev { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.vp-file { background: var(--surface-3, var(--grey-soft)); border-radius: 6px; padding: 2px 8px; }
.vp-up { cursor: pointer; padding: 4px 10px; }
.vp-clar { border-left: 3px solid var(--accent-soft-line, var(--line)); padding-left: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.vp-clar .reviewer span { font-weight: 600; color: var(--accent-dark, var(--ink)); } .vp-clar .vendor span { font-weight: 600; }
.vp-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.vp-saved { font-size: 12px; color: var(--dim); min-height: 14px; }
.vp-submit { padding: 18px 22px; }
.tprm-q { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.tprm-q-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.tprm-ans { margin: 6px 0; padding: 8px 10px; background: var(--surface-2, var(--grey-soft)); border-radius: 6px; font-size: 13.5px; white-space: pre-wrap; }
.tprm-verdicts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tprm-verdicts button.on { outline: 2px solid var(--accent); }
.tprm-linkbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.tprm-linkbox input { font-family: var(--mono, monospace); font-size: 12px; }

/* ---- Level 78 — decision, gate and contracts ---- */
.tprm-gate { list-style: none; margin: 6px 0; padding: 0; font-size: 13.5px; }
.tprm-gate li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tprm-gate li:first-child { border-top: 0; }
.tprm-gx { color: var(--red); font-weight: 700; } .tprm-gw { color: var(--amber-ink, var(--amber)); font-weight: 700; }
.tprm-ok { color: var(--green); font-weight: 600; }

/* ---- Level 79 — rule packs and traceability ---- */
.tprm-packs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tprm-packs th { text-align: left; font-size: 12px; color: var(--dim); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tprm-packs td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.tprm-packs tr.off td { opacity: 0.72; }
.tprm-matrix-wrap { overflow-x: auto; padding: 4px 0; }
.tprm-matrix th { white-space: nowrap; font-size: 11px; }
.tprm-trace { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.tprm-trace summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tprm-ti { display: inline-flex; width: 20px; justify-content: center; font-weight: 700; }
.tprm-ti.tone-green { color: var(--green); } .tprm-ti.tone-red { color: var(--red); } .tprm-ti.tone-amber { color: var(--amber-ink, var(--amber)); } .tprm-ti.tone-grey { color: var(--dim); }

/* ---- Levels 80–82 — dependency map, monitoring, exit ---- */
.tprm-deps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tprm-dep { padding: 12px 14px; font-size: 13.5px; }
.tprm-dep ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

/* ---- Levels 83–84 — reports and AI suggestions ---- */
.primary-link { display: inline-block; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--accent-ink, #fff) !important; text-decoration: none; font-weight: 600; white-space: nowrap; }
.tprm-ai { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2, transparent); border-radius: 0 6px 6px 0; font-size: 13px; }

/* ---- fix round 1: saved view (CR04), collapsed sidebar expand button (D03) ---- */
.tprm-saved { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, transparent); }
.tprm-form input:disabled, .tprm-form select:disabled, .tprm-form textarea:disabled, .card input:disabled, .card select:disabled, .card textarea:disabled { opacity: 1; color: var(--ink); background: var(--surface-2, transparent); cursor: default; }
@media (min-width: 901px) {
  .shell.collapsed .side-collapse { position: static !important; display: inline-flex !important; margin: 6px auto 0; width: 32px; height: 28px; align-items: center; justify-content: center; border: 1px solid var(--line, rgba(255,255,255,.25)); border-radius: 8px; opacity: 1; z-index: 2; }
  .shell.collapsed .side-brand { flex-direction: column; align-items: center; gap: 4px; height: auto; }
}
.vp-needs { padding: 14px 20px; border-left: 4px solid var(--accent); }
.vp-needs p { margin: 6px 0 0; font-size: 13.5px; }
.vp-needs a { font-weight: 600; }
