:root {
  --bg: #efeae2;
  --surface: #fffcf8;
  --ink: #1b1916;
  --muted: #6f6a62;
  --line: #e4ddd2;
  --spruce: #0f6a4c;
  --spruce-deep: #10241c;
  --spruce-soft: #e5f3ec;
  --gold: #a56b22;
  --gold-soft: #fff4e4;
  --red: #9d2c2c;
  --red-soft: #fdeeee;
  --blue: #1e4f86;
  --blue-soft: #e8f1fb;
  --shadow: 0 16px 40px rgba(40, 32, 18, .08);
  --side: 232px;
  --font: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.splash, .auth { min-height: 100svh; display: grid; }
.auth { grid-template-columns: 1.1fr .9fr; }
.auth-story { background: radial-gradient(900px 500px at 80% 10%, #1d6b4e, transparent 55%), var(--spruce-deep); color: #f6f3ec; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.mark { letter-spacing: .18em; text-transform: uppercase; font-size: 12px; font-weight: 700; color: #e4ad62; }
.auth-story h1 { font-family: var(--display); font-size: clamp(46px, 6vw, 78px); line-height: .95; font-weight: 560; letter-spacing: -.04em; max-width: 10ch; margin: 24px 0; }
.auth-story p { max-width: 36ch; color: #d5d0c6; font-size: 18px; }
.auth-panel { display: grid; place-items: center; padding: 28px; }
.card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.card h2 { font-family: var(--display); font-size: 34px; font-weight: 560; margin-bottom: 6px; }
.sub { color: var(--muted); margin-bottom: 18px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
input, select, textarea { width: 100%; background: #fff; border: 1px solid #ddd6cb; border-radius: 12px; padding: 11px 12px; outline: none; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #0f6a4c; box-shadow: 0 0 0 3px #0f6a4c22; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.check { display: flex; gap: 8px; align-items: center; margin: 14px 0; font-weight: 500; }
.check input { width: auto; }
.btn { border: 0; border-radius: 12px; padding: 11px 14px; background: #efe8dc; font-weight: 650; }
.btn.primary { background: var(--spruce); color: white; }
.btn.dark { background: var(--spruce-deep); color: white; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.wide { width: 100%; }
.btn.big { min-height: 58px; font-size: 18px; border-radius: 16px; }
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100svh; }
.side { background: var(--spruce-deep); color: #f4f1ea; padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100svh; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; letter-spacing: -.02em; text-decoration: none; margin-bottom: 22px; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #e7f6ee; color: var(--spruce-deep); font-family: var(--display); }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side a.nav { text-decoration: none; padding: 9px 12px; border-radius: 10px; color: #d9d3c8; }
.side a.nav.active, .side a.nav:hover { background: #ffffff14; color: white; }
.side-foot { margin-top: auto; color: #b7b1a6; font-size: 13px; padding: 12px; }
.keys { margin-top: 8px; color: #8f897f; font-size: 12px; }
.main { min-width: 0; }
.top { display: flex; gap: 12px; align-items: center; padding: 16px 22px; position: sticky; top: 0; background: rgba(239, 234, 226, .9); backdrop-filter: blur(10px); z-index: 5; }
.search { flex: 1; position: relative; }
.search input { background: white; border-radius: 999px; padding-left: 40px; }
.search::before { content: "⌕"; position: absolute; left: 16px; top: 10px; color: var(--muted); }
.results { position: absolute; left: 0; right: 0; top: 48px; background: white; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; z-index: 6; }
.results a, .results button { display: block; width: 100%; text-align: left; background: white; border: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.results a:hover, .results button:hover { background: #faf7f2; }
.who { display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--spruce); color: white; display: grid; place-items: center; font-weight: 700; }
.icon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: white; position: relative; }
.icon .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: #c2410c; border-radius: 50%; }
.menu { display: none; }
.view { padding: 6px 22px 40px; }
.hello { font-family: var(--display); font-size: clamp(36px, 5vw, 58px); font-weight: 560; letter-spacing: -.04em; line-height: 1; }
.company { color: var(--muted); margin: 6px 0 18px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 8px; font-size: 28px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat em { font-style: normal; font-weight: 500; font-size: 15px; color: var(--muted); }
.section { margin-top: 22px; }
.section h2 { font-size: 18px; margin-bottom: 10px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.item { display: grid; grid-template-columns: 108px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; }
.item:hover { border-color: #cfc6b8; }
.when { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.muted { color: var(--muted); }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; background: #eeeae3; }
.st-gepland, .st-verstuurd { background: var(--blue-soft); color: var(--blue); }
.st-onderweg, .st-gestart { background: var(--spruce-soft); color: var(--spruce); }
.st-pauze, .st-deels_betaald, .st-concept { background: var(--gold-soft); color: var(--gold); }
.st-afgerond, .st-gecontroleerd, .st-betaald, .st-geaccepteerd { background: #e5f6ea; color: #17693a; }
.st-gefactureerd { background: #e7eefc; color: #243f86; }
.st-geannuleerd, .st-afgewezen, .st-te_laat, .st-verlopen { background: var(--red-soft); color: var(--red); }
.banner, .warn, .bad { border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.banner { background: #fff8ea; border: 1px solid #f0ddb4; }
.warn { background: var(--gold-soft); }
.bad { background: var(--red-soft); }
.people { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: white; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.toolbar h1 { font-size: 28px; letter-spacing: -.04em; max-width: 18em; }
.plan-scroll { overflow: auto; padding-bottom: 12px; }
.plan { display: grid; grid-template-columns: 148px repeat(7, minmax(128px, 1fr)); gap: 8px; min-width: 1040px; }
.plan h3, .cell-head { font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px; }
.cell { background: #fffdf9; border: 1px dashed #e2dacd; border-radius: 12px; min-height: 88px; padding: 6px; }
.cell.today { border-color: var(--spruce); background: #f3faf6; }
.block { display: block; background: white; border-left: 3px solid var(--spruce); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; text-decoration: none; box-shadow: 0 1px 0 #eee; cursor: grab; }
.block small { display: block; color: var(--muted); }
.block.hot { border-left-color: var(--red); }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.month .cell { min-height: 110px; }
.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.panel { padding: 16px; }
.panel h2, .panel h3 { margin-bottom: 8px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.note { padding: 8px 0; border-bottom: 1px solid var(--line); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photos img, .sign img { width: 100%; border-radius: 12px; background: #eee; }
#drawer[hidden] { display: none; }
#drawer { position: fixed; inset: 0; z-index: 30; }
.drawer-back { position: absolute; inset: 0; background: rgba(20, 16, 12, .35); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(520px, 100%); background: #fffcf8; padding: 22px; overflow: auto; box-shadow: var(--shadow); }
.drawer-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer-panel h2 { font-family: var(--display); font-size: 32px; font-weight: 560; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--spruce-deep); color: white; padding: 12px 16px; border-radius: 14px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 40; max-width: min(520px, calc(100% - 24px)); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.field-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.field-list { display: flex; flex-direction: column; gap: 12px; }
.job-hero { background: white; color: var(--ink); border-radius: 24px; padding: 20px; }
.job-hero .time { font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 700; }
.job-hero h1 { font-family: var(--display); font-size: 40px; line-height: 1; margin: 6px 0; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sig { background: white; border: 1px dashed #ccc; border-radius: 12px; touch-action: none; width: 100%; height: 160px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; align-items: center; }
.track { height: 8px; background: #e7e1d8; border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--spruce); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.help { font-size: 14px; color: var(--muted); }
.print-sheet { max-width: 800px; margin: 24px auto; background: white; padding: 28px; }
.sync { font-size: 13px; color: #e4ad62; }
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .menu { display: grid; place-items: center; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; transform: translateX(-105%); transition: .2s ease; width: min(320px, 88vw); }
  body.nav-open .side { transform: none; }
  .item { grid-template-columns: 64px 1fr; }
  .item .pill { display: none; }
  .view, .top { padding-left: 14px; padding-right: 14px; }
}
.lead { max-width: 68ch; color: var(--muted); margin: 0 0 16px; }
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 16px; }
.compare article { background: white; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.compare h2 { font-size: 15px; margin: 0 0 8px; }
.figure { font-family: var(--display); font-size: 32px; margin: 0 0 6px; }
.compare-save { background: #e7f2ea !important; }
.route-map { height: 380px; border-radius: 16px; margin: 14px 0; background: #e7e1d8; }
.route-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.stop { border-top: 1px solid #eee4d8; padding: 8px 0; }
.stop summary { cursor: pointer; }
.stop-pin { background: #1c1917; color: #fff; border-radius: 50%; width: 26px !important; height: 26px !important; line-height: 22px; text-align: center; font-weight: 700; font-size: 12px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.block-title { margin-top: 8px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.occupancy { display: grid; gap: 8px; margin: 0 0 16px; }
.occ-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.occ { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 8px; align-items: center; background: white; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.occ.total { background: #1c1917; color: #fff; }
.occ span { color: inherit; }
.round-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.cell.closed { background: #efe8dc; }
.smart-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 8px 0 12px; }
.smart-stats .stat { margin: 0; }
@media (max-width: 860px) {
  .compare { grid-template-columns: 1fr; }
  .smart-stats { grid-template-columns: 1fr 1fr; }
  .occ { grid-template-columns: 1fr 1fr; }
  .route-map { height: 280px; }
}
@media print {
  .side, .top, .actions, #toast, #drawer { display: none !important; }
  .shell { display: block; }
  body { background: white; }
}
