/* Rustig, vlak donker thema: één blurple-accent voor acties/links, één gedempte goudtint puur
   voor "premium"-elementen (badge, knop, sidebar-link) — geen verlopen, geen glow, geen
   hover-animaties. Koppen zijn neutraal (var(--text)) i.p.v. gekleurd, zodat kleur op de pagina
   altijd iets betekent (klikbaar, actief, premium) in plaats van overal decoratief te zijn.
   Variabelenamen zijn historisch en bewust ongewijzigd gelaten om niet elk bestand dat ze
   gebruikt te hoeven aanraken. */
:root {
  --bg: #040a22;
  --bg-alt: #071033;
  --card: #0a1640;
  --card-hover: #0f1e54;
  --card-border: #1c2c63;
  --line-strong: #2b3f85;
  --purple: #1f5bff; /* historische naam: de actiekleur (koningsblauw) */
  --purple-light: #8ec5ff; /* links en accenten op donker */
  --blue-deep: #0a24c9;
  --gold: #f0b23e; /* alleen nog voor Premium */
  --gold-light: #e6eeff; /* historische naam: lichte koptint */
  --text: #f1f5ff;
  --text-dim: #b7c1de;
  --text-faint: #8a95ba;
  --success: #22b573;
  --danger: #f0454a;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 2px 4px rgba(2, 7, 25, 0.3), 0 22px 44px -24px rgba(2, 7, 25, 0.85);
  --shadow-btn: 0 10px 22px -12px rgba(31, 91, 255, 0.75);
  --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Archivo', 'Figtree', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --accent-rgb: 31, 91, 255; /* afgeleid van --purple; wordt door het eigen thema overschreven */
  --on-accent: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple-light); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--purple-light); text-decoration: underline; }

h1, h2, h3 { color: var(--text); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { font-size: 20px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.brand span { color: var(--purple-light); }

/* Site-brede navigatie in de topbar: middenlinks + rechts taal/Premium/login, met een
   hamburger-toggle op mobiel via de checkbox-hack (geen JS nodig). */
.nav-links { display: flex; align-items: center; gap: 22px; flex: 1; justify-content: center; }
.nav-links a { color: var(--text-dim); font-size: 14px; font-weight: 600; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-switch { display: flex; }
.lang-select {
  padding: 6px 10px; border-radius: var(--radius); border: 1px solid var(--card-border);
  background: var(--card); color: var(--text); font-size: 13px; font-family: inherit; cursor: pointer;
}

.nav-toggle-checkbox { display: none; }
.nav-toggle-btn { display: none; font-size: 22px; cursor: pointer; color: var(--text); padding: 4px 8px; border-radius: var(--radius); }
.nav-toggle-btn:hover { background: var(--card); }
.nav-mobile-panel { display: none; }

@media (max-width: 860px) {
  .nav-links, .topbar-actions { display: none; }
  .nav-toggle-btn { display: block; }
  .nav-mobile-panel {
    display: none; flex-direction: column; gap: 2px;
    position: absolute; top: 100%; left: 0; right: 0; padding: 10px;
    background: var(--bg-alt); border-bottom: 1px solid var(--card-border); box-shadow: var(--shadow-soft);
  }
  .nav-mobile-panel a, .nav-mobile-panel .nav-mobile-btn {
    padding: 12px 14px; border-radius: var(--radius); color: var(--text-dim); font-weight: 600;
    background: none; border: none; width: 100%; text-align: left; font-size: inherit; font-family: inherit; cursor: pointer;
  }
  .nav-mobile-panel a:hover, .nav-mobile-panel .nav-mobile-btn:hover { background: var(--card); color: var(--text); }
  .nav-toggle-checkbox:checked ~ .nav-mobile-panel { display: flex; }
}

.topbar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-user img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--card-border); flex-shrink: 0; }
.topbar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--card-hover); border-color: #2b3f85; }
.btn-primary { background: var(--purple); border-color: var(--purple); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(0.9); color: var(--on-accent); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1c1508; }
.btn-gold:hover { background: #d9a746; border-color: #d9a746; color: #1c1508; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-danger:hover { background: #d93a3e; border-color: #d93a3e; color: white; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; }
.container-wide { max-width: 1320px; margin: 0 auto; padding: 32px 24px 64px; }

/* ---------- Homepage ---------- */
.hm-hero { padding: 72px 24px 56px; background: radial-gradient(900px 380px at 18% 0%, rgba(var(--accent-rgb), 0.14), transparent 70%), radial-gradient(700px 320px at 95% 20%, rgba(201, 151, 58, 0.08), transparent 70%); }
.hm-hero-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 56px; }
.hm-hero-copy { flex: 1 1 480px; min-width: 0; }
.hm-eyebrow { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--gold-light); background: rgba(201, 151, 58, 0.12); border: 1px solid rgba(201, 151, 58, 0.35); margin-bottom: 18px; }
.hm-hero h1 { font-size: clamp(32px, 5.6vw, 54px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 18px; }
.hm-lead { color: var(--text-dim); font-size: clamp(16px, 2.6vw, 19px); line-height: 1.6; max-width: 540px; margin: 0 0 28px; }
.hm-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; }
.hm-btn-lg { font-size: 16px; padding: 13px 24px; }
.hm-link { font-weight: 600; padding: 0 6px; }
.hm-topgg { display: inline-block; }
.hm-topgg img { max-width: 100%; height: auto; display: block; }

.hm-mock { flex: 1 1 440px; min-width: 0; display: flex; justify-content: center; }
.hm-window { width: 100%; max-width: 500px; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--card-border); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.hm-window-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--card-border); }
.hm-window-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--card-border); }
.hm-window-bar span:nth-child(1) { background: var(--danger); }
.hm-window-bar span:nth-child(2) { background: #f2c94c; }
.hm-window-bar span:nth-child(3) { background: var(--success); }
.hm-window-bar em { margin-left: 10px; font-style: normal; font-size: 12px; color: var(--text-faint); background: var(--bg); padding: 3px 12px; border-radius: 999px; }
.hm-window-body { display: flex; min-height: 280px; }
.hm-side { width: 58px; background: var(--bg-alt); border-right: 1px solid var(--card-border); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; }
.hm-side b { font-size: 16px; margin-bottom: 6px; }
.hm-side b i { font-style: normal; color: var(--purple-light); }
.hm-side span { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 15px; }
.hm-side span.on { background: var(--purple); }
.hm-panel { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hm-panel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.hm-panel-stats div { background: var(--bg-alt); border: 1px solid var(--card-border); border-radius: 10px; padding: 10px 12px; }
.hm-panel-stats strong { display: block; font-size: 22px; }
.hm-panel-stats small { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.hm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-alt); border: 1px solid var(--card-border); border-radius: 10px; padding: 11px 14px; font-size: 14px; }
.hm-toggle { width: 36px; height: 20px; border-radius: 999px; background: var(--card-border); position: relative; flex-shrink: 0; }
.hm-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.hm-toggle.on { background: var(--success); }
.hm-toggle.on::after { left: 19px; }

.hm-stats { border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); background: var(--bg-alt); }
.hm-stats-inner { max-width: 1100px; margin: 0 auto; padding: 26px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.hm-stats strong { display: block; font-size: clamp(22px, 3.5vw, 32px); font-weight: 800; }
.hm-stats span { color: var(--text-faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.7px; }

.hm-section { max-width: 1100px; margin: 0 auto; padding: 72px 24px; }
.hm-alt { max-width: none; background: var(--bg-alt); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.hm-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.hm-head { text-align: center; margin-bottom: 38px; }
.hm-head h2 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 10px; letter-spacing: -0.01em; }
.hm-head p { color: var(--text-dim); max-width: 600px; margin: 0 auto; line-height: 1.6; }
.hm-center { text-align: center; margin-top: 34px; }

.hm-feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 18px; }
.hm-feature { background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 24px 22px; display: flex; flex-direction: column; gap: 8px; }
.hm-feature:hover { border-color: var(--purple); }
.hm-feature-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--bg-alt); border: 1px solid var(--card-border); margin-bottom: 4px; }
.hm-feature h3 { margin: 0; font-size: 18px; }
.hm-feature p { margin: 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.6; flex: 1; }
.hm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hm-tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(var(--accent-rgb), 0.14); color: var(--purple-light); }
.hm-more { margin-top: 44px; text-align: center; }
.hm-more h3 { color: var(--text-dim); font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hm-chip { padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-border); font-size: 14px; cursor: default; }

