/* === Unknown Data — Global theme === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root{
  --ud-primary: #2D5A3D;       /* Dark Forest Green */
  --ud-interactive: #4A7C59;   /* Medium Forest Green */
  --ud-accent: #1B365D;        /* Deep Navy */
  --ud-text: #1A202C;          /* Charcoal Blue */
  --ud-bg: #FFFFFF;            /* Pure White */

  --ud-border: #E6EAF0;
  --ud-muted: #6B7280;
  --ud-hover-bg: #F5F8FB;      /* subtle hover background */

  /* stronger nav vs. softer content shadows */
  --ud-shadow-strong: 0 4px 10px rgba(0,0,0,0.08);
  --ud-shadow-soft: 0 2px 6px rgba(27,54,93,0.05);

  /* backward compat */
  --ud-shadow: var(--ud-shadow-soft);

  --ud-radius: 12px;
}

/* ------- Base ------- */
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  padding-bottom: 60px;
  background: var(--ud-bg);
  color: var(--ud-text);
}

/* Headings */
h1, h2, h3 {
  color: var(--ud-accent);
  font-weight: 700;
  margin: 0 0 1rem;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

/* ------- Navbar ------- */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--ud-primary);
  padding: 1.2rem 2rem;                   /* balanced horizontal padding */
  color: #fff;
  box-shadow: var(--ud-shadow-strong);
}

/* Use gap for symmetric spacing between items */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 25px;                               /* symmetric spacing; no per-item margins */
}

.nav-container .brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .3px;
}

/* Nav links and dropdown titles */
.nav-left a,
.nav-right a,
.nav-right button,
.dropdown-title {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .2px;
  line-height: 1;                           /* normalize baseline */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;                   /* balanced hover hit area */
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover states: background highlight */
.nav-left a:hover,
.nav-right a:hover,
.nav-right button:hover,
.dropdown-title:hover {
  background-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
  color: #fff;
}

/* Active state: underline bar */
.nav-left .active,
.nav-right .active {
  position: relative;
  font-weight: 700;
}
.nav-left .active::after,
.nav-right .active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
}

/* Welcome text aligned with links */
.nav-right .welcome {
  line-height: 1;
  margin: 0;                                /* gap handles spacing */
}

/* ------- Logout inline form ------- */
.logout-form {
  all: unset;
  display: inline-flex;                      /* behave like a nav item */
  align-items: center;
  margin: 0;
  padding: 0;
}

form.logout-form .logout-btn {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .2px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.6rem;                    /* same as nav links */
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin-top: 0 !important;                  /* ignore global submit margin */
}

form.logout-form .logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}

/* ------- Dropdown ------- */
.dropdown { position: relative; display: inline-block; } /* nav uses gap */
.dropdown-title { position: relative; }

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--ud-accent);
  min-width: 180px;
  z-index: 1;
  padding: 0.5rem;
  border-radius: 10px;
  box-shadow: var(--ud-shadow);
}
.dropdown-content a {
  display: block;
  color: #fff;
  padding: 0.4rem 0.75rem;
  transition: background-color 0.2s;
  border-radius: 8px;
}
.dropdown-content a:hover { background-color: rgba(255,255,255,0.08); }
.dropdown:hover .dropdown-content { display: block; }

/* ------- Footer ------- */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  text-align: center;
  background-color: #FAFBFC;
  font-size: 0.9em;
  border-top: 1px solid var(--ud-border);
  color: var(--ud-muted);
}

/* ------- Layout ------- */
/* Center the content and keep symmetric side paddings */
.container {
  max-width: 1200px;            /* adjust as needed */
  margin: 0 auto;               /* centers container */
  padding: 1.5rem;              /* equal all around for symmetry */
}

/* ------- AI list / cards ------- */
.ai-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

/* Columns */
.ai-col { padding: 0 0; }
.ai-col--title { align-self: start; }
.ai-col--meta { align-self: start; }
.ai-col--compliance { min-width: 220px; }

/* Actions arranged vertically for clarity (wrap on small screens) */
.ai-action--primary .btn,
.ai-action--secondary .btn { min-width: 220px; }

/* Responsive: stack on narrow screens */
@media (max-width: 980px){
  .ai-row { grid-template-columns: 1fr; }
  .ai-action { flex-direction: row; flex-wrap: wrap; }
}

/* Title + badges */
.ai-title{ margin: 0 0 8px 0; font-size: 1.2rem; color: var(--ud-accent); line-height: 1.1; }
.ai-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;      /* avoids awkward vertical centering with different heights */
}

/* Let each badge wrap and shrink properly inside the flex row */
.ai-badges > .badge {
  min-width: 0;                 /* allow shrinking inside flex container */
}

/* Base badge: multiline pill */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .45rem .75rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal !important;      /* override any earlier nowrap */
  word-break: break-word;
  overflow-wrap: anywhere;             /* break long tokens/URLs/etc. */
  max-width: 100%;
}

/* Explicitly ensure use-case badge follows the same wrap behavior */
.badge--usecase {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}


