/* VirtualBiz HQ - stijl
   Fonts: Gowun Batang (koppen), Assistant (de rest).
   Knoppen: tactiel, licht van boven, geen glow. Kaarten: lichte bovenrand, schaduw alleen naar beneden. */

:root, [data-theme="virtualbiz"] {
  --bg: #FBF5F7; --surface: #FFFFFF; --surface-2: #F6EEF1;
  --text: #000000; --muted: #3F3F3F; --line: #D6D6D6;
  --primary: #CC1461; --primary-dark: #8E0D43; --on-primary: #FFFFFF;
  --accent: #D4AF37; --late: #B82105; --ok: #194417;
  --shadow: rgba(60, 10, 30, .22);
  --edge: color-mix(in srgb, var(--primary) 45%, #fff);
  --edge-line: color-mix(in srgb, var(--primary) 22%, #fff);
}
[data-theme="forest"] {
  --bg: #FBF5F7; --surface: #FFFFFF; --surface-2: #EEF3EE;
  --text: #000000; --muted: #3A3A3A; --line: #D6D6D6;
  --primary: #194417; --primary-dark: #0B2A0A; --on-primary: #FFFFFF;
  --accent: #D4AF37; --late: #B82105; --ok: #194417;
  --shadow: rgba(10, 40, 10, .22);
  --edge: color-mix(in srgb, var(--primary) 45%, #fff);
  --edge-line: color-mix(in srgb, var(--primary) 22%, #fff);
}
[data-theme="night"] {
  --bg: #0E0E0E; --surface: #1C1C1C; --surface-2: #262626;
  --text: #FFFFFF; --muted: #D0D0D0; --line: #3C3C3C;
  --primary: #CC1461; --primary-dark: #7A0B39; --on-primary: #FFFFFF;
  --accent: #D4AF37; --late: #FF7A5C; --ok: #8FD694;
  --shadow: rgba(0, 0, 0, .6);
  --edge: var(--primary-dark);
  --edge-line: color-mix(in srgb, var(--primary) 35%, #1C1C1C);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
[data-theme="night"] { color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Assistant', system-ui, sans-serif; font-size: 16px; line-height: 1.45;
}
h1, h2, .brand { font-family: 'Gowun Batang', Georgia, serif; font-weight: 700; margin: 0; }
h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .4rem; }
a { color: var(--primary); }
[data-theme="night"] a { color: #FF6FA8; }
.grow { flex: 1; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.late { color: var(--late); font-weight: 600; }
.mono { font-family: ui-monospace, Menlo, monospace; }

/* ---------- Kaarten: licht van boven ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-top-color: rgba(255,255,255,.9);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 16px -8px var(--shadow);
}
[data-theme="night"] .card { border-top-color: #4A4A4A; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 16px -8px var(--shadow); }

/* ---------- Knoppen: tactiel ---------- */
.btn {
  font: 600 .92rem 'Assistant', system-ui, sans-serif; cursor: pointer;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--primary) 7%, var(--surface)) 100%);
  border: 1px solid var(--edge-line); border-top-color: rgba(255,255,255,.95);
  border-bottom: 4px solid var(--edge);
  border-radius: 10px; padding: .45rem .8rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 8px -4px var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-bottom-width .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 9px 14px -6px var(--shadow); }
.btn:active { transform: translateY(3px); border-bottom-width: 1px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px var(--shadow); }
.btn:focus-visible, .tab:focus-visible, .tick:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary {
  color: var(--on-primary);
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 78%, #fff 22%) 0%, var(--primary) 100%);
  border-color: var(--primary-dark); border-top-color: color-mix(in srgb, var(--primary) 50%, #fff 50%);
  border-bottom-color: var(--primary-dark);
}
.btn.danger {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, #B82105 75%, #fff 25%) 0%, #B82105 100%);
  border-color: #7A1603; border-bottom-color: #7A1603;
}
[data-theme="night"] .btn:not(.primary):not(.danger) { background: linear-gradient(180deg, #2E2E2E 0%, #222 100%); border-top-color: #5A5A5A; box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 8px -4px var(--shadow); }
.btn.icon { padding: .1rem .55rem; font-size: 1.05rem; line-height: 1.3; }
.btn.mini-btn { padding: .15rem .5rem; font-size: .8rem; border-bottom-width: 3px; }
.btn.link { background: none; border: 0; box-shadow: none; color: var(--primary); padding: .3rem 0; text-decoration: underline; }
[data-theme="night"] .btn.link { color: #FF6FA8; }
.btn.link:hover, .btn.link:active { transform: none; box-shadow: none; }

/* ---------- Formulieren ---------- */
.field { display: flex; flex-direction: column; gap: .25rem; margin: .6rem 0; font-weight: 600; font-size: .9rem; }
input, select, textarea {
  font: 400 1rem 'Assistant', system-ui, sans-serif; color: var(--text); background: var(--surface);
  border: 2px solid color-mix(in srgb, var(--line) 60%, var(--text) 40%); border-radius: 9px; padding: .5rem .6rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; }
.check { display: flex; gap: .5rem; align-items: center; margin: 1rem 0; }
.msg { min-height: 1.2em; margin: .6rem 0 0; font-weight: 600; }
.hint { color: var(--muted); }
.hint.warn { color: var(--text); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); padding: .6rem .8rem; border-radius: 10px; border-left: 4px solid var(--accent); }

/* ---------- Inlogschermen ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-card { width: min(440px, 100%); padding: 1.6rem; }
.auth-card form { display: flex; flex-direction: column; }
.auth-card .btn { margin-top: .5rem; }
.brand { font-size: 2rem; }
.brand::after { content: ''; display: block; width: 46px; height: 4px; background: var(--accent); border-radius: 2px; margin-top: .3rem; }
.brand.small { font-size: 1.35rem; }
.brand.small::after { width: 30px; height: 3px; margin-top: .15rem; }
.tagline { color: var(--muted); margin: .4rem 0 1rem; }
.recovery {
  font: 600 1.05rem ui-monospace, Menlo, monospace; letter-spacing: .04em; word-break: break-word;
  background: var(--surface-2); border: 2px dashed var(--accent); border-radius: 10px; padding: .8rem; margin: .8rem 0;
}

/* ---------- Dashboard ---------- */
.topbar { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; flex-wrap: wrap; }
.sync { font-size: .85rem; font-weight: 600; }
.sync.error { color: var(--late); }
.grid {
  display: grid; gap: .9rem; padding: 0 1rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
}
.block { display: flex; flex-direction: column; padding: .8rem; }
.block-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.block-body { display: flex; flex-direction: column; gap: .6rem; padding: 2px 4px 6px; }
.emoji { font-size: 1.2rem; }
.badge {
  font-size: .78rem; font-weight: 700; padding: .05rem .5rem; border-radius: 99px; margin-left: .3rem; white-space: nowrap;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}
.badge.late { background: color-mix(in srgb, var(--late) 14%, var(--surface)); color: var(--late); border-color: var(--late); }
.empty { color: var(--muted); margin: .2rem 0; }

/* Compacte kaartjes naast elkaar */
.minis { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-items: start; }
.mini {
  background: var(--surface-2); border: 1px solid var(--line); border-top-color: rgba(255,255,255,.9);
  border-radius: 11px; padding: .5rem .6rem; box-shadow: 0 5px 10px -7px var(--shadow);
  display: flex; flex-direction: column; gap: .3rem;
}
[data-theme="night"] .mini { border-top-color: #4A4A4A; }
details.mini[open] { grid-column: 1 / -1; }
summary { cursor: pointer; font-weight: 600; list-style-position: inside; }
.mini-title, .todo-title {
  all: unset; cursor: pointer; font-weight: 600; overflow-wrap: anywhere;
}
.mini-title:hover, .todo-title:hover { text-decoration: underline; }
.detail { display: flex; flex-direction: column; gap: .35rem; padding-top: .4rem; }
.notes { white-space: pre-wrap; margin: 0; }
.row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: .4rem; }
.stack { display: flex; flex-direction: column; gap: .3rem; margin: 1rem 0; align-items: flex-start; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* Tabs */
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tab {
  font: 600 .85rem 'Assistant', sans-serif; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--edge-line); border-radius: 99px; padding: .2rem .75rem;
}
.tab.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary-dark); }

/* To-do's en taken */
.todos { display: flex; flex-direction: column; gap: .3rem; }
.todo { display: flex; align-items: center; gap: .5rem; padding: .25rem .2rem; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo .todo-title { flex: 1; font-weight: 500; }
.todo.done .todo-title { text-decoration: line-through; color: var(--muted); }
.tick {
  width: 24px; height: 24px; flex: none; cursor: pointer; border-radius: 7px; font-size: .8rem; line-height: 1; padding: 0;
  background: var(--surface); border: 2px solid var(--edge);
  box-shadow: 0 2px 3px -2px var(--shadow);
}
.status-dot { width: 22px; text-align: center; }

/* Vensters */
.dialog { width: min(520px, calc(100vw - 2rem)); padding: 1.2rem; color: var(--text); }
.dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog form { display: flex; flex-direction: column; }
.settings-grid { display: grid; gap: 0 .8rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.settings details { margin-top: .8rem; }

.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 10;
  background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 10px; font-weight: 600;
  max-width: min(560px, calc(100vw - 2rem)); box-shadow: 0 8px 16px -8px rgba(0,0,0,.5);
}

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* Smalle schermen: compactere knoppen bovenin en in de blokkoppen */
@media (max-width: 600px) {
  .topbar, .grid { padding-left: .6rem; padding-right: .6rem; }
  .topbar .btn, .block-head .btn { padding: .35rem .55rem; font-size: .82rem; }
  .block-head h2 { font-size: 1.05rem; }
}

/* ---------- Fase 2a: filter, Vandaag-strook, uitgebreide to-do's ---------- */
.filters { display: flex; gap: .4rem; flex-wrap: wrap; padding: 0 1rem .6rem; }
.chip {
  font: 600 .88rem 'Assistant', sans-serif; cursor: pointer; color: var(--text);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--primary) 7%, var(--surface)));
  border: 1px solid var(--edge-line); border-bottom: 3px solid var(--edge);
  border-radius: 99px; padding: .3rem .8rem; box-shadow: 0 3px 6px -4px var(--shadow);
  transition: transform .12s ease;
}
.chip:hover { transform: translateY(-2px); }
.chip:active { transform: translateY(2px); border-bottom-width: 1px; }
.chip.on { color: var(--on-primary); background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 78%, #fff 22%), var(--primary)); border-color: var(--primary-dark); }

.strip { display: grid; gap: .6rem; padding: 0 1rem .8rem; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.strip-card {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .1rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-top-color: rgba(255,255,255,.9);
  border-left: 5px solid var(--accent); border-radius: 12px; padding: .55rem .8rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 6px 12px -8px var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.strip-card:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 16px -8px var(--shadow); }
.strip-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.strip-card.warn { border-left-color: var(--late); }
[data-theme="night"] .strip-card { border-top-color: #4A4A4A; }
.strip-title { font-size: .82rem; font-weight: 700; }
.strip-value { font: 700 1.35rem 'Gowun Batang', Georgia, serif; line-height: 1.1; }
.strip-sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-card.warn .strip-sub { color: var(--late); font-weight: 600; }

.qnav { gap: .5rem; }
.todo-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.todo-main .todo-title { flex: none; }
.todo.prio { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 8px; }
.todo-wrap { border-bottom: 1px solid var(--line); }
.todo-wrap > .todo { border-bottom: 0; }
.subs { margin: 0 0 .3rem 2.1rem; }
.subs summary { font-size: .82rem; color: var(--muted); }
.todo.sub { border-bottom: 0; padding: .15rem 0; }
.todo.sub .tick { width: 20px; height: 20px; }
@media (max-width: 600px) {
  .filters, .strip { padding-left: .6rem; padding-right: .6rem; }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .strip-card { padding: .45rem .5rem; border-left-width: 4px; }
  .strip-title { font-size: .72rem; line-height: 1.2; }
  .strip-sub { display: none; }
  .chip { padding: .25rem .65rem; font-size: .82rem; }
}

/* ---------- Pagina's en Home ---------- */
.pagenav { display: flex; gap: .3rem; padding: 0 1rem .6rem; overflow-x: auto; scrollbar-width: none; }
.pagenav::-webkit-scrollbar { display: none; }
.navtab {
  all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap; flex: none;
  font: 700 .95rem 'Assistant', sans-serif; color: var(--text); padding: .4rem .75rem; border-radius: 10px 10px 0 0;
  border-bottom: 3px solid transparent;
}
.navtab:hover { border-bottom-color: var(--edge); }
.navtab.on { border-bottom-color: var(--primary); color: var(--primary); }
[data-theme="night"] .navtab.on { color: #FF6FA8; }
.navtab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.home { display: flex; flex-direction: column; }
.home-grid { display: grid; gap: .9rem; padding: 0 1rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); align-items: start; }
.page { display: grid; gap: .9rem; padding: 0 1rem 1rem; }
@media (min-width: 1000px) { .page.cols-2 { grid-template-columns: 2fr 1fr; align-items: start; } }
.mini-link { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .2rem;
  background: var(--surface-2); border: 1px solid var(--line); border-top-color: rgba(255,255,255,.9); border-radius: 11px; padding: .5rem .6rem;
  box-shadow: 0 5px 10px -7px var(--shadow); transition: transform .12s ease; }
.mini-link:hover { transform: translateY(-3px); }
.todo.deadline { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .5rem; padding: .3rem .2rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.todo.deadline:last-child { border-bottom: 0; }
.minis.wide { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.home-card form input { flex: 1; min-width: 0; }
@media (max-width: 600px) { .pagenav, .home-grid, .page { padding-left: .6rem; padding-right: .6rem; } .navtab { font-size: .88rem; padding: .35rem .55rem; } }

/* ==========================================================================
   Zachte stijl: geen harde lijnen. Ronde kaarten, bijna onzichtbare randen,
   zachte tinten en zachte schaduw naar beneden.
   ========================================================================== */
:root, [data-theme="virtualbiz"], [data-theme="forest"] {
  --soft-line: color-mix(in srgb, var(--primary) 9%, #fff);
  --soft-fill: color-mix(in srgb, var(--primary) 4%, #fff);
  --soft-fill-2: color-mix(in srgb, var(--primary) 8%, #fff);
  --edge: color-mix(in srgb, var(--primary) 28%, #fff);
  --edge-line: color-mix(in srgb, var(--primary) 12%, #fff);
}
[data-theme="night"] {
  --soft-line: #2C2C2C; --soft-fill: #222; --soft-fill-2: #292929;
  --edge: color-mix(in srgb, var(--primary) 45%, #1C1C1C); --edge-line: #333;
}

.card {
  border: 1px solid var(--soft-line); border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 12px 28px -18px var(--shadow);
}
[data-theme="night"] .card { border-color: var(--soft-line); }
.block { padding: 1.1rem 1.15rem; }
.block-head { margin-bottom: .8rem; }

.mini, .mini-link {
  background: var(--soft-fill); border: 1px solid var(--soft-line); border-radius: 16px;
  padding: .75rem .85rem; box-shadow: 0 8px 18px -16px var(--shadow);
}
[data-theme="night"] .mini, [data-theme="night"] .mini-link { border-color: var(--soft-line); }

/* Geen scheidingslijnen tussen regels, alleen ruimte */
.todo, .todo-wrap, .todo.deadline { border-bottom: 0 !important; }
.todos { gap: .25rem; }
.todo { padding: .4rem .5rem; border-radius: 12px; }
.todo:hover, .todo.deadline:hover { background: var(--soft-fill); }
.todo.prio { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }

/* Tactiele knoppen, zachter */
.btn {
  border-radius: 14px; border: 1px solid var(--edge-line); border-top-color: rgba(255,255,255,.95);
  border-bottom: 4px solid var(--edge); padding: .5rem .9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 6px 12px -8px var(--shadow);
}
.btn:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 12px 18px -10px var(--shadow); }
.btn.mini-btn { border-radius: 11px; border-bottom-width: 3px; }
.btn.icon { border-radius: 11px; }

/* Velden: zachte rand, ronde hoeken */
input, select, textarea {
  border: 1.5px solid var(--edge-line); border-radius: 14px; background: var(--soft-fill); padding: .6rem .75rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); background: var(--surface); }
.tick { border: 1.5px solid var(--edge); border-radius: 8px; box-shadow: none; background: var(--surface); }

/* Badges: rustig */
.badge { background: var(--soft-fill-2); border: 0; color: var(--muted); font-weight: 700; }
.badge.late { background: transparent; color: var(--late); }

/* Menu, filters en tabs: zachte pillen in plaats van strepen */
.navtab { border-radius: 14px; border-bottom: 0; padding: .45rem .85rem; }
.navtab:hover { background: var(--soft-fill-2); }
.navtab.on { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.chip { border-radius: 99px; border: 1px solid var(--edge-line); border-bottom: 3px solid var(--edge); }
.tab { border: 1px solid var(--soft-line); background: var(--soft-fill); }

/* Vandaag-strook: zachte tint in plaats van een harde zijbalk */
.strip-card {
  border: 1px solid var(--soft-line); border-left: 1px solid var(--soft-line); border-radius: 18px;
  background: var(--surface); padding: .75rem .95rem;
  box-shadow: 0 10px 22px -18px var(--shadow);
}
.strip-card.warn { background: color-mix(in srgb, var(--late) 7%, var(--surface)); border-color: color-mix(in srgb, var(--late) 20%, var(--surface)); }
[data-theme="night"] .strip-card { border-color: var(--soft-line); }

/* Overige harde randen zachter */
.hint.warn { border-left: 0; border-radius: 16px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.recovery { border: 1.5px solid color-mix(in srgb, var(--accent) 45%, var(--surface)); border-radius: 16px; background: var(--soft-fill); }
.dialog { border-radius: 24px; padding: 1.4rem; }
.bar { background: var(--soft-fill-2); height: 9px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '›'; display: inline-block; margin-right: .4rem; color: var(--primary); font-weight: 700; transition: transform .15s ease; }
details[open] > summary::before { transform: rotate(90deg); }
@media (max-width: 600px) { .card { border-radius: 20px; } .block { padding: .95rem; } }

/* ==========================================================================
   VirtualBiz-kleuren: 60% wit · 30% pink · 10% goud, zwart voor tekst.
   Rust: weinig kleuren, veel witruimte, geen losse pictogrammen.
   ========================================================================== */
:root, [data-theme="virtualbiz"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #FBF5F7;
  --text: #000000; --muted: #4A4A4A; --line: #F1E1E8;
  --primary: #CC1461; --primary-dark: #8E0D43; --on-primary: #FFFFFF;
  --accent: #D4AF37; --late: #8E0D43; --ok: #000000;
  --soft-line: #F3E4EB; --soft-fill: #FBF5F7; --soft-fill-2: #F6E8EE;
  --edge: #E9AFC8; --edge-line: #F3DCE6;
  --shadow: rgba(120, 20, 60, .16);
}
/* 30% pink: de kopband met titel, menu en filter */
.topbar, .pagenav, .filters { background: var(--soft-fill); }
.topbar { padding-top: .9rem; }
.filters { padding-bottom: 1rem; margin-bottom: 1.1rem; }
.pagenav { padding-bottom: .4rem; }
.navtab { font-weight: 600; color: var(--text); }
.navtab:hover { background: rgba(255,255,255,.7); }
.navtab.on { background: #fff; color: var(--primary); box-shadow: 0 6px 14px -10px var(--shadow); }
.chip { background: #fff; font-weight: 600; }
.chip.on { background: var(--primary); }
[data-theme="night"] .topbar, [data-theme="night"] .pagenav, [data-theme="night"] .filters { background: #161616; }
[data-theme="night"] .navtab.on, [data-theme="night"] .chip { background: #262626; }

/* Witte kaarten met heel zachte schaduw */
.card { border-color: var(--soft-line); box-shadow: 0 10px 30px -22px var(--shadow); }
.block-head h2 { font-size: 1.1rem; }
.head-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.head-link:hover h2 { color: var(--primary); }
.head-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.chev { color: var(--primary); font-size: 1.4rem; line-height: 1; font-weight: 700; }

/* 10% goud: voortgang, merkstreepje, prioriteit */
.bar span { background: var(--accent); }
.todo.prio { background: color-mix(in srgb, var(--accent) 10%, #fff); box-shadow: inset 3px 0 0 var(--accent); }
[data-theme="night"] .todo.prio { background: color-mix(in srgb, var(--accent) 12%, #1C1C1C); }

/* Vandaag-strook: wit, rustig, cijfer in zwart */
.strip-card, .strip-card.warn { background: #fff; border-color: var(--soft-line); box-shadow: 0 10px 26px -22px var(--shadow); }
.strip-card.warn .strip-sub { color: var(--late); }
.strip-title { font-weight: 600; color: var(--muted); }
.strip-value { font-size: 1.6rem; }
[data-theme="night"] .strip-card, [data-theme="night"] .strip-card.warn { background: var(--surface); }

/* Regels: één regel tekst, kleine grijze info eronder */
.todo { align-items: flex-start; padding: .5rem .55rem; }
.todo .tick { margin-top: .1rem; }
.todo-main .small { margin-top: .1rem; }
.late { font-weight: 600; }
.home-grid { gap: 1.1rem; }
.home-grid .card { min-height: 0; }
@media (min-width: 1100px) { .home-grid { grid-template-columns: 1.25fr 1fr 1fr; } }

/* ---------- Fase 2b: bord, timer, logboek ---------- */
.board { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); align-items: start; }
.col { background: var(--soft-fill); border-radius: 18px; padding: .7rem; display: flex; flex-direction: column; gap: .55rem; min-height: 80px; }
.col .mini { background: #fff; }
[data-theme="night"] .col .mini { background: var(--surface); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: .1rem .2rem; }
.timer-chip { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--edge-line); border-radius: 99px; padding: .25rem .35rem .25rem .8rem; }
[data-theme="night"] .timer-chip { background: var(--surface); }
.timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .timer-dot { animation: none; } }
.log { display: flex; flex-direction: column; gap: .35rem; margin-top: .3rem; }
.log form input { flex: 1; min-width: 0; padding: .4rem .6rem; }
.checks { display: grid; gap: .1rem .8rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.checks .check { margin: .2rem 0; font-weight: 400; }
fieldset.field { border: 0; padding: 0; }
fieldset.field legend { font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
textarea.mono { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
@media (max-width: 600px) { .timer-chip .small { display: none; } }

/* ---------- Fase 2d: weekplanner, focus ---------- */
.span-all { grid-column: 1 / -1; }
.page-tabs { margin-bottom: -.2rem; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: .6rem; overflow-x: auto; padding-bottom: .4rem; scroll-snap-type: x mandatory; }
.wk-day { background: var(--soft-fill); border-radius: 18px; padding: .6rem; display: flex; flex-direction: column; gap: .4rem; min-height: 180px; scroll-snap-align: start; }
.wk-day.today { background: color-mix(in srgb, var(--primary) 9%, #fff); }
[data-theme="night"] .wk-day.today { background: #2A1C22; }
.wk-head { display: flex; align-items: baseline; justify-content: space-between; }
.wk-item { display: flex; align-items: flex-start; gap: .4rem; background: #fff; border-radius: 12px; padding: .4rem .45rem; box-shadow: 0 6px 14px -12px var(--shadow); }
[data-theme="night"] .wk-item { background: var(--surface); }
.wk-item.prio { box-shadow: inset 3px 0 0 var(--accent), 0 6px 14px -12px var(--shadow); }
.wk-item .todo-title { flex: 1; font-size: .9rem; font-weight: 500; }
.wk-item .tick { width: 20px; height: 20px; flex: none; }
.wk-move { display: inline-flex; gap: .2rem; }
.btn.small-icon { padding: 0 .35rem; font-size: .85rem; border-bottom-width: 2px; border-radius: 8px; }
.wk-inbox { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.wk-inbox > div { display: flex; flex-direction: column; gap: .35rem; }
.focus-pill { display: inline-flex; gap: .4rem; align-items: baseline; background: color-mix(in srgb, var(--accent) 14%, #fff); border-radius: 10px; padding: .2rem .55rem; }
[data-theme="night"] .focus-pill { background: color-mix(in srgb, var(--accent) 18%, #1C1C1C); }
.focus-row { gap: .35rem; margin-bottom: .2rem; }

.wk-day .focus-pill { flex-direction: column; gap: 0; }
.wk-item { flex-wrap: wrap; }
@media (hover: hover) {
  .wk-move { opacity: 0; transition: opacity .15s ease; }
  .wk-item:hover .wk-move, .wk-item:focus-within .wk-move { opacity: 1; }
}

/* ---------- Gemak: +-knop, zoeken ---------- */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: .45rem .6rem; }
.fab {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 5; width: 58px; height: 58px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 78%, #fff 22%), var(--primary));
  border: 1px solid var(--primary-dark); border-bottom: 4px solid var(--primary-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 20px -8px var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.fab:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 16px 26px -10px var(--shadow); }
.fab:active { transform: translateY(3px); border-bottom-width: 1px; }
.fab svg { width: 26px; height: 26px; }
.fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.dash { padding-bottom: 5rem; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0; }
.quick-opt {
  all: unset; box-sizing: border-box; cursor: pointer; text-align: center; font-weight: 600; padding: 1rem .6rem;
  background: var(--soft-fill); border: 1px solid var(--soft-line); border-radius: 16px; transition: transform .12s ease;
}
.quick-opt:hover { transform: translateY(-3px); background: var(--soft-fill-2); }
.quick-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dialog.search { width: min(620px, calc(100vw - 2rem)); align-self: start; margin-top: 8vh; }
.search-row { gap: .6rem; }
.search-row input { flex: 1; font-size: 1.05rem; }
.search-results { display: flex; flex-direction: column; gap: .7rem; margin: .9rem 0; max-height: 55vh; overflow: auto; }
.search-group { display: flex; flex-direction: column; gap: .2rem; }
.agenda-time { min-width: 6.5rem; }
@media (max-width: 600px) { .fab { right: .9rem; bottom: .9rem; } }

/* Niets mag breder worden dan het scherm */
.page > *, .home-grid > *, .block, .block-body, .minis > *, .week > * { min-width: 0; }
.icon-btn { gap: .4rem; }
.wk-empty { display: none; }

/* Telefoon: week als rustige lijst, dagen onder elkaar */
@media (max-width: 700px) {
  .week { display: flex; flex-direction: column; gap: .45rem; overflow: visible; }
  .wk-day { min-height: 0; padding: .55rem .65rem; border-radius: 14px; }
  .wk-day.empty { flex-direction: row; align-items: baseline; gap: .6rem; padding: .35rem .65rem; background: transparent; }
  .wk-day.empty .wk-head { gap: .6rem; justify-content: flex-start; }
  .wk-day.empty .wk-empty { display: inline; }
  .wk-day.today { box-shadow: inset 3px 0 0 var(--primary); }
  .wk-day .focus-pill { flex-direction: row; gap: .4rem; }
  .wk-move { opacity: 1 !important; }
  .topbar { flex-wrap: nowrap; gap: .4rem; }
  .topbar .lbl { display: none; }
  .topbar .icon-btn { padding: .45rem .55rem; }
  .brand.small { font-size: 1.2rem; }
  .sync { font-size: .75rem; }
}

/* ---------- Content90 ---------- */
.freq-row { gap: .9rem; }
.c90-item { align-items: center; }
.c90-item .todo-main { min-width: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stat-num { font-size: 1.15rem; }
.stat-line { text-align: right; }
.cal-head, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.cal-head span { text-align: center; }
.cal-cell { background: var(--soft-fill); border-radius: 12px; padding: .35rem .4rem; min-height: 86px; display: flex; flex-direction: column; gap: .2rem; }
.cal-cell.pad { background: transparent; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-num { font-weight: 700; font-size: .85rem; }
.cal-wd { display: none; }
.cal-item { all: unset; cursor: pointer; display: flex; align-items: center; gap: .3rem; font-size: .78rem; background: #fff; border-radius: 8px; padding: .15rem .35rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
[data-theme="night"] .cal-item { background: var(--surface); }
.cal-item:focus-visible { outline: 2px solid var(--accent); }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.st-idea { background: #E9D5DF; } .st-write { background: #E9AFC8; } .st-image { background: #D9719F; } .st-planned { background: var(--primary); } .st-posted { background: var(--accent); }
@media (max-width: 700px) {
  .cal-head { display: none; }
  .cal { display: flex; flex-direction: column; gap: .35rem; }
  .cal-cell { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem; }
  .cal-cell.pad, .cal-cell.empty { display: none; }
  .cal-wd { display: inline; }
  .cal-item { white-space: normal; font-size: .85rem; flex: 1 1 100%; }
  .stat-line { text-align: left; }
}

/* Content90: per bedrijf */
.biz-switch { display: flex; gap: .5rem; flex-wrap: wrap; }
.biz-switch .chip { font-size: 1rem; padding: .45rem 1.1rem; }

/* Onderhoud en Library per onderdeel */
.area-section { display: flex; flex-direction: column; gap: .6rem; }
.area-section + .area-section { margin-top: .8rem; }
.area-title { font-family: 'Gowun Batang', Georgia, serif; font-size: 1rem; margin: 0; color: var(--primary-dark); }
[data-theme="night"] .area-title { color: #FF8FBB; }
.kind-group { display: flex; flex-direction: column; gap: .35rem; }
.maint-item .todo-title::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); margin-right: .45rem; vertical-align: middle; }
.wiki-body { line-height: 1.55; }
.dialog.wide { width: min(820px, calc(100vw - 2rem)); }
.dialog.wide textarea { min-height: 45vh; }
