/* Pas hier de huisstijl aan */
:root {
  /* Pawfect Academie */
  --accent: #8c2f55;        /* berry */
  --accent-2: #d06b97;      /* rose */
  --accent-soft: #fbe7ef;
  --blush: #f4c6d8;
  --bg: #fdf1f5;
  --card: #ffffff;
  --text: #3d1027;          /* ink */
  --muted: #7a4a60;
  --line: #f1d3e0;
  --danger: #c0262d;
  --ok: #2f7a3b;
  --radius: 20px;
  --shadow: 0 10px 30px -14px rgba(140, 47, 85, .25);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---- buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.btn:hover { background: #f1f2f5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=datetime-local], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 90px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.hint { font-size: 13px; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; margin: 8px 0; }

/* ---- auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, var(--accent-soft), var(--bg)); }
.auth .card { width: 100%; max-width: 400px; padding: 32px; }
.auth h1 { margin: 0 0 4px; font-size: 24px; }
.auth .logo { width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; margin-bottom: 18px; }

/* ---- layout */
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--card); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 15px; }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: #f1f2f5; }
.badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.menu-toggle { display: none; }

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1400px; margin: 0 auto; }
.sidebar { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--card); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: #374151; font-weight: 500; }
.nav a:hover { background: #f3f4f6; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav .ico { width: 20px; text-align: center; }
.nav h4 { margin: 18px 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nav hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.main { padding: 24px; min-width: 0; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.narrow { max-width: 760px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 12px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.card h3 a { font-size: 13px; color: var(--accent); font-weight: 500; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---- avatar */
.avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }

/* ---- feed */
.composer { display: flex; gap: 12px; align-items: flex-start; }
.composer .fake { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--muted); cursor: text; background: #fafafb; }
.post .meta { display: flex; gap: 10px; align-items: center; }
.post .meta .who { font-weight: 600; }
.post .meta .sub { font-size: 13px; color: var(--muted); }
.post h2 { font-size: 17px; margin: 12px 0 4px; }
.post .body { margin-top: 8px; white-space: normal; word-wrap: break-word; }
.post .body.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.post .actions { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.post .actions button { border: 0; background: transparent; padding: 6px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.post .actions button:hover { background: #f3f4f6; }
.post .actions button.on { color: var(--accent); }
.pin { font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 20px; margin-left: auto; }
.tag { font-size: 12px; background: #f3f4f6; padding: 2px 8px; border-radius: 20px; }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment .bubble { background: #f6f7f9; border-radius: 12px; padding: 8px 12px; flex: 1; }
.comment .bubble b { font-size: 14px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; }
.tabs a { padding: 6px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; font-size: 14px; }
.tabs a.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ---- courses */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.course-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.course-card .cover { height: 110px; display: grid; place-items: center; color: #fff; font-size: 34px; font-weight: 700; }
.course-card .inner { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.course-card h3 { margin: 0; font-size: 16px; }
.course-card.locked { opacity: .65; }
.progress { height: 6px; background: #eceef2; border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 4px; }
.mini-course { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.mini-course .sq { width: 40px; height: 40px; border-radius: 8px; flex: none; color: #fff; display: grid; place-items: center; font-weight: 700; }
.module { margin-bottom: 14px; }
.module h4 { margin: 0 0 6px; }
.lesson-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; }
.lesson-link:hover { background: #f3f4f6; }
.lesson-link .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 11px; color: #fff; }
.lesson-link .dot.done { background: var(--ok); border-color: var(--ok); }
.lesson-link.current { background: var(--accent-soft); }
.video { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 16px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; align-items: start; }

/* ---- events */
.event { display: flex; gap: 14px; align-items: flex-start; }
.datebox { flex: none; width: 54px; text-align: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.datebox .m { background: var(--accent); color: #fff; font-size: 11px; text-transform: uppercase; padding: 2px 0; }
.datebox .d { font-size: 20px; font-weight: 700; padding: 3px 0; }

/* ---- members */
.member { display: flex; gap: 12px; align-items: center; }
.notif { display: flex; gap: 10px; padding: 12px; border-radius: 10px; }
.notif.unread { background: var(--accent-soft); }

/* ---- admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 20px; background: #f3f4f6; }
.pill.ok { background: #dcfce7; color: #166534; }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.bad { background: #fee2e2; color: #991b1b; }
code, pre { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
pre { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 10px; overflow-x: auto; max-height: 300px; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat b { display: block; font-size: 26px; }

/* ---- modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--card); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 22px; }
.modal h2 { margin: 0 0 16px; font-size: 19px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 60; }
#toast div { background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; margin-top: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

.bottom-nav { display: none; }

/* ---- mobile */
@media (max-width: 1100px) {
  .columns, .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .aside { display: none; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu-toggle { display: grid; }
  .sidebar { position: fixed; top: calc(60px + env(safe-area-inset-top)); left: 0; bottom: 0; width: 280px; z-index: 30; transform: translateX(-100%); transition: transform .2s; height: auto; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.drawer .sidebar { transform: none; }
  .main { padding: 16px 12px calc(84px + env(safe-area-inset-bottom)); }
  .topbar { padding-left: 10px; padding-right: 10px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; text-align: center; padding: 8px 0 6px; font-size: 11px; color: var(--muted); position: relative; }
  .bottom-nav a .ico { display: block; font-size: 20px; line-height: 1.2; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav .badge { right: calc(50% - 22px); }
  .page-head h1 { font-size: 21px; }
}


/* ================= Pawfect-huisstijl ================= */
h1, .auth h1, .page-head h1, .course-card h3, .modal h2 { font-family: var(--serif); font-style: italic; font-weight: 700; letter-spacing: -.01em; }
.page-head h1 { font-size: 28px; }
.btn { border-radius: 999px; }
.btn.primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 16px -8px rgba(140,47,85,.6); }
.btn:hover { background: var(--accent-soft); }
.btn.primary:hover { background: #7a2549; filter: none; }
.card, .course-card { box-shadow: var(--shadow); border-color: var(--line); }
.nav a { color: var(--text); border-radius: 999px; }
.nav a:hover { background: var(--accent-soft); }
.nav a.active { background: var(--blush); color: var(--accent); font-weight: 600; }
.nav h4 { color: var(--accent-2); }
.sidebar { background: #fff8fb; }
.topbar { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); }
.brand { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--blush); }
.composer .fake { background: var(--bg); border-color: var(--line); border-radius: 999px; }
.tag, .pin { background: var(--blush); color: var(--accent); }
.tabs a.active { background: var(--accent); border-color: var(--accent); }
.progress { background: var(--accent-soft); }
.progress > div { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.datebox .m { background: var(--accent-2); }
.comment .bubble { background: var(--bg); }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px var(--blush); }
.course-card .cover { font-family: var(--serif); font-style: italic; }
.welcome-banner { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.welcome-banner img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.6); flex: none; }
.welcome-banner h1 { margin: 0; font-size: 26px; color: #fff; }
.welcome-banner p { margin: 2px 0 0; opacity: .9; }

/* inlogscherm met foto */
.auth { background: var(--bg); padding: 0; grid-template-columns: 1fr 1fr; place-items: stretch; }
.auth .auth-form { display: grid; place-items: center; padding: 24px; }
.auth .card { box-shadow: var(--shadow); border-radius: 28px; }
.auth .auth-photo { background: url(/img/academie.jpg) center/cover; position: relative; }
.auth .auth-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(140,47,85,0) 50%, rgba(61,16,39,.55)); }
.auth .auth-photo span { position: absolute; left: 32px; bottom: 32px; z-index: 1; color: #fff; font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.2; max-width: 420px; }
.auth .logo-img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--blush); margin-bottom: 16px; }
@media (max-width: 800px) {
  .auth { grid-template-columns: 1fr; }
  .auth .auth-photo { display: none; }
  .auth .auth-form { min-height: 100vh; background: linear-gradient(180deg, var(--blush), var(--bg) 45%); }
  .bottom-nav a.active { color: var(--accent); }
}
.brand span, .pin { white-space: nowrap; }
@media (max-width: 800px) {
  .brand { font-size: 18px; min-width: 0; }
  .brand span { overflow: hidden; text-overflow: ellipsis; }
  .composer > .avatar { display: none; }
  .welcome-banner { padding: 16px; gap: 12px; }
  .welcome-banner img { width: 52px; height: 52px; }
  .welcome-banner h1 { font-size: 22px; }
  .welcome-banner p { font-size: 14px; }
}

.upload-drop { display: block; border: 2px dashed var(--blush); border-radius: 16px; padding: 18px; text-align: center; cursor: pointer; background: var(--bg); }
.upload-drop:hover, .upload-drop.over { border-color: var(--accent-2); background: var(--accent-soft); }

/* foto's in berichten */
.post-images { display: grid; gap: 4px; margin-top: 12px; border-radius: 14px; overflow: hidden; }
.post-images.n1 { grid-template-columns: 1fr; }
.post-images.n2 { grid-template-columns: 1fr 1fr; }
.post-images.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-images.n3 .pimg:first-child { grid-row: span 2; }
.post-images.n4 { grid-template-columns: 1fr 1fr; }
.pimg { position: relative; padding: 0; border: 0; background: var(--accent-soft); cursor: zoom-in; display: block; }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.post-images.n1 img { aspect-ratio: auto; max-height: 520px; }
.pimg .more { position: absolute; inset: 0; background: rgba(61,16,39,.55); color: #fff; font-size: 28px; font-weight: 700; display: grid; place-items: center; }
.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.photo-strip:empty { display: none; }
.thumb { position: relative; width: 80px; height: 80px; border-radius: 12px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.modal-bg.dark { background: rgba(20, 6, 13, .92); }
.modal.bare { background: transparent; padding: 0; max-width: 95vw; max-height: 95vh; overflow: visible; }
.lightbox { position: relative; display: grid; place-items: center; }
.lightbox img { max-width: 95vw; max-height: 88vh; border-radius: 12px; display: block; }
.lb { position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; cursor: pointer; }
.lb:hover { background: rgba(255,255,255,.3); }
.lb.prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb.next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb.close { top: -52px; right: 0; }
.lb-count { position: absolute; bottom: -34px; color: #fff; font-size: 14px; }
.composer .icon-btn { flex: none; }

/* privéberichten */
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; }
.inbox-row:hover { background: var(--bg); }
.inbox-row.unread b { color: var(--accent); }
.inbox-row.unread { background: var(--accent-soft); }
.badge.static { position: static; }
.nav .badge { position: static; margin-left: auto; }
.chat { display: flex; flex-direction: column; }
.chat .card + .card { margin-top: 10px; }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--blush); }
.chat-body { height: calc(100vh - 360px); min-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 82%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble-wrap { min-width: 0; }
.mbubble { background: var(--bg); border: 1px solid var(--line); padding: 9px 13px; border-radius: 18px 18px 18px 4px; word-wrap: break-word; }
.msg.mine .mbubble { background: var(--accent); color: #fff; border-color: var(--accent); border-radius: 18px 18px 4px 18px; }
.msg.mine .mbubble a { color: #fff !important; text-decoration: underline; }
.mimg { display: block; border: 0; padding: 0; margin-top: 6px; background: none; cursor: zoom-in; }
.mimg img { max-width: 240px; max-height: 240px; border-radius: 12px; display: block; }
.chat-form textarea { resize: none; border-radius: 22px; padding: 11px 16px; }
@media (max-width: 800px) {
  .chat-body { height: calc(100vh - 330px); }
  .msg { max-width: 90%; }
}
.chat-avatar.sm { width: 30px; height: 30px; flex: none; }

/* ================= Luxe afwerking (Apple-stijl) ================= */
.i { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.i.lg { width: 34px; height: 34px; stroke-width: 1.3; }
.btn .i { width: 17px; height: 17px; }
.small .i, .pin .i { width: 14px; height: 14px; }

body { font-feature-settings: "cv11", "ss01"; letter-spacing: -0.006em; }

/* glas-effect bovenbalk en zijbalk */
.topbar { background: rgba(255, 252, 253, .72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(140, 47, 85, .08); }
.sidebar { background: rgba(255, 248, 251, .6); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-right: 1px solid rgba(140, 47, 85, .08); padding: 18px 14px; }

/* menu */
.nav a { gap: 12px; padding: 9px 12px; border-radius: 12px; font-weight: 500; font-size: 15px; color: var(--text); transition: background .15s, color .15s; }
.nav .ico { width: 22px; display: grid; place-items: center; color: var(--muted); }
.nav .ico .i { width: 21px; height: 21px; }
.nav a:hover { background: rgba(140, 47, 85, .06); }
.nav a.active { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(61,16,39,.06), 0 4px 14px -6px rgba(140,47,85,.25); }
.nav a.active .ico { color: var(--accent); }
.nav a.active .i { stroke-width: 1.9; }
.nav h4 { margin: 22px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: rgba(122, 74, 96, .7); }
.nav hr { border-top-color: rgba(140, 47, 85, .1); margin: 14px 8px; }

/* bovenbalk-knoppen */
.icon-btn { color: var(--text); border-radius: 50%; width: 40px; height: 40px; }
.icon-btn .i { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(140, 47, 85, .07); }
.badge { background: #e0245e; box-shadow: 0 0 0 2px #fff; font-variant-numeric: tabular-nums; }

/* kaarten: zachte, gelaagde schaduw */
.card, .course-card { border: 1px solid rgba(140, 47, 85, .07); box-shadow: 0 1px 2px rgba(61,16,39,.04), 0 10px 30px -16px rgba(61,16,39,.18); }
.card { border-radius: 22px; }

/* berichten-acties */
.post .actions button { display: inline-flex; align-items: center; gap: 6px; }
.post .actions .i { width: 19px; height: 19px; }
.post .actions button.on { color: #e0245e; }
.post .actions button.on .i { fill: #e0245e; stroke: #e0245e; }
.pin { display: inline-flex; align-items: center; gap: 4px; }

/* ruimte-iconen */
.space-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, #fff, var(--accent-soft)); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(140,47,85,.08); }
.space-ico .i { width: 20px; height: 20px; }
h1.with-icon { display: flex; align-items: center; gap: 12px; }
h1.with-icon .space-ico { width: 44px; height: 44px; border-radius: 13px; }
h1.with-icon .space-ico .i { width: 24px; height: 24px; }

/* icoonkiezer */
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.iconpick input { position: absolute; opacity: 0; pointer-events: none; }
.iconpick span { display: grid; place-items: center; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; transition: all .15s; }
.iconpick span:hover { border-color: var(--accent-2); color: var(--accent); }
.iconpick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px rgba(140,47,85,.7); }

/* lessen */
.lesson-link .dot .i { width: 12px; height: 12px; stroke-width: 2.6; }
.lesson-link .muted .i { width: 15px; height: 15px; }
.notif-ico { color: var(--accent); display: grid; place-items: center; }
#uplabel .i { width: 18px; height: 18px; margin-right: 4px; }
.course-card .cover .i { color: rgba(255,255,255,.9); }

/* onderbalk mobiel: glas */
@media (max-width: 800px) {
  .bottom-nav { background: rgba(255, 252, 253, .78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid rgba(140, 47, 85, .08); }
  .bottom-nav a { font-size: 10.5px; font-weight: 500; padding: 7px 0 5px; }
  .bottom-nav a .ico { display: grid; place-items: center; height: 28px; }
  .bottom-nav a .ico .i { width: 25px; height: 25px; }
  .bottom-nav a.active .i { stroke-width: 2; }
  .bottom-nav .badge { position: absolute; top: 3px; right: calc(50% - 20px); }
  .sidebar { background: rgba(255, 250, 252, .94); }
}
/* logo */
.brand img.logo-mark { width: 34px; height: 34px; border-radius: 9px; border: 0; object-fit: contain; box-shadow: 0 4px 12px -6px rgba(140,47,85,.6); }
.auth .logo-img.logo-mark { width: 64px; height: 64px; border-radius: 16px; border: 0; box-shadow: 0 10px 24px -12px rgba(140,47,85,.7); }
@media (max-width: 800px) {
  .topbar { gap: 4px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand img.logo-mark { width: 30px; height: 30px; border-radius: 8px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 360px) { .brand span { display: none; } }

/* ================= Stijlkeuze in Beheer ================= */
.theme-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-opt { display: flex; gap: 14px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: inherit; }
.theme-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tp-prev { position: relative; flex: none; width: 92px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.tp-prev i { position: absolute; left: 0; top: 0; bottom: 0; width: 24px; }
.tp-prev b { position: absolute; left: 32px; top: 9px; width: 40px; height: 7px; border-radius: 4px; }
.tp-prev span { position: absolute; left: 32px; right: 8px; height: 13px; border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tp-prev span:nth-of-type(1) { top: 22px; } .tp-prev span:nth-of-type(2) { top: 40px; }
.tp-prev em { position: absolute; right: 8px; top: 7px; width: 18px; height: 9px; border-radius: 5px; background: #8c2f55; }
.tp-calm { background: #f5f5f7; } .tp-calm i { background: #fff; border-right: 1px solid #e5e5ea; } .tp-calm b { background: #1d1d1f; }
.tp-blush { background: #fdf1f5; } .tp-blush i { background: #fbe7ef; } .tp-blush b { background: #8c2f55; }
@media (max-width: 600px) { .theme-pick { grid-template-columns: 1fr; } }

/* ================= RUSTIGE STIJL (zoals thuistrimmen.nl) =================
   Wit en lichtgrijs, strakke zwarte koppen, kleur alleen waar je moet klikken. */
body.theme-calm {
  --accent: #7a2a4b;
  --accent-2: #7a2a4b;
  --accent-soft: #f6eef2;
  --blush: #f2f2f4;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -14px rgba(0,0,0,.12);
  background: var(--bg);
}
/* koppen: strak en vet in plaats van sierlijk cursief */
.theme-calm h1, .theme-calm .auth h1, .theme-calm .page-head h1, .theme-calm .course-card h3, .theme-calm .modal h2 {
  font-family: var(--font); font-style: normal; font-weight: 700; letter-spacing: -0.025em;
}
.theme-calm .page-head h1 { font-size: 30px; }
.theme-calm .brand { font-family: var(--font); font-style: normal; font-weight: 700; color: var(--text); letter-spacing: -0.02em; font-size: 18px; }

/* balken: wit glas */
.theme-calm .topbar { background: rgba(255,255,255,.8); border-bottom: 1px solid rgba(0,0,0,.06); }
.theme-calm .sidebar { background: rgba(255,255,255,.75); border-right: 1px solid rgba(0,0,0,.06); }
.theme-calm .bottom-nav { background: rgba(255,255,255,.85) !important; border-top: 1px solid rgba(0,0,0,.06) !important; }

/* menu: grijs actief vlak, alleen het icoon in kleur */
.theme-calm .nav a { color: var(--text); }
.theme-calm .nav a:hover { background: rgba(0,0,0,.04); }
.theme-calm .nav a.active { background: #f0f0f2; color: var(--text); box-shadow: none; font-weight: 600; }
.theme-calm .nav a.active .ico { color: var(--accent); }
.theme-calm .nav h4 { color: #8e8e93; }
.theme-calm .nav hr { border-top-color: var(--line); }
.theme-calm .icon-btn:hover { background: rgba(0,0,0,.05); }

/* kaarten: wit, dun randje, nauwelijks schaduw */
.theme-calm .card, .theme-calm .course-card { border: 1px solid rgba(0,0,0,.06); box-shadow: var(--shadow); }
.theme-calm .card { border-radius: 18px; }

/* knoppen */
.theme-calm .btn { background: #fff; border-color: #d2d2d7; }
.theme-calm .btn:hover { background: #f5f5f7; }
.theme-calm .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; }
.theme-calm .btn.primary:hover { background: #64213d; }
.theme-calm input:focus, .theme-calm textarea:focus, .theme-calm select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122,42,75,.12); }

/* welkomstbanner: wit in plaats van verloop */
.theme-calm .welcome-banner { background: #fff; color: var(--text); border: 1px solid rgba(0,0,0,.06); }
.theme-calm .welcome-banner h1 { color: var(--text); }
.theme-calm .welcome-banner p { color: var(--muted); opacity: 1; }
.theme-calm .welcome-banner img { border-color: #f0f0f2; }

/* labels, pins, datums */
.theme-calm .tag, .theme-calm .pin { background: #f0f0f2; color: var(--muted); }
.theme-calm .datebox .m { background: var(--text); }
.theme-calm .composer .fake { background: #f5f5f7; border-color: transparent; }
.theme-calm .comment .bubble { background: #f5f5f7; }
.theme-calm .space-ico { background: #f5f5f7; color: var(--text); box-shadow: none; }
.theme-calm .avatar { filter: saturate(.85); }

/* trainingen: rustige grijze covers met de kleur alleen als accent */
.theme-calm .course-card .cover { background: #f5f5f7 !important; color: var(--accent); height: 96px; font-family: var(--font); font-style: normal; font-weight: 700; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); }
.theme-calm .course-card .cover .i { color: #aeaeb2; }
.theme-calm .mini-course .sq { background: #f5f5f7 !important; color: var(--accent); }
.theme-calm .course-hero { background: #fff !important; color: var(--text) !important; border: 1px solid rgba(0,0,0,.06) !important; }
.theme-calm .course-hero p { opacity: 1 !important; color: var(--muted); }
.theme-calm .course-hero .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.theme-calm .hero-progress { background: #f0f0f2 !important; }
.theme-calm .hero-progress > div { background: var(--accent) !important; }
.theme-calm .progress { background: #f0f0f2; }
.theme-calm .progress > div { background: var(--accent); }
.theme-calm .lesson-link.current { background: #f0f0f2; }
.theme-calm .tabs a { border-color: var(--line); }
.theme-calm .tabs a.active { background: var(--text); border-color: var(--text); }

/* berichten */
.theme-calm .mbubble { background: #f0f0f2; border-color: transparent; }
.theme-calm .inbox-row.unread { background: #f5f5f7; }
.theme-calm .notif.unread { background: #f5f5f7; }
.theme-calm .upload-drop { border-color: #d2d2d7; background: #fafafa; }
.theme-calm .iconpick input:checked + span { box-shadow: none; }

/* inlogscherm */
.theme-calm .auth { background: #fff; }
.theme-calm .auth .card { box-shadow: none; border: 0; }
.theme-calm .auth .auth-photo span { font-family: var(--font); font-style: normal; font-weight: 700; letter-spacing: -0.02em; font-size: 28px; }
@media (max-width: 800px) { .theme-calm .auth .auth-form { background: #fff; } }

/* afbeelding per training */
.course-card .cover.has-img { height: auto; aspect-ratio: 16 / 9; padding: 0; position: relative; background: #f0f0f2 !important; }
.course-card .cover.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card.locked .cover.has-img img { filter: grayscale(.4) brightness(.9); }
.cover-lock { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); display: grid; place-items: center; color: var(--text); }
.cover-lock .i { width: 17px; height: 17px; }
.mini-course .sq-img { object-fit: cover; padding: 0; }
.course-hero.with-img { padding-top: 0; overflow: hidden; }
.course-hero .hero-img { display: block; width: calc(100% + 36px); margin: 0 -18px 18px; aspect-ratio: 16 / 7; object-fit: cover; }
/* uploadveld */
.img-drop { position: relative; border: 1.5px dashed #d2d2d7; border-radius: 14px; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; background: #fafafa; display: grid; place-items: center; transition: border-color .15s, background .15s; }
.img-drop:hover, .img-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-drop.has { border-style: solid; border-color: transparent; }
.img-drop.has .img-drop-empty { display: none; }
.img-drop.busy { opacity: .55; }
.img-drop-empty { text-align: center; color: var(--muted); font-size: 14px; display: grid; justify-items: center; gap: 6px; }
.img-drop-empty .i { width: 30px; height: 30px; stroke-width: 1.3; }
/* alle trainingskaarten even hoog: liggend 16:9 */
.course-card .cover, .theme-calm .course-card .cover { height: auto; aspect-ratio: 16 / 9; }
.course-card .cover.has-img img { position: absolute; inset: 0; }

/* groepen beheren */
.nav a { position: relative; }
.nav-edit { display: none; border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 8px; cursor: pointer; place-items: center; padding: 0; margin-left: auto; }
.nav-edit .i { width: 15px; height: 15px; }
.nav a:hover .nav-edit { display: grid; }
.nav-edit:hover { background: rgba(0,0,0,.06); color: var(--text); }
@media (hover: none) { .nav-edit { display: grid; opacity: .6; } }
.nav a.nav-add { color: var(--muted); font-weight: 500; margin-top: 4px; }
.nav a.nav-add:hover { color: var(--accent); }
.cat-block { margin-top: 18px; }
.cat-head { display: flex; align-items: center; gap: 8px; padding: 6px 0 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cat-name { flex: 1; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cat-actions { display: flex; align-items: center; gap: 4px; }
.group-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .i { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: .25; cursor: default; }
.icon-btn.danger { color: var(--danger); }
@media (max-width: 600px) { .group-row { flex-wrap: wrap; } .group-row > div { flex-basis: calc(100% - 50px) !important; } }

/* ================= reacties (Huddle-stijl) ================= */
.post-comments { margin-top: 6px; }
.more-comments { display: inline-block; font-size: 14px; font-weight: 600; color: var(--muted); margin: 6px 0 2px; }
.more-comments:hover { color: var(--accent); }
.comment { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.cmt { flex: 1; min-width: 0; }
.comment .bubble { display: inline-block; max-width: 100%; background: #f2f2f4; border-radius: 16px; padding: 8px 14px; }
.comment .bubble b { font-size: 14px; display: block; }
.cmt-meta { margin: 3px 0 0 12px; }
.cmt-meta a { color: var(--muted); }
.cmt-meta a:hover { color: var(--danger); }
.cmt-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cmt-imgs .mimg { margin: 0; }
.cmt-imgs .mimg img { max-width: 180px; max-height: 180px; }
.cmt-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--text); max-width: 240px; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .i { width: 16px; height: 16px; color: var(--accent); }
.file-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; padding: 0 0 0 2px; }

.cbox { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 8px 8px 10px; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.cbox.focus, .cbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.cbox > .avatar { flex: none; width: 38px; height: 38px; }
.cbox-main { flex: 1; min-width: 0; }
.cbox-main textarea { width: 100%; border: 0 !important; box-shadow: none !important; outline: none; resize: none; padding: 9px 0; min-height: 0; background: transparent; font-size: 15px; line-height: 1.4; display: block; }
.cbox-main textarea::placeholder { color: #9a9aa0; }
.cbox-attach { display: flex; gap: 6px; flex-wrap: wrap; }
.cbox-attach:not(:empty) { padding-top: 6px; }
.cbox-attach .thumb { width: 56px; height: 56px; }
.cbox-tools { display: flex; align-items: center; gap: 2px; flex: none; align-self: flex-end; }
.cbox-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: #4a4a4f; display: grid; place-items: center; cursor: pointer; }
.cbox-btn:hover { background: #f2f2f4; color: var(--text); }
.cbox-btn .i { width: 20px; height: 20px; }
.cbox-send { width: 44px; height: 44px; margin-left: 4px; border-radius: 12px; border: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); opacity: .55; cursor: default; transition: all .15s; }
.cbox-send .i { width: 20px; height: 20px; fill: currentColor; }
.cbox.ready .cbox-send { background: var(--accent); color: #fff; opacity: 1; cursor: pointer; }
.cbox.ready .cbox-send:hover { filter: brightness(1.1); }
.emoji-pop { position: absolute; right: 50px; bottom: calc(100% + 6px); z-index: 20; display: grid; grid-template-columns: repeat(9, 34px); gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px -12px rgba(0,0,0,.25); }
.emoji-pop[hidden] { display: none; }
.emoji-pop button { width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; font-size: 20px; cursor: pointer; }
.emoji-pop button:hover { background: #f2f2f4; }
@media (max-width: 600px) {
  .cbox { gap: 8px; padding: 6px 6px 6px 8px; }
  .cbox > .avatar { display: none; }
  .cbox-btn { width: 32px; height: 32px; }
  .cbox-send { width: 40px; height: 40px; }
  .emoji-pop { right: 0; grid-template-columns: repeat(7, 34px); }
}

/* emoji als groepsicoon */
.emo { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-style: normal; line-height: 1; display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 18px; }
.nav .ico .emo { font-size: 18px; }
.space-ico .emo { font-size: 20px; width: 24px; height: 24px; }
h1.with-icon .space-ico .emo { font-size: 26px; width: 30px; height: 30px; }
.theme-calm .space-ico:has(.emo), .space-ico:has(.emo) { background: #f5f5f7; }
.iconpick-sub { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 6px; }
.iconpick.emoji span { font-size: 22px; }
.iconpick.emoji input:checked + span { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); color: inherit; }
.iconpick-custom { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.iconpick-custom input { width: 80px !important; text-align: center; font-size: 20px; padding: 6px !important; }

/* ================= trainingspagina (inhoudsoverzicht) ================= */
.course-page { max-width: 1120px; margin: 0 auto; }
.course-top { padding: 0; overflow: hidden; }
.ct-media { position: relative; aspect-ratio: 16 / 5; min-height: 190px; background: center / cover no-repeat; display: grid; place-items: center; }
.ct-media.no-img { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000)); }
.theme-calm .ct-media.no-img { background: linear-gradient(135deg, #3a3a3c, #1d1d1f); }
.ct-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.55)); }
.ct-title { position: absolute; left: 24px; right: 24px; bottom: 18px; margin: 0; color: #fff !important; font-size: 30px; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.ct-play { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: rgba(255,255,255,.22); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); color: #fff; border: 1px solid rgba(255,255,255,.35); transition: transform .15s, background .15s; }
.ct-play:hover { transform: scale(1.05); background: var(--accent); border-color: var(--accent); }
.ct-play .i { width: 30px; height: 30px; fill: #fff; stroke: #fff; margin-left: 3px; }
.ct-body { display: flex; align-items: center; gap: 18px; padding: 16px 20px; }
.ct-progress { flex: 1; display: grid; gap: 6px; }
.ct-body .btn .i { width: 16px; height: 16px; }
.ct-tabs { display: none; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 18px; }
.course-side { position: sticky; top: 80px; }
.cm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cm-head h3 { margin: 0 auto 0 0; font-size: 18px; }
.cm-head select { width: auto; min-width: 200px; border-radius: 12px; }
.cm-search { position: relative; display: block; }
.cm-search input { border-radius: 12px; padding-right: 38px; background: #f5f5f7; border-color: transparent; width: 230px; }
.cm-search .i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.mod { border-bottom: 1px solid var(--line); }
.mod:last-child { border-bottom: 0; }
.mod-head { width: 100%; display: flex; align-items: center; gap: 16px; padding: 12px 4px; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.mod-thumb { position: relative; flex: none; width: 132px; aspect-ratio: 16 / 9; border-radius: 12px; }
.mod-thumb img, .mod-ph { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.mod-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 65%, #fff)); color: #fff; }
.theme-calm .mod-ph { background: #f0f0f2; color: #aeaeb2; }
.mod-ph .i { width: 26px; height: 26px; stroke-width: 1.4; }
.mod-num { position: absolute; right: -12px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--text); }
.mod-num.done { background: var(--ok); color: #fff; }
.mod-num .i { width: 15px; height: 15px; stroke-width: 2.6; }
.mod-title { flex: 1; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; padding-left: 6px; }
.mod-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.mod-chev { color: var(--muted); transition: transform .2s; display: grid; }
.mod.open .mod-chev { transform: rotate(180deg); }
.mod-lessons { display: none; padding: 0 0 12px 154px; }
.mod.open .mod-lessons { display: block; }
.cs-stat { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.cs-stat .i { width: 19px; height: 19px; color: var(--muted); }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.cs-people { text-align: center; }
.cs-people p { margin: 8px 0 0; }
.avatar-stack { display: flex; justify-content: center; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.adm-mod-thumb { width: 52px; height: 30px; object-fit: cover; border-radius: 6px; margin-right: 10px; }
@media (max-width: 900px) {
  .course-layout { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .course-side { position: static; }
  .ct-tabs { display: flex; gap: 22px; padding: 4px 6px 0; margin-top: 8px; border-bottom: 1px solid var(--line); }
  .ct-tabs button { border: 0; background: none; font: inherit; font-size: 17px; font-weight: 600; color: var(--muted); padding: 10px 2px 12px; cursor: pointer; border-bottom: 3px solid transparent; }
  .ct-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
  .course-layout { margin-top: 12px; }
  .course-layout.tab-content .course-side { display: none; }
  .course-layout.tab-info .course-main { display: none; }
  .cm-head h3 { display: none; }
  .cm-head select, .cm-search, .cm-search input { width: 100%; min-width: 0; }
  .ct-media { aspect-ratio: 16 / 9; min-height: 0; }
  .ct-title { font-size: 22px; left: 16px; bottom: 12px; }
  .ct-play { width: 60px; height: 60px; border-radius: 18px; }
  .ct-body { padding: 12px 14px; flex-wrap: wrap; }
  .ct-body .btn { width: 100%; justify-content: center; }
  .mod-head { gap: 14px; padding: 10px 0; }
  .mod-thumb { width: 104px; }
  .mod-title { font-size: 15.5px; }
  .mod-count { display: none; }
  .mod-lessons { padding-left: 0; }
}

/* ================= telefoon: alles netjes binnen het scherm ================= */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
img, video, iframe, table, pre { max-width: 100%; }
code { word-break: break-all; }
.main, .columns > *, .narrow, .course-page, .lesson-layout > * { min-width: 0; }
.copy input { min-width: 0; }
@media (max-width: 800px) {
  /* iPhone zoomt in bij tekstvakken kleiner dan 16px; daardoor ging de pagina "zwieren" */
  input, textarea, select, .cbox-main textarea { font-size: 16px !important; }
  body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .table-wrap, .tabs { -webkit-overflow-scrolling: touch; }
  .modal { max-width: calc(100vw - 24px); }
  .modal-bg { padding: 12px; }
}

/* ================= Huisstijl Pawfect Academie: Poppins, #631431 =================
   Zoals op pawfectacademie.nl: vette Poppins-koppen in donker bes, zachtroze achtergrond, ronde knoppen. */
:root, body.theme-calm {
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Poppins", system-ui, sans-serif;
  --accent: #631431;
  --accent-2: #8f2d55;
}
:root { --bg: #fff7f8; --text: #3a0f22; --accent-soft: #fbeaf0; --blush: #f7dbe5; }
body { letter-spacing: 0; font-feature-settings: normal; }
h1, h2, h3, .auth h1, .page-head h1, .course-card h3, .modal h2, .brand, .ct-title, .welcome-banner h1, .mod-title {
  font-family: var(--font) !important; font-style: normal !important; font-weight: 700; letter-spacing: -0.015em;
}
.page-head h1 { color: var(--accent); }
.theme-calm .page-head h1 { color: var(--text); }
.brand { color: var(--accent) !important; font-weight: 700; }
.btn { font-weight: 600; }
.btn.primary { font-weight: 700; }
.nav h4, .cat-name, .iconpick-sub { letter-spacing: .14em; font-weight: 600; }
.theme-calm .btn.primary:hover { background: #4d0f26; }
.btn.primary:hover { background: #4d0f26; }

/* profielfoto */
img.avatar { object-fit: cover; padding: 0; background: #eee; }
.profile-photo { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.pp-drop { width: 96px; height: 96px; aspect-ratio: 1; border-radius: 50%; flex: none; border-style: solid; border-color: transparent; background: none; }
.pp-drop .img-drop-empty { width: 100%; height: 100%; }
.pp-initials { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 32px; font-weight: 600; }
.pp-drop img { border-radius: 50%; }
.pp-cam { position: absolute; right: 2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); display: grid; place-items: center; color: var(--text); z-index: 1; }
.pp-cam .i { width: 16px; height: 16px; }
.pp-drop:hover { background: none; }

/* ================= echt Pawfect Academie-logo ================= */
.brand { gap: 10px; }
.brand img.brand-mark { height: 38px; width: auto; border: 0; border-radius: 0; box-shadow: none; object-fit: contain; }
.brand img.brand-word { height: 26px; width: auto; border: 0; border-radius: 0; box-shadow: none; }
.auth-logo { display: block; width: 190px; max-width: 70%; height: auto; margin: 0 0 14px -6px; }
@media (max-width: 800px) {
  .brand img.brand-mark { height: 32px; }
  .brand img.brand-word { height: 22px; }
}
@media (max-width: 360px) { .brand img.brand-word { display: none; } }

.auth .auth-photo span { font-family: var(--font) !important; font-style: normal !important; font-weight: 700; letter-spacing: -0.01em; }

/* alleen het hondje als logo */
.brand img.brand-mark { height: 44px; }
.auth-logo.dog { width: 96px; margin: 0 0 10px -4px; }
@media (max-width: 800px) { .brand img.brand-mark { height: 38px; } }

.brand { gap: 8px; }
.brand img.brand-mark { height: 42px; margin: -2px 0; }
.brand .brand-name { font-family: var(--font) !important; font-style: normal !important; font-weight: 700; font-size: 19px; color: var(--accent); letter-spacing: -0.02em; white-space: nowrap; }
.theme-calm .brand .brand-name { color: var(--accent); }
@media (max-width: 800px) { .brand img.brand-mark { height: 36px; } .brand .brand-name { font-size: 17px; } }
@media (max-width: 360px) { .brand .brand-name { display: none; } }

/* ================= logo gecentreerd in de bovenbalk ================= */
.topbar { position: sticky; }
.topbar .brand { position: absolute; left: 50%; top: calc(50% + env(safe-area-inset-top) / 2); transform: translate(-50%, -50%); }
@media (max-width: 800px) {
  .topbar .brand .brand-name { display: none; }
  .topbar .brand img.brand-mark { height: 42px; }
  /* schrijfvakken op één regel */
  .composer .fake { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cbox [data-emoji] { display: none; }   /* de telefoon heeft zelf een emoji-toetsenbord */
  .cbox-main textarea { white-space: nowrap; overflow: hidden; }
  .cbox-main textarea:focus, .cbox.ready .cbox-main textarea { white-space: pre-wrap; overflow: auto; }
}

/* groepsiconen: altijd hetzelfde zachtroze vlakje, ook bij emoji en in de rustige stijl */
.space-ico, .space-ico:has(.emo), .theme-calm .space-ico, .theme-calm .space-ico:has(.emo) {
  background: linear-gradient(145deg, #fff, var(--accent-soft));
  box-shadow: inset 0 0 0 1px rgba(99, 20, 49, .08);
  color: var(--accent);
}

/* ================= beheer: overzicht, activiteit, toegang ================= */
.ov-hello { display: flex; align-items: center; gap: 14px; }
.ov-hello .avatar { width: 52px; height: 52px; font-size: 18px; }
.ov-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.ov-tile { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 16px 10px; color: var(--text); margin: 0 !important; }
.ov-tile:hover { border-color: var(--accent); }
.ov-tile b { font-size: 24px; line-height: 1.2; }
.ov-tile span:last-child { font-size: 13px; color: var(--muted); }
.ov-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, #fff, var(--accent-soft)); color: var(--accent); margin-bottom: 4px; }
.ov-ic .i { width: 24px; height: 24px; }
.seg { display: inline-flex; background: #f2f2f4; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.act-list { display: grid; }
.act-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.act-row:last-child { border-bottom: 0; }
.act-row .avatar { width: 40px; height: 40px; }
.act-text { color: var(--muted); }
a.act-text:hover { color: var(--accent); }
.lvl-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin: 2px 4px 2px 0; white-space: nowrap; }
.lvl-chip .i { width: 13px; height: 13px; }
.lvl-row { margin: 4px 0; }
.lvl-card { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lvl-card:last-child { border-bottom: 0; }
.lvl-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, #fff, var(--accent-soft)); color: var(--accent); flex: none; }
.access-field .check .i { width: 15px; height: 15px; color: var(--accent); }
.access-levels { margin: 4px 0 0 26px; padding: 8px 12px; border-left: 2px solid var(--accent-soft); }
.st-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.st-actions { display: flex; gap: 8px; }
.st-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.st-stats .card { margin: 0 !important; text-align: center; }
.st-stats b { display: block; font-size: 24px; color: var(--accent); }
.st-stats span { font-size: 13px; color: var(--muted); }
.st-course { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.st-course:last-child { border-bottom: 0; }
.st-course img, .st-ph { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; }
@media (max-width: 600px) { .st-course img, .st-ph { width: 64px; } .st-actions { width: 100%; } }

/* ================= community: reacties, polls, @taggen, zoeken, ranglijst, banner ================= */
.reacts { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post .actions .reacts button.react { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 15px; color: var(--text); }
.post .actions .reacts button.react span { font-size: 13px; font-weight: 600; color: var(--muted); }
.post .actions .reacts button.react.mine { background: var(--accent-soft); border-color: var(--accent); }
.post .actions .reacts button.react.mine span { color: var(--accent); }
.post .actions .reacts button.react.add { color: var(--muted); padding: 4px 8px; }
.post .actions .reacts button.react.add .i { width: 18px; height: 18px; }
.react-pop { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 15; display: flex; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.3); }
.react-pop[hidden] { display: none; }
.post .actions .react-pop button { font-size: 22px; padding: 4px 6px; border-radius: 50%; transition: transform .1s; }
.post .actions .react-pop button:hover { transform: scale(1.25); background: none; }
.lvl-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.streak { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; font-size: 12px; font-weight: 700; color: #e8590c; vertical-align: 1px; }
.streak .i { width: 14px; height: 14px; fill: #ffb347; stroke: #e8590c; }
.comment .bubble b .lvl-badge, .comment .bubble .lvl-badge { margin-left: 6px; }
.comment .bubble > b { display: inline; }
.comment .bubble > b + .lvl-badge + div, .comment .bubble > b + div, .comment .bubble > b + .streak + div { margin-top: 2px; }
.mention { color: var(--accent); font-weight: 600; }
.mention-wrap { position: relative; }
.mention-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.3); padding: 4px; max-height: 260px; overflow: auto; }
.mention-pop[hidden] { display: none; }
.cbox .mention-pop { top: auto; bottom: 100%; margin: 0 0 6px; }
.mention-pop button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 10px; cursor: pointer; font: inherit; text-align: left; }
.mention-pop button:hover, .mention-pop button:first-child { background: var(--accent-soft); }
.poll { display: grid; gap: 6px; margin: 12px 0 4px; }
.poll-opt { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--text); }
.poll:not(.voted) .poll-opt:hover { border-color: var(--accent); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); transition: width .4s; }
.poll-opt.mine { border-color: var(--accent); }
.poll-opt.mine .poll-bar { background: color-mix(in srgb, var(--accent) 18%, #fff); }
.poll-label, .poll-pct { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.poll-pct { font-weight: 700; color: var(--accent); }
.poll-label .i { width: 16px; height: 16px; color: var(--accent); stroke-width: 2.4; }
.poll-edit { display: grid; gap: 6px; margin-bottom: 12px; padding: 12px; border-radius: 12px; background: #fafafa; border: 1px solid var(--line); }
.search-big { position: relative; display: block; margin-bottom: 16px; }
.search-big .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-big input { padding: 14px 16px 14px 44px; border-radius: 16px; font-size: 16px; }
.s-sec h3 { display: flex; align-items: center; gap: 8px; justify-content: flex-start !important; }
.s-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-radius: 10px; }
.s-row:hover { background: var(--bg); }
.s-row > span:last-child { display: grid; min-width: 0; }
.s-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.s-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.s-ic .i { width: 16px; height: 16px; }
mark { background: #ffe8a3; color: inherit; border-radius: 3px; padding: 0 1px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank { width: 26px; text-align: center; font-size: 18px; }
.lb-num { font-size: 14px; font-weight: 700; color: var(--muted); }
.lb-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-pts { color: var(--accent); }
.lb-me { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.lvl-card-big { text-align: center; }
.lvl-big { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 20px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 24px -12px rgba(99,20,49,.7); }
.pts-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pts-row:last-child { border-bottom: 0; }
.pts-row.on { font-weight: 700; color: var(--accent); }
.pts-row .lvl-badge { margin: 0 6px 0 0; }
.member-game { display: grid; justify-items: center; gap: 4px; margin: 6px 0 10px; }
.lvl-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; }
.lvl-pill .i { width: 16px; height: 16px; }
.member-game .i { width: 14px; height: 14px; vertical-align: -2px; }
.promo-banner { position: relative; display: flex; gap: 0; padding: 0; overflow: hidden; margin-bottom: 14px; }
.promo-banner img { width: 38%; max-width: 260px; object-fit: cover; flex: none; }
.pb-body { padding: 18px 44px 18px 20px; display: grid; gap: 6px; align-content: center; }
.pb-body h3 { margin: 0; font-size: 18px; color: var(--accent); }
.pb-body p { margin: 0; color: var(--muted); }
.pb-body .btn { justify-self: start; margin-top: 4px; }
.pb-body .btn .i { width: 16px; height: 16px; }
.pb-close { position: absolute; top: 8px; right: 10px; border: 0; background: rgba(255,255,255,.85); width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
.lvl-names { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; margin-top: 8px; }
@media (max-width: 600px) {
  .promo-banner { flex-direction: column; }
  .promo-banner img { width: 100%; max-width: none; aspect-ratio: 16 / 7; }
  .pb-body { padding: 14px 16px 16px; }
}
#bannerForm .img-drop { max-width: 340px; }

/* ===== Lestekst met opmaak (kopjes, lijstjes, tabellen) ===== */
.lesson-text{line-height:1.65;font-size:15.5px}
.lesson-text p{margin:0 0 12px}
.lesson-text h2{font-size:19px;margin:22px 0 8px}
.lesson-text h3{font-size:16.5px;margin:18px 0 6px}
.lesson-text ul,.lesson-text ol{margin:0 0 12px;padding-left:22px}
.lesson-text li{margin:3px 0}
.lesson-text a{color:var(--accent)}
.lesson-text .ltable{overflow-x:auto;margin:6px 0 14px;-webkit-overflow-scrolling:touch}
.lesson-text table{border-collapse:collapse;min-width:100%;font-size:14px}
.lesson-text th,.lesson-text td{border:1px solid var(--line,#e7e1e4);padding:8px 10px;text-align:left;vertical-align:top}
.lesson-text th{background:rgba(99,20,49,.06);font-weight:600}
.lesson-text .lgallery{margin:8px 0 16px}
.lesson-text .lgallery img{display:block;width:100%;height:auto;border-radius:14px;background:#f4eef1}
.lesson-text .lgallery.many{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px;-webkit-overflow-scrolling:touch}
.lesson-text .lgallery.many a{flex:0 0 min(78%,360px);scroll-snap-align:start}

/* ================= trainingsbeheer in Huddle-stijl ================= */
.pmenu { position: absolute; z-index: 400; min-width: 210px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 12px 34px -8px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.04); }
.pmenu button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--text); padding: 10px 12px; border-radius: 9px; cursor: pointer; text-align: left; }
.pmenu button:hover { background: #f4f4f6; }
.pmenu button.danger { color: var(--danger); }
.pmenu .i { width: 19px; height: 19px; }

.cb-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cb-cover { width: 120px; height: 68px; border-radius: 12px; object-fit: cover; flex: none; display: block; }
.cb-head-txt { flex: 1; min-width: 200px; }
.cb-head-txt h2 { margin: 0 0 4px; font-size: 20px; }
.cb-head-btns { display: flex; align-items: center; gap: 8px; }
.cb-pill { display: inline-block; padding: 2px 9px; border-radius: 99px; background: #f2f2f4; color: var(--muted); font-weight: 600; font-size: 12px; }
.cb-pill.on { background: #e5f4e8; color: var(--ok); }
.cb-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 4px 10px; }
.cb-tools .i { width: 15px; height: 15px; vertical-align: -3px; }
.linkbtn { border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }
.cb-mods { display: flex; flex-direction: column; gap: 12px; }
.cb-mod { background: #fff; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.cb-mod-head { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 12px; }
.cb-handle { color: #b6b6bd; cursor: grab; touch-action: none; display: grid; place-items: center; padding: 6px 4px; border-radius: 8px; flex: none; }
.cb-handle:hover { color: var(--text); background: #f4f4f6; }
.cb-handle .i { width: 20px; height: 20px; }
.cb-mod-img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.cb-mod-ic { width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.cb-mod-ic .i { width: 26px; height: 26px; }
.cb-mod-title { flex: 1; min-width: 0; text-align: left; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.cb-mod-title b { font-size: 16.5px; }
.cb-mod-title span { color: var(--muted); font-size: 14px; }
.cb-more, .cb-chev { border: 0; background: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--text); flex: none; }
.cb-more:hover, .cb-chev:hover { background: #f4f4f6; }
.cb-more .i { width: 22px; height: 22px; stroke-width: 2.6; }
.cb-chev .i { width: 20px; height: 20px; transition: transform .2s; transform: rotate(180deg); }
.cb-mod.closed .cb-chev .i { transform: none; }
.cb-mod.closed .cb-body { display: none; }
.cb-body { border-top: 1px solid var(--line); margin: 0 16px; padding: 10px 0 16px; }
.cb-lessons { min-height: 8px; }
.cb-les { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 22px; border-radius: 10px; }
.cb-les:hover { background: #fafafb; }
.cb-les-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--text); padding: 12px 0; font-size: 15.5px; }
.cb-les-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-les-title:hover span { color: var(--accent); }
.cb-les-title .i { width: 22px; height: 22px; color: var(--muted); flex: none; }
.cb-addles { margin: 10px 0 0 22px; background: #f2f2f4; border-color: transparent; }
.cb-addmod { margin-top: 16px; }
.cb-mod.dragging, .cb-les.dragging { opacity: .55; outline: 2px dashed var(--accent-2); outline-offset: 2px; background: #fff; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }

/* les bewerken */
.le-wrap { max-width: 780px; margin: 0 auto; }
.le-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.le-top h2 { margin: 2px 0 0; font-size: 22px; }
.le-tabs button { padding: 7px 16px; font-size: 14px; }
.le-card { padding: 22px 24px; margin-bottom: 16px; }
.le-lbl { display: block; font-size: 13.5px; font-weight: 600; margin: 20px 0 8px; color: var(--text); }
.le-card > .le-lbl:first-child { margin-top: 0; }
.le-lbl .muted { font-weight: 400; }
.le-input { width: 100%; box-sizing: border-box; border: 1px solid transparent; background: #f2f2f4; border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--text); }
.le-input:focus { outline: none; border-color: var(--accent-2); background: #fff; }
textarea.le-input { resize: vertical; }
.le-types { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 12px; }
.le-type { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 13px 14px; font: inherit; font-size: 14.5px; cursor: pointer; color: var(--text); }
.le-type > .i { width: 19px; height: 19px; }
.le-type span { flex: 1; text-align: left; }
.le-radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #9a9aa2; display: grid; place-items: center; }
.le-radio .i { width: 13px; height: 13px; stroke-width: 3; color: #fff; opacity: 0; }
.le-type.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.le-type.on .le-radio { background: var(--accent); border-color: var(--accent); }
.le-type.on .le-radio .i { opacity: 1; }
.le-vprev { position: relative; border-radius: 12px; overflow: hidden; background: #111; }
.le-vprev .video { margin: 0; border-radius: 0; }
.le-vedit { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 9px; border: 0; background: rgba(20,20,22,.75); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.le-vedit:hover { background: rgba(20,20,22,.95); }
.le-vedit .i { width: 18px; height: 18px; }
.le-vph { aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; text-align: center; padding: 20px; font-size: 14px; }
.le-vph .i { width: 34px; height: 34px; }
.le-vph span { opacity: .8; }
.le-drop { border: 1.5px dashed #c9c9cf; border-radius: 12px; padding: 28px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; background: #fafafb; color: var(--text); }
.le-drop b { font-size: 14px; font-weight: 600; }
.le-drop span { font-size: 12.5px; color: var(--muted); }
.le-drop .i { width: 28px; height: 28px; color: var(--muted); }
.le-drop:hover, .le-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.le-vdrop { aspect-ratio: 16/9; justify-content: center; padding: 20px; }
.le-vdrop .i { width: 40px; height: 40px; }
.le-linkbtn { margin-top: 8px; font-weight: 500; }
.le-vup { aspect-ratio: 16/9; border-radius: 12px; background: #fafafb; border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
.le-vup .i { width: 34px; height: 34px; color: var(--accent); }
.le-vup .progress { width: min(380px, 90%); height: 8px; }
.le-vup span { font-size: 13px; color: var(--muted); }
.le-editor { border-radius: 12px; background: #f2f2f4; padding: 6px; }
.le-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 2px 4px 6px; }
.le-toolbar button { border: 0; background: none; min-width: 34px; height: 34px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; display: grid; place-items: center; padding: 0 6px; }
.le-toolbar button:hover:not(:disabled) { background: #fff; }
.le-toolbar button:disabled { opacity: .35; cursor: default; }
.le-toolbar .i { width: 18px; height: 18px; }
.le-toolbar .le-prevbtn { font-size: 13px; font-weight: 600; padding: 0 12px; background: #fff; }
.le-toolbar .le-prevbtn.on { background: var(--accent); color: #fff; }
.le-sep { width: 1px; height: 20px; background: #d6d6db; margin: 0 6px; }
#leBody { display: block; width: 100%; box-sizing: border-box; border: 0; border-radius: 9px; background: #fff; padding: 14px 16px; font: inherit; font-size: 15px; line-height: 1.6; color: var(--text); resize: none; min-height: 180px; }
#leBody:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; }
.le-preview { background: #fff; border-radius: 9px; padding: 14px 18px; min-height: 180px; }
.le-files { display: flex; flex-direction: column; gap: 8px; }
.le-files:not(:empty) { margin-bottom: 10px; }
.le-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f6f6f8; font-size: 14px; }
.le-file .i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.le-file a, .le-file > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.le-file em { font-size: 12.5px; color: var(--muted); }
.le-file button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.le-file button:hover { background: #fff; color: var(--danger); }
.le-file.pending { opacity: .65; }
.le-foot-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.le-switch { position: relative; width: 44px; height: 26px; flex: none; cursor: pointer; }
.le-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.le-switch span { position: absolute; inset: 0; border-radius: 99px; background: #d6d6db; transition: background .2s; }
.le-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.le-switch input:checked + span { background: var(--accent); }
.le-switch input:checked + span::after { transform: translateX(18px); }
.le-switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.le-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.le-danger { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.le-save { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 14px 0 18px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.le-save .btn.primary { min-width: 130px; }
@media (max-width: 640px) {
  .le-card { padding: 18px 16px; }
  .le-2col { grid-template-columns: 1fr; }
  .cb-mod-img, .cb-mod-ic { width: 42px; height: 42px; }
  .cb-mod-head { gap: 10px; padding: 12px 10px 12px 6px; }
  .cb-les { padding-left: 4px; }
  .cb-addles { margin-left: 4px; }
  .cb-cover { width: 84px; height: 48px; }
  .le-save { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* bijlagen en footer onder een les (cursist) */
.lesson-files { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-files h3 { width: 100%; margin: 0 0 4px; font-size: 15px; }
.lesson-files .file-chip { max-width: 100%; padding: 9px 12px; }
.lesson-foot { margin-top: 20px; padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.lesson-foot p { margin: 0; line-height: 1.6; }
@media (max-width: 800px) { .le-save { bottom: calc(57px + env(safe-area-inset-bottom)); padding-bottom: 12px; } }

/* ================= lestypes: audio en quiz ================= */
.le-types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .le-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.le-audio, .lesson-audio { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); }
.le-audio > .i, .lesson-audio > .i { width: 26px; height: 26px; color: var(--accent); flex: none; }
.le-audio audio, .lesson-audio audio { flex: 1; min-width: 0; height: 40px; }
.lesson-audio { margin: 0 0 16px; }
.le-aup { aspect-ratio: auto; padding: 22px; }
.qz-q { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; margin: 14px 0; background: #fff; }
.qz-q-head { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.qz-q-head .cb-more { width: 32px; height: 32px; }
.qz-q-head .cb-more .i { width: 17px; height: 17px; stroke-width: 1.8; }
.qz-q-head .cb-more:disabled { opacity: .3; cursor: default; background: none; }
.qz-opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 6px; padding-left: 4px; }
.qz-opt { display: flex; align-items: center; gap: 10px; }
.qz-opt .le-input { padding: 10px 12px; }
.qz-mark { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid #9a9aa2; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.qz-mark .i { width: 15px; height: 15px; stroke-width: 3; color: #fff; opacity: 0; }
.qz-mark:hover { border-color: var(--ok); }
.qz-opt.on .qz-mark { background: var(--ok); border-color: var(--ok); }
.qz-opt.on .qz-mark .i { opacity: 1; }
.qz-opt.on .le-input { box-shadow: inset 0 0 0 1.5px var(--ok); background: #f1f9f2; }
.qz-x { border: 0; background: none; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); cursor: pointer; display: grid; place-items: center; flex: none; }
.qz-x:hover { background: #f4f4f6; color: var(--danger); }
.qz-x .i { width: 16px; height: 16px; }
.qz-addopt { margin: 2px 0 10px 42px; }
.qz-explain { font-size: 14px; }
.qz-res { display: flex; flex-direction: column; }
.qz-res-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.qz-res-row a { flex: 1; color: var(--text); font-weight: 600; }
.qz-score { font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #f2f2f4; font-size: 13px; }
.qz-score.ok { background: #e5f4e8; color: var(--ok); }

/* quiz voor cursisten */
.quiz { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.quiz-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.quiz-head > .i { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); box-sizing: border-box; flex: none; }
.quiz-q { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; }
.quiz-q legend { font-weight: 600; padding: 0 4px; font-size: 15.5px; float: left; width: 100%; margin-bottom: 10px; }
.quiz-q.ok { border-color: #b9dfc0; }
.quiz-q.bad { border-color: #f0c2c4; }
.quiz-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; cursor: pointer; clear: both; }
.quiz-opt span { flex: 1; }
.quiz-opt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.quiz-opt:hover { background: #fafafb; }
.quiz-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.right { border-color: var(--ok); background: #f1f9f2; }
.quiz-opt.right .i { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.6; }
.quiz-opt.wrong { border-color: var(--danger); background: #fdf1f1; }
.quiz-explain { margin-top: 10px; font-size: 14px; color: var(--muted); padding: 10px 12px; background: #f7f7f9; border-radius: 10px; }
.quiz-result { padding: 16px 18px; border-radius: 14px; background: #fdf1f1; margin-top: 4px; }
.quiz-result.ok { background: #e9f6ec; }

/* ================= vragen onder een les ================= */
.lq { margin-top: 16px; }
.lq-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 17px; }
.lq-title .i { width: 20px; height: 20px; color: var(--accent); }
.lq-form { display: flex; gap: 10px; align-items: flex-start; }
.lq-form textarea { flex: 1; min-width: 0; border: 1px solid transparent; background: #f2f2f4; border-radius: 12px; padding: 11px 13px; font: inherit; font-size: 14.5px; resize: none; color: var(--text); }
.lq-form textarea:focus { outline: none; border-color: var(--accent-2); background: #fff; }
.lq-ask { margin-bottom: 18px; flex-wrap: wrap; }
.lq-ask .btn { align-self: flex-end; }
.lq-list { display: flex; flex-direction: column; gap: 16px; }
.lq-thread { border-top: 1px solid var(--line); padding-top: 14px; }
.lq-msg { display: flex; gap: 10px; align-items: flex-start; }
.lq-bubble { flex: 1; min-width: 0; }
.lq-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.lq-team { font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 99px; }
.lq-body { margin-top: 3px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.lq-msg.team .lq-body { background: var(--accent-soft); padding: 9px 12px; border-radius: 4px 12px 12px 12px; margin-top: 5px; }
.lq-del { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; margin-left: auto; opacity: .6; display: grid; }
.lq-del:hover { opacity: 1; color: var(--danger); }
.lq-del .i { width: 15px; height: 15px; }
.lq-replies { margin: 10px 0 0 42px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.lq-replies .lq-msg { width: 100%; }
.lq-reply { width: 100%; }
.lq-empty { margin: 0; }
.lq-count { font-size: 12px; background: var(--danger); color: #fff; border-radius: 99px; padding: 1px 8px; }
.oq-row { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }
.oq-row:hover b { color: var(--accent); }
.oq-body { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ================= stap voor stap vrijgeven ================= */
.lesson-link.locked { opacity: .55; cursor: default; }
.lesson-link.locked .dot .i { width: 12px; height: 12px; }
.lock-note { font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.lock-note .i, .mod-count .i, .cb-drip .i { width: 13px; height: 13px; vertical-align: -2px; }
.cb-drip { color: var(--accent); font-weight: 600; }

/* ================= certificaat ================= */
.cert-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(120deg, #fff 40%, var(--accent-soft)); margin-bottom: 16px; }
.cert-banner > div { flex: 1; min-width: 180px; }
.cert-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.cert-ic .i { width: 24px; height: 24px; }
.cert-page { max-width: 980px; margin: 0 auto; }
.cert-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cert-tip { margin: 0 0 14px; text-align: right; }
.cert { background: #fff; aspect-ratio: 297 / 210; width: 100%; box-shadow: var(--shadow); padding: 3.2%; box-sizing: border-box; container-type: inline-size; }
.cert-inner { height: 100%; box-sizing: border-box; border: 2px solid var(--accent); outline: 1px solid var(--accent); outline-offset: -8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3% 6%; color: #3a0f22; font-family: "Poppins", system-ui, sans-serif; }
.cert-logo { width: 8cqw; height: auto; }
.cert-brand { font-size: 1.7cqw; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-top: .6cqw; }
.cert-title { font-size: 5.6cqw; margin: 1.6cqw 0 .6cqw; color: var(--accent); font-weight: 700; letter-spacing: .02em; }
.cert-sub { font-size: 1.7cqw; margin: .4cqw 0; color: #7a4a60; }
.cert-name { font-size: 4.4cqw; font-weight: 700; margin: .8cqw 0 1cqw; padding: 0 3cqw .6cqw; border-bottom: 1px solid #e7c9d6; }
.cert-course { font-size: 2.6cqw; font-weight: 600; margin-top: .6cqw; }
.cert-foot { display: flex; gap: 12cqw; margin-top: 3.4cqw; font-size: 1.4cqw; color: #7a4a60; }
.cert-line { font-size: 1.8cqw; color: #3a0f22; font-weight: 600; border-bottom: 1px solid #c9a3b4; padding: 0 2cqw .5cqw; margin-bottom: .5cqw; min-width: 16cqw; }
.cert-sign { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 2.8cqw; font-weight: 400; color: var(--accent); }
.cert-nr { margin-top: 2.4cqw; font-size: 1.1cqw; color: #a08090; letter-spacing: .05em; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden !important; }
  .cert, .cert * { visibility: visible !important; }
  .cert { position: fixed; inset: 0; width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.lq-form[hidden] { display: none; }
.card h3.lq-title { justify-content: flex-start; }

/* ================= level omhoog ================= */
.lvl-up-bg { z-index: 300; overflow: hidden; }
.lvl-up { max-width: 380px; text-align: center; padding: 30px 24px 24px; position: relative; z-index: 2; animation: lvlPop .5s cubic-bezier(.2,1.4,.4,1); }
.lvl-up h2 { margin: 14px 0 6px; font-size: 21px; }
.lvl-up p { margin: 6px 0; }
.lvl-up-badge { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 38px; font-weight: 800; color: #fff;
  background: radial-gradient(circle at 30% 25%, #d06b97, var(--accent)); box-shadow: 0 0 0 8px var(--accent-soft), 0 12px 30px -8px rgba(99,20,49,.5); }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; background: var(--c); border-radius: 2px; transform: rotate(var(--r));
  animation: confFall 2.6s var(--d) ease-in forwards; opacity: 0; }
@keyframes confFall { 0% { opacity: 1; transform: translateY(0) rotate(var(--r)); } 100% { opacity: 0; transform: translateY(105vh) rotate(calc(var(--r) + 540deg)); } }
@keyframes lvlPop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .lvl-up { animation: none; } }

/* ================= tweestapsverificatie ================= */
.tfa-on { font-size: 12px; font-weight: 700; color: var(--ok); background: #e5f4e8; padding: 2px 9px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.tfa-steps { padding-left: 20px; line-height: 1.6; }
.tfa-steps li { margin-bottom: 12px; }
.tfa-key { font-family: ui-monospace, Menlo, monospace; font-size: 19px; letter-spacing: .08em; background: #f2f2f4; padding: 10px 14px; border-radius: 10px; margin: 8px 0 4px; word-break: break-all; user-select: all; }
.tfa-steps .btn { margin-top: 8px; }
.tfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; max-width: 360px; }
.tfa-codes code { font-family: ui-monospace, Menlo, monospace; font-size: 16px; background: #f2f2f4; padding: 8px 10px; border-radius: 8px; text-align: center; }
