:root {
  --bg: #f6f3f0; --card: #ffffff; --text: #26292b; --muted: #6b6560; --line: #e4dcd5;
  --brand: #424242; --brand-text: #ffffff; --accent: #cf8558; --accent-text: #9a5122;
  --ok: #1d7a46; --ok-bg: #e3f4ea;
  --warn: #8a5a00; --warn-bg: #fdeed4; --bad: #b3261e; --bad-bg: #fbe4e2; --grey-bg: #ece7e2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412; --card: #201d1a; --text: #ede8e3; --muted: #a39b93; --line: #34302b;
    --brand: #cf8558; --brand-text: #1a1410; --accent: #cf8558; --accent-text: #e3a67e;
    --ok: #6fd39a; --ok-bg: #153325;
    --warn: #f0be5c; --warn-bg: #3a2c10; --bad: #ff8d85; --bad-bg: #3d1a18; --grey-bg: #2b2723;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 720px; margin: 0 auto; padding: 0 12px 48px; }
header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 0 10px; border-bottom: 3px solid var(--accent); margin-bottom: 4px; }
header.top h1 { font-size: 1.3rem; margin: 6px 0 0; width: 100%; color: var(--accent-text); }
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.logo { height: 56px; width: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px 6px; flex: none; }
.brand-text strong { display: block; font-size: 1.05rem; line-height: 1.2; }
.brand-text span { display: block; color: var(--muted); font-size: .82rem; }
.foot { margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; text-align: center; line-height: 1.6; }
.foot a { color: inherit; }
.lang { display: flex; gap: 4px; }
.lang button { min-width: 44px; min-height: 36px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; font-weight: 600; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.who { width: 100%; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .95rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 12px 0; }
.card h2 { font-size: 1.05rem; margin: 0 0 10px; }
label { display: block; font-size: .9rem; color: var(--muted); margin: 10px 0 4px; }
input, select { width: 100%; min-height: 46px; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
input:focus, select:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { min-height: 46px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 38px; padding: 4px 12px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.row.end { justify-content: flex-end; }
.weeknav { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.weeknav .label { flex: 1; text-align: center; font-weight: 700; }
.weeknav .label small { display: block; font-weight: 400; color: var(--muted); }
.weeknav button { min-width: 48px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--grey-bg); color: var(--text); }
.b-doorgestuurd { background: var(--warn-bg); color: var(--warn); }
.b-goedgekeurd { background: var(--ok-bg); color: var(--ok); }
.b-afgekeurd { background: var(--bad-bg); color: var(--bad); }
.day { border-top: 1px solid var(--line); padding: 10px 0; }
.day:first-of-type { border-top: 0; }
.day h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1rem; }
.day h3 .sum { color: var(--muted); font-weight: 500; }
.line { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main hrs" "meta acts"; align-items: start; gap: 6px 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); margin: 6px 0; }
.line .main { grid-area: main; min-width: 0; }
.line .site { font-weight: 600; overflow-wrap: anywhere; }
.line .rem { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.line .hrs { grid-area: hrs; font-weight: 700; white-space: nowrap; text-align: right; }
.line .meta { grid-area: meta; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; }
.line .acts { grid-area: acts; display: flex; flex-direction: column; gap: 6px; }
.line .acts .btn { width: 100%; }
.line .why { grid-column: 1 / -1; color: var(--bad); font-size: .9rem; }
@media (min-width: 520px) {
  .line .acts { flex-direction: row; }
  .line .acts .btn { width: auto; }
}
.btn.xs { min-height: 32px; padding: 2px 11px; font-size: .84rem; border-radius: 8px; }
.btn.plus { min-width: 40px; min-height: 36px; padding: 0; font-size: 1.1rem; }
.day h3 .dayright { display: flex; align-items: center; gap: 12px; }
.msg { padding: 10px 12px; border-radius: 10px; margin: 10px 0; font-weight: 600; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.err { background: var(--bad-bg); color: var(--bad); }
.muted { color: var(--muted); }
.weeklist button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 10px; font: inherit; cursor: pointer; min-height: 46px; }
.weeklist .sel { border-color: var(--brand); }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-size: 1.15rem; text-align: center; }