.badge--risk{
  background: color-mix(in srgb, var(--risk-accent) 25%, #fff);
  color: var(--ud-text);
  border: 1px solid var(--risk-accent);
}
/* Meta key/value list */
.meta-kv{
  margin: 0;
  padding-left: 0;             /* remove default UL indent */
  list-style: none;
  display: grid;
  gap: 6px;
}
.meta-kv li strong{ color: var(--ud-text); font-weight: 700; }

/* Compliance block + pill progress */
.comp-label{ font-size:.9rem; color: var(--ud-muted); }
.comp-value{ font-size:.95rem; margin: 2px 0 8px; color: var(--ud-text); width: 100%;}

/* Compact buttons inside AI rows */
.ai-row .btn { border-radius: 12px; box-shadow: 0 6px 12px rgba(45,90,61,.14); }
.ai-row .btn.secondary { box-shadow: none; }

/* ------- Buttons ------- */
.btn {
  background-color: var(--ud-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid var(--ud-primary);
  font-weight: 600;
  box-shadow: 0 6px 12px rgba(45,90,61,.18);
  transition: background-color .2s, color .2s, border-color .2s, transform .04s;
}
.btn:hover { background-color: #264E35; border-color: #264E35; }

.btn.small {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 8px;
  display: inline-block;
  text-align: center;
}
.btn.small.disabled {
  background-color: #D6DDE4;
  color: #6B7280;
  cursor: not-allowed;
  border-color: #D6DDE4;
}

/* Secondary (outlined) */
.btn.secondary {
  background-color: #fff;
  color: var(--ud-accent);
  border-color: var(--ud-accent);
  box-shadow: none;
}
.btn.secondary:hover { background-color: var(--ud-hover-bg); }

/* Danger button */
.btn.danger {
  background-color: #E74C3C;
  color: #fff;
  padding: 0.3rem 0.6rem;
  margin-left: 10px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid #E74C3C;
}
.btn.danger:hover { background-color: #C0392B; }

/* ------- Forms ------- */
form {
  background-color: #fff;
  padding: 2rem;
  border-radius: var(--ud-radius);
  box-shadow: var(--ud-shadow);
  max-width: 600px;
  margin: 2rem auto;
}
form h2 {
  margin-bottom: 1.5rem;
  color: var(--ud-accent);
  text-align: center;
  letter-spacing: -0.01em;
  font-weight: 700;
}
form p { margin-bottom: 1.2rem; }

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ud-text);
}

form input[type="text"],
form textarea,
form select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--ud-border);
  border-radius: 10px;
  font-size: 1rem;
  background-color: #FDFDFD;
  transition: border-color 0.2s, box-shadow 0.2s;
}
form input[type="text"]:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--ud-interactive);
  box-shadow: 0 0 0 3px rgba(74,124,89,0.18);
}

form button[type="submit"] {
  background-color: var(--ud-primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--ud-primary);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1rem;
  font-weight: 600;
  box-shadow: 0 6px 12px rgba(45,90,61,.18);
}
form button[type="submit"]:hover { background-color: #264E35; border-color: #264E35; }

/* ------- Role summary / history ------- */
.role-summary {
  padding: 1.5rem;
  border-radius: var(--ud-radius);
  margin-top: 2rem;
  background: #fff;
  border: 1px solid var(--ud-border);
  box-shadow: var(--ud-shadow);
}
.role-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.role-left { display: flex; flex-direction: column; align-items: flex-start; }

.role-meta {
  font-size: 0.9rem;
  color: var(--ud-muted);
  margin: 0 0 0.5rem 0;
  font-weight: normal;
}
.role-meta strong { color: var(--ud-text); font-weight: 600; }

.role-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ud-accent);
  font-weight: 700;
}

.history-link {
  font-size: 0.9rem;
  color: var(--ud-accent);
  text-decoration: none;
  border: 1px solid var(--ud-accent);
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  transition: background-color 0.2s, color 0.2s;
  font-weight: 600;
}
.history-link:hover { background-color: var(--ud-hover-bg); color: var(--ud-accent); }

.role-list { list-style-type: disc; padding-left: 1.2rem; margin: 0; }
.no-roles { color: var(--ud-muted); font-style: italic; }

.assessment-history { list-style: none; padding-left: 0; margin-top: 2rem; }
.history-entry {
  border-radius: 10px;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--ud-border);
}

