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

:root {
  --knb-magenta: #475569;
  --knb-magenta-dark: #334155;
  --knb-magenta-light: #64748b;
  --knb-yellow: #FABA20;
  --knb-yellow-light: #fcd06a;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #2d2d2d;
  --text-muted: #6b6b6b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(71, 85, 105, 0.08);
  --shadow-lg: 0 8px 30px rgba(71, 85, 105, 0.12);
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body.canvas-page {
  overflow: hidden;
}

/* --- Topbar --- */

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-link {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}

.topbar-breadcrumb a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  color: var(--knb-magenta);
  text-decoration: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: transparent;
  transition: border-color 0.2s, background 0.2s;
}

.topbar-breadcrumb a:hover {
  border-color: var(--knb-magenta-light);
  background: var(--bg);
}

.topbar-breadcrumb-sep {
  color: var(--text-muted);
  user-select: none;
  font-size: 0.85rem;
}

.topbar-logo {
  width: 40px;
  height: auto;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--knb-magenta);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-user {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Board detail header: Home | Titel | Playback */
.topbar-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.topbar-board .topbar-left {
  justify-content: flex-start;
}

.topbar-board .topbar-right {
  justify-self: end;
}

.topbar-board-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--knb-magenta);
  text-align: center;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.topbar-playback {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topbar-playback .playback-buttons {
  display: flex;
  gap: 0.2rem;
}

.topbar-playback .playback-speed {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-playback .playback-speed input[type="range"] {
  width: 80px;
  accent-color: var(--knb-magenta);
}

.inline-form {
  display: inline;
}

/* Title edit pencil + inline input */
.topbar-board-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
}

.title-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}

.title-edit-btn:hover {
  color: var(--knb-magenta);
  background: rgba(71, 85, 105, 0.1);
}

.title-edit-input {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--knb-magenta);
  background: var(--bg-card);
  border: 1.5px solid var(--knb-magenta);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-family: inherit;
  text-align: center;
  width: 280px;
  max-width: 60vw;
}

.title-edit-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.15);
}

/* Dashboard: card wrap */
.version-card-wrap {
  position: relative;
}

.version-card-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  margin-left: auto;
}

.version-card-actions .dash-title-edit {
  position: static;
}

.version-card-actions .item-dots-wrap {
  position: relative;
}

/* --- Container --- */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container-wide {
  max-width: 1800px;
}

/* --- Login --- */

.login-page {
  background: linear-gradient(135deg, var(--knb-magenta) 0%, var(--knb-magenta-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  margin-bottom: 1rem;
}

.login-card h1 {
  font-size: 1.5rem;
  color: var(--knb-magenta);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.login-error {
  display: none;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.login-error.visible {
  display: block;
}

/* --- Forms --- */

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--bg-card);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--knb-magenta);
  box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--knb-magenta-dark);
}

.btn-outline {
  background: transparent;
  color: var(--knb-magenta);
  border: 1.5px solid var(--knb-magenta);
}

.btn-outline:hover {
  background: var(--knb-magenta);
  color: white;
}

.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-danger-outline {
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #dc2626;
}

.btn-danger-outline:hover {
  background: #dc2626;
  color: white;
}

/* --- Page header --- */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  color: var(--text);
}

/* --- Version / Board list --- */

.version-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.version-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  border: 1.5px solid transparent;
}

.version-card:hover {
  border-color: var(--knb-magenta-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.version-card-thumb {
  width: 72px;
  min-width: 72px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  margin-right: 1rem;
  flex-shrink: 0;
}

.version-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.version-card-thumb-placeholder {
  background: var(--border);
}

.version-card-left {
  flex: 1;
  min-width: 0;
}

.version-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.version-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.version-card-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

/* --- Ontwerp-sectie: kaartgrid (persona's) --- */

.ontwerp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  list-style: none;
}

.ontwerp-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.ontwerp-card:hover {
  border-color: var(--knb-magenta-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.ontwerp-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.ontwerp-card-thumb {
  width: 100%;
  height: 160px;
  background: var(--bg);
  overflow: hidden;
}

.ontwerp-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ontwerp-card-thumb-placeholder {
  background: var(--border);
}

.ontwerp-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
}

.ontwerp-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--knb-magenta);
  margin: 0 0 0.25rem 0;
}

