/* Takenapp facilitair — stijl voor cliëntweergave (ontwerp 8) en beheer */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* ========================================================================
   CLIËNTWEERGAVE — ontwerp 8: licht, hoog contrast, extra groot
   ======================================================================== */
body.client { background: #FFFFFF; color: #111111; -webkit-user-select: none; user-select: none; }

/* Gecentreerde, schaalbare breedte: prettig leesbaar op tv, pc én tablet */
.client-wrap { min-height: 100vh; display: flex; flex-direction: column; max-width: 1240px; margin: 0 auto; width: 100%; }

.c-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  border-bottom: 5px solid #111111;
  padding: clamp(16px, 3vw, 30px) clamp(20px, 4vw, 52px);
}
.c-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.c-tool {
  cursor: pointer; width: clamp(46px, 5vw, 60px); height: clamp(46px, 5vw, 60px);
  border-radius: 14px; border: 2px solid #D6DCE2; background: #fff; color: #33424D;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1; text-decoration: none;
}
.c-tool:hover { background: #EAF0F8; color: #14489B; border-color: #14489B; }
.c-tool svg { width: 58%; height: 58%; }
.c-header-left { min-width: 0; }
.c-title { font-size: clamp(30px, 4.6vw, 54px); font-weight: 800; line-height: 1; }
.c-date { font-size: clamp(17px, 2.3vw, 26px); font-weight: 700; color: #333; margin-top: 6px; text-transform: capitalize; }

/* Dag-navigatie: vaste breedte, pijltjes aan de uiteinden, datum in het midden,
   zodat de pijltjes NIET verspringen als de datumtekst langer of korter is. */
.c-datenav { display: flex; align-items: center; margin-top: 6px; width: clamp(300px, 42vw, 440px); max-width: 100%; }
.c-datenav .c-date { flex: 1 1 auto; min-width: 0; margin-top: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-arrow { flex-shrink: 0; cursor: pointer; background: none; border: none; color: #9AA7B0; padding: 8px 10px; display: flex; align-items: center; border-radius: 10px; touch-action: manipulation; }
.c-arrow:hover { color: #14489B; background: #EAF0F8; }
.c-arrow:active { background: #DCE6F5; }
/* Snelknoppen voor dagen dichtbij (Eergisteren … Overmorgen) */
.c-quicknav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.c-quick { cursor: pointer; background: #EEF2F7; color: #374151; border: 2px solid transparent; border-radius: 999px; font-weight: 800; font-size: clamp(13px, 1.5vw, 17px); padding: 8px 15px; touch-action: manipulation; }
.c-quick:hover { background: #E2E8F2; }
.c-quick.active { background: #14489B; color: #fff; }
.beta-badge { display: inline-block; vertical-align: middle; font-size: 0.3em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #AEB6BF; background: none; padding: 0; margin-left: 8px; }
.c-tags { display: block; margin-top: 8px; }
.c-tags .c-tag { margin-right: 6px; }
.c-list.readonly .c-check { opacity: 0.3; }
.c-list.readonly .c-check-btn { cursor: default; }
.c-count {
  flex-shrink: 0; background: #14489B; color: #fff; font-weight: 800;
  font-size: clamp(18px, 2.6vw, 30px); padding: 0.45em 0.85em; border-radius: 14px; white-space: nowrap;
}
.c-count.klaar { background: #1E7A46; }

.c-list { flex-grow: 1; padding: clamp(6px, 1.5vw, 16px) clamp(20px, 4vw, 52px) 150px; }

.c-row { border-bottom: 4px solid #DADADA; }
.c-row:last-child { border-bottom: none; }
.c-row-top { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px); padding: clamp(14px, 2vw, 22px) 6px; }
.c-open {
  flex-grow: 1; min-width: 0; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px);
  background: none; border: none; text-align: left; cursor: pointer; color: #111111; padding: 0;
}
.c-check-btn { flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 0; }
.c-icon {
  flex-shrink: 0; width: clamp(70px, 9vw, 98px); height: clamp(70px, 9vw, 98px);
  border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fff;
}
.c-icon svg { width: 62%; height: 62%; }
.c-main { flex-grow: 1; min-width: 0; display: block; }
.c-name { display: block; font-size: clamp(26px, 3.7vw, 42px); font-weight: 800; line-height: 1.1; }
.c-sub { display: block; font-size: clamp(19px, 2.4vw, 28px); font-weight: 800; margin-top: 6px; }
.c-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: clamp(15px, 1.8vw, 20px); font-weight: 800;
  background: #EAF0F8; color: #14489B; padding: 4px 12px 4px 5px; border-radius: 999px;
}
.tag-av { width: 1.7em; height: 1.7em; border-radius: 50%; object-fit: cover; display: block; }
.c-chev { flex-shrink: 0; color: #8497A3; display: flex; transition: transform .2s; }
.c-row.open .c-chev { transform: rotate(180deg); }
.c-check {
  width: clamp(60px, 7.5vw, 82px); height: clamp(60px, 7.5vw, 82px);
  border-radius: 18px; border: 5px solid #111111;
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.c-check svg { width: 55%; height: 55%; }

/* Afgeronde taak: bewust SUBTIEL, zodat de nadruk op de nog te doen taken ligt */
.c-row.done { opacity: 0.5; }
.c-row.done .c-name { color: #4A5568; font-weight: 700; }
.c-row.done .c-sub { color: #6B7280; }
.c-row.done .c-check { background: #E5E7EB; border-color: #E5E7EB; color: #9AA7B0; }

/* Detailpaneel: instructietekst + subtaken (zichtbaar na tik op de tekst) */
.c-detail { padding: 2px clamp(10px, 2vw, 20px) clamp(14px, 2vw, 22px) clamp(86px, 11.4vw, 126px); }
.c-instruction { font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; color: #2E2A24; background: #F5F7FA; border-left: 6px solid #14489B; border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; }
.c-subtasks { display: flex; flex-direction: column; gap: 10px; }
.c-subtask { display: flex; align-items: center; gap: 14px; background: #fff; border: 3px solid #CBD6DE; border-radius: 14px; padding: 10px 14px; cursor: pointer; text-align: left; }
.c-sub-check { flex-shrink: 0; width: clamp(38px, 4.5vw, 48px); height: clamp(38px, 4.5vw, 48px); border-radius: 10px; border: 3px solid #111; display: flex; align-items: center; justify-content: center; color: transparent; }
.c-sub-check svg { width: 60%; height: 60%; }
.c-sub-title { font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; color: #111; }
.c-subtask.done { background: #EAF0F8; border-color: #14489B; }
.c-subtask.done .c-sub-check { background: #14489B; border-color: #14489B; color: #fff; }
.c-subtask.done .c-sub-title { color: #4A5568; text-decoration: line-through; }

/* Beheer-link onder de datum */
.c-beheer { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 15px; font-weight: 800; color: #6B7A84; text-decoration: none; }
.c-beheer:hover { color: #14489B; }

/* Afrond-animatie */
.celebrate { position: fixed; inset: 0; pointer-events: none; display: none; align-items: center; justify-content: center; z-index: 150; overflow: hidden; }
.celebrate.show { display: flex; }

/* Uitstralende gloed + lichtstralen achter de vinkcirkel */
.cel-burst { position: absolute; left: 50%; top: 50%; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,122,70,0.28), rgba(30,122,70,0) 68%);
  animation: celburst 2.4s ease-out forwards; }
@keyframes celburst { 0% { transform: translate(-50%,-50%) scale(0.2); opacity: 0; } 18% { opacity: 1; } 100% { transform: translate(-50%,-50%) scale(1.9); opacity: 0; } }
.cel-rays { position: absolute; left: 50%; top: 50%; width: 460px; height: 460px; margin: -230px 0 0 -230px;
  background: repeating-conic-gradient(rgba(30,122,70,0.18) 0deg 10deg, rgba(30,122,70,0) 10deg 20deg);
  border-radius: 50%; animation: celrays 2.4s ease-out forwards; }
@keyframes celrays { 0% { transform: scale(0.2) rotate(0deg); opacity: 0; } 20% { opacity: 0.9; } 100% { transform: scale(1.4) rotate(60deg); opacity: 0; } }

.cel-ring { position: relative; width: 200px; height: 200px; border-radius: 50%; background: #1E7A46; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 50px rgba(30,122,70,0.55);
  animation: celpop 0.6s cubic-bezier(0.2,1.5,0.4,1) both, celpulse 0.7s ease-in-out 0.6s 2; }
.cel-ring svg { width: 58%; height: 58%; }
@keyframes celpop { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 60% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes celpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.cel-label { position: absolute; left: 50%; top: calc(50% + 140px); font-size: clamp(32px, 5vw, 60px); font-weight: 800;
  color: #1E7A46; white-space: nowrap; text-shadow: 0 3px 10px rgba(0,0,0,0.18); animation: cellabel 2.4s ease-out forwards; }
@keyframes cellabel { 0% { opacity: 0; transform: translate(-50%, 24px) scale(0.85); } 22% { opacity: 1; transform: translate(-50%, 0) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -8px); } }

.cel-piece { position: absolute; left: 50%; top: 50%; border-radius: 3px; animation: celfly ease-out forwards; }
.cel-piece.round { border-radius: 50%; }
@keyframes celfly {
  0% { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .cel-ring { animation: none; } .cel-piece, .cel-burst, .cel-rays, .cel-label { display: none; } }

/* Namenbalk onderin */
.names-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #F3F4F6; border-top: 4px solid #111;
  padding: 10px max(16px, calc((100% - 1240px) / 2)) 14px;
}
.names-label { font-size: clamp(14px, 1.6vw, 18px); font-weight: 800; color: #6B7280; margin-bottom: 8px; }
.names-list { display: flex; gap: 12px; align-items: center; overflow-x: auto; padding-bottom: 4px; }
.name-chip {
  flex-shrink: 0; cursor: grab; touch-action: none; user-select: none;
  background: #14489B; color: #fff; border: none; border-radius: 999px;
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; padding: 8px 16px 8px 8px;
}
.name-chip:active { cursor: grabbing; }
.chip-name { white-space: nowrap; }
.chip-av {
  flex-shrink: 0; width: clamp(40px, 4.4vw, 52px); height: clamp(40px, 4.4vw, 52px);
  border-radius: 50%; overflow: hidden; background: #0D3576;
  display: flex; align-items: center; justify-content: center;
}
.chip-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip-av.initial { color: #fff; font-weight: 800; font-size: clamp(18px, 2vw, 26px); }
.chip-cam {
  flex-shrink: 0; cursor: pointer; border: none; padding: 0;
  width: clamp(32px, 3.4vw, 42px); height: clamp(32px, 3.4vw, 42px); border-radius: 50%;
  background: rgba(255,255,255,0.22); color: #fff; display: flex; align-items: center; justify-content: center;
}
.chip-cam:hover { background: rgba(255,255,255,0.42); }
.chip-cam svg { width: 62%; height: 62%; }
.name-add {
  flex-shrink: 0; cursor: pointer; background: #fff; color: #14489B;
  border: 3px dashed #14489B; border-radius: 999px;
  font-size: clamp(18px, 2.2vw, 26px); font-weight: 800; padding: 10px 22px;
}
.name-ghost {
  position: fixed; z-index: 300; pointer-events: none; transform: translate(-50%, -50%);
  background: #14489B; color: #fff; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; padding: 8px 20px 8px 8px; opacity: 0.95;
  display: flex; align-items: center; gap: 10px;
}
.ghost-av { flex-shrink: 0; width: clamp(40px, 4.4vw, 52px); height: clamp(40px, 4.4vw, 52px); border-radius: 50%; overflow: hidden; background: #0D3576; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.ghost-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ghost-av.initial { font-size: clamp(18px, 2vw, 26px); }
.c-row.drop-target { outline: 5px dashed #14489B; outline-offset: -3px; border-radius: 16px; background: #EAF0F8; }

/* Naam-invoervenster */
.name-overlay { position: fixed; inset: 0; background: rgba(17,24,39,0.6); display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.name-overlay.open { display: flex; }
.name-modal { background: #fff; border-radius: 22px; padding: 28px; width: min(560px, 100%); }
.name-modal h2 { margin: 0 0 18px; font-size: clamp(26px, 3.4vw, 36px); color: #111; }
#name-input { width: 100%; font-size: clamp(24px, 3vw, 34px); font-weight: 700; padding: 16px 18px; border: 3px solid #111; border-radius: 14px; box-sizing: border-box; }
.name-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.btn-soft-lg, .btn-primary-lg { cursor: pointer; border: none; border-radius: 14px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; padding: 14px 26px; }
.btn-soft-lg { background: #E5E7EB; color: #1F2933; }
.btn-primary-lg { background: #14489B; color: #fff; }

.c-empty { text-align: center; padding: 12vh 24px; }
.c-empty .big { font-size: clamp(40px, 7vw, 84px); font-weight: 800; color: #1E7A46; }
.c-empty .sub { font-size: clamp(22px, 3vw, 34px); font-weight: 700; color: #333; margin-top: 12px; }

/* Locatiekiezer (als er meerdere locaties zijn) */
.c-picker { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 40px; }
.c-picker h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; margin: 0; text-align: center; }
.c-picker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; width: min(900px, 100%); }
.c-picker-btn {
  cursor: pointer; border: 5px solid #111; background: #fff; color: #111; border-radius: 22px;
  padding: clamp(24px, 4vw, 44px); font-size: clamp(26px, 3.5vw, 38px); font-weight: 800;
}

/* ========================================================================
   BEHEEROMGEVING — voor medewerkers
   ======================================================================== */
body.beheer { background: #F3F4F6; color: #1F2933; }
.b-wrap { max-width: 900px; margin: 0 auto; padding: 20px 16px 80px; }

.b-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.b-top h1 { font-size: 26px; font-weight: 800; margin: 0; }
.b-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.b-tab {
  cursor: pointer; border: 2px solid #D1D5DB; background: #fff; color: #374151;
  font-weight: 800; font-size: 16px; padding: 10px 18px; border-radius: 999px;
}
.b-tab.active { background: #14489B; border-color: #14489B; color: #fff; }

.b-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.b-field { display: flex; flex-direction: column; gap: 6px; }
label.b-label { font-weight: 800; font-size: 14px; color: #374151; }
select, input[type="text"], input[type="time"], input[type="number"], textarea {
  font-family: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid #D1D5DB; border-radius: 10px; background: #fff; color: #1F2933;
}
textarea { resize: vertical; width: 100%; }

/* Herhaal-opties (Outlook-stijl) */
.rec-opts { background: #F7F8FA; border: 2px solid #E5E7EB; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.rec-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: #374151; }
.rec-num { width: 74px; }
select:focus, input:focus, textarea:focus { outline: 3px solid #A9C2EA; border-color: #14489B; }

/* Subtaken-editor */
.subtask-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.subtask-row input { flex-grow: 1; }
.subtask-del { cursor: pointer; border: none; background: #F0D2D2; color: #B02020; font-weight: 800; border-radius: 8px; padding: 8px 12px; }

.card { background: #fff; border: 1px solid #E5E7EB; border-radius: 14px; padding: 14px; margin-bottom: 12px; }

.task-item { display: flex; align-items: center; gap: 14px; }
.task-item .mini {
  width: 52px; height: 52px; border-radius: 12px; color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.task-item .mini svg { width: 60%; height: 60%; }
.task-item .grow { flex-grow: 1; min-width: 0; }
.task-item .t-name { font-size: 18px; font-weight: 800; }
.task-item .t-meta { font-size: 14px; color: #6B7280; font-weight: 700; margin-top: 2px; }
.task-item.paused { opacity: 0.55; }
.badge-paused { display: inline-block; background: #FEE2C7; color: #9A5B0C; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: 6px; }

.btn { cursor: pointer; border: none; border-radius: 10px; font-weight: 800; font-size: 15px; padding: 10px 16px; }
.btn-primary { background: #14489B; color: #fff; }
.btn-soft { background: #E5E7EB; color: #1F2933; }
.btn-danger { background: #B02020; color: #fff; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-icon { padding: 8px 12px; }

.list-empty { color: #6B7280; font-weight: 700; padding: 20px; text-align: center; }

/* Icoon- en kleurkiezer */
.chooser { display: flex; flex-wrap: wrap; gap: 8px; }
.chooser button {
  cursor: pointer; width: 52px; height: 52px; border-radius: 12px; border: 3px solid transparent;
  display: flex; align-items: center; justify-content: center; background: #F3F4F6; color: #374151;
}
.chooser button.sel { border-color: #111; }
.chooser.colors button { color: #fff; }

/* Modaal / formulier */
.overlay { position: fixed; inset: 0; background: rgba(17,24,39,0.55); display: none; align-items: flex-start; justify-content: center; padding: 20px; z-index: 50; overflow-y: auto; }
.overlay.open { display: flex; }
.modal { background: #fff; border-radius: 16px; width: min(560px, 100%); padding: 20px; margin-top: 20px; }
.modal h2 { margin: 0 0 14px; font-size: 22px; }
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.row2 { display: flex; gap: 12px; flex-wrap: wrap; }
.row2 > * { flex: 1 1 180px; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.switch input { width: 22px; height: 22px; }

/* Pincode-scherm */
.pin-screen { position: fixed; inset: 0; background: #111827; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; z-index: 100; padding: 20px; }
.pin-screen h1 { font-size: 28px; margin: 0; }
.pin-dots { display: flex; gap: 14px; }
.pin-dot { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #fff; }
.pin-dot.on { background: #fff; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 84px); gap: 14px; }
.pin-key { cursor: pointer; height: 84px; border-radius: 50%; border: none; background: #374151; color: #fff; font-size: 32px; font-weight: 800; }
.pin-key.wide { background: transparent; font-size: 18px; }
.pin-error { color: #FCA5A5; font-weight: 800; min-height: 22px; }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 800; z-index: 200; opacity: 0; transition: opacity .2s; }
.toast.show { opacity: 1; }

/* Locatie-chips in het taakformulier (meerdere kiezen) */
.chooser.locs { gap: 10px; }
.chooser button.locchip, .chooser button.clientchip { cursor: pointer; border: 2px solid #D1D5DB; background: #fff; color: #374151; font-weight: 800; font-size: 15px; padding: 10px 16px; border-radius: 999px; width: auto; height: auto; }
.chooser button.locchip.sel, .chooser button.clientchip.sel { background: #14489B; border-color: #14489B; color: #fff; }
.chooser.clients { gap: 10px; }
.hint { font-size: 13px; color: #6B7280; font-weight: 700; }

/* Uitleg-tab */
.card.help { line-height: 1.5; }
.card.help h3 { margin: 18px 0 6px; font-size: 18px; }
.card.help h3:first-child { margin-top: 4px; }
.card.help p { margin: 6px 0; }
.card.help ul { margin: 6px 0; padding-left: 20px; }
.card.help li { margin: 4px 0; }
.card.help code { background: #EEF2F7; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
