/* ============================================
   LEAGL Contract Risk Scanner - Huisstijl CSS
   Kleurenpalet: Navy #222035 | Purple #5245AD | Goud #C8A96E
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  --navy: #222035;
  --navy-light: #2E2B4A;
  --navy-lighter: #363360;
  --red: #DC2626;
  --red-light: #EF4444;
  --red-dark: #B91C1C;
  --white: #FFFFFF;
  --gray-50: #F7F5F0;
  --gray-100: #F0EDE7;
  --gray-200: #E0DDD6;
  --gray-300: #CCC9C2;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1A1A1A;
  --green: #C8A96E;
  --green-light: #F7F5F0;
  --yellow: #D97706;
  --yellow-light: #FEF3C7;
  --red-light-bg: #FEE2E2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-md: 0 10px 25px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: #FFFFFF;
  color: #1A1A1A;
  line-height: 1.6;
  min-height: 100vh;
}

/* =================== TYPOGRAFIE =================== */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

/* =================== NAVIGATIE =================== */
.nav {
  background: #FFFFFF;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid #E0DDD6;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 32px;
  height: 32px;
  background: var(--navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: white;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.nav-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.nav-title span {
  color: var(--green);
}

/* =================== KNOPPEN =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--navy-lighter);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--navy);
  background: var(--gray-50);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* =================== HERO SECTIE =================== */
.hero {
  background: #F7F5F0;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200, 169, 110, 0.12);
  border: 1px solid rgba(200, 169, 110, 0.35);
  color: #8A6830;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #1A1A1A;
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1 span {
  color: var(--green);
}

.hero p {
  font-size: 1.1rem;
  color: #4B5563;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 0.9rem;
}

.hero-feature svg {
  color: var(--green);
  flex-shrink: 0;
}

/* =================== FORMULIER SECTIE =================== */
.form-section {
  max-width: 860px;
  margin: -2rem auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.form-card-header {
  background: var(--navy);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-card-header h2 {
  color: var(--white);
  font-size: 1.2rem;
}

.form-card-header .steps {
  display: flex;
  gap: 0.5rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

.step-dot.active {
  background: var(--red-light);
}

.form-body {
  padding: 2rem;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: var(--gray-50);
  margin-bottom: 2rem;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--red);
  background: var(--red-light-bg);
}

.upload-zone.has-file {
  border-color: var(--green);
  background: var(--green-light);
  border-style: solid;
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.upload-zone h3 {
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.upload-zone p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-preview {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  border: 1px solid var(--gray-200);
}

.file-preview.show {
  display: flex;
}

.file-preview-icon {
  font-size: 1.5rem;
}

.file-preview-info {
  flex: 1;
  text-align: left;
}

.file-preview-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
}

.file-preview-size {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.file-remove:hover {
  color: var(--red);
  background: var(--red-light-bg);
}

/* Formulier velden */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

label .required {
  color: var(--red);
  margin-left: 2px;
}

input, select, textarea {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  width: 100%;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 23, 41, 0.08);
}

input::placeholder {
  color: var(--gray-400);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 2.5rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-group:hover {
  border-color: var(--navy);
  background: var(--white);
}

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

.checkbox-label {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.checkbox-label a {
  color: var(--navy);
  font-weight: 600;
}

.form-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 1.5rem 0;
}

.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* =================== TRUST BADGES =================== */
.trust-section {
  max-width: 860px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.trust-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.trust-icon {
  width: 44px;
  height: 44px;
  background: #F7F5F0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.trust-card h4 {
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.trust-card p {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* =================== LOADING PAGINA =================== */
.loading-page {
  min-height: 100vh;
  background: #F7F5F0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.loading-card {
  background: #FFFFFF;
  border: 1px solid #E0DDD6;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.loading-scanner {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  position: relative;
}

.loading-ring {
  width: 80px;
  height: 80px;
  border: 3px solid #E0DDD6;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 0;
  left: 0;
}

.loading-ring-2 {
  width: 60px;
  height: 60px;
  border: 3px solid #F0EDE7;
  border-bottom-color: rgba(200,169,110,0.4);
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
  position: absolute;
  top: 10px;
  left: 10px;
}

.loading-icon-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-card h2 {
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.loading-card > p {
  color: #6B7280;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.loading-steps {
  text-align: left;
  margin-bottom: 2rem;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 0;
  border-bottom: 1px solid #E0DDD6;
  opacity: 0.4;
  transition: var(--transition);
}

.loading-step:last-child {
  border-bottom: none;
}

.loading-step.active {
  opacity: 1;
}

.loading-step.done {
  opacity: 0.7;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  background: #F0EDE7;
  color: var(--gray-400);
}

.loading-step.active .step-icon {
  background: rgba(200,169,110,0.2);
  color: #8A6830;
  animation: pulse-icon 1.5s ease-in-out infinite;
}

.loading-step.done .step-icon {
  background: rgba(200,169,110,0.15);
  color: var(--green);
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.step-text {
  flex: 1;
}

.step-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.step-sublabel {
  font-size: 0.78rem;
  color: #6B7280;
}

.loading-step.active .step-sublabel {
  color: #4B5563;
}

.progress-bar-wrap {
  background: #E0DDD6;
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8A6830, #C8A96E);
  border-radius: 100px;
  width: 0%;
  transition: width 0.5s ease;
}

.progress-label {
  font-size: 0.8rem;
  color: #6B7280;
  text-align: right;
  margin-top: 6px;
}

/* =================== RESULTATEN PAGINA =================== */
.results-page {
  background: #FFFFFF;
  min-height: 100vh;
}

.results-hero {
  background: var(--navy);
  padding: 2.5rem 2rem;
}

.results-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.results-meta h1 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.results-meta p {
  color: #94A3B8;
  font-size: 0.9rem;
}

/* Score cirkel */
.score-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 5px solid;
  background: rgba(255,255,255,0.08);
}

.score-circle.laag {
  border-color: #6BAE8A;
  color: #6BAE8A;
}

.score-circle.gemiddeld {
  border-color: #D97706;
  color: #D97706;
}

.score-circle.hoog {
  border-color: #DC2626;
  color: #DC2626;
}

.score-number {
  font-size: 2rem;
  line-height: 1;
}

.score-max {
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: 400;
}

.score-label-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-label-badge.laag {
  background: rgba(107,174,138,0.2);
  color: #3D8A62;
}

.score-label-badge.gemiddeld {
  background: rgba(217,119,6,0.15);
  color: #92400E;
}

.score-label-badge.hoog {
  background: rgba(220,38,38,0.12);
  color: #991B1B;
}

/* Resultaten inhoud */
.results-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result-card-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-card-header h3 {
  font-size: 0.95rem;
  color: var(--navy);
}

.result-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--red-light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.result-card-body {
  padding: 1.5rem;
}

/* Pijlers */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

.pillar-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pillar-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.pillar-score-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.pillar-score-badge.laag {
  background: var(--green-light);
  color: var(--green);
}

.pillar-score-badge.gemiddeld {
  background: var(--yellow-light);
  color: var(--yellow);
}

.pillar-score-badge.hoog {
  background: var(--red-light-bg);
  color: var(--red);
}

.pillar-bar-bg {
  height: 6px;
  background: var(--gray-100);
  border-radius: 100px;
  overflow: hidden;
}

.pillar-bar {
  height: 100%;
  border-radius: 100px;
  transition: width 1s ease;
}

.pillar-bar.laag { background: var(--green); }
.pillar-bar.gemiddeld { background: var(--yellow); }
.pillar-bar.hoog { background: var(--red); }

.pillar-toelichting {
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* Bevindingen */
.bevinding {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  margin-bottom: 0.75rem;
}

.bevinding:last-child {
  margin-bottom: 0;
}

.bevinding.kritiek {
  background: #FFF1F1;
  border-color: #FECACA;
}

.bevinding.waarschuwing {
  background: #FFFBEB;
  border-color: #FDE68A;
}

.bevinding.info {
  background: #F7F5F0;
  border-color: #E0DDD6;
}

.bevinding-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.bevinding-ernst {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-top: 2px;
}

.bevinding.kritiek .bevinding-ernst {
  background: var(--red-light-bg);
  color: var(--red-dark);
}

.bevinding.waarschuwing .bevinding-ernst {
  background: var(--yellow-light);
  color: var(--yellow);
}

.bevinding.info .bevinding-ernst {
  background: #DBEAFE;
  color: #1D4ED8;
}

.bevinding-titel {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-800);
}

.bevinding-body {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.bevinding-clausule {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-style: italic;
  background: rgba(0,0,0,0.04);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--gray-300);
}

.bevinding-advies {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--gray-700);
  font-weight: 500;
}

/* Quick wins */
.quick-wins-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quick-win {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.85rem 1rem;
  background: var(--green-light);
  border-radius: var(--radius-sm);
  border: 1px solid #C5CBE8;
}

.quick-win-num {
  width: 24px;
  height: 24px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-win-text {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.5;
}

/* Aanbeveling CTA */
.cta-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.cta-card h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.cta-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* =================== LOGIN PAGINA =================== */
.login-page {
  min-height: 100vh;
  background: #F7F5F0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: #FFFFFF;
  border: 1px solid #E0DDD6;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: var(--navy);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
}

.login-logo h2 {
  color: var(--navy);
  font-size: 1.1rem;
}

.login-logo p {
  color: #6B7280;
  font-size: 0.85rem;
}

.login-card label {
  color: #374151;
}

.login-card input {
  background: #FFFFFF;
  border-color: #E0DDD6;
  color: #1A1A1A;
}

.login-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.15);
}

.login-card input::placeholder {
  color: #9CA3AF;
}

.login-error {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 1rem;
  display: none;
}

/* =================== DASHBOARD =================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  width: 240px;
  background: #FFFFFF;
  border-right: 1px solid #E0DDD6;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid #E0DDD6;
  margin-bottom: 1rem;
}

.sidebar-brand h3 {
  color: var(--navy);
  font-size: 0.95rem;
}

.sidebar-brand p {
  color: #6B7280;
  font-size: 0.78rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  color: #6B7280;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: #F7F5F0;
  color: var(--navy);
}

.nav-item.active {
  background: rgba(200,169,110,0.12);
  color: var(--navy);
  font-weight: 600;
}

.sidebar-footer {
  padding: 1rem 1.5rem 0;
  border-top: 1px solid #E0DDD6;
}

.dashboard-main {
  flex: 1;
  overflow: auto;
}

.dashboard-header {
  background: var(--white);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-header h1 {
  font-size: 1.2rem;
  color: var(--navy);
}

.dashboard-header p {
  font-size: 0.83rem;
  color: var(--gray-500);
}

.dashboard-body {
  padding: 2rem;
}

/* Statistieken kaarten */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* Tabel */
.table-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.table-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-card-header h3 {
  font-size: 0.95rem;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap input {
  padding-left: 2.2rem;
  width: 240px;
  font-size: 0.87rem;
}

.search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--gray-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--gray-50);
}

.data-table .name-cell {
  font-weight: 600;
  color: var(--navy);
}

.data-table .email-cell {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.risk-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.risk-badge.laag {
  background: var(--green-light);
  color: var(--green);
}

.risk-badge.gemiddeld {
  background: var(--yellow-light);
  color: var(--yellow);
}

.risk-badge.hoog {
  background: var(--red-light-bg);
  color: var(--red-dark);
}

.date-cell {
  color: var(--gray-400);
  font-size: 0.82rem;
}

.action-btn {
  background: none;
  border: 1px solid var(--gray-200);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--navy);
  transition: var(--transition);
  white-space: nowrap;
}

.action-btn:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.action-btn-delete:hover {
  background: var(--red) !important;
  border-color: var(--red) !important;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--gray-500);
}

.pagination-btns {
  display: flex;
  gap: 0.4rem;
}

.page-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  background: white;
  color: var(--gray-700);
  transition: var(--transition);
}

.page-btn:hover, .page-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1rem;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--gray-400);
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}

.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

/* Brede modal voor volledige rapportweergave */
.modal-wide {
  max-width: 860px;
}

/* Secties binnen de modal */
.modal-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}

.modal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.modal-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

/* Lead grid: 2 kolommen */
.modal-lead-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 1.5rem;
}

@media (max-width: 560px) {
  .modal-lead-grid { grid-template-columns: 1fr; }
}

.modal-lead-item {
  display: flex;
  gap: 0.4rem;
  font-size: 0.86rem;
  align-items: baseline;
}

.modal-lead-item .detail-label {
  min-width: 90px;
  flex-shrink: 0;
  font-size: 0.78rem;
}

/* Score rij */
.modal-score-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.modal-score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0,0,0,0.02);
}