.ontwerp-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ontwerp-card-actions {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.ontwerp-card-actions .section-toggle-visibility {
  flex-shrink: 0;
}

/* --- Mindmap view (Markmap) --- */

.mindmap-wrap {
  position: relative;
  min-height: 500px;
  height: calc(100vh - 140px);
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.mindmap-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mindmap-wrap a {
  color: var(--knb-magenta);
  text-decoration: none;
  cursor: pointer;
}
.mindmap-wrap a:hover {
  text-decoration: underline;
}

.mindmap-toolbar {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

/* --- Home: 4 sectie-kaarten --- */

body.home-bg {
  background-image: url(/public/bg.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

body.home-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 0;
}

body.home-bg .topbar,
body.home-bg .container {
  position: relative;
  z-index: 1;
}

.youtube-player-hidden {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.btn-music {
  padding: 0.4rem;
  min-width: auto;
  color: var(--knb-magenta);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-music:hover {
  border-color: var(--knb-magenta-light);
  background: var(--bg);
}

.music-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.music-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.music-volume {
  width: 70px;
  height: 4px;
  accent-color: var(--knb-magenta);
  cursor: pointer;
  vertical-align: middle;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.home-grid-top {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1.5rem;
}

.home-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s;
}

body.home-bg .home-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-card:hover {
  border-color: var(--knb-magenta-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.home-card-icon {
  display: block;
  line-height: 1;
  color: var(--knb-magenta);
}

.home-card-icon svg {
  display: block;
}

.home-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--knb-magenta);
  margin: 0;
}

.home-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.home-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  border: 1.5px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

body.home-bg .home-bar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-bar:hover {
  border-color: var(--knb-magenta-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.home-bar-icon {
  flex-shrink: 0;
  line-height: 1;
  color: var(--knb-magenta);
}

.home-bar-icon svg {
  display: block;
}

.home-bar-text {
  min-width: 0;
}

.home-bar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--knb-magenta);
  margin: 0;
}

.home-bar-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
  line-height: 1.4;
}

.section-item-hidden {
  opacity: 0.65;
}

.section-toggle-wrap {
  display: inline-flex;
}

.section-toggle-wrap .section-toggle-visibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
}

.section-toggle-wrap .section-toggle-visibility svg {
  display: block;
}

.text-muted {
  color: var(--text-muted);
}

.assets-gallery-wrap {
  margin-bottom: 2rem;
}

.assets-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.asset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.asset-card:hover {
  border-color: var(--knb-magenta-light);
  box-shadow: var(--shadow);
}

.asset-card-img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.asset-card-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  word-break: break-all;
}

/* --- Item detail (onderzoek/ontwerp/verhaallijn) --- */

.item-detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.item-detail-title {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.item-detail-section {
  margin-bottom: 2rem;
}

.item-detail-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.item-detail-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.item-detail-description {
  white-space: pre-wrap;
  padding: 0.75rem 0;
  color: var(--text);
  line-height: 1.6;
}

.item-detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.item-detail-title-full {
  flex: 1;
  min-width: 200px;
}

.item-detail-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}

.item-detail-textarea {
  width: 100%;
  min-height: 280px;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  display: block;
  margin-bottom: 0.75rem;
}

.item-detail-desc-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.item-save-feedback {
  font-size: 0.85rem;
  color: var(--knb-magenta);
  opacity: 0;
  transition: opacity 0.2s;
}

.item-save-feedback.visible {
  opacity: 1;
}

.item-detail-markdown,
.item-detail-markdown-preview {
  line-height: 1.6;
}

.item-detail-markdown h1,
.item-detail-markdown-preview h1 { font-size: 1.35rem; margin: 0.75rem 0 0.35rem; }
.item-detail-markdown h2,
.item-detail-markdown-preview h2 { font-size: 1.15rem; margin: 0.6rem 0 0.3rem; }
.item-detail-markdown p,
.item-detail-markdown-preview p { margin: 0.5rem 0; }
.item-detail-markdown ul,
.item-detail-markdown-preview ul { margin: 0.5rem 0; padding-left: 1.5rem; }
.item-detail-markdown pre,
.item-detail-markdown-preview pre { background: var(--bg); padding: 0.75rem; border-radius: 6px; overflow-x: auto; margin: 0.5rem 0; }
.item-detail-markdown code,
.item-detail-markdown-preview code { font-size: 0.9em; }
.item-detail-markdown a,
.item-detail-markdown-preview a { color: var(--knb-magenta); }

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

.item-attachment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 6px;
}

.item-attachment a {
  color: var(--knb-magenta);
  text-decoration: none;
}

.item-attachment a:hover {
  text-decoration: underline;
}

.item-attachment-preview {
  max-width: 200px;
  max-height: 150px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  margin-top: 0.25rem;
}

/* --- Status badges --- */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-concept {
  background: #fef3c7;
  color: #92400e;
}

.badge-review {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-definitief {
  background: #d1fae5;
  color: #065f46;
}

/* --- Feedback count --- */

.feedback-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Board detail toprow --- */

.board-toprow {
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-block;
  color: var(--knb-magenta);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.back-link:hover {
  text-decoration: underline;
}

.board-info h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.board-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.board-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* --- Board main layout --- */

.board-main {
  padding-top: 1rem;
}

/* Slide-gebied over volle breedte (100vw), zijbalk helemaal links */
.board-slide-area {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.editor-sidebar {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.5rem 0 0.5rem 1rem;
  margin-left: 0;
  align-items: stretch;
}

.editor-sidebar .sidebar-btn {
  white-space: nowrap;
  text-align: left;
}

/* --- Asset panel (overlay) --- */

.asset-panel {
  position: fixed;
  top: 60px;
  left: 0;
  width: 440px;
  min-width: 260px;
  max-width: 80vw;
  height: calc(100vh - 70px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 16px rgba(0,0,0,0.10);
  overflow: hidden;
}

.asset-panel-header {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.asset-panel-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 0.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.asset-panel-close:hover {
  color: var(--text);
}

.asset-panel-resize {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
  z-index: 51;
}

.asset-panel-resize:hover,
.asset-panel-resize:active {
  background: var(--knb-magenta-light);
  opacity: 0.3;
}

.asset-panel-search {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg);
}

.asset-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-content: start;
}

.asset-panel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: none;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-primary);
}

.asset-panel-item:hover {
  background: var(--bg-hover, #f1f5f9);
}

.asset-panel-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--bg);
}

.asset-panel-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  font-size: 0.7rem;
  line-height: 1.2;
}

.asset-panel-empty {
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-style: italic;
  grid-column: 1 / -1;
}

.asset-panel-dragover {
  outline: 3px dashed var(--knb-magenta);
  outline-offset: -3px;
}

/* --- Shapes panel (overlay, vergelijkbaar met asset-panel) --- */

.shapes-panel {
  position: fixed;
  top: 60px;
  left: 0;
  width: 220px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 16px rgba(0,0,0,0.10);
  border-radius: 0 0 var(--radius) 0;
}

.shapes-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.shapes-panel-title {
  font-weight: 600;
  font-size: 0.85rem;
}

.shapes-panel-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
}

