@import url('https://fonts.bunny.net/css?family=inter:400,500,600,700|roboto:400,500,700|poppins:400,500,600,700|montserrat:400,500,600,700|playfair-display:400,700|jetbrains-mono:400,600|lato:400,700|open-sans:400,600,700|raleway:400,600,700|oswald:400,600,700|merriweather:400,700|lora:400,600,700|nunito:400,600,700|quicksand:400,600,700|rubik:400,600,700|work-sans:400,600,700|dm-sans:400,600,700|ubuntu:400,700|fira-sans:400,600,700|karla:400,600,700|cabin:400,600,700|comfortaa:400,700|pacifico:400|caveat:400,700|dancing-script:400,700|bebas-neue:400|anton:400|archivo:400,600,700|libre-baskerville:400,700|abril-fatface:400|space-grotesk:400,600,700|plus-jakarta-sans:400,600,700|manrope:400,600,700|barlow:400,600,700&display=swap');
@import url('https://fonts.bunny.net/css?family=abel:400|acme:400|alata:400|alegreya:400|alegreya-sans:400|alfa-slab-one:400|amatic-sc:400,700|amiri:400|arimo:400|arvo:400|asap:400|assistant:400|bangers:400|barlow-condensed:400|bitter:400|bodoni-moda:400|bree-serif:400|cardo:400|catamaran:400|chakra-petch:400|chivo:400|cinzel:400|cormorant:400|courier-prime:400|crimson-text:400|cutive-mono:400|dm-mono:400|domine:400|eb-garamond:400|exo:400|exo-2:400|figtree:400|fjalla-one:400|frank-ruhl-libre:400|gloria-hallelujah:400|gothic-a1:400|great-vibes:400|heebo:400|ibm-plex-mono:400|ibm-plex-sans:400|inconsolata:400|indie-flower:400|josefin-sans:400|josefin-slab:400|kanit:400|kaushan-script:400|league-spartan:400|lexend:400|libre-franklin:400|lilita-one:400|lobster:400|lobster-two:400|m-plus-rounded-1c:400|manjari:400|maven-pro:400|merienda:400|monoton:400|noto-sans:400|noto-serif:400|nunito-sans:400|orbitron:400|oxygen:400|patrick-hand:400|permanent-marker:400|philosopher:400|play:400|press-start-2p:400|pt-serif:400|rajdhani:400|red-hat-display:400|righteous:400|roboto-condensed:400|roboto-mono:400|roboto-slab:400|russo-one:400|sacramento:400|satisfy:400|shadows-into-light:400|signika:400|silkscreen:400|sora:400|source-code-pro:400|special-elite:400|spectral:400|teko:400|titillium-web:400|tinos:400|ubuntu-mono:400|unbounded:400|urbanist:400|varela-round:400|vollkorn:400|yellowtail:400|zilla-slab:400|staatliches:400|tangerine:400|tenor-sans:400|viga:400|yantramanav:400|zen-dots:400&display=swap');

:root {
  --primary: #111111;
  --primary-dark: #000000;
  --on-primary: #ffffff;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --text: #111111;
  --text-muted: #707070;
  --border: #d9d9d9;
  --silver: #c0c0c0;
  --error: #c0392b;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.02em;
  font-weight: 700;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.85rem;
}

/* Navbar */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-brand .logo {
  height: 72px;
  width: auto;
  display: block;
}

.navbar-brand .logo-dark {
  display: none;
}

[data-theme="dark"] .navbar-brand .logo-light {
  display: none;
}

[data-theme="dark"] .navbar-brand .logo-dark {
  display: block;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: var(--text);
}

