* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #1a1a1a;
  background: #f5f5f5;
  line-height: 1.5;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f7f3ee 0%, #e8e0d6 100%);
}
.login-card {
  max-width: 400px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.08);
}
.login-card h1 { font-size: 1.6rem; margin-bottom: .5rem; }
.login-card p { color: #666; margin-bottom: 1.5rem; font-size: .95rem; }
.login-card label { display: grid; gap: .4rem; margin-bottom: 1rem; }
.login-card label span { font-weight: 600; font-size: .9rem; }
.login-card .btn { width: 100%; }
.login-hint { margin-top: 1.5rem; font-size: .82rem; color: #999; }
.login-hint code {
  background: #f0f0f0; padding: .15em .4em; border-radius: 4px; font-size: .85em;
}
.error-msg { color: #c0392b; font-size: .9rem; margin-top: .5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: .55rem 1.1rem;
  border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: all .15s ease;
  text-decoration: none; gap: 6px;
}
.btn-primary { background: #7d1f2f; color: #fff; }
.btn-primary:hover { background: #641726; }
.btn-secondary { background: #fff; color: #1a1a1a; border-color: #ddd; }
.btn-secondary:hover { border-color: #7d1f2f; color: #7d1f2f; }
.btn-ghost { background: transparent; color: #666; }
.btn-ghost:hover { color: #7d1f2f; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-small { min-height: 36px; padding: .4rem .8rem; font-size: .85rem; }
.btn-save { min-width: 100px; }

/* Header */
.admin-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid #e5e5e5;
}
.admin-header-inner {
  display: flex; align-items: center; gap: 1rem;
  max-width: 1600px; margin: 0 auto;
  padding: .6rem 1.5rem;
}
.admin-brand {
  font-weight: 800; color: #7d1f2f; text-decoration: none; font-size: .95rem;
  white-space: nowrap;
}
.admin-title {
  font-weight: 700; color: #999; font-size: .85rem;
  padding-left: 1rem; border-left: 1px solid #e5e5e5;
  white-space: nowrap;
}
.admin-actions { margin-left: auto; display: flex; gap: .5rem; flex-shrink: 0; }

/* ═══ Tab navigation ═══ */
.admin-tabs {
  display: flex; gap: 2px; margin-left: 1.5rem;
  background: #f5f5f5; border-radius: 10px; padding: 3px;
}
.tab-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .45rem .9rem;
  border: none; border-radius: 8px;
  background: transparent; color: #666;
  font: inherit; font-size: .84rem; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
  white-space: nowrap;
}
.tab-btn:hover { color: #333; background: rgba(255,255,255,.6); }
.tab-btn.active {
  background: #fff; color: #7d1f2f;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tab-btn svg { flex-shrink: 0; }

/* ═══ Tab panels ═══ */
.tab-panel { display: none; max-width: 1600px; margin: 0 auto; }
.tab-panel.active { display: block; }

/* ═══ DASHBOARD ═══ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
}
.dash-card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 14px;
  padding: 1.25rem;
}
.dash-card h3 { font-size: 1rem; margin-bottom: 1rem; color: #333; }
.dash-stat { text-align: center; }
.dash-stat-label { font-size: .82rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .35rem; }
.dash-stat-value { font-size: 2rem; font-weight: 800; color: #7d1f2f; }
.dash-wide { grid-column: span 2; }
.dash-full { grid-column: 1 / -1; }

.session-bars { display: grid; gap: .6rem; }
.session-bar-item { display: grid; grid-template-columns: 140px 1fr 40px; align-items: center; gap: .75rem; }
.session-bar-label { font-size: .82rem; font-weight: 600; color: #444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-bar-track { height: 24px; background: #f0ece8; border-radius: 6px; overflow: hidden; }
.session-bar-fill { height: 100%; background: linear-gradient(90deg, #7d1f2f, #a3354c); border-radius: 6px; transition: width .4s ease; min-width: 2px; }
.session-bar-count { font-size: .82rem; font-weight: 700; color: #555; text-align: right; }

.task-bars { display: grid; gap: .75rem; }
.task-bar-item { display: grid; grid-template-columns: 160px 1fr 60px; align-items: center; gap: .75rem; }
.task-bar-name { font-size: .85rem; font-weight: 600; color: #444; }
.task-bar-track { height: 20px; background: #f0ece8; border-radius: 6px; overflow: hidden; }
.task-bar-fill { height: 100%; border-radius: 6px; transition: width .4s ease; min-width: 2px; }
.task-bar-fill.green { background: #27ae60; }
.task-bar-fill.amber { background: #f39c12; }
.task-bar-fill.red { background: #e74c3c; }
.task-bar-pct { font-size: .82rem; font-weight: 700; color: #555; text-align: right; }

.activity-list { max-height: 300px; overflow-y: auto; }
.activity-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid #f0f0f0; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.activity-dot.login { background: #27ae60; }
.activity-dot.new { background: #3498db; }
.activity-dot.update { background: #f39c12; }
.activity-text { font-size: .85rem; color: #444; flex: 1; }
.activity-time { font-size: .78rem; color: #999; white-space: nowrap; }

/* ═══ KANDIDATEN ═══ */
.kandidaten-header { padding: 1.5rem 1.5rem .75rem; }
.kandidaten-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.kandidaten-title-row h2 { margin: 0; font-size: 1.3rem; }
.kandidaten-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.search-input {
  width: 280px; padding: .5rem .85rem;
  border: 1px solid #ddd; border-radius: 10px;
  font: inherit; font-size: .88rem;
}
.search-input:focus { outline: none; border-color: #7d1f2f; box-shadow: 0 0 0 3px rgba(125,31,47,.08); }
.filter-select {
  padding: .5rem .75rem; border: 1px solid #ddd; border-radius: 10px;
  font: inherit; font-size: .85rem; background: #fff; cursor: pointer;
}

.kandidaten-table-wrap { padding: 0 1.5rem 1.5rem; overflow-x: auto; }
.kandidaten-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.kandidaten-table thead th {
  text-align: left; padding: .65rem .75rem;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #888; border-bottom: 2px solid #e5e5e5;
}
.kandidaten-table tbody tr { cursor: pointer; transition: background .1s; }
.kandidaten-table tbody tr:hover { background: #faf7f4; }
.kandidaten-table tbody td { padding: .65rem .75rem; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }

.task-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.task-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.task-pill.done { background: #d4edda; color: #155724; }
.task-pill.pending { background: #fff3cd; color: #856404; }

.empty-state { text-align: center; padding: 3rem; color: #999; }
.empty-hint { color: #999; font-size: .88rem; }

/* ═══ CONTENT (existing CMS) ═══ */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 60px);
}

/* Nav */
.admin-nav {
  position: sticky; top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 1.5rem 0;
  border-right: 1px solid #e5e5e5;
  background: #fff;
}
.admin-nav a {
  display: block;
  padding: .55rem 1.5rem;
  color: #555; text-decoration: none;
  font-size: .9rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .1s ease;
}
.admin-nav a:hover { color: #7d1f2f; background: #faf7f4; }
.admin-nav a.active {
  color: #7d1f2f; font-weight: 700;
  background: #faf7f4; border-left-color: #7d1f2f;
}
.admin-nav .nav-group { padding: .4rem 1.5rem .2rem; font-size: .75rem; font-weight: 800; color: #aaa; text-transform: uppercase; letter-spacing: .06em; margin-top: .8rem; }
.admin-nav .nav-group:first-child { margin-top: 0; }

/* Main */
.admin-main { padding: 2rem; }

/* Sections */
.cms-section {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.cms-section-header {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background .1s ease;
}
.cms-section-header:hover { background: #faf7f4; }
.cms-section-header h2 { font-size: 1.1rem; flex: 1; }
.cms-section-header .section-desc { font-size: .85rem; color: #888; }
.cms-section-toggle {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px; background: #f5f5f5;
  font-size: 1.1rem; color: #999;
  transition: transform .2s ease;
}
.cms-section.open .cms-section-toggle { transform: rotate(180deg); }
.cms-section-body {
  display: none;
  padding: 0 1.5rem 1.5rem;
}
.cms-section.open .cms-section-body { display: block; }

/* Fields */
.field-group { margin-bottom: 1.25rem; }
.field-group:last-child { margin-bottom: 0; }
.home-order-editor .field-hint { margin-bottom: .65rem; }
.home-order-list { display: grid; gap: .55rem; }
.home-order-item {
  display: grid;
  grid-template-columns: 20px 1fr auto auto;
  align-items: center;
  gap: .65rem;
  padding: .62rem .75rem;
  border: 1px solid #e5ddd3;
  border-radius: 10px;
  background: #fcfaf7;
  cursor: grab;
}
.home-order-item.is-dragging { opacity: .5; cursor: grabbing; }
.home-order-grip { color: #8a8178; font-size: .95rem; line-height: 1; }
.home-order-label { font-size: .86rem; font-weight: 600; color: #332f2c; }
.home-order-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .73rem; color: #7a726a; background: #f1ebe4;
  border-radius: 999px; padding: .15rem .5rem; white-space: nowrap;
}
.home-order-actions { display: inline-flex; gap: .3rem; }
.home-order-actions .btn { min-height: 30px; min-width: 32px; padding: 0; }
.field-label {
  display: block;
  font-weight: 600; font-size: .88rem;
  margin-bottom: .4rem; color: #333;
}
.field-hint { font-size: .8rem; color: #999; margin-bottom: .35rem; }
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font: inherit; font-size: .95rem;
  color: #1a1a1a; background: #fff;
  transition: border-color .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #7d1f2f;
  box-shadow: 0 0 0 3px rgba(125,31,47,.08);
}
textarea { min-height: 100px; resize: vertical; }
textarea.tall { min-height: 160px; }

/* Image upload */
.image-field { display: grid; gap: .75rem; }
.image-preview {
  width: 100%; max-width: 320px;
  border: 1px solid #e5e5e5; border-radius: 10px;
  overflow: hidden; background: #fafafa;
}
.image-preview img { width: 100%; height: auto; display: block; max-height: 200px; object-fit: contain; }
.image-preview.empty { min-height: 80px; display: grid; place-items: center; color: #ccc; font-size: .85rem; }
.image-upload-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.image-upload-row input[type="file"] { font-size: .85rem; }
.upload-status { font-size: .82rem; color: #888; }
.upload-status.success { color: #27ae60; }
.upload-status.error { color: #c0392b; }

/* Repeater fields */
.repeater { display: grid; gap: .75rem; }
.repeater-item {
  display: grid; gap: .5rem;
  padding: 1rem; background: #fafafa;
  border: 1px solid #eee; border-radius: 10px; position: relative;
}
.repeater-item .item-num { position: absolute; top: .6rem; left: .75rem; font-size: .75rem; font-weight: 800; color: #ccc; }
.repeater-item input, .repeater-item textarea { background: #fff; }
.repeater-actions { display: flex; gap: .5rem; margin-top: .5rem; }

/* Toast */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a; color: #fff;
  padding: .75rem 1.5rem; border-radius: 12px;
  font-weight: 600; font-size: .95rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  z-index: 200; animation: toastIn .3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* Session editor */
.sessies-panel { padding: 1.5rem; }
.sessies-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.sessies-header h2 { margin: 0; }

.session-editor-card {
  padding: 1.25rem; margin-bottom: 1rem;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 12px;
}
.session-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem;
  padding-bottom: .75rem; border-bottom: 1px solid #eee;
}
.session-editor-header strong { font-size: 1rem; }
.session-editor-status { font-size: .82rem; color: #888; font-weight: 600; }
.session-editor-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem 1rem;
}
.session-editor-fields .field-group { margin-bottom: 0; }
.session-editor-fields select {
  width: 100%; min-height: 42px; padding: .5rem .75rem;
  border-radius: 8px; border: 1px solid #e0e0e0; background: #fff;
  font: inherit; font-size: .9rem;
}

/* Rich text editor */
.richtext-wrap {
  border: 1px solid #ddd; border-radius: 10px;
  overflow: hidden; transition: border-color .15s ease;
}
.richtext-wrap:focus-within { border-color: #7d1f2f; box-shadow: 0 0 0 3px rgba(125,31,47,.08); }
.richtext-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 6px 8px; background: #f8f7f6;
  border-bottom: 1px solid #e5e5e5; flex-wrap: wrap;
}
.rt-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: 6px;
  background: transparent; color: #444; font-size: .9rem;
  cursor: pointer; transition: all .1s ease; font-family: inherit;
}
.rt-btn:hover { background: #e8e0d6; color: #7d1f2f; }
.rt-btn:active { background: #d4c9bd; }
.rt-sep { width: 1px; height: 20px; background: #ddd; margin: 0 4px; }
.rt-select {
  height: 32px; min-width: 88px; padding: 0 8px;
  border: 1px solid #ddd; border-radius: 6px; background: #fff;
  font: inherit; font-size: .82rem; color: #444; cursor: pointer;
}
.rt-select:focus { outline: none; border-color: #7d1f2f; }
.rt-color-wrap { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; }
.rt-color-label { font-size: .74rem; font-weight: 600; color: #6e665f; text-transform: uppercase; letter-spacing: .03em; }
.rt-color { width: 28px; height: 28px; border: 1px solid #ddd; border-radius: 6px; padding: 0; background: #fff; cursor: pointer; }
.richtext-editor {
  min-height: 100px; padding: .7rem .85rem;
  font: inherit; font-size: .95rem; color: #1a1a1a;
  background: #fff; outline: none; line-height: 1.6; overflow-y: auto;
}
.richtext-editor.tall { min-height: 160px; }
.richtext-editor p { margin: 0 0 .5em; }
.richtext-editor ul, .richtext-editor ol { margin: 0 0 .5em; padding-left: 1.5em; }
.richtext-editor h2 { font-size: 1.3rem; margin: 0 0 .4em; }
.richtext-editor h3 { font-size: 1.1rem; margin: 0 0 .4em; }
.richtext-editor h4 { font-size: 1rem; margin: 0 0 .4em; }
.richtext-editor a { color: #7d1f2f; text-decoration: underline; }
.richtext-editor blockquote { border-left: 3px solid #ddd; margin: 0 0 .5em; padding: .3em 0 .3em .8em; color: #666; }
.richtext-format-summary {
  font-size: .78rem; color: #6f685f;
  padding: .5rem .75rem .6rem; border-top: 1px solid #eee7de; background: #fcfaf7;
}

/* ═══ MODALS ═══ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-content {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.15);
  animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }
.modal-large { max-width: 860px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid #e5e5e5;
  position: sticky; top: 0; background: #fff; z-index: 1; border-radius: 16px 16px 0 0;
}
.modal-header h2 { font-size: 1.15rem; margin: 0; }
.modal-close {
  width: 36px; height: 36px; border: none; background: #f5f5f5;
  border-radius: 8px; font-size: 1.3rem; color: #666;
  cursor: pointer; transition: all .1s;
}
.modal-close:hover { background: #e5e5e5; color: #333; }
.modal-body { padding: 1.5rem; }

.modal-tabs {
  display: flex; gap: 2px; background: #f5f5f5;
  border-radius: 10px; padding: 3px; margin-bottom: 1.5rem;
}
.modal-tab {
  flex: 1; padding: .5rem .75rem; border: none; border-radius: 8px;
  background: transparent; color: #666; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer; transition: all .15s;
  text-align: center;
}
.modal-tab:hover { color: #333; }
.modal-tab.active { background: #fff; color: #7d1f2f; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.modal-tab-panel { display: none; }
.modal-tab-panel.active { display: block; }

.modal-action-row { display: flex; gap: .5rem; margin-top: 1.25rem; flex-wrap: wrap; }
.modal-feedback { font-size: .88rem; margin-top: .75rem; padding: .6rem .85rem; border-radius: 8px; background: #f0f0f0; }
.modal-feedback.success { background: #d4edda; color: #155724; }
.modal-feedback.error { background: #f8d7da; color: #721c24; }

.profiel-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.profiel-grid label { display: grid; gap: .3rem; }
.profiel-grid label span { font-weight: 600; font-size: .85rem; color: #555; }

/* Task checklist */
.task-checklist { display: grid; gap: .75rem; }
.task-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; background: #fafafa;
  border: 1px solid #eee; border-radius: 10px;
  cursor: pointer; transition: background .1s;
}
.task-item:hover { background: #f0ece8; }
.task-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: #7d1f2f; cursor: pointer; }
.task-item span { font-weight: 600; font-size: .92rem; }

/* Documents list */
.documents-list { display: grid; gap: .5rem; }
.doc-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .85rem; background: #fafafa;
  border: 1px solid #eee; border-radius: 10px;
}
.doc-icon { font-size: 1.2rem; }
.doc-info { flex: 1; }
.doc-name { font-weight: 600; font-size: .88rem; }
.doc-meta { font-size: .78rem; color: #888; }

/* Form data view */
.form-data-view h4 { margin-bottom: .75rem; color: #333; }
.form-data-content { font-size: .9rem; }
.form-data-row { display: grid; grid-template-columns: 200px 1fr; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid #f0f0f0; }
.form-data-label { font-weight: 600; color: #555; font-size: .85rem; }
.form-data-value { color: #333; }

/* Action cards */
.action-cards { display: grid; gap: 1rem; }
.action-card {
  padding: 1rem 1.25rem; border: 1px solid #e5e5e5; border-radius: 12px;
}
.action-card h4 { margin-bottom: .3rem; font-size: .95rem; }
.action-card p { font-size: .85rem; color: #666; margin-bottom: .75rem; }
.action-danger { border-color: #f5c6cb; background: #fff5f5; }

/* ═══ SETTINGS ═══ */
.settings-grid { padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.settings-card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 14px;
  padding: 1.5rem;
}
.settings-card h3 { margin-bottom: .5rem; }
.settings-desc { font-size: .88rem; color: #666; margin-bottom: 1rem; }
.settings-hint { font-size: .82rem; color: #999; margin-top: .75rem; }
.settings-hint code { background: #f0f0f0; padding: .1em .4em; border-radius: 4px; font-size: .85em; }

/* ═══ Utility ═══ */
[hidden] { display: none !important; }
.hidden { display: none !important; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px; text-align: left; }

/* ═══ Portal compatibility ═══ */
.portal-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 1.5rem; margin-bottom: 1rem; }
.portal-meta { color: #666; font-size: .88rem; }
.portal-form { display: flex; gap: .5rem; }
.portal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.portal-form-grid label { display: grid; gap: .3rem; }
.portal-form-grid label span { font-weight: 600; font-size: .85rem; }
.portal-error { color: #c0392b; font-size: .88rem; }
.portal-feedback { font-size: .88rem; color: #666; margin-top: .5rem; }
.portal-action-row { display: flex; gap: .5rem; }
.section-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #888; }

/* ═══ Responsive ═══ */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-wide { grid-column: span 1; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .admin-header-inner { flex-wrap: wrap; }
  .admin-tabs { margin-left: 0; order: 10; width: 100%; overflow-x: auto; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav {
    position: static; height: auto;
    display: flex; flex-wrap: wrap; gap: 0;
    padding: .75rem;
    border-right: none; border-bottom: 1px solid #e5e5e5;
  }
  .admin-nav .nav-group { display: none; }
  .admin-nav a {
    padding: .45rem .75rem; font-size: .82rem;
    border-left: none; border-radius: 8px;
  }
  .admin-nav a.active { background: #7d1f2f; color: #fff; }
  .admin-main { padding: 1rem; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .profiel-grid { grid-template-columns: 1fr; }
  .modal-content { margin: 1rem; }
  .kandidaten-actions { width: 100%; }
  .search-input { width: 100%; }
}
@media (max-width: 600px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-wide, .dash-full { grid-column: span 1; }
  .tab-btn span { display: none; }
}

/* Array-based section items */
.array-section { display:flex; flex-direction:column; gap:8px; }
.array-item { border:1px solid #D9D1C8; border-radius:8px; background:#fff; }
.array-item-header { display:flex; align-items:center; gap:8px; padding:10px 14px; cursor:pointer; }
.array-item-header:hover { background:#F7F4EF; }
.array-item-label { flex:1; font-size:14px; }
.array-item-toggle { font-size:12px; color:#8A7D72; }
.array-item-delete { color:#8A2735; font-size:14px; border:none; background:none; cursor:pointer; padding:2px 6px; }

/* ═══ CMS TOOLBAR & SEARCH ═══ */
.cms-toolbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1.5rem;
  background: #fff; border-bottom: 1px solid #e5e5e5;
  position: sticky; top: 52px; z-index: 40;
}
.cms-search-wrap {
  position: relative; flex: 1; max-width: 560px;
}
.cms-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #999; pointer-events: none;
}
.cms-search {
  width: 100%; padding: .6rem .85rem .6rem 38px;
  border: 1px solid #ddd; border-radius: 10px;
  font: inherit; font-size: .9rem; background: #fafafa;
  transition: all .15s ease;
}
.cms-search:focus {
  outline: none; border-color: #7d1f2f; background: #fff;
  box-shadow: 0 0 0 3px rgba(125,31,47,.08);
}
.cms-search-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 2px 7px; border: 1px solid #ddd; border-radius: 5px;
  font-size: .72rem; color: #999; background: #f5f5f5;
  line-height: 1.4; pointer-events: none;
}
.cms-search:focus ~ .cms-search-kbd { display: none; }
.cms-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: none; background: none; font-size: 1.2rem; color: #999;
  cursor: pointer; padding: 2px 6px; line-height: 1;
}
.cms-search-clear:hover { color: #333; }
.cms-toolbar-actions {
  display: flex; align-items: center; gap: .5rem; margin-left: auto; flex-shrink: 0;
}
.cms-field-counter {
  font-size: .78rem; color: #999; font-weight: 600; white-space: nowrap;
}

/* Search results overlay */
.cms-search-results {
  max-width: 1600px; margin: 0 auto;
  padding: 1rem 1.5rem;
  background: #fffdf9; border-bottom: 1px solid #e5ddd3;
}
.cms-search-results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.cms-search-results-header h3 {
  font-size: .95rem; color: #333; margin: 0;
}
.cms-search-results-header span {
  font-size: .82rem; color: #888;
}
.cms-search-result-list {
  display: grid; gap: .5rem;
  max-height: 420px; overflow-y: auto;
}
.cms-search-result {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: .75rem;
  padding: .65rem .85rem;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 10px;
  cursor: pointer; transition: all .12s ease;
}
.cms-search-result:hover {
  border-color: #7d1f2f; background: #faf7f4;
}
.cms-search-result-section {
  font-size: .72rem; color: #7d1f2f; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
}
.cms-search-result-label {
  font-size: .88rem; font-weight: 600; color: #333;
}
.cms-search-result-value {
  font-size: .82rem; color: #666;
  max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cms-search-result-value mark {
  background: #fff3c4; color: #333; border-radius: 2px; padding: 0 1px;
}
.cms-search-result-goto {
  font-size: .78rem; color: #7d1f2f; font-weight: 600; white-space: nowrap;
}

/* ═══ IMPROVED NAV ═══ */
.admin-nav .nav-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 1.5rem .25rem; cursor: pointer; user-select: none;
}
.admin-nav .nav-group-header:hover { background: #faf7f4; }
.admin-nav .nav-group-label {
  font-size: .72rem; font-weight: 800; color: #888;
  text-transform: uppercase; letter-spacing: .06em;
}
.admin-nav .nav-group-count {
  font-size: .68rem; color: #bbb; font-weight: 700;
}
.admin-nav .nav-group-items { overflow: hidden; }
.admin-nav .nav-group-items.collapsed { display: none; }
.admin-nav a .nav-item-badge {
  font-size: .68rem; color: #bbb; margin-left: auto; font-weight: 700;
}
.admin-nav a.archief-link {
  color: #b08d72; font-style: italic;
}

/* Archief section styling */
.cms-section.is-archived {
  border-color: #e8ddd0; background: #fdfbf8;
}
.cms-section.is-archived .cms-section-header h2 {
  color: #8a7d72;
}
.cms-section.is-archived .cms-section-header .section-desc {
  color: #b0a898;
}
.archief-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; background: #f0ece6; color: #8a7d72;
  margin-left: 8px; vertical-align: middle;
}
.archief-activate-hint {
  padding: .6rem .85rem; margin-bottom: 1rem;
  background: #f8f5f0; border: 1px solid #e5ddd3; border-radius: 8px;
  font-size: .82rem; color: #6b6157; display: flex; align-items: center; gap: .5rem;
}
.archief-activate-hint svg { flex-shrink: 0; }

/* ═══ UNSAVED CHANGES INDICATOR ═══ */
.btn-save.has-changes {
  animation: pulse-save 1.5s ease-in-out infinite;
  position: relative;
}
.btn-save.has-changes::after {
  content: ''; position: absolute; top: -3px; right: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #e74c3c; border: 2px solid #fff;
}
@keyframes pulse-save {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125,31,47,.3); }
  50% { box-shadow: 0 0 0 6px rgba(125,31,47,0); }
}

/* ═══ FIELD HIGHLIGHT ON SEARCH ═══ */
.field-group.search-highlight {
  background: #fffde6; border: 1px solid #f5e6a0; border-radius: 8px;
  padding: 8px; margin: -8px; margin-bottom: calc(1.25rem - 8px);
  animation: flash-highlight .6s ease;
}
@keyframes flash-highlight {
  0% { background: #fff3c4; }
  100% { background: #fffde6; }
}

/* ═══ SECTION STATUS BADGES ═══ */
.section-field-count {
  font-size: .72rem; color: #bbb; font-weight: 600;
  margin-left: 8px;
}

@media (max-width: 860px) {
  .cms-toolbar { flex-wrap: wrap; top: auto; position: static; }
  .cms-search-wrap { max-width: 100%; width: 100%; }
  .cms-toolbar-actions { width: 100%; justify-content: flex-end; }
  .cms-search-kbd { display: none; }
}
.array-item-body { padding:0 14px 14px; }
.array-item-body .field-group { margin-top:10px; }