.hm-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hm-step { background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 26px 22px; text-align: center; }
.hm-step-n { width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--purple); color: #fff; }
.hm-step h3 { margin: 0 0 8px; font-size: 18px; }
.hm-step p { margin: 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }

.hm-why { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 22px 28px; }
.hm-why-item { display: flex; gap: 14px; align-items: flex-start; }
.hm-why-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--card); border: 1px solid var(--card-border); }
.hm-why-item h3 { margin: 2px 0 4px; font-size: 16px; }
.hm-why-item p { margin: 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.55; }

.hm-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.hm-faq details { background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: 0 18px; }
.hm-faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after { content: '+'; color: var(--purple-light); font-size: 20px; line-height: 1; }
.hm-faq details[open] summary::after { content: '–'; }
.hm-faq details p { margin: 0 0 16px; color: var(--text-dim); line-height: 1.65; }

.hm-bands { padding-top: 24px; }
.hm-bands .cta-band { margin-top: 0; margin-bottom: 20px; }

@media (max-width: 900px) {
  .hm-hero { padding: 48px 18px 40px; }
  .hm-hero-inner { flex-direction: column; text-align: center; gap: 36px; }
  .hm-lead { margin-left: auto; margin-right: auto; }
  .hm-cta { justify-content: center; }
  .hm-hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hm-window { max-width: 420px; }
  .hm-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hm-steps { grid-template-columns: 1fr; }
  .hm-section { padding: 52px 18px; }
}

.cta-band {
  text-align: center; padding: 60px 24px; margin-top: 24px; border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.cta-band h2 { color: var(--text); font-size: clamp(22px, 3.5vw, 28px); margin: 0 0 10px; }
.cta-band p { color: var(--text-dim); margin: 0 0 28px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.card h2 { margin-top: 0; color: var(--text); font-size: 17px; font-weight: 700; }
.card h3 { color: var(--purple-light); font-size: 15px; }

.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.guild-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  transition: border-color 0.15s ease;
}
.guild-card:hover { border-color: var(--purple); }
.guild-card img.icon, .guild-card .icon-fallback {
  width: 60px; height: 60px; border-radius: 50%; margin-bottom: 12px; object-fit: cover;
}
.icon-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--purple);
  color: white; font-weight: 700; font-size: 20px; margin: 0 auto 12px;
}
.guild-card .name { font-weight: 700; margin-bottom: 12px; }
.badge-no-bot { color: var(--text-faint); font-size: 12px; display: block; margin-top: 8px; }

/* Dyno-achtige indeling: links een vaste zijbalk met alle modules per categorie (met aan/uit-stip),
   rechts de pagina zelf. De zijbalk blijft staan terwijl je scrolt en heeft een zoekveld bovenin
   (zie dash-search.js). Op mobiel klapt hij in tot een kopregel met een Menu-knop (dash-nav.js). */
.layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start; }
.layout > * { min-width: 0; }

.dash-sidebar {
  position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin;
  background: var(--bg-alt); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 14px 10px 10px;
}
.dash-side-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 6px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--card-border);
}
/* De serverkop blijft bovenin de zijbalk staan terwijl de lijst scrolt. */
.dash-sidebar .dash-side-head { position: sticky; top: -14px; z-index: 2; background: var(--bg-alt); margin-top: -14px; padding-top: 14px; }
.dash-server { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dash-server img, .dash-server .icon-fallback-sm { border-radius: 50%; flex-shrink: 0; width: 34px; height: 34px; }
.dash-server-text { display: flex; flex-direction: column; min-width: 0; }
.dash-server-text strong { font-size: 14.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-server-text span { font-size: 11.5px; color: var(--text-faint); }
.dash-menu-btn {
  display: none; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius); flex-shrink: 0;
  border: 1px solid var(--card-border); background: var(--card); color: var(--text); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
}

/* Snel een instelling opzoeken — vult zich uit dash-search-data (alle modules, al bekend bij het
   renderen), dus geen server-aanvraag nodig terwijl je typt. */
.dash-search { position: relative; margin: 0 4px 8px; }
.dash-search input {
  width: 100%; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--card-border);
  background: var(--bg); color: var(--text); font-size: 13.5px; font-family: inherit;
}
.dash-search input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.dash-search-results { display: none; margin-top: 6px; max-height: 260px; overflow-y: auto; background: var(--bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 4px; }
.dash-search-results.open { display: block; }
.dash-search-result {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius); color: var(--text-dim); font-size: 13.5px; cursor: pointer;
}
.dash-search-result .group { font-size: 11px; color: var(--text-faint); }
.dash-search-result:hover, .dash-search-result.highlighted { background: var(--card-hover); color: var(--text); }
.dash-search-empty { padding: 10px; font-size: 13px; color: var(--text-faint); }

.dash-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; margin: 1px 0;
  color: var(--text-dim); font-size: 14px; font-weight: 500; transition: background-color 0.12s ease, color 0.12s ease;
}
.dash-nav-item .ico { width: 20px; text-align: center; flex-shrink: 0; font-size: 15px; }
.dash-nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-nav-item:hover { background: var(--card); color: var(--text); text-decoration: none; }
.dash-nav-item.active { background: rgba(var(--accent-rgb), 0.16); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--purple); }

.dash-nav-group-title {
  display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 14px 10px 6px;
  background: none; border: none; font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); cursor: pointer; text-align: left;
}
.dash-nav-group-title:hover { color: var(--text-dim); }
.dash-nav-group-title .chev { transition: transform 0.15s ease; }
.dash-nav-group.collapsed .chev { transform: rotate(-90deg); }
.dash-nav-group.collapsed .dash-nav-group-items { display: none; }

.dash-side-foot {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding: 12px 8px 2px; border-top: 1px solid var(--card-border);
  font-size: 12.5px; font-weight: 600;
}
.dash-side-foot a { color: var(--text-dim); }
.dash-side-foot a:hover { color: var(--text); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dash-sidebar { position: static; max-height: none; overflow: visible; }
  .dash-sidebar .dash-side-head { position: static; margin-top: 0; padding-top: 2px; }
  .dash-menu-btn { display: inline-flex; }
  .dash-side-head { border-bottom: 0; margin-bottom: 0; padding-bottom: 2px; }
  .dash-nav { display: none; }
  .dash-sidebar.open .dash-side-head { border-bottom: 1px solid var(--card-border); margin-bottom: 10px; padding-bottom: 14px; }
  .dash-sidebar.open .dash-nav { display: block; }
}

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.status-dot.on { background: var(--success); }
.status-dot.live { animation: status-pulse 2s ease-in-out infinite; }
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Kaarten-grid op het overzicht: elke module een eigen kaart met icoon, omschrijving en toggle,
   i.p.v. een lijst. Klikbaar (naar de instelpagina), met de toggle als apart klikgebied erbovenop
   zodat aan/uitzetten niet ook doorklikt. */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.module-card {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text);
  transition: border-color 0.15s ease;
}
.module-card:hover { color: var(--text); border-color: #2b3f85; }
.module-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.module-card .module-icon { width: 40px; height: 40px; font-size: 19px; border-radius: 10px; }
.module-card-body { flex: 1; min-width: 0; }
.module-card-title { display: block; font-weight: 700; font-size: 15px; }
.module-card-desc { display: block; font-size: 12.5px; color: var(--text-faint); margin-top: 5px; line-height: 1.5; }
.module-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 2px; }
.module-card-footer .btn-sm { padding: 5px 12px; }