.modal-score-circle.laag     { border-color: var(--green); color: var(--green); }
.modal-score-circle.gemiddeld { border-color: var(--yellow); color: var(--yellow); }
.modal-score-circle.hoog     { border-color: var(--red); color: var(--red); }

/* Pijlers in modal */
.modal-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
}

@media (max-width: 560px) {
  .modal-pillars { grid-template-columns: 1fr; }
}

.modal-pillar {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.87rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--gray-500);
}

.detail-value {
  color: var(--gray-800);
}

/* =================== FOOTER =================== */
.footer {
  background: #222035;
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
}

.footer a {
  color: rgba(255,255,255,0.7);
}

/* =================== UTILS =================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* Alert */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--red-light-bg);
  border: 1px solid #FECACA;
  color: var(--red-dark);
}

.alert-success {
  background: var(--green-light);
  border: 1px solid #C5CBE8;
  color: #3D4E9E;
}

/* Spinner inline */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* =================== TOAST NOTIFICATIE =================== */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-success {
  background: var(--navy);
  color: var(--green);
  border: 1px solid rgba(200, 169, 110, 0.3);
}

.toast-error {
  background: var(--navy);
  color: #FCA5A5;
  border: 1px solid rgba(252, 165, 165, 0.25);
}

/* =================== PRINT STYLESHEET =================== */
.print-only { display: none; }