.nav-user {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #ececec 100%);
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 40px;
  padding-bottom: 60px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* Forms */
.auth-container {
  max-width: 560px;
  padding-top: 40px;
  padding-bottom: 60px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.form input {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

.form input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.form-section-title {
  font-size: 1.1rem;
  margin: 0;
}

.auth-alt {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.alert-error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid var(--error);
  color: var(--error);
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

/* Cards & grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--text);
  display: block;
}

.card:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.card-muted {
  opacity: 0.7;
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 2px;
  background: #e8e8e8;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.plan-featured {
  border-color: var(--primary);
}

.plan-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0;
}

.plan-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan ul {
  padding-left: 20px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .features,
  .grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .navbar-inner {
    flex-direction: column;
    min-height: auto;
    padding: 12px 0;
    gap: 8px;
  }

  .navbar-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Chat */
.chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 70vh;
}

.chat-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.chat-sidebar h2 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.contact-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  margin-bottom: 4px;
}

.contact-item:hover {
  background: #ececec;
  text-decoration: none;
}

.contact-item.active {
  background: #e0e0e0;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.chat-header #chat-with {
  flex: 1;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: var(--radius);
  word-wrap: break-word;
}

.msg-mine {
  align-self: flex-end;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-right-radius: 0;
}

.msg-theirs {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.chat-input input {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Panels / vrienden */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
}

.panel h2 {
  font-size: 1.1rem;
  margin: 0 0 16px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.search-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.user-row:last-child {
  border-bottom: none;
}

.user-row small {
  display: block;
}

.row-actions {
  display: flex;
  gap: 8px;
}

/* Call panel (klein, zwevend) */
.hidden {
  display: none !important;
}

.call-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.call-panel.is-audio {
  width: 260px;
}

.call-panel.is-audio #call-videos {
  display: none;
}

.call-panel.is-audio #btn-cam {
  display: none;
}

.call-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.call-panel-header #call-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-panel-header #call-timer {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

#call-videos {
  position: relative;
  height: 190px;
  background: #000;
}

#remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#local-video {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 34%;
  max-height: 60px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.call-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

.call-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.call-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.call-btn.off {
  background: #fbeae9;
  color: var(--error);
  border-color: var(--error);
}

.call-btn.off::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  height: 2px;
  background: var(--error);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.call-btn-danger {
  background: var(--error);
  color: var(--on-primary);
  border-color: var(--error);
}

.call-btn-danger:hover {
  background: #e05555;
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .chat-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .call-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }
}