/* --- Slide viewer --- */

.slide-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.slide-viewer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.slide-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
  position: relative;
  height: calc(100vh - 260px);
  min-height: 300px;
  flex: 1;
  min-width: 0;
  width: 100%;
  cursor: grab;
}

.slide-viewport:active {
  cursor: grabbing;
}

.zoom-transform-layer {
  transform-origin: 0 0;
  will-change: transform;
}

.slide-canvas {
  position: relative;
  background: white;
}

.slide-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 32px;
}

.slide-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text);
}

.slide-nav:hover {
  background: var(--knb-magenta);
  color: white;
  border-color: var(--knb-magenta);
}

.slide-nav-add {
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
}

/* --- Thumbnails --- */

.thumbnails-strip {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}

.export-pdf-wrap {
  text-align: center;
  margin-bottom: 0.75rem;
}

.thumb {
  flex-shrink: 0;
  width: 80px;
  height: 45px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
}

.thumb-num {
  pointer-events: none;
}

.thumb-menu-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-menu-btn:hover {
  background: var(--border);
  color: var(--text);
}

.thumb-menu-dropdown {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.25rem;
  min-width: 140px;
}

.thumb-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text);
}

.thumb-menu-item:hover {
  background: rgba(71, 85, 105, 0.1);
  color: var(--knb-magenta);
}

.thumb-menu-delete:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.thumb:hover {
  border-color: var(--knb-magenta-light);
}

.thumb-active {
  border-color: var(--knb-magenta);
  background: rgba(71, 85, 105, 0.08);
  color: var(--knb-magenta);
}

.thumb-add {
  border-style: dashed;
  font-size: 1.2rem;
  color: var(--knb-magenta);
}

.thumb-add:hover {
  background: rgba(71, 85, 105, 0.08);
}

.thumb[draggable="true"] {
  cursor: grab;
}

.thumb[draggable="true"]:active {
  cursor: grabbing;
}

.thumb-dragging {
  opacity: 0.6;
}