@media print {
  /* Verberg navigatie, knoppen en footer */
  .no-print,
  .nav,
  .btn,
  button,
  .footer {
    display: none !important;
  }

  /* Toon print-only elementen */
  .print-only {
    display: block !important;
  }

  /* Pagina instellingen */
  @page {
    size: A4 portrait;
    margin: 18mm 16mm 18mm 16mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: white !important;
    font-size: 10pt;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }

  /* Print-header bovenaan elke pagina */
  .results-hero {
    background: #222035 !important;
    color: white;
    padding: 14mm 16mm 10mm;
    margin: -18mm -16mm 8mm;
    page-break-after: avoid;
  }

  .results-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .results-meta h1 {
    color: white !important;
    font-size: 16pt;
    margin-bottom: 3pt;
  }

  .results-meta p {
    color: #94A3B8 !important;
    font-size: 9pt;
  }

  /* Score cirkel in print */
  .score-circle {
    width: 72pt;
    height: 72pt;
    border-width: 4pt;
  }

  .score-number {
    font-size: 22pt;
  }

  .score-label-badge {
    font-size: 7pt;
    padding: 2pt 6pt;
  }

  /* Kaarten */
  .results-content {
    padding: 0;
    gap: 6mm;
    display: block;
  }

  .result-card {
    border: 1px solid #e5e7eb;
    border-radius: 6pt;
    box-shadow: none !important;
    margin-bottom: 6mm;
    page-break-inside: avoid;
  }

  .result-card-header {
    background: #f9fafb;
    padding: 6pt 10pt;
    border-bottom: 1px solid #e5e7eb;
  }

  .result-card-header h3 {
    font-size: 10pt;
    font-weight: 700;
    color: #222035;
  }

  .result-card-icon {
    display: none;
  }

  .result-card-body {
    padding: 8pt 10pt;
  }

  /* Pijlers: 2 kolommen in print */
  .pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6pt;
  }

  .pillar-item {
    gap: 3pt;
  }

  .pillar-name {
    font-size: 8.5pt;
  }

  .pillar-toelichting {
    font-size: 7.5pt;
  }

  .pillar-bar-bg {
    height: 4pt;
  }

  /* Bevindingen */
  .bevinding {
    padding: 6pt 8pt;
    margin-bottom: 4pt;
    page-break-inside: avoid;
  }

  .bevinding-titel {
    font-size: 9pt;
  }

  .bevinding-body,
  .bevinding-advies {
    font-size: 8.5pt;
  }

  .bevinding-clausule {
    font-size: 8pt;
  }

  /* Quick wins */
  .quick-win {
    padding: 5pt 8pt;
    margin-bottom: 3pt;
    page-break-inside: avoid;
  }

  .quick-win-text {
    font-size: 8.5pt;
  }

  .quick-win-num {
    width: 16pt;
    height: 16pt;
    font-size: 7pt;
  }

  /* Print-only CTA onderaan */
  .print-cta {
    border-top: 2pt solid #222035;
    margin-top: 6mm;
    padding-top: 5mm;
    font-size: 9pt;
    color: #374151;
  }

  .print-cta p:first-child {
    font-style: italic;
    margin-bottom: 3pt;
  }

  /* Print-only footer */
  .print-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 6mm;
    padding-top: 4mm;
    font-size: 7.5pt;
    color: #6b7280;
  }

  /* Zorg dat scorekolommen correct kleuren bij print */
  .score-circle.laag  { border-color: #6bae8a !important; color: #6bae8a !important; }
  .score-circle.gemiddeld { border-color: #d97706 !important; color: #d97706 !important; }
  .score-circle.hoog  { border-color: #dc2626 !important; color: #dc2626 !important; }

  .pillar-bar.laag     { background: #6bae8a !important; }
  .pillar-bar.gemiddeld { background: #d97706 !important; }
  .pillar-bar.hoog     { background: #dc2626 !important; }

  .bevinding.kritiek    { background: #fff1f1 !important; border-color: #fecaca !important; }
  .bevinding.waarschuwing { background: #fffbeb !important; border-color: #fde68a !important; }
  .bevinding.info       { background: #eff6ff !important; border-color: #bfdbfe !important; }

  .quick-win { background: #f7f5f0 !important; border-color: #e0ddd6 !important; }
  .quick-win-num { background: #c8a96e !important; }
}
