/* Hubble Social — huisstijl Hubblemedia (inkt, oranje, warmwit · Outfit + Inter) */
@font-face { font-family: Outfit; src: url(../assets/Outfit.ttf); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url(../assets/Inter.ttf); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #191919; --ink-2: #2A2926;
  --orange: #FF682C; --orange-d: #E8551A; --orange-50: #FFF3EC; --orange-100: #FFE3D4;
  --paper: #FAF8F3; --sand: #F3EFE6; --sand-2: #EAE4D7; --white: #FFFFFF;
  --line: #E8E2D5; --muted: #6E6960; --muted-2: #9A948A;
  --green: #2F7A55; --green-50: #E8F3EC; --amber: #B7791F; --amber-50: #FBF3E2; --red: #B7410E; --red-50: #FBEDE6;
  --heading: Outfit, system-ui, sans-serif; --body: Inter, system-ui, sans-serif;
  --r: 16px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(25,25,25,.04), 0 4px 16px rgba(25,25,25,.04);
  --shadow-lg: 0 24px 64px rgba(25,25,25,.18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14.5px/1.5 var(--body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--heading); margin: 0; letter-spacing: -.01em; }
:focus-visible { outline: 2.5px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .grow { flex: 1; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* layout */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #EDE9E0; display: flex; flex-direction: column; padding: 26px 16px 18px; overflow-y: auto; }
.brand { padding: 0 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.brand img { width: 138px; display: block; }
.brand-sub { font: 600 11px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); padding-left: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.nav-label { font: 600 10.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: #6F6A61; padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #BDB8AE; font-weight: 500; transition: background .15s, color .15s; }
.nav-item:hover { background: #242320; color: #fff; }
.nav-item.is-active { background: #2A2825; color: #fff; }
.nav-item .num { width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; font: 700 11.5px var(--body); background: #34322E; color: #CFCABF; flex: none; }
.nav-item.is-active .num { background: var(--orange); color: var(--ink); }
.nav-item.done .num { background: var(--green); color: #fff; }
.nav-item span.t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .ic { width: 18px; height: 18px; flex: none; }
.nav-item.is-active .ic { color: var(--orange); }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid #2C2A27; font-size: 12px; color: #8F8A80; display: flex; flex-direction: column; gap: 6px; }
.dotline { display: flex; align-items: center; gap: 8px; }
.dot-s { width: 8px; height: 8px; border-radius: 9px; background: #5A564F; flex: none; }
.dot-s.on { background: #54C28A; } .dot-s.off { background: var(--orange); }
.main { min-width: 0; }
.view { max-width: 1320px; margin: 0 auto; padding: 36px 40px 90px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* koppen */
.eyebrow { font: 600 11.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--orange-d); margin: 0 0 6px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 40px; font-weight: 700; line-height: 1.05; }
.page-head h1 .dot { color: var(--orange); }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; max-width: 720px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2.sec { font-size: 22px; font-weight: 700; margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }
h2.sec small { font: 500 13px var(--body); color: var(--muted); }

/* knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .1s, background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: #D6CEBE; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #FF7A42; border-color: #FF7A42; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #2C2B28; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--sand); box-shadow: none; }
.btn-danger { color: var(--red); border-color: #F1C9B8; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn .ic { width: 16px; height: 16px; }
.link { color: var(--orange-d); font-weight: 600; }
.link:hover { text-decoration: underline; }
.seg { display: inline-flex; background: var(--sand); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button small { color: var(--muted-2); font-weight: 500; margin-left: 3px; }
.seg button.is-on { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* kaarten */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 18px; font-weight: 700; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-value { font: 700 30px/1.1 var(--heading); letter-spacing: -.02em; }
.kpi-value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }

/* projecten */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pcard { display: flex; flex-direction: column; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(25,25,25,.08); }
.pcard h3 { font-size: 20px; }
.pcard .row { display: flex; align-items: center; gap: 16px; }
.pcard .stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pcard .stats b { color: var(--ink); font-family: var(--heading); font-size: 16px; display: block; }
.empty { text-align: center; padding: 60px 20px; border: 1.5px dashed var(--sand-2); border-radius: var(--r); color: var(--muted); background: rgba(255,255,255,.5); }
.empty h3 { color: var(--ink); font-size: 22px; margin-bottom: 8px; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--sand); color: var(--ink-2); }
.pill.fout, .st-fout { background: var(--red-50); color: var(--red); }
.pill.waarschuwing, .st-waarschuwing { background: var(--amber-50); color: var(--amber); }
.pill.goed, .st-goed { background: var(--green-50); color: var(--green); }
.pill.oranje { background: var(--orange-50); color: var(--orange-d); }
.pill.donker { background: var(--ink); color: #fff; }

/* categorieën */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cat { padding: 14px 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s; }
.cat:hover, .cat.is-on { border-color: var(--orange); }
.cat .top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 13.5px; gap: 10px; }
.cat .top b { font: 700 20px var(--heading); }
.bar { height: 7px; background: var(--sand-2); border-radius: 9px; overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; border-radius: 9px; background: var(--orange); }
.bar.good > i { background: var(--green); } .bar.mid > i { background: #E3A23B; } .bar.bad > i { background: var(--red); }

/* checks */
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { border: 1px solid var(--line); border-radius: 12px; background: var(--white); overflow: hidden; }
.check > summary { list-style: none; display: grid; grid-template-columns: 28px 1fr auto auto; gap: 12px; align-items: center; padding: 13px 16px; cursor: pointer; }
.check > summary::-webkit-details-marker { display: none; }
.check > summary:hover { background: var(--paper); }
.st { width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.check .t { font-weight: 600; }
.check .t small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.imp { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.imp.hoog { color: var(--orange-d); }
.check .body { padding: 4px 16px 16px 56px; border-top: 1px solid var(--line); background: var(--paper); }
.advice { display: flex; gap: 10px; background: var(--orange-50); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 13.5px; }
.advice b { color: var(--orange-d); }
.affected { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow: auto; }
.affected a, .affected div { display: flex; gap: 10px; font-size: 13px; padding: 5px 8px; border-radius: 8px; }
.affected a:hover { background: var(--sand); }
.affected .u { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

/* tabellen */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; white-space: nowrap; cursor: default; }
.tbl th.sort { cursor: pointer; } .tbl th.sort:hover { color: var(--ink); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--paper); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.thumb { width: 88px; height: 56px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); background: var(--sand); display: block; }
.kd { display: inline-block; min-width: 34px; text-align: center; padding: 2px 6px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.kd.l { background: var(--green-50); color: var(--green); } .kd.m { background: var(--amber-50); color: var(--amber); } .kd.h { background: var(--red-50); color: var(--red); }
.kans { display: inline-flex; align-items: center; gap: 6px; }
.kans .bar { width: 54px; margin: 0; height: 6px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--sand); color: var(--ink-2); white-space: nowrap; }
.tag.snelle-winst { background: var(--orange-50); color: var(--orange-d); }
.tag.gat { background: #EEF0FB; color: #3B4BA8; }
.tag.top3 { background: var(--green-50); color: var(--green); }
.tag.vraag { background: #F4EEF9; color: #7240A0; }

/* formulieren */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 10px 12px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-100); }
.textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.search { max-width: 280px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.check-inline { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(25,25,25,.45); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal { background: var(--white); border-radius: 20px; box-shadow: var(--shadow-lg); width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; }
.modal h2 { font-size: 24px; margin-bottom: 4px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* taakvoortgang */
.jobbox { position: fixed; right: 22px; bottom: 22px; width: 380px; background: var(--ink); color: #EDE9E0; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow-lg); z-index: 40; }
.jobbox .top { display: flex; justify-content: space-between; font-weight: 700; font-family: var(--heading); font-size: 15px; margin-bottom: 8px; }
.jobbox .msg { font-size: 12.5px; color: #BDB8AE; min-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobbox .bar { background: #34322E; }
.jobbox.err { background: #3A1A0D; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; font-weight: 500; animation: fade .2s; max-width: 90vw; }
.toast.err { background: var(--red); }


.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--sand); font-size: 13.5px; margin-bottom: 16px; align-items: flex-start; }
.notice.warn { background: var(--amber-50); }
.notice.info { background: var(--orange-50); }
.notice b { font-weight: 700; }
.dropzone { border: 1.5px dashed var(--sand-2); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); background: var(--paper); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--orange); background: var(--orange-50); }
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stepc { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.stepc .n { width: 30px; height: 30px; border-radius: 99px; background: var(--sand); display: grid; place-items: center; font-weight: 800; flex: none; }
.stepc.done .n { background: var(--green); color: #fff; }
.stepc.now { border-color: var(--orange); }
.stepc.now .n { background: var(--orange); }
.stepc b { display: block; font-size: 13.5px; } .stepc small { color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .sticky { position: static; max-height: none; } .g4 { grid-template-columns: repeat(2, 1fr); } .steps-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; margin-top: 10px; } .nav-label { display: none; } .sidebar-foot { display: none; }
  .view { padding: 22px 16px 70px; } .g2, .g3, .g4 { grid-template-columns: 1fr; } .blk { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 30px; } .jobbox { left: 16px; right: 16px; width: auto; }
  .card { padding: 16px; border-radius: 16px; }
}

/* afdrukken (rapport / werkbon) */
@media print {
  .sidebar, .page-actions, .jobbox, .toolbar, .noprint { display: none !important; }
  .app { display: block; } .view { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; }
  .card, .check, .chg { box-shadow: none; break-inside: avoid; }
  .check .body { display: block !important; }
  details.check > .body { display: block; }
  .split { display: block; } .sticky { position: static; max-height: none; overflow: visible; }
}