@media (prefers-reduced-motion: reduce) {
  .status-dot.live { animation: none; }
}

.module-icon {
  font-size: 19px; flex-shrink: 0; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--card); border-radius: 9px;
}

.toggle-switch {
  width: 40px; height: 22px; border-radius: 999px; border: none; background: #22306a; cursor: pointer;
  position: relative; flex-shrink: 0; padding: 0; transition: background 0.2s ease;
}
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: white; transition: transform 0.2s ease;
}
.toggle-switch.on { background: var(--success); }
.toggle-switch.on::after { transform: translateX(18px); }

label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--text-dim); font-weight: 600; }
input[type=text], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--card-border);
  background: var(--bg-alt); color: var(--text); font-size: 14px; font-family: inherit; transition: border-color 0.15s ease;
}
/* Onder 16px zoomt iOS Safari automatisch in zodra je een veld aantikt (een bekende, storende
   mobiele eigenaardigheid) — op mobiel dus altijd minstens 16px, ook al is 14px op desktop prima. */
@media (max-width: 720px) {
  input[type=text], input[type=number], textarea, select { font-size: 16px; }
}
input[type=text]:focus, input[type=number]:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
textarea { resize: vertical; min-height: 90px; }
.searchable-select { display: flex; flex-direction: column; }
.searchable-select-input { margin-bottom: 6px; }
.searchable-select select[multiple] { min-height: 140px; }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; line-height: 1.5; }
.switch-row { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.switch-row input { width: 18px; height: 18px; }

/* Aan/uit-checkboxen in instellingenformulieren krijgen dezelfde pil-vormige toggle-look als de
   module-kaarten (i.p.v. een kaal vinkje) — puur visueel, blijft een gewone checkbox qua gedrag
   (dus gewoon onderdeel van het formulier, geen losse submit zoals op het moduleoverzicht). */
input[type="checkbox"].toggle-input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 40px; height: 22px; border-radius: 999px; border: none; background: #22306a;
  position: relative; flex-shrink: 0; cursor: pointer; transition: background 0.2s ease;
}
input[type="checkbox"].toggle-input::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: white; transition: transform 0.2s ease;
}
input[type="checkbox"].toggle-input:checked { background: var(--success); }
input[type="checkbox"].toggle-input:checked::after { transform: translateX(18px); }
input[type="checkbox"].toggle-input:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }

table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--card-border); }
th { color: var(--text-faint); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; }
tr:hover td { background: var(--card-hover); }

.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-open { background: rgba(35, 165, 90, 0.15); color: var(--success); }
.pill-closed { background: rgba(124, 196, 255, 0.12); color: var(--text-faint); }
.pill-active { background: rgba(201, 151, 58, 0.18); color: var(--gold-light); }
.pill-ended { background: rgba(124, 196, 255, 0.12); color: var(--text-faint); }

.mention { background: rgba(var(--accent-rgb), 0.22); color: var(--purple-light); border-radius: 3px; padding: 0 3px; font-weight: 600; }
.chat-reply-quote { border-left: 3px solid var(--purple); padding: 2px 10px; margin-bottom: 4px; color: var(--text-faint); font-size: 13px; }

.toggle-list { display: flex; flex-direction: column; gap: 10px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg-alt); border-radius: var(--radius); border: 1px solid var(--card-border);
}

.participants { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.participant { display: flex; align-items: center; gap: 8px; background: var(--bg-alt); padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--card-border); }
.participant img { width: 28px; height: 28px; border-radius: 50%; }

.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat {
  flex: 1; min-width: 140px; background: var(--bg-alt);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 18px; text-align: center;
}
.stat .value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat .label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; }

.stat-chart { width: 100%; height: auto; min-width: 600px; }
.stat-chart [data-label] { cursor: crosshair; }

.chart-tooltip {
  position: fixed; z-index: 200; pointer-events: none; display: none;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 6px 10px; font-size: 12.5px; color: var(--text); box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.footer { text-align: center; padding: 36px; color: var(--text-faint); font-size: 13px; }
.flash { padding: 13px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.flash-success { background: rgba(35, 165, 90, 0.13); color: var(--success); border-color: rgba(35,165,90,0.3); }
.flash-error { background: rgba(242, 63, 67, 0.13); color: var(--danger); border-color: rgba(242,63,67,0.3); }

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .container, .container-wide { padding: 20px 14px 48px; }
  .card { padding: 16px; }
  .stat { padding: 14px; min-width: 42%; }
  .stat .value { font-size: 22px; }
  .guild-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  /* Duimvriendelijke tikgrootte (Apple/Google's richtlijn is ~40-44px) — ook voor -sm-knoppen en de
     hamburger-toggle, die op desktop bewust compacter mogen blijven. */
  .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 38px; padding: 8px 14px; }
  .nav-toggle-btn { padding: 9px 12px; }
  .module-grid { grid-template-columns: 1fr; gap: 10px; }
  .module-card { padding: 14px; }
  .stat { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .stat-chart { min-width: 0; }

  /* De serverwisselaar-dropdown hangt af van waar de knop in de topbar terechtkomt (die schuift mee
     door justify-content:space-between) — op smalle schermen daarom vast tegen de randen plakken
     i.p.v. links uitlijnen op de knop, zodat 'm nooit rechts van het scherm af kan lopen. */
  .guild-switcher-menu { left: 16px; right: 16px; min-width: 0; width: auto; }

  /* Tabellen scrollen al horizontaal binnen hun kaart (zie .card { overflow-x: auto }), maar dat is
     op een smal scherm niet altijd duidelijk zichtbaar — een subtiele schaduw aan de rechterkant
     laat zien dat er nog meer te zien is. */
  .card:has(table) { position: relative; }
  .card:has(table)::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 24px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(4, 10, 34, 0.5));
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  }
}

@media (max-width: 420px) {
  .topbar-user span { max-width: 80px; }
  .brand { font-size: 18px; }
}

/* --- Toast-meldingen: vervangen de statische .flash-banner bovenaan de pagina door een
   zelf-verdwijnende melding rechtsonder, zodat opslaan voelt als directe feedback i.p.v. een
   paginaherlading die je moet opmerken. toast.js zet elke .flash die de server al rendert
   automatisch om, dus geen enkele pagina hoeft hier zelf iets voor te doen. */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 500;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow-soft); font-size: 14px; max-width: 340px;
  pointer-events: auto; animation: toast-in 0.2s ease;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-out { animation: toast-out 0.2s ease forwards; }
.toast-icon { flex-shrink: 0; font-size: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; } }

/* --- Zwevende "onopgeslagen wijzigingen"-balk: verschijnt zodra een veld binnen een
   .settings-form verandert. unsaved-bar.js beheert dit generiek voor élk formulier met die
   class, geen per-pagina JS nodig. */