.thumb-drag-over {
  border-color: var(--knb-magenta);
  background: rgba(71, 85, 105, 0.12);
  box-shadow: 0 0 0 2px var(--knb-magenta-light);
}

/* --- Playback controls --- */

.playback-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.playback-buttons {
  display: flex;
  gap: 0.25rem;
}

.pb-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s;
  color: var(--text);
}

.pb-btn:hover {
  border-color: var(--knb-magenta);
  color: var(--knb-magenta);
}

.pb-btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  background: var(--knb-magenta);
  color: white;
  border-color: var(--knb-magenta);
}

.pb-btn-play:hover {
  background: var(--knb-magenta-dark);
}

.pb-btn-add {
  font-weight: 700;
  font-size: 1.1rem;
}

.playback-speed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.playback-speed input[type="range"] {
  width: 120px;
  accent-color: var(--knb-magenta);
}

.playback-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.slide-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* --- Format toolbar (rich text) --- */

.format-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 99;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.ft-select {
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg-card);
  cursor: pointer;
}

.ft-select:focus {
  outline: none;
  border-color: var(--knb-magenta);
}

.ft-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.15s;
}

.ft-btn:hover {
  border-color: var(--knb-magenta-light);
  background: var(--bg);
}

.ft-btn.ft-active {
  background: var(--knb-magenta);
  color: white;
  border-color: var(--knb-magenta);
}

/* --- Editor toolbar --- */

.editor-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* --- Slide elements --- */

.se {
  position: absolute;
  user-select: none;
}

.se-text {
  padding: 8px;
  word-break: break-word;
  position: relative;
}

.se-text-content {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1em;
}

.se-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
  z-index: 3;
}

.se-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 2px;
  width: 3px;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: var(--knb-magenta-light);
  opacity: 0;
  transition: opacity 0.15s;
}

.se-text:hover .se-resize-handle::after,
.se-resize-handle:hover::after {
  opacity: 0.7;
}

.se-corner-resize {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 3;
}

.se-corner-resize::after {
  content: '';
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--knb-magenta);
  opacity: 0;
  transition: opacity 0.15s;
}

.se-image:hover .se-corner-resize::after,
.se-file:hover .se-corner-resize::after,
.se-corner-resize:hover::after {
  opacity: 0.7;
}

.se-contenteditable {
  outline: none;
  border: 2px solid var(--knb-magenta);
  border-radius: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.95);
  min-height: 1.2em;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
}

.se-image {
  overflow: hidden;
}

.se-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.se-draggable {
  cursor: move;
}

.se-draggable:hover {
  outline: 2px dashed var(--knb-magenta-light);
  outline-offset: 2px;
}

.se-selected {
  outline: 2px solid var(--knb-magenta) !important;
  outline-offset: 2px;
}

.se-inline-edit {
  width: 100%;
  min-height: 60px;
  border: 2px solid var(--knb-magenta);
  border-radius: 4px;
  padding: 4px;
  font-family: inherit;
  resize: both;
  background: rgba(255, 255, 255, 0.95);
}

/* --- Feedback --- */

.feedback-section {
  margin-top: 1rem;
}

.feedback-section h2,
.feedback-section-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.feedback-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.feedback-tab {
  padding: 0.5rem 1.25rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.feedback-tab:hover {
  color: var(--knb-magenta);
}

.feedback-tab.active {
  color: var(--knb-magenta);
  border-bottom-color: var(--knb-magenta);
}

.feedback-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.feedback-form .btn {
  margin-top: 0.5rem;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feedback-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.feedback-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.feedback-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--knb-magenta);
}

.feedback-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feedback-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feedback-text {
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.feedback-slide-label {
  font-size: 0.75rem;
  background: var(--knb-magenta);
  color: white;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  font-weight: 600;
}

.feedback-edit-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.feedback-edit-textarea:focus {
  outline: none;
  border-color: var(--knb-magenta);
  box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1);
}

.feedback-edit-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* --- Modal --- */

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

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

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

/* --- Utilities --- */

.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

.empty-state p {
  margin-bottom: 1rem;
}

/* --- Responsive --- */