/* Studio diepte */
.card,
.panel,
.feature-card,
.plan {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Animaties */
a,
.btn,
.card,
.panel,
.plan,
.feature-card,
.contact-item,
.nav-link,
.form input,
.chat-input input,
.search-form input {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.card:hover,
.feature-card:hover,
.plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1,
.hero-sub,
.hero-actions {
  animation: fadeUp 0.6s ease both;
}

.hero-sub {
  animation-delay: 0.12s;
}

.hero-actions {
  animation-delay: 0.24s;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg {
  animation: msgIn 0.18s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feature-card,
.card,
.plan,
.panel {
  animation: fadeIn 0.3s ease both;
}

/* Incoming call overlay */
.incoming-call {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background: rgba(17, 17, 17, 0.28);
}

.incoming-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  min-width: 260px;
  animation: msgIn 0.2s ease;
}

.incoming-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.incoming-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 6px 0 2px;
}

.incoming-type {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.incoming-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.call-btn-accept {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.call-btn-accept:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Playground */
.playground {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  min-height: 480px;
  max-width: none;
  margin: 0;
  padding: 0;
}

.playground-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.playground-header h1 {
  font-size: 1.15rem;
  margin: 0;
}

.pg-back {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

.pg-back:hover {
  color: var(--primary);
  text-decoration: none;
}

.pg-clear {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--error);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pg-clear:hover {
  background: rgba(192, 57, 43, 0.08);
  border-color: var(--error);
}

.playground-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.tool-rail {
  width: 76px;
  flex: 0 0 auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  overflow-y: auto;
}

.tool-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #e6e6e6;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.tool-btn-board {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.tool-btn-board:hover {
  background: var(--primary-dark);
}

.tool-icon {
  line-height: 1;
}

.grid-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #fff;
  background-image: radial-gradient(circle, #d9d9d9 1px, transparent 1px);
  background-size: 24px 24px;
  cursor: grab;
  user-select: none;
}

.grid-viewport.grabbing {
  cursor: grabbing;
}

.grid-world {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  transform-origin: 0 0;
}

.board-tile {
  position: absolute;
  width: 110px;
  height: 110px;
  min-width: 110px;
  min-height: 110px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--text);
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.board-tile:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.board-tile-name {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  font-weight: 600;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 4px;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.board-tile:hover .board-tile-name,
.board-tile:focus-within .board-tile-name {
  opacity: 1;
}

.board-icon {
  font-size: 2rem;
  line-height: 1;
}

.board-tile-icon-btn {
  position: absolute;
  top: 6px;
  right: 32px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.board-tile:hover .board-tile-icon-btn {
  opacity: 1;
  pointer-events: auto;
}

.board-tile-icon-btn:hover {
  color: var(--primary);
}

.board-image {
  display: block;
  max-width: 100%;
  max-height: 84px;
  border-radius: 6px;
  object-fit: contain;
}

.board-desc {
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text);
  text-align: left;
  word-break: break-word;
}

.board-link {
  display: block;
  font-size: 0.6rem;
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
  margin-top: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Bord logo editor popup */
.board-logo-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  background: rgba(17, 17, 17, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-logo-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  width: 380px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.board-logo-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.board-logo-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-bottom: 10px;
  max-height: 260px;
  overflow-y: auto;
}

.board-logo-symbol {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.board-logo-symbol:hover {
  border-color: var(--primary);
}

.board-logo-symbol.selected {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.board-logo-upload-row {
  margin-bottom: 8px;
}

.board-logo-upload {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.board-logo-upload:hover {
  border-color: var(--primary);
}

.board-logo-status {
  font-size: 0.8rem;
  color: var(--primary);
  min-height: 18px;
  margin-bottom: 8px;
}

.board-logo-desc {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.board-logo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.board-logo-actions button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.board-logo-actions button.primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.board-tile-rename {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.board-tile:hover .board-tile-rename {
  opacity: 1;
  pointer-events: auto;
}

.board-tile-rename:hover {
  color: var(--primary);
}

.board-tile-input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  background: #fff;
  color: var(--text);
}

/* Modules */
.module-item {
  position: absolute;
  min-width: 140px;
  min-height: 60px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: grab;
  user-select: none;
}

.module-content {
  padding: 10px 12px;
  min-height: 60px;
  height: 100%;
  outline: none;
  cursor: text;
  user-select: text;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  background: transparent;
}

/* Tekst-module: vrij zwevende tekst met transparante achtergrond */
.module-item.module-text {
  min-width: 100px;
  min-height: 30px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  box-shadow: none;
}

.module-item.module-text:hover,
.module-item.module-text:focus-within {
  border-color: var(--border);
}

.module-text .module-content {
  padding: 6px 8px;
  min-height: 24px;
}

/* Notitie-module: sticky note */
.module-item.module-note {
  min-width: 170px;
  min-height: 150px;
  background: #fff9c4;
  border: 1px solid #eee28f;
  border-radius: 3px 3px 12px 3px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
}

.module-note .module-content {
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(1.6em - 1px),
    rgba(150, 130, 60, 0.28) calc(1.6em - 1px),
    rgba(150, 130, 60, 0.28) 1.6em
  );
  background-origin: content-box;
  background-clip: content-box;
  line-height: 1.6;
}

[data-theme="dark"] .module-note .module-content {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(1.6em - 1px),
    rgba(255, 240, 180, 0.16) calc(1.6em - 1px),
    rgba(255, 240, 180, 0.16) 1.6em
  );
}

/* Kolom (container) */
.module-colum {
  min-width: 220px;
  min-height: 180px;
  background: #fafafa;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.colum-title {
  padding: 8px 34px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  cursor: text;
  user-select: text;
  background: var(--surface);
  border-radius: 6px 6px 0 0;
}

.colum-title-input {
  width: 100%;
  font: inherit;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 2px 4px;
}

.colum-body {
  position: relative;
  flex: 1;
  min-height: 120px;
  overflow: visible;
}

/* To Do */
.module-todo {
  min-width: 200px;
  min-height: 120px;
  background: #fffbe6;
  border: 1px solid #e6d97e;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.todo-head {
  padding: 8px 30px 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.todo-title {
  font-weight: 700;
  font-size: 0.9rem;
  outline: none;
  cursor: text;
  white-space: pre-wrap;
  word-break: break-word;
}

.todo-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 8px;
}

.todo-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.todo-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--on-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.todo-item.done .todo-check {
  background: var(--primary);
  border-color: var(--primary);
}

.todo-text {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.todo-item.done .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-del {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.todo-item:hover .todo-del {
  opacity: 1;
}

.todo-del:hover {
  color: var(--error);
}

.todo-add {
  padding: 6px 8px 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.todo-add-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}

.todo-add-input:focus {
  border-color: var(--primary);
}

[data-theme="dark"] .todo-head,
[data-theme="dark"] .todo-add {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .todo-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Tabel (spreadsheet) */
.module-table {
  min-width: 240px;
  min-height: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  display: flex;
  flex-direction: column;
}

.table-controls {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.table-btn {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 6px;
  color: var(--text);
}

.table-btn:hover {
  border-color: var(--primary);
}

.table-wrap {
  flex: 1;
  overflow: auto;
}

.table-grid {
  border-collapse: collapse;
  width: 100%;
  height: 100%;
}

.table-grid td {
  border: 1px solid var(--border);
  padding: 5px 8px;
  min-width: 64px;
  min-height: 28px;
  background: #fff;
  outline: none;
  user-select: text;
  cursor: text;
  font-size: 0.85rem;
  word-break: break-word;
}

.table-grid td:focus {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* Agenda (kalender) */
.module-agenda {
  min-width: 340px;
  min-height: 280px;
  background: #eef7ff;
  border: 1px solid #bcd9f0;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.agenda-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.agenda-nav {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
  padding: 2px 8px;
  border-radius: 4px;
}

.agenda-nav:hover {
  background: rgba(0, 0, 0, 0.06);
}

.agenda-title {
  font-weight: 700;
  font-size: 0.85rem;
}

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 6px;
  flex: 1;
}

.agenda-dow {
  font-size: 0.65rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
  padding: 2px 0;
}

.agenda-day {
  position: relative;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 3px;
  cursor: pointer;
  background: #fff;
  overflow: hidden;
}

.agenda-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.agenda-day:hover {
  border-color: var(--primary);
}

.agenda-day-num {
  font-size: 0.7rem;
  font-weight: 600;
}

.agenda-entry {
  font-size: 0.6rem;
  background: #e8f0fe;
  border-radius: 3px;
  padding: 1px 3px;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-day-add {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.agenda-day:hover .agenda-day-add {
  opacity: 1;
  pointer-events: auto;
}

.agenda-view-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.agenda-view-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 8px 0;
}

.agenda-view-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
  background: #fafafa;
}

.agenda-view-time {
  font-weight: 700;
  font-size: 0.8rem;
}

.agenda-view-desc {
  font-size: 0.9rem;
  margin: 2px 0;
}

.agenda-view-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* Agenda formulier popup */
.agenda-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  background: rgba(17, 17, 17, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.agenda-form-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  width: 300px;
  max-width: 92vw;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.agenda-form-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.agenda-form-field {
  margin-bottom: 6px;
}

.agenda-form-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.agenda-form-input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}

.agenda-form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.agenda-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.agenda-form-actions button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.agenda-form-actions button.primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

/* Comment (wolkje) */
.module-comment {
  min-width: 140px;
  min-height: 50px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.module-shape {
  width: 140px;
  height: 100px;
  background: transparent;
  border: 2px solid var(--primary);
  box-shadow: none;
}

.module-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 14px;
  text-align: center;
}

.module-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.module-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Formatteer-toolbar (verschijnt onder de module, overlapt niet) */
.module-toolbar {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  z-index: 20;
  white-space: nowrap;
}

.module-item:hover .module-toolbar,
.module-item.toolbar-open .module-toolbar,
.module-item:focus-within .module-toolbar {
  display: flex;
  animation: msgIn 0.15s ease;
}

.module-toolbar select {
  font-size: 0.72rem;
  padding: 3px 4px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  max-width: 128px;
  cursor: pointer;
}

.module-toolbar select.tool-size {
  max-width: 60px;
}

.module-toolbar input[type="color"] {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.tool-bg-clear {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-bg-clear.active {
  background: var(--primary);
  color: var(--on-primary);
}

/* Zoekbare font-kiezer */
.font-picker {
  position: relative;
}

.font-picker-trigger {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.72rem;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.font-picker-list {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  min-width: 200px;
  display: none;
  z-index: 30;
  overflow: hidden;
}

.font-picker.open .font-picker-list {
  display: block;
}

.font-picker-input {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  box-sizing: border-box;
  background: #fff;
}

.font-picker-items {
  max-height: 200px;
  overflow-y: auto;
}

.font-picker-item {
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

.font-picker-item:hover {
  background: #f0f0f0;
}

/* Drag-handle (makkelijker verslepen) */
.module-drag {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px;
  color: var(--text-muted);
  cursor: grab;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 3;
}

.module-item:hover .module-drag {
  opacity: 1;
  pointer-events: auto;
}

.module-drag:active {
  cursor: grabbing;
}

/* Resize-handle (groter & soepeler) */
.module-resize {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 50%;
  cursor: nwse-resize;
  z-index: 3;
}

.board-tile-delete,
.module-delete {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.module-delete {
  left: auto;
  right: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px;
}

.board-tile:hover .board-tile-delete,
.module-item:hover .module-delete {
  opacity: 1;
  pointer-events: auto;
}

.board-tile-delete:hover,
.module-delete:hover {
  color: var(--error);
}

.form input:focus,
.modal-inner input:focus,
.chat-input input:focus,
.search-form input:focus {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  background: rgba(17, 17, 17, 0.28);
}

.modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  min-width: 280px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  animation: msgIn 0.18s ease;
}

.modal-inner h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.modal-inner input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 14px;
}

.modal-inner input:focus {
  outline: none;
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Workspace knop & popup */
.workspace-btn {
  position: fixed;
  left: 28px;
  top: calc(50% - 42px);
  transform: translateY(-50%);
  z-index: 1000;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #e6e6e6;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.workspace-btn:hover {
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.workspace-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.workspace-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.ws-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
}

.ws-popup[hidden] {
  display: none;
}

.ws-popup-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 17, 17, 0.28);
}

.ws-popup-panel {
  position: relative;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  padding: 16px;
}

.ws-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ws-popup-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.ws-popup-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}

.ws-popup-close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.ws-popup.ws-open .ws-popup-backdrop {
  animation: fadeIn 0.2s ease both;
}

.ws-popup.ws-open .ws-popup-panel {
  animation: wsIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ws-popup.ws-close .ws-popup-backdrop {
  animation: fadeOut 0.2s ease both;
}

.ws-popup.ws-close .ws-popup-panel {
  animation: wsOut 0.2s ease both;
}

@keyframes wsIn {
  from {
    opacity: 0;
    transform: translateX(28px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes wsOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(28px) scale(0.94);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Vet-knop in tekst-toolbar */
.tool-bold {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-bold.active {
  background: var(--primary);
  color: var(--on-primary);
}

/* Media-modules (afbeelding / video / audio) */
.module-media {
  padding: 4px;
}

.module-media .media-body img,
.module-media .media-body video {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
}

.module-media .media-body audio {
  display: block;
  width: 100%;
  min-width: 200px;
}

.file-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
}

.file-link:hover {
  color: var(--primary);
}

.file-name {
  font-size: 0.85rem;
}

/* Link / verbindingen */
.link-layer {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.grid-viewport.linking {
  cursor: crosshair;
}

.module-item.link-source {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tool-btn.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

/* Modules-knop & popup */
.modules-btn {
  position: fixed;
  left: 28px;
  top: calc(50% + 42px);
  transform: translateY(-50%);
  z-index: 1000;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #e6e6e6;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modules-btn:hover {
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.modules-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.modules-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.mod-popup {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1002;
}

.mod-popup[hidden] {
  display: none;
}

.mod-popup-panel {
  position: relative;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(240, 240, 240, 0.35) 45%, rgba(224, 224, 224, 0.45));
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 12px 14px;
  width: auto;
  max-width: 94vw;
}

.mod-popup-panel::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 6px;
  right: 6px;
  height: 45%;
  border-radius: 20px 20px 50% 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.mod-popup-head {
  position: absolute;
  top: -12px;
  right: -10px;
  margin: 0;
  z-index: 2;
}

.mod-popup-head h3 {
  display: none;
}

.mod-popup-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: color 0.15s ease, background 0.15s ease;
}

.mod-popup-close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.mod-popup-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: min(92vw, 900px);
}

.mod-popup-grid .tool-btn {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  flex-direction: column;
  gap: 4px;
  font-size: 1rem;
}

.mod-popup-grid .tool-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.mod-popup-grid .tool-name {
  font-size: 0.65rem;
  line-height: 1;
}

.mod-popup.mod-open .mod-popup-panel {
  animation: modIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modIn {
  from {
    opacity: 0;
    transform: translateY(80px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.module-replace {
  position: absolute;
  top: 2px;
  right: 28px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 3;
}

.module-item:hover .module-replace {
  opacity: 1;
  pointer-events: auto;
}

.module-replace:hover {
  color: var(--primary);
}

/* Sketch-module */
.module-sketch {
  min-width: 220px;
  min-height: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px;
}

.module-sketch .sketch-preview {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  cursor: pointer;
}

/* Sketch-editor popup */
.sketch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(17, 17, 17, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sketch-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 14px;
  max-width: 940px;
  width: 100%;
}

.sketch-head h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.sketch-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.sketch-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sketch-btn:hover {
  border-color: var(--primary);
}

.sketch-btn.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.sketch-btn.primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  font-weight: 600;
}

.sketch-btn.primary:hover {
  background: var(--primary-dark);
}

.sketch-btn.outline {
  background: transparent;
  border: 1px solid var(--border);
}

.sketch-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 2px;
}

.sketch-color {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.sketch-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}

@media (max-width: 720px) {
  .playground {
    flex-direction: column;
    height: auto;
  }

  .playground-body {
    flex-direction: column;
  }

  .tool-rail {
    width: auto;
    flex-direction: row;
    justify-content: flex-start;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px;
  }

  .grid-viewport {
    height: 60vh;
  }

  .workspace-btn {
    left: 16px;
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .workspace-btn:hover {
    transform: scale(1.06);
  }

  .modules-btn {
    left: 16px;
    top: auto;
    bottom: 96px;
    transform: none;
  }

  .modules-btn:hover {
    transform: scale(1.06);
  }

  .ws-popup {
    justify-content: center;
    padding: 16px;
  }

  .ws-popup-panel {
    width: 100%;
    max-width: 320px;
  }
}

/* =====================================================
   Donkere modus
   ===================================================== */
[data-theme="dark"] {
  --primary: #e8e8e8;
  --primary-dark: #c8c8c8;
  --on-primary: #111111;
  --bg: #121212;
  --surface: #1c1c1e;
  --text: #ececec;
  --text-muted: #9e9e9e;
  --border: #333333;
  --silver: #555555;
  --error: #e0533f;
}

body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] .navbar {
  background: var(--surface);
}

[data-theme="dark"] .navbar-brand span {
  color: var(--text-muted);
}

/* Witte kaarten / panelen */
[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .plan,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .modal-inner,
[data-theme="dark"] .incoming-inner {
  background: #1e1e1e;
}

/* Formulieren */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #1e1e1e;
  color: var(--text);
  border-color: var(--border);
}

/* Chat */
[data-theme="dark"] .msg {
  background: #26262a;
}
[data-theme="dark"] .msg-mine {
  background: var(--primary);
  color: var(--on-primary);
}

/* Playground grid */
[data-theme="dark"] .grid-viewport {
  background-color: #121212;
  background-image: radial-gradient(circle, #2a2a2a 1px, transparent 1px);
}

/* Borden & modules */
[data-theme="dark"] .board-tile,
[data-theme="dark"] .module-item,
[data-theme="dark"] .module-comment,
[data-theme="dark"] .module-table {
  background: #1e1e1e;
}

[data-theme="dark"] .board-desc {
  background: #26262a;
}

[data-theme="dark"] .module-note {
  background: #3a3420;
  border-color: #5a5220;
}

[data-theme="dark"] .module-todo {
  background: #33301a;
  border-color: #5a5220;
}

[data-theme="dark"] .module-agenda {
  background: #16212e;
  border-color: #2a3a4a;
}

[data-theme="dark"] .module-colum {
  background: #1a1a1a;
}

[data-theme="dark"] .colum-title {
  background: #242426;
}

[data-theme="dark"] .table-grid td {
  background: #1e1e1e;
}

[data-theme="dark"] .agenda-day {
  background: #1e1e1e;
}
[data-theme="dark"] .agenda-entry {
  background: #2a3a50;
}
[data-theme="dark"] .agenda-view-item {
  background: #26262a;
}

/* Toolbar & knoppen */
[data-theme="dark"] .module-toolbar,
[data-theme="dark"] .font-picker-trigger,
[data-theme="dark"] .font-picker-list,
[data-theme="dark"] .tool-bold,
[data-theme="dark"] .tool-bg-clear,
[data-theme="dark"] .sketch-btn,
[data-theme="dark"] .table-btn,
[data-theme="dark"] .agenda-form-actions button,
[data-theme="dark"] .board-logo-actions button,
[data-theme="dark"] .board-logo-symbol,
[data-theme="dark"] .board-logo-upload {
  background: #2a2a2c;
  color: var(--text);
}

[data-theme="dark"] .font-picker-item:hover {
  background: #3a3a3c;
}

[data-theme="dark"] .sketch-btn.outline {
  background: transparent;
}

[data-theme="dark"] .tool-btn {
  background: #2a2a2c;
  color: var(--text);
}

[data-theme="dark"] .workspace-btn,
[data-theme="dark"] .modules-btn {
  background: #3a3a3c;
  color: var(--text);
}

[data-theme="dark"] .mod-popup-panel {
  background: linear-gradient(to bottom, rgba(62, 62, 66, 0.55), rgba(30, 30, 34, 0.45) 45%, rgba(18, 18, 20, 0.55));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .mod-popup-panel::before {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

/* Popups */
[data-theme="dark"] .ws-popup-panel,
[data-theme="dark"] .mod-popup-panel,
[data-theme="dark"] .sketch-panel,
[data-theme="dark"] .agenda-form-panel,
[data-theme="dark"] .board-logo-panel {
  background: #1e1e1e;
}

[data-theme="dark"] .sketch-canvas {
  background: #1e1e1e;
}

/* Handles (drag / resize / delete) */
[data-theme="dark"] .module-drag,
[data-theme="dark"] .module-delete,
[data-theme="dark"] .module-replace,
[data-theme="dark"] .module-resize {
  background: #2a2a2c;
}

/* Theme toggle knop */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: var(--surface);
  transform: scale(1.08);
}

/* =====================================================
   Liquid Glass — Apple premium (Playground)
   Licht = helder glas · Donker = donker glas
   ===================================================== */
:root {
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-bg-2: rgba(255, 255, 255, 0.16);
  --glass-strong: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-shadow: rgba(31, 38, 45, 0.16);
  --glass-blur: blur(16px) saturate(160%);
}

[data-theme="dark"] {
  --glass-bg: rgba(66, 66, 74, 0.4);
  --glass-bg-2: rgba(20, 20, 24, 0.5);
  --glass-strong: rgba(40, 40, 46, 0.68);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.14);
  --glass-shadow: rgba(0, 0, 0, 0.55);
  --glass-blur: blur(16px) saturate(140%);
}

/* Scherp & vloeiend (full HD) */
.playground,
.grid-world,
.grid-viewport {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* —— Canvas —— */
.grid-viewport {
  background-color: #ffffff;
  background-image: radial-gradient(circle, #d9d9d9 1px, transparent 1px);
  background-size: 24px 24px;
}

[data-theme="dark"] .grid-viewport {
  background-color: #121212;
  background-image: radial-gradient(circle, #2a2a2a 1px, transparent 1px);
  background-size: 24px 24px;
}

/* —— Header —— */
.playground-header {
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}

/* —— Bord-tegel —— */
.board-tile {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 28px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

/* —— Modules (generiek glas) —— */
.module-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 28px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

/* —— Vrij zwevende tekst blijft transparant (geen blur) —— */
.module-item.module-text {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* —— Gekleurde glas-types —— */
.module-item.module-note {
  background: #fff9c4;
  border: 1px solid #eee28f;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.module-item.module-todo {
  background: #fffbe6;
  border: 1px solid #e6d97e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.module-item.module-agenda {
  background: #eef7ff;
  border: 1px solid #bcd9f0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.module-item.module-table {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 34px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

.module-item.module-colum {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 38px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

.module-item.module-comment {
  background: #ffffff;
  border: 1px solid var(--border);
}

.colum-title {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.agenda-head {
  background: var(--surface);
}

.table-grid td {
  background: #ffffff;
}

.agenda-day {
  background: #ffffff;
}

.agenda-entry {
  background: #e8f0fe;
}

.agenda-view-item {
  background: #fafafa;
}

/* —— Glossy knoppen —— */
.tool-btn,
.workspace-btn,
.modules-btn {
  background: linear-gradient(to bottom, #ffffff, #e3e7ee);
  border: 1px solid var(--glass-border);
  color: var(--text);
  box-shadow: 0 6px 18px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* —— Popups —— */
.ws-popup-panel,
.sketch-panel,
.agenda-form-panel,
.board-logo-panel {
  background: linear-gradient(150deg, var(--glass-strong), var(--glass-bg-2));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 20px 50px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

/* —— Toolbar & lettertype-kiezer —— */
.module-toolbar {
  background: linear-gradient(to bottom, #ffffff, #eceef3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.font-picker-trigger,
.font-picker-list {
  background: linear-gradient(to bottom, #ffffff, #e9ecf1);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* —— Handles —— */
.module-drag,
.module-delete,
.module-replace {
  background: linear-gradient(to bottom, #ffffff, #e8ebf0);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 6px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ============ DONKER GLAS ============ */
[data-theme="dark"] .board-tile,
[data-theme="dark"] .module-item {
  background: #1e1e1e;
  border-color: var(--border);
  box-shadow: 0 10px 28px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

[data-theme="dark"] .module-item.module-note {
  background: #3a3420;
  border-color: #5a5220;
}

[data-theme="dark"] .module-item.module-todo {
  background: #33301a;
  border-color: #5a5220;
}

[data-theme="dark"] .module-item.module-agenda {
  background: #16212e;
  border-color: #2a3a4a;
}

[data-theme="dark"] .module-item.module-table,
[data-theme="dark"] .module-item.module-comment {
  background: #1e1e1e;
  border-color: var(--border);
  box-shadow: 0 12px 34px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

[data-theme="dark"] .module-item.module-colum {
  background: #1a1a1a;
  border-color: var(--border);
  box-shadow: 0 12px 34px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

[data-theme="dark"] .colum-title {
  background: #242426;
  border-bottom-color: var(--border);
}

[data-theme="dark"] .table-grid td {
  background: #1e1e1e;
}

[data-theme="dark"] .agenda-day {
  background: #1e1e1e;
}

[data-theme="dark"] .agenda-entry {
  background: #2a3a50;
}

[data-theme="dark"] .agenda-view-item {
  background: #26262a;
}

[data-theme="dark"] .tool-btn,
[data-theme="dark"] .workspace-btn,
[data-theme="dark"] .modules-btn {
  background: linear-gradient(to bottom, #4a4a52, #2e2e35);
  border-color: var(--glass-border);
  color: var(--text);
  box-shadow: 0 6px 18px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .ws-popup-panel,
[data-theme="dark"] .sketch-panel,
[data-theme="dark"] .agenda-form-panel,
[data-theme="dark"] .board-logo-panel {
  background: linear-gradient(150deg, var(--glass-strong), var(--glass-bg-2));
  border-color: var(--glass-border);
}

[data-theme="dark"] .module-toolbar,
[data-theme="dark"] .font-picker-trigger,
[data-theme="dark"] .font-picker-list {
  background: linear-gradient(to bottom, #3c3c44, #27272e);
  border-color: var(--glass-border);
  box-shadow: 0 8px 24px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .module-drag,
[data-theme="dark"] .module-delete,
[data-theme="dark"] .module-replace {
  background: linear-gradient(to bottom, #3c3c44, #2b2b32);
  border-color: var(--glass-border);
  box-shadow: 0 2px 6px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* =====================================================
   Apple Navbar — glossy liquid glass
   ===================================================== */
.navbar {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.09);
}

[data-theme="dark"] .navbar {
  background: linear-gradient(to bottom, rgba(42, 42, 48, 0.9), rgba(24, 24, 30, 0.72));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.55);
}

/* Nav-links als ronde Apple-pills */
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link::after {
  display: none;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: rgba(0, 0, 0, 0.09);
  color: var(--text);
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] .nav-link.active {
  background: rgba(255, 255, 255, 0.16);
}

/* Gebruikersnaam */
.nav-user {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 2px;
}

/* Theme-toggle glossy */
.theme-toggle {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(226, 230, 236, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .theme-toggle {
  background: linear-gradient(to bottom, #4a4a52, #2e2e35);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Knoppen (inloggen / registreren / uitloggen) glossy pill */
.navbar .btn {
  border-radius: 999px;
  font-weight: 600;
}

.navbar .btn-outline {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(232, 235, 240, 0.8));
  border-color: var(--border);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .navbar .btn-outline {
  background: linear-gradient(to bottom, #3c3c44, #2b2b32);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.navbar .btn-primary {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* =====================================================
   Bevestigings-popup (eigen stijl i.p.v. browser confirm)
   ===================================================== */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4000;
  background: rgba(17, 17, 17, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.confirm-box {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 250, 0.9));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  animation: msgIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.confirm-text {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.confirm-btn:hover {
  transform: translateY(-1px);
}

.confirm-cancel {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(230, 233, 238, 0.92));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.confirm-ok {
  background: linear-gradient(to bottom, #e0533f, #c0392b);
  border-color: #c0392b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .confirm-box {
  background: linear-gradient(150deg, rgba(44, 44, 50, 0.96), rgba(28, 28, 34, 0.92));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .confirm-cancel {
  background: linear-gradient(to bottom, #3c3c44, #2b2b32);
  border-color: var(--border);
  color: var(--text);
}

/* =====================================================
   Navbar-menu (Apple dropdown: Dashboard / Vrienden / Chat)
   ===================================================== */
.nav-menu {
  position: relative;
}

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.nav-menu-btn:hover,
.nav-menu-btn[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .nav-menu-btn:hover,
[data-theme="dark"] .nav-menu-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.09);
}

.nav-menu-dots {
  font-size: 1.15rem;
  line-height: 1;
}

.nav-menu-popup {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  min-width: 220px;
  padding: 6px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 250, 0.92));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .nav-menu-popup {
  background: linear-gradient(150deg, rgba(44, 44, 50, 0.96), rgba(28, 28, 34, 0.94));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav-menu-popup:not([hidden]) {
  animation: menuPop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes menuPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.12s ease;
}

.nav-menu-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .nav-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-menu-ico {
  font-size: 1.15rem;
  line-height: 1;
}

.nav-menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.nav-menu-user-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(to bottom, #333333, #000000);
  color: #ffffff;
  font-size: 0.95rem;
}

[data-theme="dark"] .nav-menu-user-avatar {
  background: linear-gradient(to bottom, #e8e8e8, #cfcfcf);
  color: #111111;
}

.nav-menu-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .nav-menu-sep {
  background: rgba(255, 255, 255, 0.1);
}