.save-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 120%);
  display: flex; align-items: center; gap: 16px; z-index: 400;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 14px 18px; box-shadow: var(--shadow-soft); transition: transform 0.2s ease;
  max-width: calc(100vw - 32px);
}
.save-bar.visible { transform: translate(-50%, 0); }
.save-bar-text { font-size: 14px; color: var(--text-dim); white-space: nowrap; }
.save-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 560px) {
  .save-bar { flex-direction: column; align-items: stretch; gap: 10px; left: 16px; right: 16px; transform: translateY(120%); max-width: none; }
  .save-bar.visible { transform: translateY(0); }
  .save-bar-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* --- Klikbare variabele-tags onder een textarea: klik plakt {var} op de cursorpositie.
   var-pills.js leest data-vars="user,server,..." van de textarea en bouwt de pillen. */
.var-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.var-pill {
  font-family: monospace; font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--card-border); color: var(--purple-light);
  cursor: pointer; transition: border-color 0.15s ease;
}
.var-pill:hover { border-color: var(--purple); color: var(--text); background: var(--card-hover); }

/* --- Live-preview naast het formulier i.p.v. eronder, zoals Dyno's editor. Stapelt op mobiel. */
.editor-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.editor-preview { position: sticky; top: 76px; }
@media (max-width: 900px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
}

/* --- Server-switcher in de header: toont de huidige server (icoon + naam) met een dropdown naar
   je andere beheerbare servers, zodat je niet terug hoeft naar "Mijn servers" om te wisselen. */
.guild-switcher { position: relative; }
.guild-switcher-btn {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 6px 12px 6px 6px; cursor: pointer; color: var(--text); font-size: 13px; font-weight: 600;
}
.guild-switcher-btn:hover { border-color: #2b3f85; }
.guild-switcher-btn img, .guild-switcher-btn .icon-fallback-sm {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.icon-fallback-sm {
  display: flex; align-items: center; justify-content: center; background: var(--purple);
  color: white; font-size: 11px; font-weight: 700;
}
.guild-switcher-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; max-height: 320px; overflow-y: auto;
  background: var(--bg-alt); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-soft);
  padding: 6px; z-index: 50;
}
.guild-switcher.open .guild-switcher-menu { display: block; }
.guild-switcher-menu a {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius);
  color: var(--text-dim); font-size: 13px; font-weight: 500;
}
.guild-switcher-menu a:hover { background: var(--card); color: var(--text); }
.guild-switcher-menu a img, .guild-switcher-menu a .icon-fallback-sm { width: 20px; height: 20px; }
.guild-switcher-menu a.active { color: var(--text); font-weight: 700; }
@media (max-width: 720px) {
  .guild-switcher-btn span { display: none; }
}

/* ───── Dashboard-indeling in Dyno-stijl (modulelijst met schakelaars, kleine kopjes, commando's per categorie,
   ruime aanraakdoelen, mobiel-eerst) — in de eigen kleuren van DG (donker + goud). Alleen onder /dashboard. ───── */
.is-dash .btn-sm:not(.btn-gold):not(.btn-danger):not(.btn-primary) {
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 11.5px; font-weight: 700; color: var(--gold-light);
}
.is-dash .card { border-radius: 14px; }
/* Kleine, ruimtelijke kopjes boven een kaart, zoals "SERVERINFORMATIE" bij Dyno. */
.is-dash .card > h2:first-child { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }
.is-dash input[type="text"], .is-dash input[type="number"], .is-dash input[type="password"], .is-dash input[type="url"], .is-dash select, .is-dash textarea { border-radius: 10px; }
.is-dash .stat { border-radius: 14px; }

.is-dash .toggle-switch { width: 46px; height: 26px; }
.is-dash .toggle-switch::after { width: 20px; height: 20px; top: 3px; left: 3px; }
.is-dash .toggle-switch.on::after { transform: translateX(20px); }
.is-dash input[type="checkbox"].toggle-input { width: 46px; height: 26px; }
.is-dash input[type="checkbox"].toggle-input::after { width: 20px; height: 20px; top: 3px; left: 3px; }
.is-dash input[type="checkbox"].toggle-input:checked::after { transform: translateX(20px); }

/* Modulelijst op het overzicht: naam + omschrijving links, INSTELLINGEN en schakelaar rechts. */
.module-list { display: flex; flex-direction: column; }
.module-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--card-border); }
.module-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.module-row-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.module-row-ico { width: 30px; text-align: center; font-size: 18px; }
.module-row-desc { overflow-wrap: anywhere; font-size: 12.5px; color: var(--text-faint); line-height: 1.45; padding-left: 40px; }
.module-row-group { display: none; }
.module-row-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.module-row-actions form { margin: 0; display: flex; }

/* Serverinformatie-kaart */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 20px; }
.info-grid div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--card-border); font-size: 14px; }
.info-grid span { color: var(--text-dim); }
.info-grid strong { color: var(--text); }

/* Commando's: categorie-chips, alles aan/uit, rijen met schakelaar */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { padding: 9px 16px; border-radius: 8px; border: 0; background: var(--card-hover); color: var(--text); font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.chip.active { background: var(--gold); color: #1c1508; }
.bulk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.bulk-row .btn { width: 100%; justify-content: center; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--gold-light); padding: 14px; }
.cmd-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; margin-bottom: 10px; border-radius: 14px; background: var(--bg-alt); border: 1px solid var(--card-border); }
.cmd-card-main { min-width: 0; }
.cmd-card-name { font-weight: 700; font-size: 15px; }
.cmd-card-desc { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; line-height: 1.45; }

@media (max-width: 720px) {
  body.is-dash .settings-form .btn-gold[type="submit"], body.is-dash .card > form > .btn-gold[type="submit"] { width: 100%; padding: 14px; }
  .is-dash .dash-nav-item { padding: 13px 14px; font-size: 15px; }
  /* Op mobiel staat INSTELLINGEN + schakelaar onder de omschrijving (net als bij Dyno), i.p.v. ernaast te persen. */
  .module-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 0; }
  .module-row-actions { justify-content: space-between; }
  .module-row-name { font-size: 14.5px; }
}

/* Account-rij (taal + uitloggen) bovenin het dashboardmenu: alleen op mobiel, op desktop staan die in de topbar. */
.dash-account { display: none; align-items: center; justify-content: space-between; gap: 10px; margin: 0 4px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--card-border); }
.dash-account form { margin: 0; }
@media (max-width: 900px) { .dash-account { display: flex; } }

