:root {
  --green: #445b3e; --green-dark: #31412e; --green-light: #e8efe3;
  --brown: #68421c; --bg: #faf9f6; --card: #ffffff; --fg: #252525; --muted: #6b6b66; --line: #e2dfd8;
  --ok: #2e7d32; --warn: #b26a00; --err: #b3261e;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: Assistant, "Segoe UI", system-ui, sans-serif; font-size: 16px; line-height: 1.45; }
a { color: var(--green); }
header.top { background: var(--green-dark); color: #fff; }
header.top .wrap { display: flex; align-items: center; gap: 14px; padding: 10px 16px; max-width: 1100px; margin: 0 auto; }
header.top img { height: 44px; width: 44px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
header.top .brand { font-weight: 700; font-size: 1.15rem; letter-spacing: .2px; }
header.top .brand small { display: block; font-weight: 400; font-size: .8rem; opacity: .8; }
header.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
header.top nav a, header.top nav button { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; background: transparent; border: 1px solid rgba(255,255,255,.25); font: inherit; cursor: pointer; }
header.top nav a.primary { background: #fff; color: var(--green-dark); border-color: #fff; font-weight: 700; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 6px 0 14px; color: var(--green-dark); }
h2 { font-size: 1.1rem; margin: 18px 0 8px; color: var(--green-dark); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: #eaf4ea; border-color: #bfdcc0; color: var(--ok); }
.flash.err { background: #fbeae9; border-color: #f0c2bf; color: var(--err); }
form .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; color: var(--green-dark); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--fg); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
textarea { min-height: 80px; resize: vertical; }
.span2 { grid-column: 1 / -1; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--green); background: var(--green); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--green-dark); }
.btn.secondary { background: #fff; color: var(--green-dark); }
.btn.small { padding: 6px 10px; font-size: .85rem; font-weight: 500; }
.btn.danger { background: #fff; color: var(--err); border-color: var(--err); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--fg); background: #fff; }
.tabs a.active { background: var(--green); color: #fff; border-color: var(--green); }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: var(--green-light); color: var(--green-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .4px; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.today td { background: #fffbe9; }
table.list a.row { color: inherit; text-decoration: none; font-weight: 700; }
.tablewrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--green-light); color: var(--green-dark); white-space: nowrap; }
.badge.ny { background: #e3eefc; color: #1b4f9c; }
.badge.bekræftet { background: var(--green-light); color: var(--green-dark); }
.badge.læsset { background: #eaf4ea; color: var(--ok); }
.badge.afsluttet { background: #ececec; color: #555; }
.badge.annulleret { background: #fbeae9; color: var(--err); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { font-weight: 600; color: var(--green-dark); }
dl.facts dd { margin: 0; }
.status-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.err { background: var(--err); } .dot.none { background: #bbb; }
.login { max-width: 380px; margin: 40px auto; text-align: center; }
.login img { height: 120px; margin-bottom: 8px; }
.login form { text-align: left; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px; }
@media (max-width: 600px) {
  header.top .brand small { display: none; }
  table.list th:nth-child(4), table.list td:nth-child(4) { display: none; }
}

/* Ugekalender */
.cal-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.cal-head h1 .hint { font-size: 1rem; font-weight: 400; margin-left: 8px; }
table.cal { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); table-layout: fixed; min-width: 760px; }
table.cal th, table.cal td { border: 1px solid var(--line); padding: 0; height: 30px; font-size: .85rem; vertical-align: top; }
table.cal thead th { background: var(--green-light); color: var(--green-dark); padding: 6px 4px; text-align: center; }
table.cal thead th a { color: inherit; text-decoration: none; font-weight: 700; }
table.cal thead th span { font-weight: 400; font-size: .8rem; }
table.cal th.time { width: 58px; background: var(--bg); color: var(--muted); font-weight: 500; text-align: right; padding-right: 6px; font-size: .8rem; }
table.cal tr.allday td { padding: 3px; height: auto; min-height: 22px; background: #fff; }
table.cal .today { background: #fffbe9; }
table.cal td.busy { background: #ececec; }
table.cal td.busy.hoe { background: var(--green-light); }
table.cal td.past { background: #f5f4f1; color: var(--muted); }
table.cal td.busy .ev { display: block; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--green-dark); text-decoration: none; font-weight: 600; }
table.cal td.free { cursor: pointer; }
table.cal td.free a.book { display: block; height: 100%; min-height: 30px; text-align: center; line-height: 30px; color: transparent; text-decoration: none; }
table.cal td.free:hover { background: var(--green); }
table.cal td.free:hover a.book { color: #fff; font-weight: 700; }
.chip { display: inline-block; background: #ececec; border-radius: 6px; padding: 1px 6px; margin: 1px; font-size: .75rem; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
