@font-face { font-family: "Lato"; font-style: normal; font-weight: 300; font-display: swap; src: url(/static/fonts/lato-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/lato-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/lato-latin-700-normal.woff2) format("woff2"); }

/* Palette follows the company site: anthracite + warm sand tones, Lato. */
:root {
  --bg: #f4f2f1;
  --surface: #ffffff;
  --text: #323336;
  --heading: #1b1c20;
  --muted: #545558;
  --border: #e3dfd8;
  --accent: #1b1c20;
  --accent-hover: #655a4e;
  --accent-text: #ffffff;
  --brand: #897a69;
  --link: #655a4e;
  --focus: #655a4e;
  --free-bg: #e3f4e8;   --free-fg: #17693a;
  --use-bg: #fff3c4;    --use-fg: #6b5200;
  --over-bg: #fbe3e8;   --over-fg: #9b1c38;
  --off-bg: #e8e8e9;    --off-fg: #545558;
  --radius: 4px;
  --radius-btn: 2px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1c20; --surface: #26272c; --text: #e8e8e9; --heading: #ffffff; --muted: #aca093; --border: #3a3b40;
    --accent: #e3dfd8; --accent-hover: #c7bfb7; --accent-text: #1b1c20;
    --brand: #aca093; --link: #c7bfb7; --focus: #c7bfb7;
    --free-bg: #173a27; --free-fg: #7ddba0;
    --use-bg: #3d3412;  --use-fg: #ffcf23;
    --over-bg: #4a1c26; --over-fg: #f59aaa;
    --off-bg: #323336;  --off-fg: #aca093;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 Lato, Arial, system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--link); }
h1 { font-size: 1.9rem; font-weight: 300; color: var(--heading); letter-spacing: .01em; margin: 0 0 1rem; line-height: 1.25; }
h2 { font-size: 1.15rem; font-weight: 700; color: var(--heading); margin: 1.5rem 0 .6rem; }
.muted { color: var(--muted); font-size: .9rem; }

header.top { background: var(--surface); border-bottom: 1px solid var(--border); }
header.top .inner { max-width: 1000px; margin: 0 auto; padding: .6rem 16px; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.25rem; }
.brand { font-weight: 300; font-size: 1.4rem; letter-spacing: .02em; text-decoration: none; color: var(--heading); }
.brand span { font-weight: 700; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; flex: 1; }
nav a { text-decoration: none; color: var(--muted); padding: .25rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: var(--heading); border-bottom-color: var(--brand); }
.userbox { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); }
main { max-width: 1000px; margin: 0 auto; padding: 1.25rem 16px 3rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card .plate { font-family: ui-monospace, monospace; font-size: .9rem; color: var(--muted); }
.card .row { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.card .status-line { margin: .7rem 0; min-height: 3rem; }
.card ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .9rem; color: var(--muted); }
.card .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge.free { background: var(--free-bg); color: var(--free-fg); }
.badge.in_use { background: var(--use-bg); color: var(--use-fg); }
.badge.overdue { background: var(--over-bg); color: var(--over-fg); }
.badge.inactive, .badge.neutral { background: var(--off-bg); color: var(--off-fg); }

.btn { display: inline-block; font: inherit; font-size: .95rem; padding: .45rem .9rem; border-radius: var(--radius-btn); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--over-fg); }
.btn.small { padding: .2rem .6rem; font-size: .85rem; }
form.inline { display: inline; }

.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.flash.ok { background: var(--free-bg); color: var(--free-fg); }
.flash.error { background: var(--over-bg); color: var(--over-fg); }
.flash.warn { background: var(--use-bg); color: var(--use-fg); }