@media (max-width: 900px) {
  .container-wide {
    padding: 1rem;
  }

  .slide-nav {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .playback-controls,
  .topbar-playback {
    gap: 0.5rem;
  }

  .topbar-board {
    grid-template-columns: auto 1fr auto;
  }

  .topbar-right {
    gap: 0.5rem;
  }

  .topbar-right .music-controls {
    display: none;
  }

  .editor-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 5;
  }

  .board-slide-area {
    flex-direction: column;
  }

  .slide-viewport {
    height: calc(100vh - 340px);
  }

  .asset-panel {
    width: 100vw;
    max-width: 100vw;
    height: 50vh;
    top: auto;
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: 1px solid var(--border);
  }

  .thumb {
    width: 60px;
    height: 34px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 1.25rem 1rem;
  }

  .version-card {
    gap: 0.5rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .slide-viewer {
    gap: 0.25rem;
  }

  .playback-speed input[type="range"] {
    width: 80px;
  }

  .editor-toolbar,
  .editor-sidebar {
    gap: 0.35rem;
  }
}

/* --- Canvas item-detail: file element --- */

.se-file {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}

.se-file:hover {
  border-color: var(--knb-magenta-light);
}

.se-file-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.se-file-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.25rem 0.5rem;
  word-break: break-all;
  max-width: 100%;
}

/* --- Arrow layer --- */

.arrow-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.arrow-line {
  pointer-events: stroke;
  cursor: pointer;
}

.arrow-line.arrow-selected {
  stroke: var(--knb-yellow);
  stroke-width: 4;
}

.arrow-handle {
  pointer-events: all;
  cursor: grab;
  transition: opacity 0.15s;
}

.arrow-handle:hover {
  opacity: 1 !important;
}

/* --- File viewer overlay --- */

.file-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-viewer-content {
  max-width: 90vw;
  max-height: 90vh;
}

.file-viewer-pdf {
  width: 80vw;
  height: 85vh;
  border: none;
  border-radius: 8px;
}

.file-viewer-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

.file-viewer-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: none;
  font-size: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

/* --- Drie-puntjes menu (section items) --- */

.item-dots-wrap {
  position: relative;
  display: inline-flex;
}

.item-dots-btn {
  padding: 0.25rem 0.3rem;
  min-width: auto;
  line-height: 1;
}

.item-dots-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 0.25rem 0;
  min-width: 140px;
}

.item-dots-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: #c53030;
}

.item-dots-menu-item:hover {
  background: var(--bg);
}

/* Canvas context menu (rechtermuisknop) */
.canvas-context-menu {
  position: fixed;
  z-index: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 0.25rem 0;
  min-width: 180px;
}

.canvas-context-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.canvas-context-menu-item:hover {
  background: var(--bg);
}

/* Thumbnail-ster op canvas-element */
.se-thumb-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  color: var(--knb-yellow);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  z-index: 2;
  pointer-events: none;
}

.se-image .se-thumb-badge,
.se-file .se-thumb-badge {
  display: inline-flex;
}

.se-is-thumbnail {
  outline: 2px solid var(--knb-yellow);
  outline-offset: 2px;
}

/* --- Assets gallery header --- */
.assets-gallery-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.assets-gallery-header .item-detail-subtitle {
  margin-bottom: 0;
}

/* --- Lightbox overlay (assets) --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: none;
  font-size: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1101;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1101;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: white;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-caption {
  color: white;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
  max-width: 80vw;
  word-break: break-all;
}

/* --- Verhaallijn view toggle + grid --- */

.vl-view-toggle {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.vl-toggle-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.vl-toggle-btn:hover {
  background: var(--knb-magenta-light);
  color: white;
  border-color: var(--knb-magenta-light);
}

.vl-toggle-active {
  background: var(--knb-magenta);
  color: white;
  border-color: var(--knb-magenta);
}

.vl-toggle-active:hover {
  background: var(--knb-magenta);
  color: white;
  border-color: var(--knb-magenta);
}

.vl-slide-title-wrap {
  text-align: center;
  padding: 0.5rem 1rem 0.75rem;
}

.vl-slide-title-input {
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 50%;
  min-width: 260px;
  max-width: 600px;
  text-align: center;
  background: var(--bg-card);
}

.vl-slide-title-display {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
}

#vlGridView {
  max-width: 1600px;
}

.vl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 1rem 0 2rem;
}

