/* Bis Deniz' eigenes Design steht: Grundregeln von Weissraum (app.html, organize/ui/mail.js). */
@font-face { font-family: "Inter"; src: url("/inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
/* Avenir Next für das spätere eigene Design: wird erst geladen, wenn etwas --schrift-marke nutzt. */
@font-face { font-family: "Avenir Next"; src: url("/AvenirNext-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Avenir Next"; src: url("/AvenirNext-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Avenir Next"; src: url("/AvenirNext-Demi.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Avenir Next"; src: url("/AvenirNext-DemiItalic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Avenir Next"; src: url("/AvenirNext-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Avenir Next"; src: url("/AvenirNext-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
:root {
  --t: #f2f2ef;
  --g: #9a9a9a;
  --l: rgba(242, 242, 239, .22);
  --f: #1c1c1c;
  --grund: #151515;
  --spalte: #0a0a0a;
  --fehler: #ff8a80;
  --wr-sans: "Inter", "Avenir Next", "Trebuchet MS", Arial, sans-serif;
  --schrift-marke: "Avenir Next", "Inter", "Trebuchet MS", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --k-h: 38px; --k-h-klein: 32px; --k-r: 10px; --k-r-klein: 8px;
  --k-px: 16px; --k-px-klein: 12px;
  --kd-fuell: #1c1c1c; --kd-rand: #343432; --kd-text: #f2f2ef;
  --kd-fuell-hover: #252524; --kd-rand-hover: #55554f;
  --kd1-rand: #5a5a55; --kd1-text: #fff; --kd1-fuell-hover: #262625; --kd1-rand-hover: #8a8a84;
  color-scheme: dark;
}
* { box-sizing: border-box; }
:focus, :focus-visible { outline: none; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--t);
  font: 400 14px/1.45 var(--wr-sans);
  -webkit-font-smoothing: antialiased;
}
h1 { margin: 0 0 24px; font: 500 13px/1.4 var(--wr-sans); letter-spacing: .22em; text-transform: uppercase; color: var(--g); }
h2 { margin: 28px 0 10px; font: 500 13px/1.4 var(--wr-sans); color: var(--g); }
.pille {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--k-h); padding: 0 var(--k-px); border-radius: var(--k-r);
  border: 1px solid var(--kd-rand);
  background: var(--kd-fuell);
  color: var(--kd-text);
  font: 500 14px/1 var(--wr-sans); letter-spacing: 0; text-transform: none; text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease);
}
.pille:hover, .pille:focus-visible { background: var(--kd-fuell-hover); border-color: var(--kd-rand-hover); }
.pille.haupt { border-color: var(--kd1-rand); color: var(--kd1-text); }
.pille.haupt:hover, .pille.haupt:focus-visible { background: var(--kd1-fuell-hover); border-color: var(--kd1-rand-hover); }
.pille:disabled { opacity: .45; cursor: default; }
input {
  width: 100%; height: var(--k-h-klein); padding: 0 11px;
  border: 1px solid var(--l); border-radius: var(--k-r-klein);
  background: transparent; color: var(--t);
  font: 400 13px var(--wr-sans);
  transition: border-color .2s var(--ease);
}
input:focus { border-color: var(--t); }
input::placeholder { color: var(--g); }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--t);
  box-shadow: 0 0 0 40px var(--grund) inset;
  caret-color: var(--t);
}
/* Auswahl: Karte wie ADD und EXPORT */
.klapp { position: relative; min-width: 0; }
.klapp > .pille { width: 100%; height: var(--k-h-klein); padding: 0 var(--k-px-klein); border-radius: var(--k-r-klein); justify-content: space-between; font: 500 13px/1 var(--wr-sans); }
.klapp > .pille span { overflow: hidden; text-overflow: ellipsis; }
.klapp > .pille::after { content: ""; flex: none; width: 5px; height: 5px; margin-top: -3px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.klapp-liste {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 200px; max-height: 60vh; overflow: auto; padding: 8px;
  border-radius: 16px; border: 1px solid #0a0a0a; background: #fafaf8; box-shadow: 0 30px 80px rgba(10, 10, 10, .18);
}
.klapp-liste button {
  appearance: none; display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left;
  font: 500 15px/1.25 var(--wr-sans); color: #0a0a0a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background-color .2s var(--ease);
}
.klapp-liste button:hover, .klapp-liste button:focus-visible { background: #f1f0ec; }
.klapp-liste button.an { font-weight: 700; }
.karte { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.karte form { display: grid; gap: 14px; }
.karte label { display: grid; gap: 7px; font-size: 13px; color: var(--g); }
.karte input { height: var(--k-h); border-radius: var(--k-r); font-size: 14px; }
.hinweis { color: var(--g); font-size: 13px; }
.fehler { color: var(--fehler); font-size: 13px; min-height: 18px; }
.code { font: 13px ui-monospace, Menlo, monospace; word-break: break-all; background: var(--f); padding: 10px 12px; border-radius: 10px; user-select: all; }
.rahmen { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.seite { background: var(--spalte); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; }
.marke { font: 500 15px/1 var(--wr-sans); padding: 6px 10px 20px; }
.seite button.eintrag {
  appearance: none; flex: none; height: var(--k-h-klein); border: 0; background: none; color: inherit; font: 400 14px/1 var(--wr-sans); text-align: left;
  padding: 0 10px; border-radius: var(--k-r-klein); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background-color .2s var(--ease);
}
.seite button.eintrag:hover, .seite button.eintrag:focus-visible { background: rgba(255, 255, 255, .05); }
.seite button.eintrag.aktiv { font-weight: 700; }
.seite .unten { margin-top: auto; padding: 12px 10px 0; display: grid; gap: 10px; font-size: 13px; color: var(--g); }
.seite .unten .pille { height: var(--k-h-klein); padding: 0 var(--k-px-klein); border-radius: var(--k-r-klein); font-size: 13px; }
.inhalt { padding: 28px 28px 80px; min-width: 0; position: relative; }
.kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pfad { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; flex: 1; min-width: 160px; font-size: 14px; }
.pfad button { appearance: none; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 4px 6px; border-radius: var(--k-r-klein); transition: background-color .2s var(--ease); }
.pfad button:hover, .pfad button:focus-visible { background: rgba(255, 255, 255, .05); }
.pfad span { color: var(--g); }
.pfad .hier { font-weight: 700; }
.zeile {
  display: grid; grid-template-columns: minmax(0, 1fr) 100px 110px 190px; gap: 12px; align-items: center;
  padding: 9px 2px; border-top: 1px solid var(--l); font-size: 13px;
}
.zeile .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile button.name { appearance: none; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; font-weight: 600; padding: 0; }
.zeile .klein { color: var(--g); font-size: 13px; }
.zeile .knoepfe { display: flex; gap: 6px; justify-content: flex-end; }
.zeile .pille, .tabelle .pille { height: var(--k-h-klein); padding: 0 var(--k-px-klein); border-radius: var(--k-r-klein); font-size: 13px; }
.leer { color: var(--g); padding: 40px 4px; text-align: center; border-top: 1px solid var(--l); font-size: 13px; }
.ablage { position: absolute; inset: 8px; border: 1px dashed var(--t); border-radius: 16px; background: color-mix(in srgb, var(--grund) 88%, transparent); display: none; align-items: center; justify-content: center; font-weight: 500; z-index: 5; pointer-events: none; }
.ablage.an { display: flex; }
.warteschlange { position: fixed; right: 16px; bottom: 16px; width: min(360px, calc(100vw - 32px)); background: var(--f); border: 1px solid var(--kd-rand); border-radius: 16px; padding: 12px 14px; display: grid; gap: 10px; max-height: 50vh; overflow: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.warteschlange:empty { display: none; }
.auftrag { display: grid; gap: 4px; font-size: 13px; }
.auftrag .oben { display: flex; justify-content: space-between; gap: 8px; }
.auftrag .oben span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balken { height: 4px; background: #2c2c2c; border-radius: 2px; overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--t); width: 0; transition: width .4s var(--ease); }
.formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 12px; align-items: end; }
.formular .pille { height: var(--k-h-klein); padding: 0 var(--k-px-klein); border-radius: var(--k-r-klein); font-size: 13px; }
.tabelle { display: grid; }
.tabelle .reihe { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 90px 200px; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--l); align-items: center; font-size: 13px; }
.tabelle.protokoll .reihe { grid-template-columns: minmax(0, 2fr) 120px minmax(0, 1fr) 170px; }
.tabelle .reihe > * { overflow: hidden; text-overflow: ellipsis; }
.tabelle .neben { color: var(--g); }
.tabelle .knoepfe { display: flex; gap: 6px; justify-content: flex-end; }
.meldung { background: var(--f); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; display: grid; gap: 8px; }
@media (max-width: 720px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .seite { padding: 12px; }
  .seite .unten { margin-top: 8px; }
  .inhalt { padding: 16px 16px 80px; }
  .zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .zeile .klein { display: none; }
  .tabelle .reihe, .tabelle.protokoll .reihe { grid-template-columns: minmax(0, 1fr) auto; }
  .tabelle .reihe .neben { display: none; }
}