/* Premium: prijskaarten (Gratis / Premium / Gold) */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; max-width: 1040px; margin: 0 auto; }
.tier-card { display: flex; flex-direction: column; gap: 10px; padding: 26px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-border); }
.tier-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.tier-card h2 { margin: 0; font-size: 20px; color: var(--gold-light); }
.tier-icon { font-size: 30px; }
.tier-price { font-size: 22px; font-weight: 800; margin: 4px 0 6px; }
.tier-list { list-style: none; padding: 0; margin: 0 0 14px; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.tier-list li { display: flex; gap: 10px; color: var(--text-dim); font-size: 14px; line-height: 1.45; }
.tier-list li::before { content: '✓'; color: var(--success); font-weight: 800; flex-shrink: 0; }
.tier-card .btn { justify-content: center; text-align: center; }

/* ---------- Compatibiliteit: alle schermen en apparaten ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { overflow-wrap: break-word; }
img, svg, video { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
.hm-lead, .hm-head p { text-wrap: pretty; }

/* Notch / afgeronde hoeken (iPhone, Android met cutout): inhoud blijft binnen het veilige gebied. */
@supports (padding: max(0px)) {
  .topbar { padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
  .footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .hm-hero, .hm-section, .hm-stats-inner { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
}

/* Toetsenbord- en schermlezergebruikers zien waar de focus staat. */
:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible { outline-offset: 3px; }

/* Hover-effecten alleen op apparaten die echt kunnen hoveren; op touch blijft niets "plakken". */
@media (hover: none) { .hm-feature:hover { border-color: var(--card-border); } }

/* Aanraakschermen: grotere tikdoelen (Apple/Google raden minimaal ~44px aan). */
@media (pointer: coarse) {
  .hm-hero .btn, .hm-section .btn, .cta-band .btn { min-height: 46px; }
  .hm-faq summary { min-height: 48px; }
  .nav-links a, .nav-mobile-panel a { min-height: 44px; display: flex; align-items: center; }
}

/* Kleine telefoons (iPhone SE, 320-360px): knoppen volle breedte, compactere witruimte. */
@media (max-width: 480px) {
  .hm-hero { padding-top: 36px; }
  .hm-cta { flex-direction: column; align-items: stretch; width: 100%; }
  .hm-cta .btn { justify-content: center; text-align: center; width: 100%; }
  .hm-link { text-align: center; padding: 8px 0; }
  .hm-topgg { max-width: 100%; }
  .hm-stats-inner { padding: 20px 14px; gap: 14px 8px; }
  .hm-feature, .hm-step { padding: 20px 18px; }
  .hm-section { padding-top: 44px; padding-bottom: 44px; }
  .hm-window-body { min-height: 0; }
  .hm-side { width: 46px; }
  .hm-side span { width: 30px; height: 30px; }
  .hm-row { font-size: 13px; padding: 9px 11px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
}

/* Telefoon in landscape: lage schermen krijgen geen reusachtige hero. */
@media (max-height: 480px) and (orientation: landscape) {
  .hm-hero { padding-top: 24px; padding-bottom: 24px; }
  .hm-section { padding-top: 36px; padding-bottom: 36px; }
}

/* Tablets (iPad staand/liggend): twee brede kolommen i.p.v. smalle krappe kaarten. */
@media (min-width: 601px) and (max-width: 1023px) {
  .hm-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hm-steps { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .hm-step { padding: 22px 16px; }
}

/* Grote schermen (QHD, 4K, ultrawide): iets bredere inhoud en grotere tekst zodat het niet verloren oogt. */
@media (min-width: 1600px) {
  .hm-hero-inner, .hm-stats-inner, .hm-section, .hm-alt > * { max-width: 1280px; }
  .hm-hero { padding-top: 96px; padding-bottom: 80px; }
  .hm-lead { font-size: 21px; max-width: 600px; }
  .hm-window { max-width: 560px; }
}

/* Gebruikers die minder beweging willen (systeeminstelling) krijgen geen animaties of vloeiend scrollen. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Afdrukken: donkere achtergronden weglaten. */
@media print {
  .topbar, .footer, .hm-topgg, .hm-mock, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Verfijning: formulieren, tabellen, paginering, laadstaten ---------- */
/* Alle tekstachtige velden krijgen dezelfde look (voorheen alleen text/number). */
input[type=password], input[type=url], input[type=email], input[type=search], input[type=tel],
input[type=date], input[type=time], input[type=datetime-local] {
  width: 100%; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--card-border);
  background: var(--bg-alt); color: var(--text); font-size: 14px; font-family: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 42px;
}
input[type=password]:focus, input[type=url]:focus, input[type=email]:focus, input[type=search]:focus, input[type=tel]:focus,
input[type=date]:focus, input[type=time]:focus, input[type=datetime-local]:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
@media (max-width: 720px) {
  input[type=password], input[type=url], input[type=email], input[type=search], input[type=tel],
  input[type=date], input[type=time], input[type=datetime-local] { font-size: 16px; }
}
input[type=text], input[type=number], select { min-height: 42px; }
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: 1; }
input[type=color] { width: 46px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--card-border); background: var(--bg-alt); cursor: pointer; }
input[type=file] { color: var(--text-dim); font-size: 13px; max-width: 100%; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--card-border); background: var(--card); color: var(--text); font-weight: 600; cursor: pointer; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }

/* Knoppen: duidelijke ingedrukt-, uitgeschakeld- en laadstaat. */
.btn { text-align: center; line-height: 1.3; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn.is-disabled { opacity: 0.4; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: btn-spin 0.7s linear infinite;
}
.btn-gold.is-loading::after { border-color: rgba(28, 21, 8, 0.3); border-top-color: #1c1508; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Tabellen: rustiger, laatste rij zonder streep, kop blijft leesbaar bij scrollen. */
tbody tr:last-child td { border-bottom: 0; }
th { white-space: nowrap; }
td { vertical-align: middle; }
td img { vertical-align: middle; }

/* Paginering */
.pager { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager-info { margin: 0; }
@media (max-width: 480px) { .pager { gap: 8px; } .pager-info { order: 3; width: 100%; text-align: center; } }

/* Meldingen */
.flash { line-height: 1.5; }

/* Scrollbalken en selectie in dezelfde stijl als de rest. */
::selection { background: rgba(var(--accent-rgb), 0.45); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #22306a transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #22306a; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #33458a; }
::-webkit-scrollbar-track { background: transparent; }

/* Op touch-apparaten: tikdoelen in formulieren en tabellen iets ruimer. */
@media (pointer: coarse) {
  .btn-sm { min-height: 38px; }
  input[type="checkbox"], input[type="radio"] { min-width: 20px; min-height: 20px; }
}

/* ---------- Eigenaar-paneel ---------- */
.owner-title { color: var(--gold-light); margin: 0 0 4px; }
.owner-bar { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin: 14px 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--card-border); }
/* Op de pc staan alle knoppen zichtbaar (ze lopen door naar een volgende regel); alleen op een telefoon is het één rij waar je door veegt. */
.owner-nav { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 520px; min-width: 0; }
@media (max-width: 720px) {
  .owner-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .owner-nav::-webkit-scrollbar { display: none; }
}
.owner-nav a { white-space: nowrap; padding: 8px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-dim); border: 1px solid transparent; }
.owner-nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.owner-nav a.active { background: rgba(var(--accent-rgb), 0.18); border-color: rgba(var(--accent-rgb), 0.5); color: var(--text); }
.owner-search { flex: 0 1 260px; min-width: 180px; }
.owner-search input { margin: 0; }
@media (max-width: 720px) { .owner-search { flex: 1 1 100%; } }

.owner-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.owner-alert { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 10px; font-size: 14px; border: 1px solid var(--card-border); background: var(--card); color: var(--text); }
a.owner-alert:hover { text-decoration: none; background: var(--card-hover); }
.owner-alert em { margin-left: auto; font-style: normal; color: var(--text-faint); }
.owner-alert-bad { border-color: rgba(242, 63, 67, 0.5); background: rgba(242, 63, 67, 0.1); }
.owner-alert-warn { border-color: rgba(201, 151, 58, 0.5); background: rgba(201, 151, 58, 0.1); }
.owner-alert-ok { border-color: rgba(35, 165, 90, 0.4); background: rgba(35, 165, 90, 0.08); }

.owner-stats .stat { flex: 1 1 140px; }
.owner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 20px; align-items: start; margin-bottom: 4px; }
.owner-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.owner-grid > .card, .owner-grid > div > .card { margin-bottom: 20px; }
.owner-chart { width: 100%; height: auto; display: block; }
.owner-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.owner-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

.owner-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.owner-bars li { position: relative; display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding-bottom: 7px; }
.owner-bars li i { position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 3px; background: var(--purple); }
.owner-bars b { color: var(--text-dim); }

.owner-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.owner-feed li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.owner-feed-icon { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--bg-alt); border: 1px solid var(--card-border); font-size: 14px; }

.owner-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.owner-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.owner-list li a { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.owner-list li img { width: 22px; height: 22px; border-radius: 50%; }

.owner-health strong { word-break: break-word; }
.text-ok { color: var(--success); } .text-warn { color: var(--gold); } .text-bad { color: var(--danger); }
.owner-danger { border-color: rgba(242, 63, 67, 0.45); }
.owner-inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.owner-progress { height: 10px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; border: 1px solid var(--card-border); }
.owner-progress i { display: block; height: 100%; background: var(--success); transition: width 0.4s ease; }
.owner-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.owner-stats .stat { min-width: 0; }
@media (max-width: 900px) { .owner-stats { grid-template-columns: repeat(2, 1fr); } }
.info-grid.owner-health { grid-template-columns: 1fr; }
.owner-grid .card .info-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.owner-grid .card .info-grid.owner-health { grid-template-columns: 1fr; }

/* Promotiepagina (eigenaar) */
.promo-copyrow { display: flex; gap: 8px; align-items: center; }
.promo-copyrow input { flex: 1; min-width: 0; margin: 0; }
.promo-text { margin-top: 18px; }
.promo-text-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.promo-text-head label { margin: 0; }
.promo-text textarea { font-family: inherit; line-height: 1.5; min-height: 0; }
.promo-tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-dim); line-height: 1.6; }
.promo-set[hidden] { display: none; }

/* Marketing */
.owner-inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.owner-inline-form > div { margin: 0; }
.mkt-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(124, 196, 255, 0.12); color: var(--text-dim); white-space: nowrap; }
.mkt-contacted { background: rgba(var(--accent-rgb), 0.18); color: var(--purple-light); }
.mkt-interested, .mkt-follow_up { background: rgba(201, 151, 58, 0.2); color: var(--gold-light); }
.mkt-added { background: rgba(35, 165, 90, 0.18); color: var(--success); }
.mkt-declined, .mkt-dnc { background: rgba(242, 63, 67, 0.15); color: var(--danger); }
tr.mkt-me td { background: rgba(var(--accent-rgb), 0.08); }

