:root {
  --black: #141414;
  --black-2: #2a2a2a;
  --gold: #d9953c;
  --gold-dark: #9a6118;
  --gold-light: #fbf1e3;
  --bg: #f7f6f4;
  --card: #fff;
  --text: #1b1b1b;
  --muted: #6b6b6b;
  --line: #e4e0da;
  --red: #b23a2e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--gold-dark); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }

.top {
  background: var(--black); border-bottom: 3px solid var(--gold); color: #fff; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .4rem 1rem; padding: .6rem 1rem;
  padding-top: calc(.6rem + env(safe-area-inset-top));
}
.brand { color: var(--gold); text-decoration: none; font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.brand img { display: block; height: 44px; width: auto; }
.top nav { display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: center; }
.top nav a, .top nav .link { color: #e9e4dc; text-decoration: none; font-size: .95rem; }
.top nav a:hover, .top nav .link:hover { color: var(--gold); text-decoration: underline; }
.badge { background: var(--gold); color: var(--black); border-radius: 99px; padding: 0 .45rem; font-size: .8rem; font-weight: 700; }

main { max-width: 760px; margin: 0 auto; padding: 1rem; }
body.wide main { max-width: 1200px; }
body.center main { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card.narrow { max-width: 420px; width: 100%; margin: 0 auto; }
.dim { opacity: .6; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center-text { text-align: center; }
.nowrap { white-space: nowrap; }
.error-text { color: var(--red); }
.back { display: inline-block; margin-bottom: .4rem; text-decoration: none; }

label { display: block; margin-bottom: .9rem; font-weight: 600; font-size: .95rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .7rem .75rem; font: inherit; font-weight: 400;
  border: 1px solid #cfc9bd; border-radius: 9px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
input[type=checkbox] { width: auto; display: inline-block; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 600; margin-bottom: .5rem; padding: 0; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
.row3 label { margin-bottom: .3rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: end; }
.grid2 .btn { margin-bottom: .9rem; }
.total { margin: .2rem 0 1rem; font-size: 1.05rem; }
.total strong { color: var(--gold-dark); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { margin: 0; font-weight: 500; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: .55rem .85rem; border: 1px solid #cfc9bd; border-radius: 99px;
  background: #fff; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--black); border-color: var(--black); color: var(--gold); }
.chip input:checked + span::before { content: "✔ "; }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn {
  display: inline-block; padding: .65rem 1.1rem; border-radius: 9px; border: 1px solid #c9c2b4;
  background: #fff; color: var(--text); font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; text-align: center;
}
.btn:hover { background: var(--gold-light); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn.primary:hover { background: #c98528; border-color: #c98528; }
.btn.danger { color: var(--red); border-color: #e2b5af; }
.btn.danger:hover { background: #fbeceb; }
.btn.small { padding: .4rem .75rem; font-size: .9rem; }
.btn.big { padding: 1rem; font-size: 1.15rem; }
.btn.wide { display: block; width: 100%; }
button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
form.inline input { width: 11rem; margin: 0; padding: .4rem .6rem; }
.danger-zone { margin-top: 1rem; text-align: right; }

.flash { padding: .75rem 1rem; border-radius: 9px; margin-bottom: 1rem; background: #edf5e8; border: 1px solid #c9dfbd; }
.flash.error { background: #fbeceb; border-color: #efc4bf; color: #7d2219; }
.flash.warn { background: var(--gold-light); border-color: #edcf9f; }
.flash ul { margin: 0; padding-left: 1.1rem; }

.hello h1 { margin-bottom: 0; }
.hello { margin-bottom: 1rem; }
.entry { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .8rem; }
.entry.locked { border-left-color: #b9b3a6; }
.entry-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.day { font-weight: 700; }
.day::first-letter { text-transform: uppercase; }
.hours { font-weight: 700; font-size: 1.15rem; color: var(--gold-dark); }
.entry-client { font-weight: 600; margin-top: .15rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.tag { background: #f1efec; color: var(--black-2); border-radius: 99px; padding: .1rem .6rem; font-size: .85rem; }
.note { margin: .5rem 0 0; white-space: pre-line; }
.entry-foot { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; margin-top: .6rem; }

.status { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px; margin: .1rem .2rem .1rem 0; white-space: nowrap; }
.status.ok { background: #e3f0dc; color: #2c5a1f; }
.status.open { background: var(--gold-light); color: #7a4c10; }
.status.wait { background: #fff1cc; color: #6e5200; }
.status.lock { background: #eeeae3; color: #5a5348; }
.status.warn { background: #fbe3df; color: #8a2a1e; }

.filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; }
.filters label { margin: 0; flex: 1 1 150px; }
.quick { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; }
.totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.total-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: .8rem 1rem; }
.big-num { font-size: 1.8rem; font-weight: 700; color: var(--black); }
.actions-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th, table.list td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { background: var(--black); color: var(--gold); font-size: .85rem; }
table.list tfoot td { border-bottom: 0; background: #faf8f4; }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
dl.details dt { font-weight: 600; color: var(--muted); }
dl.details dd { margin: 0; }
ol.history { padding-left: 1.2rem; }
ol.history li { margin-bottom: .8rem; }
table.diff { border-collapse: collapse; margin-top: .3rem; font-size: .9rem; }
table.diff th { text-align: left; padding: .15rem .6rem .15rem 0; color: var(--muted); font-weight: 600; }
table.diff td { padding: .15rem .3rem; }
table.diff .old { text-decoration: line-through; color: var(--red); }
table.diff .new { color: #2c5a1f; font-weight: 600; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
.act-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.reason { font-size: 1.05rem; margin: .4rem 0; }
.decide { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.decide input { flex: 1 1 200px; margin: 0; }
.user-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; align-items: center; }
.user-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

body.print { background: #fff; padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
body.print table.list { font-size: .85rem; }
@media print {
  .no-print { display: none !important; }
  body.print { padding: 0; }
  @page { size: A4 landscape; margin: 12mm; }
}

@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .row3 label:last-child { grid-column: span 2; }
  .top nav { width: 100%; }
  form.inline input { width: 9rem; }
}

/* Logo */
.login-logo { display: block; margin: 0 auto 1rem; width: 220px; max-width: 70%; height: auto; }
body.center main .card.narrow { border-top: 4px solid var(--gold); }

body.center .top { display: none; }

/* Betalingen */
.status.paid { background: var(--black); color: var(--gold); }
.title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.title-row h1 { margin: 0; }
.pay-card .pay-name { margin-bottom: .5rem; }
.pay-card .pay-until { font-weight: 700; margin-bottom: .5rem; }
.pay-card .actions-bar { margin-bottom: 0; }
.mt0 { margin-top: 0; }
.span2 { grid-column: 1 / -1; }
.pay-form { margin-top: 1.2rem; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; margin-bottom: .4rem; }
button.danger-link { color: var(--red); text-decoration: underline; margin-left: .3rem; }
input[type=file] { padding: .5rem; }

/* Handleiding */
.print-only { display: none; }
.help-head .lead { font-size: 1.1rem; }
.help-head .addr { background: var(--black); color: var(--gold); padding: .6rem .9rem; border-radius: 9px; display: inline-block; }
.help-head .addr strong { color: #fff; word-break: break-all; }
.step { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.step-text { flex: 1 1 280px; }
.step h2 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--gold); color: var(--black); font-size: 1rem; flex: none; }
.step p { margin: .4rem 0; }
.step ul { padding-left: 1.2rem; margin: .4rem 0; }
.shot { flex: 0 1 260px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.shot.tall { flex-basis: 240px; }
ul.legend { list-style: none; padding: 0; }
ul.legend li { margin: .35rem 0; }
.tips { background: var(--gold-light); border: 1px solid #edcf9f; border-radius: var(--radius); padding: .8rem 1.1rem; }
.tips h2 { margin-top: 0; }
@media print {
  body.help .top, body.help .no-print { display: none !important; }
  body.help { background: #fff; font-size: 11pt; }
  body.help main { max-width: none; padding: 0; }
  .print-only { display: block; }
  .help-logo { width: 150px; margin-bottom: .3rem; }
  .help-head h1 { margin: 0 0 .3rem; font-size: 18pt; }
  .step { break-inside: avoid; padding: .5rem .8rem; margin-bottom: .5rem; box-shadow: none; }
  .shot { flex-basis: 170px; box-shadow: none; }
  .shot.tall { flex-basis: 150px; }
  .tips { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 portrait; margin: 12mm; }
}