/* Toggle details */
.toggle-details {
  background-color: var(--ud-primary);
  color: #fff;
  border: 1px solid var(--ud-primary);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-weight: 600;
  box-shadow: 0 6px 12px rgba(45,90,61,.12);
}
.toggle-details:hover { background-color: #264E35; border-color: #264E35; }
.toggle-icon { font-size: 1rem; margin-left: auto; }

.log-details { margin-top: 1rem; padding-left: 0.5rem; }
.hidden { display: none; }

/* Form wrapper */
.form-wrapper {
  background-color: #fff;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 700px;
  border-radius: var(--ud-radius);
  box-shadow: var(--ud-shadow);
}

/* New assessment CTA */
.new-assessment-action { text-align: center; margin-top: 2rem; }
.new-assessment-action .btn {
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  border-radius: 10px;
  background-color: #2D5A3D;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.new-assessment-action .btn:hover { background-color: #264E35; }

/* ------- Tables (Compliance actions) ------- */
table.compliance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  box-shadow: var(--ud-shadow);
  border-radius: var(--ud-radius);
  overflow: hidden;
}
.compliance-table th,
.compliance-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ud-border);
  text-align: left;
}
.compliance-table th {
  background-color: var(--ud-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.compliance-table tr:nth-child(even) { background-color: #FAFCFB; }
.compliance-table tr:hover { background-color: #F0F6F3; }

/* ------- Inputs (auth, etc.) ------- */
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--ud-border);
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 1rem;
  background: #FDFDFD;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--ud-interactive);
  box-shadow: 0 0 0 3px rgba(74,124,89,0.18);
}

/* === Login page overrides === */
body.login { background:#F7FAF9; }

body.login #container {
  min-width:320px;
  max-width:520px;
  margin:6vh auto;
  padding:0;
  background:transparent;
  box-shadow:none;
  border:0;
}
body.login #content {
  background:#fff;
  border:1px solid var(--ud-border);
  border-radius:var(--ud-radius);
  box-shadow:var(--ud-shadow);
  padding:28px;
}
body.login .login-logo { text-align: center; margin-bottom: 1.2rem; }
body.login .login-logo img { max-width: 160px; height: auto; }

body.login h1 {
  color:var(--ud-accent);
  font-weight:700;
  font-size:1.4rem;
  letter-spacing:-.01em;
  margin:0 0 1rem 0;
  text-align:center;
}
body.login h1::after {
  content:"";
  display:block;
  width:56px;
  height:3px;
  background:var(--ud-primary);
  border-radius:999px;
  margin:10px auto 0;
  opacity:.9;
}
body.login .errornote {
  background:#FEF2F2;
  color:#7F1D1D;
  border:1px solid #FECACA;
  border-left:6px solid #EF4444;
  border-radius:10px;
  padding:.75rem 1rem;
  margin:0 0 1rem 0;
  box-shadow:0 2px 6px rgba(0,0,0,.03);
}
#login-form { margin-top:10px; }
#login-form .form-row { margin:0 0 14px 0; }
#login-form label {
  display:block;
  font-weight:600;
  color:var(--ud-text);
  margin:0 0 6px 0;
}
#login-form input[type="text"],
#login-form input[type="password"] {
  width:100%;
  box-sizing:border-box;
  border:1px solid var(--ud-border);
  border-radius:10px;
  padding:.6rem .7rem;
  font-size:1rem;
  background:#FDFDFD;
  color:var(--ud-text);
  outline:none;
  transition:border-color .2s, box-shadow .2s;
}
#login-form input[type="text"]:focus,
#login-form input[type="password"]:focus {
  border-color:var(--ud-interactive);
  box-shadow:0 0 0 3px rgba(74,124,89,.18);
}
#login-form .submit-row { margin-top:16px; text-align:center; }
#login-form .submit-row input[type="submit"] {
  appearance:none;
  -webkit-appearance:none;
  background: var(--ud-primary);
  color:#fff;
  border:1px solid var(--ud-primary);
  border-radius:10px;
  padding:.6rem 1.2rem;
  font-weight:600;
  font-size:1rem;
  cursor:pointer;
  box-shadow:0 6px 12px rgba(45,90,61,.18);
  transition:background-color .2s, border-color .2s, transform .04s;
}
#login-form .submit-row input[type="submit"]:hover { background:#264E35; border-color:#264E35; }
body.login .password-reset-link,
body.login .help-links a { color: var(--ud-interactive); text-decoration:none; font-weight:600; }
body.login .password-reset-link:hover,
body.login .help-links a:hover { text-decoration:underline; }

/* =========================
   AI Systems — scoped layout
   (safe: no global overrides)
   ========================= */

/* Page list spacing */
.ai-list{
  display:flex;
  flex-direction:column;
  gap:22px;                 /* space between rows */
  margin-top:12px;
}

/* Row card */
.ai-row {
  position: relative;
  display: grid;
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 gelijke kolommen */
  align-items: flex-start; /* iets luchtiger dan center met meer content */
  gap: 18px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(27,54,93,.06);
  border-bottom: 1px solid var(--ud-border);
  border-top: 1px solid var(--ud-border);
  border-left: 6px solid var(--risk-accent, rgba(27,54,93,.10));
  border-right: 6px solid var(--risk-accent, rgba(27,54,93,.10));
  isolation: isolate;
  margin: 22px;
}

.ai-row > *{ position:relative; z-index:1; }

/* Risk color mapping based on data attribute */
.ai-row[data-risk="unacceptable"]{ --risk-accent: rgba(231,76,60,.28); }
.ai-row[data-risk="high"]        { --risk-accent: rgba(230,126,34,.26); }
.ai-row[data-risk="limited"]     { --risk-accent: rgba(241,196,15,.24); }
.ai-row[data-risk="minimal"]     { --risk-accent: rgba(46,204,113,.24); }
.ai-row[data-risk="none"],
.ai-row[data-risk=""]            { --risk-accent: rgba(27,54,93,.10); }

/* Left column: title + chips + roles (chips), tighten vertical whitespace */
.ai-col--left .ai-title{
  margin:0 0 .35rem;
  line-height:1.15;
}