/* ---------- Dashboard in de stijl van het voorbeeld: koppen met bovenregel, grote afgeronde kaarten, heldenkaart,
   stat-kaarten met accentlijn en een zijbalk met merkblok. Alle kleuren komen uit de variabelen, dus het eigen thema
   (pagina Aanpassen) werkt overal. ---------- */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--purple-light); margin-bottom: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--bg-alt); border: 1px solid var(--card-border); color: var(--text); }
.refresh-btn { border-radius: 999px; }

body.is-dash .layout > div > h1:first-child, body.is-dash .layout > div > .page-head h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
body.is-dash .layout > div > h1:first-child::before {
  content: 'CONTROL CENTER / DASHBOARD'; display: block; margin-bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; color: var(--purple-light);
}
body.is-dash .layout > div > h1:first-child + p.hint { font-size: 15px; color: var(--text-dim); margin-bottom: 22px; }

body.is-dash .card, body.is-dash .stat {
  border-radius: 22px;
  background-image: linear-gradient(150deg, rgba(var(--accent-rgb), 0.05), transparent 55%);
}
body.is-dash .card { padding: 26px; }
body.is-dash .card > h2:first-child { font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 700; }
body.is-dash .stat { position: relative; padding: 22px 22px 20px; box-shadow: inset 0 3px 0 rgba(var(--accent-rgb), 0.55); text-align: left; }
body.is-dash .stat .value { font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
body.is-dash .stat .label { margin-top: 8px; }
.stat-ico { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: rgba(var(--accent-rgb), 0.16); }

.hero-card {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 30px; margin-bottom: 22px;
  border-radius: 26px; border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.04) 55%), var(--card);
}
.hero-card::before, .hero-card::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(var(--accent-rgb), 0.28); pointer-events: none; }
.hero-card::before { width: 420px; height: 420px; right: -80px; top: -140px; }
.hero-card::after { width: 300px; height: 300px; right: 40px; top: -60px; border-color: rgba(var(--accent-rgb), 0.16); }
.hero-icon { width: 84px; height: 84px; border-radius: 24px; flex-shrink: 0; object-fit: cover; border: 1px solid rgba(var(--accent-rgb), 0.5); position: relative; z-index: 1; }
.hero-icon-fallback { display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; background: rgba(var(--accent-rgb), 0.2); }
.hero-text { position: relative; z-index: 1; min-width: 0; }
.hero-text h1 { margin: 0; font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.hero-text .hint { margin: 6px 0 0; font-size: 14px; }

.dash-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 16px; }
.dash-brand-logo { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--on-accent); background: linear-gradient(135deg, var(--purple), var(--purple-light)); box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35); flex-shrink: 0; }
.dash-brand-text { display: flex; flex-direction: column; min-width: 0; }
.dash-brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.dash-brand-text small { font-size: 10px; letter-spacing: 0.28em; color: var(--text-faint); font-weight: 700; }
.dash-section-label { font-size: 11px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-faint); padding: 14px 12px 8px; }

@media (min-width: 901px) {
  body.is-dash .layout { grid-template-columns: 296px minmax(0, 1fr); gap: 34px; }
  body.is-dash .dash-sidebar { border-radius: 26px; padding: 18px 14px 12px; top: 84px; max-height: calc(100vh - 100px); }
  body.is-dash .dash-nav-item { padding: 12px 14px; border-radius: 16px; font-size: 15px; margin: 3px 0; border: 1px solid transparent; }
  body.is-dash .dash-nav-item.active { background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--text-rgb, 238, 240, 242), 0.28); box-shadow: none; }
  body.is-dash .dash-side-foot { margin-top: 16px; padding: 14px; border: 1px solid var(--card-border); border-radius: 18px; background: rgba(var(--accent-rgb), 0.06); }
}
@media (max-width: 900px) {
  .hero-card { padding: 20px; gap: 16px; border-radius: 22px; }
  .hero-icon { width: 60px; height: 60px; border-radius: 18px; }
  .dash-brand { display: none; }
  .hide-mobile { display: none; }
}

