:root {
  --tint: #C89B4F; --tint-deep: #A87F3B; --tint-soft: rgba(200,155,79,.13);
  --green: #357358; --green-soft: rgba(53,115,88,.12);
  --red: #D0342C; --red-soft: rgba(208,52,44,.1);
  --orange: #C77B22; --orange-soft: rgba(199,123,34,.12);
  --ink: #1D1D1F; --ink-2: #6E6E73; --ink-3: #AEAEB2;
  --canvas: #F5F5F7; --surface: #FFFFFF; --well: rgba(0,0,0,.035);
  --line: rgba(0,0,0,.08); --line-soft: rgba(0,0,0,.05);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 2px 6px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.09);
  --shadow-lg: 0 8px 20px rgba(0,0,0,.1), 0 28px 70px rgba(0,0,0,.18);
  --ease: cubic-bezier(.32,.72,0,1);
  --r-card: 14px; --r-input: 10px;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
       background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.5; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.022em; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--tint-soft); }

input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 9px 12px; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  appearance: none; -webkit-appearance: none;
}
select { background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236E6E73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tint); box-shadow: 0 0 0 3.5px var(--tint-soft); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { resize: vertical; line-height: 1.45; }
label { font-size: 12px; font-weight: 600; color: var(--ink-2); display: block; margin: 14px 0 5px; letter-spacing: -.01em; }

/* ---------- topbar ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 0 22px; height: 54px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .brand-title { font-size: 17px; font-weight: 700; letter-spacing: -.022em; color: var(--ink); }
.brand .brand-sub { font-size: 13px; color: var(--ink-2); }
nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.seg { display: flex; background: rgba(0,0,0,.055); border-radius: 9px; padding: 2px; }
.seg button {
  border: none; background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 500; padding: 5px 16px; border-radius: 7px;
  transition: background .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.seg button.active { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.seg.mini { padding: 1px; }
.seg.mini button { padding: 3px 9px; font-size: 11px; }
#logoutBtn { border: none; background: none; color: var(--ink-2); font-size: 13px; padding: 6px 4px; border-radius: 8px; }
#logoutBtn:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--tint); color: #fff; border: none;
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  padding: 9px 20px; border-radius: 980px;
  transition: transform .15s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), opacity .18s;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.btn:hover { background: var(--tint-deep); }
.btn:active { transform: scale(.97); }
.btn:disabled { background: rgba(0,0,0,.08); color: var(--ink-3); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-dark { background: rgba(0,0,0,.06); color: var(--ink); box-shadow: none; }
.btn-dark:hover { background: rgba(0,0,0,.1); }
.btn-danger { background: none; color: var(--red); box-shadow: none; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-text { background: none; box-shadow: none; color: var(--tint-deep); padding: 4px 0; font-size: 12.5px; }
.btn-text:hover { text-decoration: underline; background: none; }

main { padding: 26px 22px 60px; max-width: 1180px; margin: 0 auto; }
.hidden { display: none !important; }

/* ---------- login ---------- */
#login {
  max-width: 350px; margin: 14vh auto; text-align: center;
  background: var(--surface); border-radius: 20px; padding: 40px 34px 34px;
  box-shadow: var(--shadow-md);
  animation: rise .45s var(--ease);
}
#login .login-mono { font-size: 21px; font-weight: 700; letter-spacing: -.022em; color: var(--ink); margin-bottom: 6px; }
#login h2 { font-size: 20px; margin: 10px 0 4px; }
#login p.sub { font-size: 13px; color: var(--ink-2); margin-bottom: 20px; }
#login input { text-align: center; font-size: 15px; padding: 11px 12px; border-radius: 12px; }
#loginErr { color: var(--red); font-size: 12px; min-height: 18px; margin-top: 8px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- stats ---------- */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.stat {
  background: var(--surface); border-radius: var(--r-card); padding: 12px 18px 11px; min-width: 118px;
  box-shadow: var(--shadow-sm);
}
.stat b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; display: block; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; text-transform: uppercase; }
.stat.live b { color: var(--green); }
.stat.wachten b { color: var(--ink-2); }
.stat.actie b { color: var(--tint-deep); }

