/* PeakBlanc Creators — gedeeld designsysteem (Apple-designtaal, uit parkhotel-os).
   Light-only, geen dark mode. Modulespecifieke opmaak staat in public/modules/creators.css.
   Merkkleuren: oranje #DA5D2B + navy #232C38 (uit het PeakBlanc-logo). */
:root {
  --tint: #DA5D2B; --tint-deep: #B54A1F; --tint-soft: rgba(218,93,43,.12);
  --navy: #232C38;
  --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;
  --topbar-h: 54px;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; }
body {
  margin: 0;
  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); }
.hidden { display: none !important; }

/* ---------- taken: checklist in Apple Notes-stijl ---------- */
.taak-lijst { margin: 2px 0 10px; }
.taak-rij { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; }
.taak-rij + .taak-rij { border-top: 1px solid var(--line-soft); }
.taak-bol {
  flex: none; width: 17px; height: 17px; margin-top: 1px; padding: 0;
  border: 1.5px solid var(--ink-3); border-radius: 50%; background: none; color: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.taak-bol:hover { border-color: var(--ink-2); }
.taak-rij.klaar .taak-bol { background: var(--tint); border-color: var(--tint); color: #fff; }
.taak-bol .ic { stroke-width: 2.6; }
.taak-tekst {
  flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; letter-spacing: -.01em;
  cursor: text; outline: none; overflow-wrap: anywhere;
}
.taak-tekst:empty::before { content: attr(data-leeg); color: var(--ink-3); }
.taak-tekst:focus:empty::before { content: ''; }
.taak-rij.klaar .taak-tekst { text-decoration: line-through; color: var(--ink-3); }
.taak-rij.nieuw .taak-bol { border-style: dashed; border-color: var(--line); }

/* ---------- formulieren ---------- */
input:not([type=checkbox]):not([type=radio]), 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 {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink-2);
  margin: 14px 0 5px; letter-spacing: -.01em;
}

/* ---------- topbar ---------- */
header.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px; height: var(--topbar-h);
  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);
  color: var(--ink);
}
header.top .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
header.top .brand img { height: 30px; display: block; flex: none; }
header.top .brand #module-titel {
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  border-left: 1px solid var(--line); padding-left: 12px; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
header.top .rechts { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* iOS-segmented control (tabs + taalswitch) */
.seg { display: flex; background: rgba(0,0,0,.055); border-radius: 9px; padding: 2px; flex: none; }
.seg:empty { display: none; }
.seg button {
  border: none; background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 500; padding: 5px 16px; border-radius: 7px; white-space: nowrap;
  transition: background .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.seg button:hover { background: rgba(0,0,0,.04); }
.seg button.active { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.lang-seg button { padding: 5px 11px; font-size: 12px; letter-spacing: .02em; }

/* ---------- knoppen ---------- */
.ic { flex: none; }

.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  background: rgba(0,0,0,.06); color: var(--ink); border: none; text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  padding: 8px 18px; border-radius: 980px;
  transition: transform .15s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.knop:hover { background: rgba(0,0,0,.1); }
.knop:active { transform: scale(.97); }
.knop.primair { background: var(--tint); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.knop.primair:hover { background: var(--tint-deep); }
.knop.tekst { background: none; color: var(--ink-2); font-weight: 500; padding: 6px 8px; }
.knop.tekst:hover { background: none; color: var(--ink); }
.knop.breed { width: 100%; }

/* ---------- paneel ---------- */
#paneel { padding: 26px 22px 60px; }

/* ---------- stat-tegels ---------- */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.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; }

/* ---------- dialogen ---------- */
dialog {
  border: none; border-radius: 18px; padding: 0; max-width: 440px; width: 92vw;
  box-shadow: var(--shadow-lg); color: var(--ink);
}
dialog::backdrop { background: rgba(20,20,20,.32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
dialog form { padding: 24px 26px 22px; }
dialog h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.02em; }
dialog textarea { min-height: 76px; }
dialog .acties { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------- login ---------- */
/* LET OP: #login krijgt display:flex, dus het HTML-attribuut `hidden` werkt alleen
   dankzij de regel hieronder. Niet verwijderen — anders blijft de overlay staan. */
#login {
  position: fixed; inset: 0; background: var(--canvas);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
#login[hidden], #app[hidden] { display: none; }
#login form {
  background: var(--surface); border-radius: 20px; padding: 36px 34px 30px; width: 340px; max-width: 100%;
  box-shadow: var(--shadow-md); text-align: center;
  animation: rise .45s var(--ease);
}
#login .login-logo { height: 52px; display: block; margin: 0 auto 14px; }
#login h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.026em; }
#login p.sub { font-size: 13px; color: var(--ink-2); margin: 0 0 20px; }
#login input { text-align: center; font-size: 15px; padding: 11px 12px; border-radius: 12px; }
#login .fout { color: var(--red); font-size: 12px; min-height: 18px; margin: 8px 0 4px; }
#login .lang-seg { display: inline-flex; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- toast ---------- */
.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; }

/* ---------- klein grut ---------- */
.leeg { color: var(--ink-2); font-size: 13px; padding: 6px 0; margin: 0; }
.mini { font-size: 12px; color: var(--ink-2); }

/* ---------- smal scherm ---------- */
@media (max-width: 900px) {
  header.top { gap: 10px; padding: 0 12px; }
  #tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  #tabs::-webkit-scrollbar { display: none; }
  #paneel { padding: 18px 14px 48px; }
}
@media (max-width: 640px) {
  header.top .brand #module-titel { display: none; }
  header.top .brand img { height: 24px; }
  header.top .seg button { padding: 5px 10px; }
  header.top .knop.tekst { padding: 6px 2px; }
}
