/* Huisstijl en gedeelde onderdelen van de Hoogeboom-webapps (overzicht, beheer, planning, ...).
   Volgens het Hoogeboom huisstijlhandboek (versie 1.0, 01-01-2025):
   kleuren zwart / oranje / blauw 1 / blauw 2 / licht blauw-grijs, lettertype Outfit,
   diagonale hoek, gemarkeerde titel en het beeldmerk als watermerk.
   Licht en donker: volgt het toestel, of de keuze in het accountvenster (data-theme op <html>). */
:root {
  /* huisstijlkleuren (handboek 2.1) */
  --hb-zwart: #231F20; --hb-oranje: #E8530E; --hb-blauw: #3BA6DE; --hb-blauw-2: #2C96CE; --hb-grijs: #F0F4F5;

  --bg: #F0F4F5; --panel: #ffffff; --panel-2: #F6F8F9; --line: #dfe5e8; --line-strong: #c3ccd1;
  --ink: #231F20; --muted: #5d6468; --brand: #E8530E; --brand-soft: #fde3d6;
  --red: #c8321f; --red-soft: #fbe1dc; --orange: #d9730b; --orange-soft: #fcead5;
  --ok: #2f8a55; --ok-soft: #dcf0e3; --blue: #2C96CE; --blue-soft: #e1f0f9;
  --held: #3BA6DE;          /* blauw vlak (welkom, paginakop) */
  --knop: #2C96CE;          /* hoofdknop */
  --ico: #2C96CE;           /* lijniconen */
  --radius: 3px;
  --hoek: 1.1rem;           /* diagonale hoek (handboek 4.1): overal dezelfde maat */
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-kop: "Outfit", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161718; --panel: #222427; --panel-2: #2b2e31; --line: #3a3d40; --line-strong: #4d5155;
    --ink: #F0F4F5; --muted: #a3abaf; --brand-soft: #4a2414; --red: #ff6b55; --red-soft: #45211b;
    --orange: #f0983c; --orange-soft: #43301a; --ok: #5cc486; --ok-soft: #173024; --blue: #6cc0ec; --blue-soft: #16303f;
    --held: #1f6f9c; --knop: #2C96CE; --ico: #6cc0ec;
  }
}
:root[data-theme="dark"] {
  --bg: #161718; --panel: #222427; --panel-2: #2b2e31; --line: #3a3d40; --line-strong: #4d5155;
  --ink: #F0F4F5; --muted: #a3abaf; --brand-soft: #4a2414; --red: #ff6b55; --red-soft: #45211b;
  --orange: #f0983c; --orange-soft: #43301a; --ok: #5cc486; --ok-soft: #173024; --blue: #6cc0ec; --blue-soft: #16303f;
  --held: #1f6f9c; --knop: #2C96CE; --ico: #6cc0ec;
}

/* ---------- logo (handboek 1.2: kleur op licht, diapositief wit/oranje op donker) ---------- */
.hb-logo { display: block; flex: 0 0 auto; height: 1.75rem; aspect-ratio: 142.3 / 19.5;
  background: url(logo.svg) left center / contain no-repeat; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hb-logo { background-image: url(logo-wit.svg); } }
:root[data-theme="dark"] .hb-logo { background-image: url(logo-wit.svg); }
.hb-logo.wit { background-image: url(logo-wit.svg); }
/* los beeldmerk (handboek 1.3), bijv. op de telefoon naast een paginatitel */
.hb-merk { display: block; flex: 0 0 auto; height: 1.9rem; aspect-ratio: 1; background: url(beeldmerk.svg) center / contain no-repeat; }

/* ---------- gemarkeerde titel (handboek 4.3) en diagonale hoek (4.1) ---------- */
.hb-hl { display: inline-block; background: var(--hb-oranje); color: #fff; font-family: var(--font-kop); font-weight: 800;
  text-transform: uppercase; letter-spacing: .02em; font-size: .8rem; line-height: 1.2; padding: .2rem .55rem .15rem;
  transform: rotate(-3deg); transform-origin: left center; }