/* Pagina Aanpassen */
.custom-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.custom-head .page-title { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--card-border); color: var(--text); font-size: 13px; font-weight: 600; }
.pill-btn:hover { text-decoration: none; background: var(--card); }
.custom-card { padding: 28px; }
.custom-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple-light); border: 1px solid rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.1); }
.custom-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; margin-top: 18px; }
.color-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0; }
.color-row label { margin: 0; font-size: 14px; font-weight: 700; }
.color-row input[type="color"] { width: 70px; height: 46px; border-radius: 14px; padding: 4px; border: 2px solid var(--card-border); background: var(--bg-alt); cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; }
.swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg); }
.contrast-hint { font-size: 13px; color: var(--success); margin-top: 10px; }
.contrast-hint.warn { color: var(--gold); }
.font-preview { margin-top: 12px; padding: 18px; border-radius: 18px; background: var(--bg); border: 1px solid var(--card-border); }
.font-preview-title { font-size: 26px; font-weight: 700; }
.font-preview-text { margin: 8px 0 14px; color: var(--text-dim); }
.font-preview-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.image-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.custom-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
@media (max-width: 900px) { .custom-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* ==== Huisstijl RRM Visuals / ShiftGo ==== */
/* Deze laag zet de vorm van de kernonderdelen; de kleuren komen uit :root en volgen dus ook een eigen dashboardthema. */
html { scrollbar-color: #2b3f85 var(--bg); accent-color: var(--purple); }
body { font-size: 16px; line-height: 1.6; caret-color: var(--purple-light); text-rendering: optimizeLegibility; -moz-osx-font-smoothing: grayscale; }
::selection { background: var(--purple); color: #fff; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #22306a; border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #33458a; }
:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, .brand, .stat .value, .hm-stats strong, .hm-panel-stats strong, .apm-tile strong {
  font-family: var(--font-display); letter-spacing: -0.02em; text-wrap: balance;
}
h1 { font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-weight: 700; line-height: 1.15; }
h3 { font-weight: 700; }
p { text-wrap: pretty; }
a { text-underline-offset: 3px; }
table { font-variant-numeric: tabular-nums; }

/* kop */
.topbar { padding: 12px 32px; background: var(--bg); border-bottom-color: var(--card-border); gap: 16px; }
.brand { font-size: 24px; font-weight: 900; letter-spacing: -0.04em; display: inline-flex; align-items: baseline; }
.brand span { color: var(--purple-light); }
.brand::after { content: ''; width: 6px; height: 6px; margin-left: 3px; background: var(--purple); border-radius: 1px; }
.nav-links { gap: 28px; }
.nav-links a { font-size: 14.5px; font-weight: 600; color: var(--text-dim); }
.nav-links a:hover { color: #fff; }
.lang-select { background: transparent; border-color: var(--card-border); font-weight: 600; }

/* knoppen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); font-weight: 700; font-size: 14px; letter-spacing: 0;
  background: transparent; border-color: var(--line-strong); color: var(--text);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { background: var(--card-hover); border-color: #4460c4; color: #fff; text-decoration: none; }
.btn-primary, .btn-gold { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover, .btn-gold:hover { background: #3d74ff; border-color: #3d74ff; color: #fff; filter: none; }
.btn-danger { background: transparent; border-color: rgba(240, 69, 74, 0.6); color: #ff8a8d; }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-gold.is-loading::after { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.btn:disabled, .btn.is-disabled { box-shadow: none; }

/* vlakken */
.card, .guild-card, .hm-feature, .hm-step, .hm-faq details, .tier-card, .stat, .cta-band { border-radius: var(--radius-lg); }
.card { background: var(--card); border-color: var(--card-border); }
.card h2 { font-size: 18px; letter-spacing: -0.015em; }
.card h3 { color: var(--text); font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }
.guild-card:hover, .hm-feature:hover { border-color: var(--purple); }
.stat .value { font-weight: 800; }
.stat .label { letter-spacing: 0.04em; }
.hint { font-size: 13px; }
.flash { border-radius: var(--radius); }
.dash-sidebar { border-radius: var(--radius-lg); }

/* invoer */
input[type=text], input[type=number], input[type=password], input[type=url], input[type=email], input[type=search], input[type=tel],
input[type=date], input[type=time], input[type=datetime-local], textarea, select {
  background: var(--bg-alt); border-color: var(--card-border); border-radius: var(--radius); color: var(--text);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
input:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus) { border-color: var(--line-strong); }
label { color: var(--text-dim); font-weight: 600; }

/* startpagina: het donkerblauwe vlak van RRM Visuals en de zware kop van ShiftGo */
.hm-hero {
  padding: clamp(56px, 9vw, 112px) 24px clamp(48px, 7vw, 88px);
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(31, 91, 255, 0.55), transparent 62%),
    radial-gradient(700px 420px at 4% 110%, rgba(10, 36, 201, 0.4), transparent 65%),
    linear-gradient(180deg, #050b26 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--card-border);
}
.hm-eyebrow { display: none; }
/* videobanner (zoals op rrmvisuals.nl): de video ligt onder de tekst, met een blauw waas voor de leesbaarheid */
.hm-hero { position: relative; isolation: isolate; overflow: hidden; }
.hm-hero-media { position: absolute; inset: 0; z-index: -1; }
.hm-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; filter: grayscale(0.2) contrast(1.05); }
.hm-hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 24, 0.9) 0%, rgba(3, 10, 44, 0.68) 40%, rgba(8, 28, 160, 0.4) 72%, rgba(11, 38, 214, 0.5) 100%),
    linear-gradient(0deg, rgba(4, 10, 34, 0.85) 0%, transparent 40%);
}
@media (max-width: 900px) { .hm-hero-shade { background: linear-gradient(180deg, rgba(2, 6, 24, 0.72) 0%, rgba(4, 14, 70, 0.62) 50%, rgba(4, 10, 34, 0.92) 100%); } }
@media (prefers-reduced-motion: reduce) { .hm-hero-video { display: none; } }
.hm-hero h1 { font-size: clamp(40px, 6.6vw, 82px); font-weight: 900; line-height: 0.98; letter-spacing: -0.04em; margin: 0 0 22px; color: #fff; }
.hm-lead { color: #c9d4f2; font-size: clamp(16px, 1.6vw, 19px); max-width: 52ch; }
.hm-btn-lg { font-size: 16px; padding: 14px 24px; }
.hm-cta .btn-primary { background: transparent; border-color: rgba(255, 255, 255, 0.4); box-shadow: none; }
.hm-cta .btn-primary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
/* de kop draagt zichzelf: geen los labeltje erboven */
.eyebrow { display: none; }
body.is-dash .layout > div > h1:first-child::before { content: none; }
.hm-link { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.4); }
.hm-link:hover { text-decoration-color: #fff; color: #fff; }
.hm-window { border-radius: 16px; border-color: var(--line-strong); box-shadow: 0 2px 4px rgba(2, 7, 25, 0.4), 0 40px 80px -30px rgba(2, 7, 25, 0.95); }
.hm-side span.on { background: var(--purple); }
.hm-stats { background: var(--bg-alt); }
.hm-stats strong { font-weight: 800; color: #fff; }
.hm-section { padding: clamp(56px, 8vw, 104px) 24px; }
.hm-head { text-align: left; margin-bottom: 40px; }
.hm-head h2 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px; }
.hm-head p { margin: 0; max-width: 60ch; font-size: 17px; }
.hm-feature { padding: 26px 24px; background: var(--card); }
.hm-feature-icon { border-radius: 10px; background: rgba(var(--accent-rgb), 0.16); }
.hm-feature h3, .hm-step h3, .hm-why-item h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; }
.hm-tags span { border-radius: 6px; background: rgba(var(--accent-rgb), 0.16); color: var(--purple-light); font-weight: 600; }
.hm-chip { border-radius: 8px; }
.hm-step { text-align: left; }
.hm-step-n { margin: 0 0 16px; border-radius: 10px; background: var(--purple); color: #fff; font-family: var(--font-display); }
.hm-why-icon { border-radius: 10px; background: rgba(var(--accent-rgb), 0.16); }
.hm-faq { margin: 0; }
.hm-faq summary { font-weight: 700; }
.cta-band {
  text-align: left; padding: clamp(32px, 5vw, 56px);
  background: radial-gradient(800px 360px at 100% 0%, rgba(31, 91, 255, 0.5), transparent 65%), var(--card);
  border-color: var(--line-strong);
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; }
.cta-band p { max-width: 60ch; }

.footer { border-top: 1px solid var(--card-border); background: #020719; color: var(--text-faint); }
.footer a { color: var(--text-dim); font-weight: 600; }
.footer a:hover { color: #fff; }

@media (max-width: 900px) {
  .hm-hero-copy { align-items: flex-start; }
  .hm-hero-inner { text-align: left; }
  .hm-lead { margin-left: 0; }
  .hm-cta { justify-content: flex-start; }
  .topbar { padding: 12px 18px; }
}

/* indeling en toegankelijkheid */
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 300; padding: 12px 18px; border-radius: 8px; background: var(--purple); color: #fff; font-weight: 700; transition: top 0.15s var(--ease); }
.skip-link:focus { top: 10px; color: #fff; text-decoration: none; }
main:focus { outline: none; }

/* niets kleiner dan 12 px, en kleine hoofdletterlabels minder gespatieerd zodat ze leesbaar blijven */
th { font-size: 12.5px; letter-spacing: 0.04em; color: var(--text-dim); }
.dash-section-label { font-size: 12px; letter-spacing: 0.12em; color: var(--text-dim); }
.dash-nav-group-title { font-size: 12px; letter-spacing: 0.06em; color: var(--text-dim); min-height: 36px; }
.stat .label, .hm-stats span { font-size: 12.5px; letter-spacing: 0.04em; color: var(--text-dim); }
.hm-panel-stats small { font-size: 12px; }
.chip { font-size: 12px; letter-spacing: 0.04em; }
.pill { font-size: 12.5px; }
.hint { font-size: 13.5px; line-height: 1.55; max-width: 72ch; color: var(--text-dim); }
.bulk-row .btn { font-size: 13px; letter-spacing: 0.04em; }
small { font-size: max(12px, 0.82em); }

/* knoppen en velden zijn groot genoeg om te raken; kleine knoppen worden gewone tekst in plaats van mini-hoofdletters */
.btn { min-height: 42px; }
.btn-sm, body.is-dash .btn-sm { min-height: 36px; font-size: 13.5px; letter-spacing: 0; text-transform: none; }
input[type=text], input[type=number], input[type=password], input[type=url], input[type=email], input[type=search], input[type=tel],
input[type=date], input[type=time], input[type=datetime-local], select { min-height: 44px; font-size: 15px; }
textarea { font-size: 15px; line-height: 1.5; }
input[type=checkbox]:not(.toggle-input), input[type=radio] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--purple); cursor: pointer; }
input[type="checkbox"].toggle-input { width: 46px; height: 26px; background: #2b3f85; }
input[type="checkbox"].toggle-input::after { top: 3px; left: 3px; width: 20px; height: 20px; }
input[type="checkbox"].toggle-input:checked::after { transform: translateX(20px); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 1px; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.28); }
.dash-nav-item { min-height: 44px; }
.dash-side-foot a { font-size: 14px; display: block; padding: 6px 0; }

/* formulieren in het dashboard: duidelijke labels, velden niet breder dan prettig leest, schakelaars als rij */
body.is-dash label { font-size: 14px; color: var(--text); margin: 18px 0 7px; }
body.is-dash .card :is(input[type=text], input[type=number], input[type=url], input[type=email], input[type=search], input[type=date], input[type=time], input[type=datetime-local], select, textarea) { max-width: 720px; }
body.is-dash .card td :is(input, select, textarea) { max-width: none; }
body.is-dash .card > h2:first-child { font-size: 19px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--card-border); }
body.is-dash .card > h2:first-child + .hint, body.is-dash .card > h2:first-child + p { margin-top: 14px; }
body.is-dash .card { margin-bottom: 24px; }
body.is-dash .stat { box-shadow: none; }
.switch-row {
  display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 16px;
  max-width: 720px; margin: 8px 0; padding: 12px 16px; border: 1px solid var(--card-border); border-radius: var(--radius); background: var(--bg-alt);
  transition: border-color 0.18s var(--ease);
}
.switch-row:hover { border-color: var(--line-strong); }
.switch-row label, body.is-dash .switch-row label { flex: 1; margin: 0 !important; font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer; line-height: 1.4; }
.switch-row input { width: auto; height: auto; }
.switch-row + .hint { margin: -2px 0 12px 2px; }
.toggle-row { padding: 14px 16px; gap: 14px; }
tr:hover td { background: rgba(var(--accent-rgb), 0.08); }
table { font-size: 14.5px; }

.is-dash .btn-sm:not(.btn-gold):not(.btn-danger):not(.btn-primary) { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); }
.dash-brand-text small { font-size: 12px; letter-spacing: 0.12em; color: var(--text-dim); }
.dash-search-result .group { font-size: 12px; color: var(--text-dim); }

/* wie in het besturingssysteem om meer contrast vraagt, krijgt dat */
@media (prefers-contrast: more) {
  :root { --card-border: #5a74cf; --line-strong: #7f97e6; --text-dim: #dbe3fa; --text-faint: #c3cdee; }
  .btn { border-width: 2px; }
}
@media (max-width: 720px) {
  .btn, .btn-sm, body.is-dash .btn-sm { min-height: 44px; }
  .switch-row { padding: 14px; }
  body.is-dash .card { padding: 18px; }
}

/* telefoon */
@media (max-width: 860px) {
  body { font-size: 16px; }
  /* 16 px in elk invoerveld: dan zoomt de telefoon niet in zodra je erin tikt */
  input[type=text], input[type=number], input[type=password], input[type=url], input[type=email], input[type=search], input[type=tel],
  input[type=date], input[type=time], input[type=datetime-local], select, textarea, .dash-search input, .lang-select { font-size: 16px; min-height: 48px; }
  /* alles wat je aantikt is minstens 44 px hoog */
  .btn, .btn-sm, body.is-dash .btn-sm { min-height: 46px; padding: 11px 16px; font-size: 15px; }
  .nav-toggle-btn, .guild-switcher-btn, .dash-menu-btn { min-height: 46px; min-width: 46px; display: inline-flex; align-items: center; justify-content: center; }
  .dash-menu-btn { padding: 0 16px; font-size: 15px; }
  .brand { min-height: 44px; }
  .dash-nav-item, body.is-dash .dash-nav-item { min-height: 50px; font-size: 16px; }
  .dash-nav-group-title { min-height: 46px; font-size: 13px; }
  .nav-mobile-panel a, .nav-mobile-panel .nav-mobile-btn { min-height: 48px; display: flex; align-items: center; font-size: 16px; }
  .footer a, .dash-side-foot a { display: inline-block; padding: 12px 8px; font-size: 15px; }
  /* schakelaars: het raakvlak is groter dan het plaatje */
  .toggle-switch, input[type="checkbox"].toggle-input { position: relative; }
  .toggle-switch::before, input[type="checkbox"].toggle-input::before { content: ''; position: absolute; inset: -10px -6px; }
  .switch-row { min-height: 56px; }
  .switch-row label, body.is-dash .switch-row label { font-size: 15.5px; }
  input[type=checkbox]:not(.toggle-input), input[type=radio] { width: 22px; height: 22px; }
  /* leesbare tekst: geen mini-hoofdletters die midden in een woord afbreken */
  .stat .label, body.is-dash .stat .label { text-transform: none; letter-spacing: 0; font-size: 14px; hyphens: auto; overflow-wrap: normal; word-break: normal; }
  .module-row-desc, .hint { font-size: 14.5px; line-height: 1.5; }
  body.is-dash label { font-size: 15.5px; }
  th { font-size: 13px; }
  td, table { font-size: 15px; }
  .pill, .chip { font-size: 13px; }
  body.is-dash .layout > div > h1:first-child, body.is-dash .layout > div > .page-head h1 { font-size: clamp(28px, 8vw, 36px); overflow-wrap: anywhere; }
  body.is-dash .card > h2:first-child { font-size: 20px; }
  /* velden en knoppen over de volle breedte; de opslaan-balk blijft boven de rand van het scherm */
  body.is-dash .card :is(input[type=text], input[type=number], input[type=url], input[type=email], input[type=search], input[type=date], input[type=time], input[type=datetime-local], select, textarea) { max-width: none; width: 100%; }
  .apm-sticky, .save-bar { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .apm-tools select, .apm-tools input { max-width: none; flex-basis: 100%; }
  .apm-actions .btn, .ap-actions .btn { flex: 1 1 auto; }
  .apm-tab { min-height: 48px; font-size: 15.5px; padding: 12px 14px; }
  .apm-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .apm-tab { white-space: nowrap; }
  .apm-row { min-height: 60px; }
  .ap-option { min-height: 52px; font-size: 16px; }
  .ap-scale-item { min-width: 48px; height: 48px; }
  /* een brede tabel schuift zelf, niet de hele pagina */
  .card { -webkit-overflow-scrolling: touch; }
}
@media (prefers-reduced-motion: reduce) { .btn, input, textarea, select { transition: none; } }