.vl-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.vl-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.vl-card-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.vl-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.vl-card-preview {
  flex: 1;
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.vl-card-img-preview {
  margin-bottom: 0.5rem;
}

.vl-card-img-preview img {
  max-width: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
}

.vl-card-text-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.vl-card-empty {
  color: var(--text-secondary);
  font-style: italic;
}

.vl-card-add {
  border: 2px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: transparent;
}

.vl-card-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.vl-card-add-icon {
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.thumb-title {
  display: block;
  font-size: 0.6rem;
  line-height: 1.2;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60px;
}

/* --- Format toolbar: color pickers & groups --- */

.ft-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ft-color-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.15rem 0.3rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  transition: border-color 0.15s;
}

.ft-color-label:hover {
  border-color: var(--knb-magenta-light);
}

.ft-color {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  background: none;
}

.ft-color::-webkit-color-swatch-wrapper { padding: 1px; }
.ft-color::-webkit-color-swatch { border: none; border-radius: 3px; }
.ft-color::-moz-color-swatch { border: none; border-radius: 3px; }

.ft-select-narrow {
  max-width: 70px;
}

/* --- SVG Shapes --- */

.shape-el {
  pointer-events: all;
  cursor: pointer;
  transition: filter 0.1s;
}

.shape-el:hover {
  filter: brightness(0.9);
}

.shape-selected {
  filter: drop-shadow(0 0 4px var(--knb-magenta));
}

.shape-handle {
  pointer-events: all;
  cursor: pointer;
  transition: opacity 0.15s;
  opacity: 0.6;
}

.shape-handle:hover {
  opacity: 1;
}

.shape-corner {
  cursor: nwse-resize;
}

.shape-corner[data-corner="ne"],
.shape-corner[data-corner="sw"] {
  cursor: nesw-resize;
}

.shape-ep {
  cursor: move;
}

/* --- Zoom controls --- */

.zoom-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 50;
  font-size: 0.8rem;
}

.zoom-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s;
  color: var(--text);
}

.zoom-btn:hover {
  background: var(--bg);
  border-color: var(--knb-magenta-light);
}

.zoom-level {
  min-width: 40px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.slide-viewer {
  position: relative;
}

/* --- Hoofdvraag rich text editor --- */

.hoofdvraag-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.hoofdvraag-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  position: sticky;
  top: 56px;
  z-index: 10;
}

.hoofdvraag-editor {
  min-height: 60vh;
  padding: 2rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  font-size: 1rem;
  line-height: 1.7;
  outline: none;
  color: var(--text);
}

.hoofdvraag-editor:focus {
  border-color: var(--knb-magenta-light);
}

.hoofdvraag-editor img {
  max-width: 100%;
  border-radius: 6px;
  margin: 0.5rem 0;
}

.hoofdvraag-save-status {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  min-height: 1.2em;
}

/* --- Taken checklist --- */

.todo-container {
  max-width: 800px;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.todo-header {
  display: flex;
  gap: 0;
  margin-bottom: 0;
}

.todo-input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 0;
  outline: none;
}

.todo-input:focus {
  border-color: var(--knb-magenta-light);
}

.todo-add-btn {
  padding: 0.75rem 1.5rem;
  background: var(--knb-magenta);
  color: white;
  border: 1px solid var(--knb-magenta);
  border-radius: 0 var(--radius) 0 0;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.todo-add-btn:hover {
  background: var(--knb-magenta-dark);
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.todo-item {
  position: relative;
  padding: 0.85rem 2.75rem 0.85rem 2.5rem;
  background: var(--bg-card);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}

.todo-item:first-child {
  border-top: 1px solid var(--border);
}

.todo-header + .todo-list .todo-item:first-child {
  border-top: none;
}

.todo-item:nth-child(odd) {
  background: #f9fafb;
}

.todo-item:hover {
  background: #e8eaed;
}

.todo-checked {
  background: #6b7280 !important;
  color: #fff;
  text-decoration: line-through;
}

.todo-checked:hover {
  background: #5b6370 !important;
}

.todo-checked::before {
  content: '';
  position: absolute;
  border-color: #fff;
  border-style: solid;
  border-width: 0 2px 2px 0;
  top: 0.7rem;
  left: 1rem;
  transform: rotate(45deg);
  height: 14px;
  width: 7px;
}

.todo-item-text {
  word-break: break-word;
}

.todo-linked {
  font-size: 0.75rem;
  margin-left: 0.35rem;
  opacity: 0.6;
}

.todo-close {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--knb-magenta-light);
  transition: background 0.15s, color 0.15s;
}

.todo-close:hover {
  background: #ef4444;
  color: white;
}

.todo-archived-item {
  opacity: 0.6;
  cursor: default;
  text-decoration: line-through;
}

.todo-archive {
  margin-top: 1.5rem;
}

.todo-archive-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  user-select: none;
}

.todo-archive-summary:hover {
  color: var(--text);
}

.todo-list-archive .todo-close {
  color: var(--text-muted);
}

.todo-list-archive .todo-close:hover {
  background: #ef4444;
  color: white;
}