form.stack { display: grid; gap: .9rem; max-width: 520px; }
label { display: grid; gap: .25rem; font-weight: 600; font-size: .92rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--surface); color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.check input { width: auto; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: .93rem; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.toolbar h1 { margin: 0; }
.login-box { max-width: 380px; margin: 4rem auto 0; }
.demo-list { margin-top: 1.25rem; font-size: .9rem; }
.demo-list code { background: var(--off-bg); padding: .05rem .35rem; border-radius: 4px; }

@media (max-width: 560px) {
  .two { grid-template-columns: 1fr; }
  .userbox { width: 100%; justify-content: space-between; }
}

/* ---- Timeline / Kalender ---- */
:root { --bar-other-bg: #e3dfd8; --bar-other-fg: #323336; --today-bg: rgba(137, 122, 105, .14); --we-bg: rgba(0, 0, 0, .035); }
@media (prefers-color-scheme: dark) {
  :root { --bar-other-bg: #4a443c; --bar-other-fg: #e8e8e9; --today-bg: rgba(172, 160, 147, .14); --we-bg: rgba(255, 255, 255, .04); }
}
.tl-controls { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tl-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tl { min-width: 760px; }
.tl-row { display: grid; grid-template-columns: 150px 1fr; border-bottom: 1px solid var(--border); }
.tl-row:last-child { border-bottom: 0; }
.tl-label { padding: .5rem .75rem; border-right: 1px solid var(--border); font-size: .9rem; line-height: 1.3; }
.tl-label a { text-decoration: none; color: var(--text); }
.tl-label .muted { font-size: .78rem; }
.tl-track { position: relative; min-height: 56px; }
.tl-head .tl-track { min-height: 0; }
.tl-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.tl-head .tl-cells { position: static; }
.tl-day, .tl-cell { border-left: 1px solid var(--border); }
.tl-day:first-child, .tl-cell:first-child { border-left: 0; }
.tl-day { padding: .45rem .3rem; text-align: center; font-size: .8rem; color: var(--muted); }
.tl-day strong { color: var(--text); }
.tl-day.today, .tl-cell.today { background: var(--today-bg); }
.tl-day.we, .tl-cell.we { background: var(--we-bg); }
.tl-cell:hover { background: var(--today-bg); outline: 1px dashed var(--brand); outline-offset: -3px; }
.tl-bar { position: absolute; top: 8px; bottom: 8px; border-radius: 6px; padding: 0 .45rem; display: flex; align-items: center; overflow: hidden; text-decoration: none; font-size: .78rem; z-index: 1; min-width: 6px; }
.tl-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-bar.other, .tl-key.other { background: var(--bar-other-bg); color: var(--bar-other-fg); }
.tl-bar.mine, .tl-key.mine { background: var(--accent); color: var(--accent-text); }
.tl-bar.returned, .tl-key.returned { background: var(--off-bg); color: var(--off-fg); }
.tl-bar.overdue, .tl-key.overdue { background: var(--over-bg); color: var(--over-fg); outline: 2px solid var(--over-fg); outline-offset: -2px; }
.tl-bar:hover { filter: brightness(.95); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--over-fg); z-index: 2; pointer-events: none; opacity: .8; }
.tl-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .8rem; font-size: .85rem; }
.tl-key { display: inline-block; width: 1.1rem; height: .7rem; border-radius: 3px; vertical-align: middle; margin-right: .25rem; }

/* ---- Inline editing in admin tables ---- */
form.inline-edit { display: block; margin: 0; }
form.inline-edit input { max-width: 260px; }

/* ---- Help page ---- */
.help { max-width: 820px; }
.help h2 { margin-top: 2rem; scroll-margin-top: 1rem; }
.help .card { margin-bottom: .6rem; }
.help .card > .badge:first-child { margin-bottom: .5rem; }
.help ul, .help ol { margin: .4rem 0 .4rem 1.1rem; padding: 0; }
.help li { margin: .25rem 0; }
.help .steps { counter-reset: step; list-style: none; margin-left: 0; }
.help .steps li { counter-increment: step; position: relative; padding-left: 2rem; margin: .45rem 0; }
.help .steps li::before { content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-size: .8rem; font-weight: 700; text-align: center; line-height: 1.4rem; }
.toc { margin-bottom: 1rem; }
.toc ol { margin: .4rem 0 0 1.2rem; }
.toc .toc-group { list-style: none; margin: .7rem 0 .2rem -1.2rem; font-weight: 700; color: var(--heading); }
.faq dt { font-weight: 700; color: var(--heading); margin-top: .8rem; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: .15rem 0 0; }
.role-sep { border: 0; border-top: 2px solid var(--border); margin: 2.5rem 0 0; }
.role-heading { font-size: 1.5rem; font-weight: 300; }

@media print {
  header.top, .toc, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, table { border-color: #999; break-inside: avoid; }
  .help h2 { break-after: avoid; }
  a { color: #000; text-decoration: none; }
}