.hb-hl.blauw { background: var(--hb-blauw); transform: rotate(2deg); }
.hb-hl.blauw2 { background: var(--hb-blauw-2); }
.hb-hoek { clip-path: polygon(var(--hoek) 0, 100% 0, 100% 100%, 0 100%, 0 var(--hoek)); }

/* ---------- basis (alleen op pagina's die class="hb" op <body> hebben) ---------- */
body.hb { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
body.hb * { box-sizing: border-box; }
:where(body.hb) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(body.hb) :where(button) { cursor: pointer; touch-action: manipulation; }
:where(body.hb) :where(h1, h2, h3, h4) { font-family: var(--font-kop); }
.hb-wrap { max-width: 64rem; margin: 0 auto; padding: 0 .75rem 2rem; }

/* kopbalk: witte balk over de volle breedte, logo links, gebruikersknop rechts */
.hb-top { display: flex; align-items: center; gap: .9rem; background: var(--panel); min-width: 0;
  margin: 0 0 1rem; padding: calc(.7rem + env(safe-area-inset-top, 0px)) 0 .7rem;
  box-shadow: 0 0 0 100vmax var(--panel); clip-path: inset(0 -100vmax); }
.hb-top > a { display: block; flex: 0 0 auto; text-decoration: none; }
.hb-top img { height: 2.2rem; width: auto; display: block; flex: 0 0 auto; }
.hb-top h1 { margin: 0; font-family: var(--font-kop); font-size: 1.25rem; font-weight: 800; line-height: 1.1;
  text-transform: uppercase; letter-spacing: .01em; flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: .9rem; border-left: 2px solid var(--line); }
.hb-top h1 span { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.hb-top .ruimte { flex: 1 1 auto; }
@media (max-width: 560px) {
  .hb-top { gap: .6rem; padding-top: calc(.55rem + env(safe-area-inset-top, 0px)); padding-bottom: .55rem; margin-bottom: .75rem; }
  .hb-top .hb-logo { height: 1.35rem; }
  /* op de telefoon naast een paginatitel alleen het beeldmerk */
  .hb-top h1 ~ * { flex: 0 0 auto; }
  .hb-top:has(h1) .hb-logo { aspect-ratio: 1; height: 1.9rem; background-image: url(beeldmerk.svg) !important; }
  .hb-top h1 { font-size: 1.1rem; padding-left: .6rem; }
  .hb-top h1 span { display: none; }
}

/* blauw vlak met diagonale hoek en watermerk (welkom, paginakop) */
.hb-held { position: relative; overflow: hidden; background: var(--held); color: #fff; padding: 1.6rem 1.6rem 1.8rem;
  margin: 0 0 1rem; --hoek: 2.4rem; clip-path: polygon(var(--hoek) 0, 100% 0, 100% 100%, 0 100%, 0 var(--hoek)); }
.hb-held::after { content: ""; position: absolute; right: -2.5rem; top: -3rem; width: 19rem; aspect-ratio: 1;
  background: url(watermerk.svg) center / contain no-repeat; opacity: .45; pointer-events: none; }
.hb-held > * { position: relative; z-index: 1; }
.hb-held h2 { margin: .55rem 0 0; font-family: var(--font-kop); font-weight: 900; font-size: 2.4rem; line-height: 1;
  text-transform: uppercase; overflow-wrap: anywhere; }
.hb-held p { margin: .45rem 0 0; font-weight: 300; font-size: 1.05rem; }
@media (max-width: 560px) {
  .hb-held { padding: 1.1rem 1.05rem 1.3rem; --hoek: 1.6rem; margin-bottom: .75rem; }
  .hb-held::after { width: 12rem; right: -2rem; top: -2rem; }
  .hb-held h2 { font-size: 1.65rem; }
  .hb-held p { font-size: .98rem; }
}

.hb-card { background: var(--panel); border: 0; border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; }
.hb-card h2 { margin: 0 0 .6rem; font-family: var(--font-kop); font-size: 1.2rem; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.hb-muted { color: var(--muted); }
:where(body.hb) a:not([class]) { color: var(--blue); }
.hb-err { color: var(--red); font-weight: 700; }
.hb-okmsg { color: var(--ok); font-weight: 700; }

/* knoppen */
.hb-btn { min-height: 3rem; padding: 0 .95rem; border-radius: var(--radius); border: 1.5px solid var(--line-strong); background: var(--panel);
  color: var(--ink); font-weight: 600; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem; text-decoration: none; line-height: 1.1; text-align: center; }
.hb-btn:active { transform: translateY(1px); filter: brightness(.95); }
.hb-btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }
.hb-btn.primary, .hb-btn.brand { background: var(--knop); border-color: var(--knop); color: #fff; font-weight: 800;
  text-transform: uppercase; letter-spacing: .03em; font-size: .95rem; }
.hb-btn.brand { background: var(--brand); border-color: var(--brand); }
.hb-btn.bad { border-color: var(--red); color: var(--red); }
.hb-btn.on { background: var(--hb-blauw-2); border-color: var(--hb-blauw-2); color: #fff; font-weight: 700; }
.hb-btn.small { min-height: 2.5rem; font-size: .9rem; padding: 0 .7rem; }
.hb-btn.primary.small, .hb-btn.brand.small { font-size: .82rem; }
.hb-link { background: none; border: 0; color: var(--blue); font-weight: 700; padding: .3rem 0; text-align: left; cursor: pointer; font-size: 1rem; }

/* invoer */
.hb-field { display: flex; flex-direction: column; gap: .4rem; font-weight: 700; margin-bottom: .85rem;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.hb-field small { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: .9rem; }
.hb-field input, .hb-input { height: 3.2rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--panel);
  color: var(--ink); padding: 0 .85rem; font-size: 1.1rem; width: 100%; font-weight: 400; text-transform: none; letter-spacing: 0; }
.hb-field input:focus, .hb-input:focus { outline: 2px solid var(--hb-blauw); outline-offset: 0; border-color: var(--hb-blauw); }

/* ---------- inloggen ---------- */
.hb-login { max-width: 27.5rem; margin: 8vh auto 0; padding: 0 .75rem; box-sizing: border-box; }
.hb-login .hb-card { padding: 1.5rem 1.4rem 1.3rem; display: flex; flex-direction: column; gap: .85rem;
  --hoek: 1.6rem; clip-path: polygon(var(--hoek) 0, 100% 0, 100% 100%, 0 100%, 0 var(--hoek)); }
.hb-login .hb-field { margin: 0; }
.hb-login .kop { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: .2rem; }
.hb-login .kop img { height: 3rem; }
.hb-login .kop .hb-logo { height: 2rem; }
.hb-login .kop b { font-family: var(--font-kop); font-size: 1.9rem; font-weight: 900; line-height: 1; text-transform: uppercase; }
.hb-namen { list-style: none; margin: -.3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.hb-namen:empty { display: none; }
.hb-namen button { width: 100%; min-height: 3.1rem; text-align: left; border: 1.5px solid var(--line); border-left: .35rem solid var(--hb-blauw);
  border-radius: var(--radius); background: var(--panel-2); font-weight: 600; font-size: 1.05rem; padding: 0 .9rem; }
.hb-namen .leeg { color: var(--muted); font-size: .98rem; }
.hb-gekozen { display: flex; align-items: center; gap: .6rem; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: .55rem .8rem; }
.hb-gekozen b { flex: 1; font-size: 1.1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-gekozen .hb-link { padding: 0; }

/* ---------- tegels (overzicht) ---------- */
.hb-tegels { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 1rem; }
.hb-tegel { position: relative; display: flex; flex-direction: column; gap: .3rem; background: var(--panel); border: 0;
  border-radius: 0; padding: 1.15rem 1.15rem 1.1rem; text-decoration: none; color: var(--ink); min-height: 7.5rem;
  --hoek: 1.1rem; clip-path: polygon(var(--hoek) 0, 100% 0, 100% 100%, 0 100%, 0 var(--hoek)); }
.hb-tegel b { font-family: var(--font-kop); font-size: 1.12rem; font-weight: 800; line-height: 1.1; text-transform: uppercase;
  letter-spacing: .01em; overflow-wrap: break-word; hyphens: auto; margin-top: .5rem; }
.hb-tegel span:not(.hb-hl):not(.tel):not(.ico) { color: var(--muted); font-size: .9rem; font-weight: 300; }
.hb-tegel .ico { font-size: 1.7rem; line-height: 1; color: var(--ico); }
.hb-tegel .ico svg { width: 1.9rem; height: 1.9rem; display: block; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.hb-tegel.oranje .ico { color: var(--brand); }
.hb-tegel .tel { position: absolute; right: .9rem; top: .9rem; min-width: 1.55rem; height: 1.55rem; padding: 0 .45rem; border-radius: 1rem;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.hb-tegel.uit { opacity: .55; cursor: default; }
a.hb-tegel:hover { box-shadow: inset 0 -3px 0 var(--hb-blauw); }
a.hb-tegel:active { transform: translateY(1px); }
/* telefoon: tegels in twee kolommen, alleen icoon en naam */
@media (max-width: 560px) {
  .hb-tegels { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .hb-tegel { min-height: 6.2rem; padding: .85rem .85rem .8rem; --hoek: .9rem; }
  .hb-tegel .ico svg { width: 1.65rem; height: 1.65rem; }
  .hb-tegel b { font-size: .95rem; margin-top: .45rem; }
  .hb-tegel span:not(.ico):not(.tel) { display: none; }
  .hb-tegel .tel { right: .7rem; top: .7rem; }
}

/* ---------- gebruikersknop + accountvenster ---------- */
.hb-user { min-height: 2.6rem; padding: 0 .8rem; border: 0; background: var(--bg); border-radius: var(--radius);
  font-weight: 500; font-size: .95rem; display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; max-width: 14rem;
  overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; color: var(--ink); cursor: pointer; margin-left: auto; }
.hb-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(15, 16, 17, .6); display: none; align-items: center;
  justify-content: center; padding: 1rem; }
.hb-overlay.show { display: flex; }
.hb-modal { background: var(--panel); color: var(--ink); border-radius: var(--radius); width: min(30rem, 100%); max-height: 92vh; overflow: auto;
  padding: 1.2rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .6rem;
  font-family: var(--font); font-size: 16px; line-height: 1.4; }
.hb-modal * { box-sizing: border-box; }
.hb-modal h3 { margin: 0; font-family: var(--font-kop); font-size: 1.4rem; font-weight: 900; text-transform: uppercase; flex: 1; }
.hb-modal .kop { display: flex; align-items: center; gap: .6rem; }
.hb-modal .hb-btn { justify-content: flex-start; width: 100%; }
.hb-modal .kop .hb-btn { width: auto; }
.hb-modal .hb-field { margin: 0; }
.hb-thema { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.hb-thema span { grid-column: 1 / -1; padding: .45rem .75rem; font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.hb-thema button { min-height: 2.8rem; border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-weight: 500; font-size: .95rem; padding: 0 .4rem; }
.hb-thema span + button { border-left: 0; }
.hb-thema button.aan { background: var(--hb-blauw-2); color: #fff; font-weight: 700; }
.hb-user svg { flex: 0 0 auto; }
.hb-user span { overflow: hidden; text-overflow: ellipsis; }

/* ---------- geen toegang ---------- */
.hb-geen { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 1rem;
  font-family: var(--font); color: var(--ink); }
.hb-geen .hb-card { max-width: 28rem; }


/* ---------- foto groot bekijken ---------- */
.hb-fotogroot { position: fixed; inset: 0; z-index: 98; background: rgba(15, 16, 17, .92); display: none; align-items: center; justify-content: center;
  padding: calc(3.5rem + env(safe-area-inset-top, 0px)) .75rem calc(1rem + env(safe-area-inset-bottom, 0px)); cursor: zoom-out; }
.hb-fotogroot.show { display: flex; }
.hb-fotogroot img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.hb-fotogroot .hb-btn { position: absolute; right: .75rem; top: calc(.75rem + env(safe-area-inset-top, 0px)); }