/* switch */
.switch-row { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; color: var(--ink); margin: 0; cursor: pointer; letter-spacing: 0; text-transform: none; }
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch { width: 36px; height: 22px; background: rgba(0,0,0,.16); border-radius: 22px; position: relative; transition: background .2s var(--ease); flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch-row input:checked + .switch { background: var(--green); }
.switch-row input:checked + .switch::after { transform: translateX(14px); }

/* ---------- dialog & toast ---------- */
dialog { border: none; border-radius: 18px; padding: 26px 28px; max-width: 440px; width: 92vw; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(20,20,20,.32); backdrop-filter: blur(3px); }
dialog h3 { font-size: 18px; letter-spacing: -.02em; margin-bottom: 6px; }
dialog .acties { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
dialog .knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(0,0,0,.06); color: var(--ink); border: none;
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  padding: 9px 18px; border-radius: 980px;
}
dialog .knop.primair { background: var(--tint); color: #fff; }
dialog .knop.primair:hover { background: var(--tint-deep); }
dialog .knop.gevaar { background: none; color: var(--red); margin-right: auto; }
dialog .knop.gevaar:hover { background: var(--red-soft); }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: rgba(29,29,31,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; padding: 11px 20px; font-size: 13px; font-weight: 500; border-radius: 980px;
  display: flex; gap: 14px; align-items: center; z-index: 99;
  box-shadow: var(--shadow-lg);
  animation: toastup .4s var(--ease);
}
@keyframes toastup { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.toast button { background: var(--tint); border: none; color: #fff; padding: 5px 14px; font-size: 12px; font-weight: 600; border-radius: 980px; }

/* ================= MICE ================= */
.acties-card {
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  padding: 20px 22px 18px; margin-bottom: 24px;
}
.acties-card h3 { font-size: 16px; margin-bottom: 12px; letter-spacing: -.015em; }
.todo { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.todo li { border-radius: 10px; transition: opacity .15s; }
.todo label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 4px 2px; }
.todo input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; padding: 0;
  width: 19px; height: 19px; min-width: 19px; border-radius: 50%; position: relative;
  border: 1.5px solid var(--ink-3); background: var(--surface);
  cursor: pointer; display: block; margin-top: 1px;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.todo input[type="checkbox"]:hover { border-color: var(--ink-2); }
.todo input[type="checkbox"]:active { transform: scale(.9); }
.todo input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3.5px var(--tint-soft); }
.todo input[type="checkbox"]::after {
  content: ""; position: absolute; left: 5.5px; top: 2.5px;
  width: 4px; height: 8.5px; border: solid #fff; border-width: 0 1.7px 1.7px 0;
  transform: rotate(45deg) scale(.5); opacity: 0;
  transition: transform .18s var(--ease), opacity .1s ease;
}
.todo input[type="checkbox"]:checked { background: var(--tint); border-color: var(--tint); }
.todo input[type="checkbox"]:checked:hover { background: var(--tint-deep); border-color: var(--tint-deep); }
.todo input[type="checkbox"]:checked::after { opacity: 1; transform: rotate(45deg) scale(1); }
.todo li.klaar { opacity: .55; }
.todo li.klaar .todo-tekst { text-decoration: line-through; }
.todo-tekst { font-size: 13.5px; line-height: 1.45; }
.taak-add { display: flex; gap: 8px; margin-top: 14px; }
.taak-add input { font-size: 13px; }

.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.platform-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-sm); padding: 18px 20px 18px; }
.pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pc-logo {
  flex: none; width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pc-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.pc-logo .pc-logo-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--tint-soft); color: var(--tint-deep); font-size: 15px; font-weight: 700;
}
.pc-head h3 { font-size: 15.5px; letter-spacing: -.015em; flex: 1; }
.pc-edit { background: none; border: none; color: var(--ink-3); padding: 4px; border-radius: 6px; display: flex; }
.pc-edit:hover { color: var(--ink); background: var(--well); }
.pill-status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: -.005em; padding: 3px 11px; border-radius: 980px; border: none; cursor: pointer;
}
.pill-status.live { background: var(--green-soft); color: var(--green); }
.pill-status.wachten { background: rgba(0,0,0,.055); color: var(--ink-2); }
.pill-status.actie { background: var(--tint-soft); color: var(--tint-deep); }
.pc-status-label { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.pc-samenvatting { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-bottom: 12px; }
.pc-taken { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pc-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 980px; text-decoration: none;
  background: var(--tint-soft); color: var(--tint-deep);
}
.pill-link:hover { background: var(--tint); color: #fff; }
.pill-link.dark { background: rgba(0,0,0,.06); color: var(--ink); }
.pill-link.dark:hover { background: rgba(0,0,0,.1); color: var(--ink); }

/* ---------- beheer-inloggegevens ---------- */
.pc-login { background: var(--well); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.pc-login-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 7px; }
.pc-login-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; }
.pc-login-row .lbl { font-size: 12px; color: var(--ink-2); flex: none; }
.pc-login-row .val { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink); text-align: right; word-break: break-all; }
.pc-login-row .val-wrap { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.pc-login-icon { background: none; border: none; color: var(--ink-3); padding: 2px; display: flex; border-radius: 5px; flex: none; }
.pc-login-icon:hover { color: var(--ink); background: rgba(0,0,0,.06); }
.pc-login-note { font-size: 12px; color: var(--ink-2); font-style: italic; margin-top: 4px; line-height: 1.4; }

@media (max-width: 640px) {
  .platform-grid { grid-template-columns: 1fr; }
  main { padding: 20px 14px 50px; }
  header { padding: 0 14px; gap: 12px; }
}
