/* 3D-Druck – kinnatics.com */
:root {
  --bg: #f4f5f2; --panel: #ffffff; --panel-2: #f8f9f6; --ink: #1b201c; --muted: #646d65; --line: #dde1da;
  --accent: #e0b400; --accent-ink: #1b201c; --link: #1d5bbf;
  --open: #56625a; --open-bg: #eceee9;
  --run: #1d5bbf; --run-bg: #e2ecfb;
  --done: #1b7a45; --done-bg: #e0f2e6;
  --skip: #858b84; --skip-bg: #eeefec;
  --warn: #8a5a00; --warn-bg: #fdf0cf;
  --bad: #b3261e; --bad-bg: #fbe5e3;
  --thumb: #e8ebe5;
  --shadow: 0 1px 2px rgba(20, 30, 20, .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131613; --panel: #1b1f1b; --panel-2: #171a17; --ink: #e8ebe5; --muted: #98a196; --line: #2c322c;
    --accent: #ffd400; --accent-ink: #151815; --link: #8ab6ff;
    --open: #b2bbb0; --open-bg: #262c26;
    --run: #8ab6ff; --run-bg: #1a2b45;
    --done: #7ed69f; --done-bg: #16321e;
    --skip: #7d867c; --skip-bg: #222722;
    --warn: #ffcf66; --warn-bg: #3a2e10;
    --bad: #ff9a92; --bad-bg: #3e1c19;
    --thumb: #252a25;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.klein { font-size: 13px; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: .005em; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0 0 6px; }

/* Kopf */
.kopf { background: var(--panel); border-bottom: 1px solid var(--line); }
.kopf-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; min-height: 54px; flex-wrap: wrap; }
.marke { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.marke i { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: inline-block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 550; }
.nav a:hover { text-decoration: none; color: var(--ink); background: var(--panel-2); }
.nav a.an { color: var(--ink); background: var(--open-bg); }
.wer { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.slicer { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.slicer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--skip); }
.slicer.an::before { background: var(--done); }

main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 64px; }
.titelzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Meldungen */
.meldungen { display: grid; gap: 6px; margin-bottom: 14px; }
.meldung { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.meldung.ok { border-color: var(--done); background: var(--done-bg); }
.meldung.fehler { border-color: var(--bad); background: var(--bad-bg); }

/* Flaechen */
.karte { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.karte + .karte { margin-top: 14px; }
.raster { display: grid; gap: 14px; align-items: start; }
.raster.zwei { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.raster.drei { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.abschnitt { margin-top: 26px; }
.abschnitt > .titelzeile { margin-bottom: 10px; }

/* Kennzahlen */
.zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.zahl b { display: block; font-size: 20px; font-weight: 650; }
.zahl span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) { .zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.balken { height: 8px; border-radius: 99px; background: var(--open-bg); overflow: hidden; display: flex; }
.balken i { display: block; height: 100%; }
.balken .b-done { background: var(--done); } .balken .b-run { background: var(--run); }

/* Pillen */
.pill { display: inline-block; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.p-offen { color: var(--open); background: var(--open-bg); }
.p-druckt, .p-laeuft, .p-wartet { color: var(--run); background: var(--run-bg); }
.p-gedruckt, .p-fertig, .p-aktiv, .p-frei { color: var(--done); background: var(--done-bg); }
.p-uebersprungen, .p-keiner, .p-archiviert, .p-aus { color: var(--skip); background: var(--skip-bg); }
.p-warn, .p-planung, .p-pausiert { color: var(--warn); background: var(--warn-bg); }
.p-fehler { color: var(--bad); background: var(--bad-bg); }
.p-drucker { color: var(--ink); background: var(--open-bg); font-weight: 550; }

/* Knoepfe und Formulare */
.btn { font: inherit; font-size: 13.5px; border-radius: 8px; padding: 6px 11px; cursor: pointer; border: 1px solid var(--line);
       background: var(--panel); color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; line-height: 1.3; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primaer { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 620; }
.btn.ok { background: var(--done); color: var(--panel); border-color: var(--done); font-weight: 620; }
.btn.leise { border-color: transparent; color: var(--muted); background: transparent; padding: 6px 8px; }
.btn.gefahr { color: var(--bad); border-color: var(--bad); }
.btn.klein { font-size: 12.5px; padding: 4px 8px; }
.btn:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--run); outline-offset: 2px; }
form.inline { display: inline; margin: 0; }
.aktionen { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  font: inherit; font-size: 14px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); width: 100%; min-width: 0; }
select.kompakt { width: auto; padding: 4px 8px; font-size: 13px; }
textarea { min-height: 70px; resize: vertical; }
label.feld { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
label.feld > span b { color: var(--ink); font-weight: 600; }
.felder { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.felder .breit { grid-column: 1 / -1; }
.hinweis { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
input[type=file] { font: inherit; font-size: 13.5px; max-width: 100%; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }

/* Reiter */
.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 16px 0; overflow-x: auto; }
.reiter a { padding: 8px 12px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.reiter a:hover { color: var(--ink); text-decoration: none; }
.reiter a.an { color: var(--ink); border-bottom-color: var(--accent); }
.reiter small { color: var(--muted); font-weight: 500; margin-left: 3px; }

/* Filter-Chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 99px; padding: 4px 11px; font-size: 13.5px; }
.chip:hover { text-decoration: none; border-color: var(--muted); }
.chip.an { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { opacity: .7; margin-left: 4px; }
.trenner { width: 1px; background: var(--line); margin: 2px 4px; }

/* Plattenliste */
.platte { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; box-shadow: var(--shadow); scroll-margin-top: 12px; }
.platte.s-druckt { border-color: var(--run); }
.platte.s-gedruckt .bild, .platte.s-uebersprungen .bild, .platte.s-uebersprungen .name { opacity: .55; }
.platte:target { outline: 2px solid var(--accent); }
.zeile { display: grid; grid-template-columns: 22px 30px 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; }
.zeile .nr { color: var(--muted); font-size: 12.5px; text-align: right; }
.bild { width: 64px; height: 64px; border-radius: 8px; background: var(--thumb); object-fit: contain; display: block; }
.bild.klein { width: 44px; height: 44px; border-radius: 6px; }
.name { font-weight: 620; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.meta .warn { color: var(--warn); }
.meta .fehler { color: var(--bad); }
@media (max-width: 820px) {
  .zeile { grid-template-columns: 22px 52px minmax(0, 1fr); }
  .zeile .nr { display: none; }
  .bild { width: 52px; height: 52px; }
  .zeile .aktionen { grid-column: 1 / -1; }
}
details.mehr > summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 6px 8px; border-radius: 8px; }
details.mehr > summary::-webkit-details-marker { display: none; }
details.mehr > summary:hover { color: var(--ink); }
details.mehr[open] > summary { color: var(--ink); }
.details { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 12px; font-size: 13.5px; }
.details dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }

/* Sammelleiste */
.sammel { position: sticky; bottom: 0; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
          padding: 10px 12px; margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.sammel .titel { font-weight: 600; margin-right: 4px; }
input.wahl { width: 18px; height: 18px; accent-color: var(--accent); }

/* Drucker-Karten */
.drucker { display: grid; gap: 10px; align-content: start; }
.drucker .kopfzeile { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.drucker .modell { color: var(--muted); font-size: 12.5px; }
.lauf { border: 1px solid var(--run); background: var(--run-bg); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.lauf.frei { border-color: var(--line); background: var(--panel-2); }
.lauf .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lauf .ttl { font-weight: 650; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.liste li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.liste li > .aktionen, .liste li > form { grid-column: 2; }
.liste li:first-child { border-top: 0; }
.liste .t { font-weight: 560; overflow-wrap: anywhere; font-size: 14px; }
.liste .u { color: var(--muted); font-size: 12.5px; }

/* Projektkarten */
.projekt { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; color: var(--ink); }
.projekt:hover { text-decoration: none; border-color: var(--muted); }
.projekt .name { font-size: 15.5px; }

/* Tabellen */
table.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; color: var(--muted); font-weight: 550; font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tabelle td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabellenrahmen { overflow-x: auto; }

/* Aufgaben */
.aufgaben { list-style: none; padding: 0; margin: 0; }
.aufgaben li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.aufgaben li:first-child { border-top: 0; }
.aufgaben .text { flex: 1; overflow-wrap: anywhere; }
.aufgaben li.erledigt .text { text-decoration: line-through; color: var(--muted); }
.haken { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--muted); background: transparent; cursor: pointer; padding: 0;
         display: inline-grid; place-items: center; color: var(--panel); font-size: 14px; line-height: 1; }
.erledigt .haken { background: var(--done); border-color: var(--done); }

.verlauf { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.verlauf li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.verlauf li:first-child { border-top: 0; }
@media (max-width: 560px) { .verlauf li { grid-template-columns: 1fr; gap: 0; } }

.leer { color: var(--muted); text-align: center; padding: 28px 0; }
code { font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; overflow-wrap: anywhere; }
pre.token { white-space: pre-wrap; word-break: break-all; background: var(--panel-2); border: 1px solid var(--line); padding: 10px; border-radius: 8px; font-size: 13px; }

/* Anmeldung */
.anmeldung { max-width: 380px; margin: 9vh auto 0; }
.anmeldung form { display: grid; gap: 12px; margin-top: 14px; }
