/* Aufgabenarchiv – Farben wie im Klick-Entwurf, Systemschriften (keine externen Fonts) */
:root {
  --bg: #f4f5f7; --flaeche: #ffffff; --text: #1c2430; --leise: #5a6472; --rand: #dde1e6; --feld: #b9c0c8;
  --akzent: #1d5a85; --akzent-dunkel: #123f60; --akzent-hell: #e6eff6; --chip: #eef1f4;
  --warn: #9a4a00; --warn-bg: #fff3e0; --ok: #1f6b3a; --ok-bg: #e7f4ec; --fehler: #a4262c; --fehler-bg: #fdecec;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d; --flaeche: #1d232a; --text: #e6e9ed; --leise: #a3acb7; --rand: #333b44; --feld: #4a535e;
    --akzent: #7fb6e0; --akzent-dunkel: #a9cdea; --akzent-hell: #1f3344; --chip: #28303a;
    --warn: #f0b066; --warn-bg: #3a2a14; --ok: #7fd09a; --ok-bg: #16301f; --fehler: #f19a9e; --fehler-bg: #3b1a1c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--akzent); } a:hover { color: var(--akzent-dunkel); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--chip); padding: .6rem; border-radius: 6px;
  max-height: 22rem; overflow: auto; }

.kopf { background: var(--flaeche); border-bottom: 1px solid var(--rand); padding: 12px 24px; display: flex;
  flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.kopf .marke { display: flex; align-items: baseline; gap: 12px; }
.kopf .marke b { font-family: Georgia, serif; font-size: 1.4rem; font-weight: 600; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.kopf nav a { text-decoration: none; padding: 4px 2px; }
.kopf nav a[aria-current="page"] { font-weight: 700; border-bottom: 2px solid var(--akzent); }
.kopf form { display: inline; }

main { max-width: 1440px; margin: 0 auto; padding: 20px 24px; }
main.schmal { max-width: 520px; }
main.mittel { max-width: 960px; }
.spalten { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.spalten > .links { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.spalten > .rechts { flex: 1 1 360px; min-width: 0; position: sticky; top: 12px; }

.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 16px; }
.karte + .karte { margin-top: 14px; }
.stapel { display: flex; flex-direction: column; gap: 12px; }
.reihe { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.leise { color: var(--leise); font-size: .9rem; }
.klein { font-size: .85rem; }

label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
input[type=text], input[type=search], input[type=password], input[type=email], input[type=date],
input[type=number], select, input[type=file] {
  font: inherit; padding: 8px 10px; border: 1px solid var(--feld); border-radius: 6px; background: var(--flaeche);
  color: var(--text); max-width: 100%; }
input.voll, select.voll { width: 100%; }
input.be { width: 5em; }
input.code { font-size: 1.4rem; letter-spacing: .2em; width: 9em; text-align: center; }

button, .knopf { font: inherit; cursor: pointer; border-radius: 6px; padding: 8px 14px; border: 1px solid var(--akzent);
  background: var(--akzent); color: #fff; text-decoration: none; display: inline-block; }
@media (prefers-color-scheme: dark) { button, .knopf { color: #10161c; } }
button.zweit, .knopf.zweit { background: transparent; color: var(--akzent); }
button.klein { padding: 4px 10px; font-size: .85rem; }
button.gefahr { background: transparent; color: var(--fehler); border-color: var(--fehler); }
button:disabled { opacity: .5; cursor: default; }
button.link { background: none; border: 0; color: var(--akzent); padding: 0; text-decoration: underline; }
@media (pointer: coarse) { button, .knopf, input, select { min-height: 44px; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; background: var(--chip); border-radius: 999px; padding: 2px 9px; }
.chip.thema { background: var(--akzent-hell); }

.treffer { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.treffer li { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 12px 14px;
  display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.treffer .inhalt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.treffer .anfang { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; color: var(--leise);
  overflow-wrap: anywhere; }
.karte-rahmen { display: block; max-height: 26rem; overflow: hidden; background: #fff; border: 1px solid var(--rand);
  border-radius: 6px; }
.karte-rahmen img { display: block; max-width: 100%; height: auto; }
.verwendet { font-size: .85rem; color: var(--leise); }
.verwendet.frisch { color: var(--warn); font-weight: 600; }

.zs { list-style: none; margin: 0; padding: 0; counter-reset: nr; }
.zs li { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rand); }
.zs li::before { counter-increment: nr; content: counter(nr) "."; font-weight: 700; min-width: 1.6em; }
.zs .titel { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.summe { font-size: 1.1rem; font-weight: 700; margin: 10px 0; }

.hinweis { border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.hinweis.ok { background: var(--ok-bg); color: var(--ok); }
.hinweis.fehler { background: var(--fehler-bg); color: var(--fehler); }
.hinweis.warn { background: var(--warn-bg); color: var(--warn); }
.hinweis.info { background: var(--akzent-hell); }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle { overflow-x: auto; }

.zaehler { display: flex; flex-wrap: wrap; gap: 10px; }
.zaehler a, .zaehler span { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px;
  padding: 8px 14px; text-decoration: none; color: var(--text); }
.zaehler [aria-current="page"] { border-color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.zaehler b { font-size: 1.2rem; margin-right: 4px; }

.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 8px; }
.codes { columns: 2; font-family: ui-monospace, Menlo, monospace; font-size: 1.05rem; }
.vorschau img { max-width: 100%; border: 1px solid var(--rand); background: #fff; display: block; margin-bottom: 8px; }
.entschieden { opacity: .75; }
.status { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.status.frei { background: var(--ok-bg); color: var(--ok); }
.status.abgelehnt { background: var(--fehler-bg); color: var(--fehler); }
.status.offen { background: var(--warn-bg); color: var(--warn); }
details summary { cursor: pointer; }
.htmx-indicator { display: none; } .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }
.versteckt { position: absolute; left: -9999px; }
@media (max-width: 640px) { main, .kopf { padding-left: 16px; padding-right: 16px; } .spalten > .rechts { position: static; } }