/* Risk / Use-case chips (the “bubbles”) */
.ai-badges{
  display:flex; flex-wrap:wrap; gap:8px;
  margin:4px 0 8px;         /* smaller gap to kill the big white space */
}
.badge{
  display:inline-flex; align-items:center;
  padding:.28rem .6rem;
  font-weight:800; font-size:.82rem; line-height:1;
  border-radius:999px; border:1px solid transparent; white-space:nowrap;
}
.badge--risk{ background:#EAF3EE; color:var(--ud-primary); border-color:#DDE7E1; }
.badge--usecase{ background:#F1F5FA; color:var(--ud-accent); border-color:#E4ECF6; }

/* Actor Roles as chips (cleaner than bullets) */
.ai-roles{ margin-top:6px; }
.ai-roles__title{ margin:0 0 6px; font-weight:800; color:var(--ud-text); }
.ai-roles__list{
  display:flex; flex-wrap:wrap; gap:8px 10px;
  margin:0; padding:0; list-style:none;
}
.ai-roles__list li{
  display:inline-flex; align-items:center;
  padding:.26rem .6rem;
  border-radius:999px;
  background:#F8FAFD; border:1px solid #E6EDF7;
  color:#1E2A3B; font-size:.82rem; font-weight:700;
}

/* Middle column — compliance (keep compact) */
.ai-col--compliance{ min-width:240px; height: 100%; position: relative;}
.comp-label{ font-size:.92rem; color:var(--ud-muted); margin-bottom:2px; }
.comp-value{ font-size:.95rem; margin-bottom:8px; }

/* Progress pill (uses your existing ud-progress markup if present) */
.ud-progress{
  width:100%; height:25px; border-radius:999px;
  background:#EAF3EE; border:2px solid #DDE7E1; position:relative; overflow:hidden;
}
.ud-progress__bar{
  height:100%; width:var(--value, 0%);
  background: #18a957;
  transition:width .35s ease;
}
.ud-progress__label{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:.8rem; font-weight:800;
}

.progress-bar-wrapper{ margin-top: 25px; }

/* Right column — stacked buttons aligned neatly */
.ai-action.ai-action--stack{
  display:flex; flex-direction:column; align-items:stretch; gap:10px; height:100%;
}
.ai-row .btn{ border-radius:12px; }   /* only inside rows */

/* Hover elevation (subtle) */
.ai-row:hover{ box-shadow: 0 6px 22px rgba(27,54,93,.12); }

/* Responsive */
@media (max-width: 980px){
  .ai-row{ grid-template-columns: 1fr; }
  .ai-col--compliance{ min-width:unset; }
  .ai-action.ai-action--stack{ flex-direction:row; flex-wrap:wrap; gap:8px; }
}

/* === AI row balance fix === */

/* 0) Neutralize any ad-hoc margins on columns inside the AI row */
.ai-row .ai-col {
  margin: 0 !important;     /* use grid gap + internal padding instead */
}

/* 2) Left column: prevent over-expansion */
.ai-col--left {
  max-width: 620px;         /* keeps long titles/role chips from pushing layout */
  padding-right: 8px;       /* tiny breathing room before the compliance col */
}

.comp-label,
.comp-value { text-align: left; }

/* 4) Actions column: consistent look */
.ai-action.ai-action--stack {
  justify-self: right;      /* align to the left edge of its grid cell */
  min-width: 260px;        /* prevent over-expansion on wide screens */
}

/* 5) Make sure spacing between cards feels right */
.ai-list {
  gap: 28px;                /* pleasant vertical rhythm between cards */
}

/* 6) Responsive: stack cleanly on small screens */
@media (max-width: 980px) {
  .ai-row {
    grid-template-columns: 1fr;  /* full-width stack */
  }
  .ai-col--left,
  .ai-col--compliance,
  .ai-action.ai-action--stack {
    max-width: none;
    width: 100%;
  }
  .ai-action.ai-action--stack {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}


/* === Risk badge color sync with card accent === */
.ai-row[data-risk] .badge--risk {
  background: var(--risk-accent);
  color: #000;                /* make text readable on colored background */
  border: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 0.75rem;
}

/* ===== Risk Assessment Summary — scoped styles ===== */

/* Header */
.ra-header{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:16px; margin:14px 0 18px;
}
.ra-header__left{ max-width: 880px; }
.ra-meta{
  font-size:.95rem; color:var(--ud-muted);
  margin-bottom:6px;
}
.ra-title{
  display:flex; align-items:center; gap:10px;
  margin: 2px 0 6px;
}
.ra-title__label{
  font-size:1.1rem; font-weight:800; color:var(--ud-accent);
}
.ra-title__badge{
  font-size:.85rem;
}

/* Reuse the risk accent colors on the badge */
.badge--risk[data-risk]{
  background: var(--risk-accent, rgba(27,54,93,.10));
  color:#fff;
  border:none;
  font-weight:800;
  letter-spacing:.3px;
  text-transform:uppercase;
  padding:.35rem .65rem;
}
/* Map codes -> accents (in case the page doesn’t inherit ai-row mapping) */
.badge--risk[data-risk="unacceptable"]{ --risk-accent: rgba(231,76,60,.85); }
.badge--risk[data-risk="high"]        { --risk-accent: rgba(230,126,34,.85); }
.badge--risk[data-risk="limited"]     { --risk-accent: rgba(241,196,15,.85); color:#1a1a1a; }
.badge--risk[data-risk="minimal"]     { --risk-accent: rgba(46,204,113,.90); }
.badge--risk[data-risk="none"]        { --risk-accent: rgba(27,54,93,.70); }

.ra-rationale{
  margin: 4px 0 0;
  font-style: italic;
  color: var(--ud-text);
  opacity: .9;
}

/* History button spacing */
.ra-history{ align-self:flex-start; }

/* Panel wrapper (uses your existing .panel tokens if present) */
.ra-summary.panel{
  border:1px solid var(--ud-border);
  border-radius: var(--ud-radius);
  background:#fff;
  box-shadow: var(--ud-shadow);
  padding: 16px 18px;
}

/* Q&A list as cards */
.qa-list{
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.qa-item{
  border:1px solid var(--ud-border);
  border-radius: 12px;
  padding: 12px 14px;
  background:#FAFCFB;
}
.qa-q{
  font-weight: 800;
  color: var(--ud-text);
  margin-bottom: 6px;
}
.qa-a{
  display: block;
  color: var(--ud-text);
}

/* Pill answers */
.qa-pills{
  display:flex; flex-wrap:wrap; gap:8px; margin: 4px 0 0; padding:0; list-style:none;
}
.qa-pill{
  display:inline-flex; align-items:center;
  padding:.28rem .6rem;
  border-radius:999px;
  background:#EEF2F7;
  border:1px solid #E1E8F0;
  color:#1E2A3B;
  font-weight:700; font-size:.82rem; line-height:1.2;
}

/* CTA area */
.ra-cta{
  display:flex; justify-content:center; margin: 18px 0 10vh;
}
.ra-cta .btn.primary{
  min-width: 320px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(45,90,61,.18);
}

/* Optional: tighten default ul bullets in content blocks */
.assessment-summary ul{ padding-left: 1.2rem; }

/* Ensure header and buttons don't clash with generic form/button styles */
.ra-header .btn,
.ra-summary .btn { margin: 0; }

/* ===== Role Assessment page (scoped) ===== */

.roleass-header{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:16px; margin:14px 0 18px;
}
.roleass-header__left{ max-width:900px; }
.roleass-meta{
  font-size:.95rem; color:var(--ud-muted);
  margin-bottom:6px;
}
.roleass-title{ display:flex; align-items:center; gap:10px; }
.roleass-title__label{
  font-size:1.15rem; font-weight:800; color:var(--ud-accent);
}

.roleass-history{ align-self:flex-start; }

/* Assigned roles panel */
.roleass-assigned{
  border:1px solid var(--ud-border);
  border-radius: var(--ud-radius);
  background:#fff;
  box-shadow: var(--ud-shadow);
  padding:16px 18px;
}
.roleass-chips{
  display:flex; flex-wrap:wrap; gap:10px; margin:0; padding:0; list-style:none;
}
.chip{
  display:inline-flex; align-items:center;
  padding:.32rem .7rem;
  border-radius:999px;
  background:#F8FAFD;
  border:1px solid #E6EDF7;
  color:#1E2A3B;
  font-size:.82rem; font-weight:700; line-height:1.2;
  white-space:normal; word-break:break-word; overflow-wrap:anywhere; max-width:100%;
}

/* Form card */
.roleass-form{
  border:1px solid var(--ud-border);
  border-radius: var(--ud-radius);
  background:#fff;
  box-shadow: var(--ud-shadow);
  padding:18px 20px;
  max-width:820px;            /* keeps readable line length */
}

/* Tighter question spacing for admin-generated p blocks */
.roleass-form p{
  margin: 0 0 14px 0;
}

/* Radios layout improvements without touching global form rules */
.roleass-form input[type="radio"]{
  transform: translateY(1px);
  margin-right: .4rem
}

/* Toast wrapper floats above content */
.message-wrapper{
  position: fixed;
  top: 76px;                /* just below the navbar */
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;     /* clicks pass through background */
}

/* Basis voor alle toasts (success + info) */
.message-wrapper .message-success,
.message-wrapper .message-info {
  position: relative;
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: #fff;
  color: var(--ud-text);
  border: 1px solid var(--ud-border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(27,54,93,.12);
  padding: 12px 40px 12px 14px;   /* reserve space for close button */
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease, box-shadow .2s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* In-animatie voor beide */
.message-wrapper .message-success.show,
.message-wrapper .message-info.show {
  opacity: 1;
  transform: translateY(0);
}

/* Hover-shadow voor beide */
.message-wrapper .message-success:hover,
.message-wrapper .message-info:hover {
  box-shadow: 0 12px 28px rgba(27,54,93,.16);
}

/* Iconen */
.message-wrapper .message-success::before,
.message-wrapper .message-info::before {
  font-weight: 800;
  display: inline-block;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Kleurspecifiek per type */
.message-wrapper .message-success {
  border-left: 6px solid var(--ud-interactive);
}
.message-wrapper .message-success::before {
  content: "✓";
  color: var(--ud-interactive);
}

.message-wrapper .message-info {
  border-left: 6px solid var(--ud-info, #3A7DCC);
}
.message-wrapper .message-info::before {
  content: "ℹ";
  color: var(--ud-info, #3A7DCC);
}

/* Absolute close button */
.message-wrapper .message-close{
  position: absolute;
  top: 8px;
  right: 10px;
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent; cursor: pointer;
  font-weight: 800; font-size: 1.1rem; line-height: 1;
  color: var(--ud-muted);
  padding: 2px 4px;
  border-radius: 6px;
}
.message-wrapper .message-close:hover{
  background: var(--ud-hover);
  color: var(--ud-accent);
}

/* ------ Error Message ------ */
.message-wrapper .message-error {
  position: relative;
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: #fff;
  color: var(--ud-text);
  border: 1px solid var(--ud-border);
  border-left: 6px solid var(--ud-danger, #C62828); /* fallback UD red */
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(27,54,93,.12);
  padding: 12px 40px 12px 14px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease, box-shadow .2s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* show animation */
.message-wrapper .message-error.show {
  opacity: 1;
  transform: translateY(0);
}

/* hover elevation */
.message-wrapper .message-error:hover {
  box-shadow: 0 12px 28px rgba(27,54,93,.16);
}

/* icon */
.message-wrapper .message-error::before {
  content: "❗";
  color: var(--ud-danger, #C62828);
  font-weight: 800;
  display: inline-block;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* ===== Risk Assessment flow (scoped) ===== */
.rs-wrap{ max-width: 820px; margin: 10px auto 7vh; }
.rs-head{ margin: 6px 2px 14px; }
.rs-title{
  margin: 0 0 6px;
  color: var(--ud-accent);
  font-weight: 800;
  letter-spacing: .1px;
}
.rs-step{ display:flex; align-items:baseline; gap:10px; margin-bottom:10px; }
.rs-step__label{ font-weight:800; color: var(--ud-text); }
.rs-step__count{
  background:#F1F5FA; color: var(--ud-accent); border:1px solid #E4ECF6;
  border-radius: 999px; padding:.18rem .55rem; font-weight:800; font-size:.82rem;
}

/* Thin progress */
.ud-progress.ud-progress--thin{
  height: 8px; border-radius: 999px;
  background:#EAF3EE; border:1px solid #DDE7E1; overflow:hidden;
}
.ud-progress.ud-progress--thin .ud-progress__bar{
  height:100%; width:var(--value, 0%); background: var(--ud-interactive);
  transition: width .3s ease;
}

/* Form card */
.rs-form{
  border:1px solid var(--ud-border);
  border-radius: 16px;
  background:#fff;
  box-shadow: var(--ud-shadow);
  padding: 18px 22px;
}

/* Headings inside generated form */
.rs-form h2, .rs-form h3, .rs-form h4 {
  margin: 0 0 8px; color: var(--ud-text); font-weight: 800;
}

/* Generated <p> blocks from Django forms */
.rs-form > p{
  margin: 0 0 10px;
}

/* Checkbox groups: Django typically renders as <ul><li><label><input> text… */
.rs-form ul{
  list-style:none; margin: 8px 0 0; padding: 0;
  display:flex; flex-direction:column; gap:8px;
}
.rs-form li{ margin: 0; }

/* Pretty checkbox “chips” */
.rs-form label{
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 12px;
  border:1px solid var(--ud-border);
  border-radius: 12px;
  background:#FAFCFB;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.rs-form label:hover{
  background:#F4F9F6; border-color:#D4E4DA;
}
.rs-form input[type="checkbox"]{
  flex: 0 0 auto;
  width: 18px; height: 18px; margin-top: 2px;
  appearance: none; -webkit-appearance: none;
  border: 2px solid #9BB6A5; border-radius: 4px; background:#fff;
  display:inline-grid; place-content:center;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.rs-form input[type="checkbox"]:focus{
  outline: none; box-shadow: 0 0 0 3px rgba(74,124,89,.22);
  border-color: var(--ud-interactive);
}
.rs-form input[type="checkbox"]::after{
  content: ""; width: 10px; height: 10px; transform: scale(0);
  transition: transform .12s ease-in-out;
  background: var(--ud-interactive); border-radius: 2px;
}
.rs-form input[type="checkbox"]:checked{
  border-color: var(--ud-interactive); background:#fff;
}
.rs-form input[type="checkbox"]:checked::after{ transform: scale(1); }

/* Keep long option text readable inside the chip */
.rs-form label > span, .rs-form label { word-break: break-word; }

/* Action row */
.rs-actions{ margin-top: 14px; display:flex; justify-content:flex-start; }
.rs-next{ min-width: 120px; border-radius: 12px; }

/* Make the “Finish/Next” button pop a bit more in this flow */
.rs-form .btn.primary{
  box-shadow: 0 8px 18px rgba(45,90,61,.16);
}
.rs-form .btn.primary:hover{
  box-shadow: 0 10px 22px rgba(45,90,61,.20);
}

/* Small screens */
@media (max-width: 560px){
  .rs-wrap{ margin-left: 0; margin-right: 0; padding: 0 10px; }
  .rs-form{ padding: 16px; border-radius: 14px; }
}

/* --- Fix: only option labels get the pill style --- */

/* Reset the QUESTION label (top-level label before the list) */
.rs-form > p > label {
  display: block;
  margin: 0 0 8px 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: default;
  font-weight: 800;
  color: var(--ud-text);
}

/* Apply pill style ONLY to option labels inside the list */
.rs-form ul > li > label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--ud-border);
  border-radius: 12px;
  background: #FAFCFB;
  font-weight: 700;
  line-height: 1.3;
  cursor: p
}

/* ===== Risk Assessment — unify sizes & keep everything inside form ===== */

/* Container + card */
.rs-wrap{ max-width: 900px; margin: 12px auto 7vh; }
.rs-form{
  border:1px solid var(--ud-border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--ud-shadow);
  padding:20px 22px 18px;
}

/* Header inside the form */
.rs-head.in-form{ margin: 0 0 14px; }
.rs-title{
  margin:0 0 6px;
  color:var(--ud-accent);
  font-weight:800;
  font-size:1.35rem;        /* Title ≈ Question size */
  letter-spacing:.1px;
}
.rs-stepline{
  display:flex; align-items:baseline; gap:10px;
  margin-bottom:10px;
}
.rs-step__label{ font-weight:800; color:var(--ud-text); font-size:1rem; }
.rs-step__count{
  background:#F1F5FA; color:var(--ud-accent); border:1px solid #E4ECF6;
  border-radius:999px; padding:.18rem .55rem; font-weight:800; font-size:.85rem;
}

/* Progress (thin) */
.ud-progress.ud-progress--thin{
  height:8px; border-radius:999px; overflow:hidden;
  background:#EAF3EE; border:1px solid #DDE7E1;
}
.ud-progress.ud-progress--thin .ud-progress__bar{
  height:100%; width:var(--value,0%); background:var(--ud-interactive);
  transition:width .3s ease;
}

/* QUESTION label: same optical size as section label */
.rs-form > p > label{
  display:block;
  margin:16px 2px 8px;
  padding:0; background:transparent; border:0; border-radius:0;
  cursor:default;
  font-weight:800;
  color:var(--ud-text);
  font-size:1rem;           /* ≈ rs-step__label */
  line-height:1.35;
}

/* OPTION labels: pills (unchanged behavior) */
.rs-form ul{ list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
.rs-form ul > li > label{
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 12px;
  border:1px solid var(--ud-border);
  border-radius:12px;
  background:#FAFCFB;
  font-weight:700;
  line-height:1.3;
  cursor:pointer;
  transition:border-color .2s, background-color .2s, box-shadow .2s;
}
.rs-form ul > li > label:hover{ background:#F4F9F6; border-color:#D4E4DA; }

/* Pretty checkbox */
.rs-form ul > li > label input[type="checkbox"]{
  flex:0 0 auto; width:18px; height:18px; margin-top:2px;
  appearance:none; -webkit-appearance:none;
  border:2px solid #9BB6A5; border-radius:4px; background:#fff;
  display:inline-grid; place-content:center;
  transition:border-color .2s, background-color .2s, box-shadow .2s;
}
.rs-form ul > li > label input[type="checkbox"]:focus{
  outline:none; box-shadow:0 0 0 3px rgba(74,124,89,.22);
  border-color:var(--ud-interactive);
}
.rs-form ul > li > label input[type="checkbox"]::after{
  content:""; width:10px; height:10px; transform:scale(0);
  transition:transform .12s ease-in-out;
  background:var(--ud-interactive); border-radius:2px;
}
.rs-form ul > li > label input[type="checkbox"]:checked{
  border-color:var(--ud-interactive); background:#fff;
}
.rs-form ul > li > label input[type="checkbox"]:checked::after{ transform:scale(1); }

/* Actions */
.rs-actions{ margin-top:16px; display:flex; justify-content:flex-start; }
.rs-next{ min-width:120px; border-radius:12px; box-shadow:0 8px 18px rgba(45,90,61,.16); }
.rs-next:hover{ box-shadow:0 10px 22px rgba(45,90,61,.20); }

/* Small screens */
@media (max-width: 560px){
  .rs-wrap{ padding:0 10px; }
  .rs-form{ padding:16px; border-radius:14px; }
}


/* ====== DASHBOARD ====== */
/* === Compliance Dashboard – Polished === */

/* Branding */
:root{
  --brand-dark:#0D3B66;
  --brand-mid:#7F9DB1;
  --brand-light:#B4D6E3;
  --text:#0D3B66;
  --ok:#18a957;
  --warn:#f0a202;
  --bad:#e03a3a;

  --bg:#F6FAFD;            /* zachtere page bg */
  --card-bg:#ffffff;       /* cards wit voor beter contrast */
  --card-ring:#E7EEF4;     /* donut achterring */
  --muted:#5C6B7A;

  --radius:18px;
  --shadow:0 10px 30px rgba(13,59,102,0.08), 0 2px 10px rgba(13,59,102,0.06);
  --gap:18px;
}

/* pagina basis (optioneel, alleen als je body nog geen bg heeft) */
body { background: var(--bg); }

/* container */
.wrap{
  max-width:1200px;
  margin:28px auto 40px;
  padding:0 18px;
}
.wrap h1{
  font-size:26px;
  font-weight:800;
  color:var(--brand-dark);
  letter-spacing:.2px;
  margin:0 0 6px;
}
.wrap .desc{
  color:var(--muted);
  font-size:14px;
  margin:0 0 22px;
}

/* grid – betere responsiveness & gelijke hoogtes */
.grid{
  display:grid;
  gap:var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items:stretch;
}

/* card */
.card{
  background:var(--card-bg);
  border-radius:var(--radius);
  padding:20px 20px 18px;
  box-shadow:var(--shadow);
  border:1px solid rgba(13,59,102,0.06);
  display:flex;
  flex-direction:column;
  min-height:240px;
  position: relative;
}
.card h2{
  margin:4px 0 10px;
  font-size:18px;
  font-weight:700;
  color:var(--text);
}
.sub{
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.6px;
}
.big{
  font-size:52px;
  font-weight:800;
  line-height:1;
  margin:8px 0 6px;
}
.badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:var(--brand-mid);
  color:#fff;
  font-weight:600;
  font-size:12px;
}

/* KPI row onder donuts */
.row{
  display:flex; gap:10px; align-items:center; justify-content:center;
  margin-top:12px;
}
.kpi{
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius:12px;
  padding:8px 12px;
  font-size:13px;
  font-weight:600;
  border:1px solid rgba(13,59,102,0.1);
}

/* Donut – dikker, animatie, scherper contrast */
.donut-wrap{ position:relative; display:grid; place-items:center; margin-top:8px; }
.donut{
  --size:152px;
  --thickness:16px;
  --value:0;                      /* 0..100 */
  --color: var(--warn);
  width:var(--size);
  height:var(--size);
  border-radius:50%;
  background: conic-gradient(var(--color) calc(var(--value)*1%), var(--card-ring) 0);
  display:grid; place-items:center;
  position:relative;
  transition: background 420ms ease;  /* smooth update */
}
.donut::before{
  content:"";
  width:calc(var(--size) - 2*var(--thickness));
  height:calc(var(--size) - 2*var(--thickness));
  background:var(--card-bg);
  border-radius:50%;
  box-shadow: inset 0 0 0 1px rgba(13,59,102,0.06);
}
.donut .center{
  position:absolute;
  text-align:center;
  font-weight:800;
  color:var(--text);
  font-size:18px;
}
.legend{
  margin-top:12px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
}

/* States / kleurgebruik */
.is-bad{ color:var(--bad); }
.is-warn{ color:var(--warn); }
.is-ok{ color:var(--ok); }

/* Unacceptable card accent (val op zonder te schreeuwen) */
/* Basis: unacceptable maar geen systemen → neutrale kaart */
#card-unacceptable .big{
  color: var(--muted);
}

#card-unacceptable .badge{
  background: #8A94A1;
  color: #fff;
}

/* Alert: er zijn unacceptable systemen → kaart moet 'aan' */
.card--alert{
  border: 1px solid rgba(220, 38, 38, 0.55);
  background: #FEF2F2;
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, 0.08),
    0 12px 28px rgba(220, 38, 38, 0.20);
}

.card--alert h2{
  color: #7F1D1D;
}

.card--alert .big{
  color: var(--bad);
}

.card--alert .badge{
  background: var(--bad);
  color: #FEE2E2;
}

.card--alert::after {
  content: "🚫";
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 22px;
  opacity: 0.85;
  pointer-events: none;
}

/* Minimal kaart – subtiele highlight */
#minimal-count{ color: var(--ok); }

#minimal-badge{
  margin-top: 8px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 12px;
  border: 1px solid rgba(13,59,102,0.12);
}

/* Hover micro-interaction (optioneel) */
.card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(13,59,102,0.10), 0 3px 12px rgba(13,59,102,0.08);
  transition: box-shadow .2s ease, transform .2s ease;
}

.footnote {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
  min-height: 28px; /* voorkomt springen */
}

/* ====== EVIDENCE BOX ====== */
.evidence-group {
  margin-top: 1rem;
}

.evidence-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.evidence-icon {
  font-size: 1rem;
}

.evidence-current a {
  color: var(--ud-interactive);
  text-decoration: none;
  font-weight: 500;
}

.evidence-current a:hover {
  text-decoration: underline;
}

.evidence-help {
  font-size: 0.85rem;
  color: var(--ud-muted);
  margin: 0 0 0.35rem;
}

.evidence-restrictions {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--ud-muted);
  line-height: 1.35;
  padding-left: 2px;
}
.evidence-restrictions strong {
  color: var(--ud-primary);
}

/* Link-achtige button (in plaats van een harde rode knop) */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link.danger {
  color: #b3261e;
  margin-left: auto;
}

.btn-link.danger:hover {
  color: #8f1c16;
}

/* --- Modal backdrop --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35); /* semi-transparante overlay */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* sichtbar maken via JS */
.modal-backdrop.is-visible {
  display: flex;
}

/* --- Modal dialog --- */
.modal-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
}

.modal-dialog h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--ud-primary);
}

.modal-dialog p {
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  color: var(--ud-text);
  line-height: 1.4;
}

/* --- Modal actions --- */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* optioneel, als je nog geen .btn.danger hebt */
.btn.danger {
  background: #C62828;
  color: #fff;
}
.btn.danger:hover {
  background: #A01F1F;
}

.ai-highlight {
  color: #C62828;
  font-weight: 700;
}

.additional-info {
  background: var(--ud-hover, #F5F7FA);
  border-left: 2px solid var(--ud-muted, #94A3B8);
  border-right: 2px solid var(--ud-muted, #94A3B8);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 1.25rem 0;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ud-text-muted, #4B5563);
  line-height: 1.45;
}

.textarea-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.textarea-wrapper textarea {
  padding-bottom: 2.2rem !important; /* ruimte voor hint */
}

.textarea-hint {
  position: absolute;
  bottom: 0.45rem;
  left: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--ud-text-muted, #6B7280);
  pointer-events: none;
  opacity: 0.85;
}

.comp-label {
  margin-bottom: 0.25rem;
}

.comp-sub {
  font-size: 0.9rem;
  color: var(--ud-muted, #6B7280);
}

.comp-wrapper{
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
}

.button-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 9px;
}

.comp-unacceptable__headline {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: #b91c1c;
  font-size: 0.95rem;
}

.comp-unacceptable__text {
  margin: 0;
  font-size: 0.85rem;
  color: #7f1d1d;
}

/* DISABLED BUTTON — duidelijk zichtbaar */
.btn-disabled,
.btn[aria-disabled="true"] {
  position: relative;
  opacity: 0.45;                      /* flink gedimd */
  pointer-events: none;
  cursor: not-allowed !important;
  filter: grayscale(80%);             /* kleur eruit → meer disabled */
  border-color: #b8b8b8 !important;   /* egalere grijstint */
  color: #555 !important;
}

.btn-disabled::after,
.btn[aria-disabled="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
      45deg,
      rgba(0,0,0,0.05) 0px,
      rgba(0,0,0,0.05) 6px,
      rgba(0,0,0,0.1) 6px,
      rgba(0,0,0,0.1) 12px
  );
  border-radius: inherit;
  pointer-events: none;
}

/* === 404 page === */

.error-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;      /* netjes gecentreerd zonder te botsen met navbar */
}

.error-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 3rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--ud-border);
  box-shadow: var(--ud-shadow);
}

.error-card h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--ud-primary);
}

.error-card p {
  margin-bottom: 1.4rem;
  font-size: 1rem;
  color: var(--ud-muted);
}