/* Moinjunto – Gestaltung nach dem freigegebenen Mockup (10.10.2026).
   Kobalt für Handlung, Grün nur für Bezahltes/Festes, Bernstein für „liegt bei dir“, Rot nur für Fehler.
   Schriften selbst gehostet über /fonts (fontsource). */
:root {
  --bg: #f7f8fa; --flaeche: #ffffff; --flaeche-2: #fbfcfd; --linie: #e3e6eb; --linie-stark: #cfd4dc;
  --text: #1a1f2b; --text-2: #3d4556; --text-3: #5a6275;
  --kobalt: #2055b3; --kobalt-dunkel: #163d85; --kobalt-hell: #eef2fa; --kobalt-blass: #c9d5ec;
  --gruen: #2f8a5b; --gruen-hell: #e9f5ee; --bernstein: #d79a2b; --bernstein-mittel: #e3b866; --bernstein-hell: #ecd3a0; --bernstein-flaeche: #fff8eb;
  --rot: #b3261e; --rot-hell: #fdecea; --grau-rand: #b9c0cc;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --flaeche: #1a1e26; --flaeche-2: #1e232c; --linie: #2b313c; --linie-stark: #3a4250;
    --text: #e8ebf0; --text-2: #c3c9d4; --text-3: #9aa3b2;
    --kobalt: #6f9be8; --kobalt-dunkel: #9dbcf2; --kobalt-hell: #1f2a40; --kobalt-blass: #2d3f63;
    --gruen: #5cc28c; --gruen-hell: #173126; --bernstein: #e0ad4e; --bernstein-mittel: #b98a35; --bernstein-hell: #6e5322; --bernstein-flaeche: #2a2316;
    --rot: #f08b84; --rot-hell: #3a1c1a; --grau-rand: #4a5261;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
a { color: var(--kobalt); } a:hover { color: var(--kobalt-dunkel); }
:focus-visible { outline: 3px solid var(--kobalt); outline-offset: 2px; }
.mono, .betrag { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
h1 { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.25; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-3); }
p { margin: 0; }
ul { margin: 0; padding-left: 20px; }
.leise { color: var(--text-3); font-size: 13px; }
.bezahlt { color: var(--gruen); }

/* Rahmen */
.rahmen { display: flex; min-height: 100vh; }
nav.haupt { width: 232px; flex: none; background: var(--flaeche); border-right: 1px solid var(--linie); padding: 28px 20px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.marke { display: flex; align-items: center; gap: 10px; padding: 0 8px 28px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.marke .m { width: 28px; height: 28px; background: var(--kobalt); color: #fff; display: grid; place-items: center; font-size: 15px; }
nav.haupt > a { padding: 10px 12px; text-decoration: none; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
nav.haupt > a.marke { justify-content: flex-start; padding: 0 8px 28px; }
nav.haupt > a.marke:hover { background: transparent; }
nav.haupt > a:hover { background: var(--flaeche-2); color: var(--text); }
nav.haupt > a.aktiv { background: var(--kobalt-hell); color: var(--text); font-weight: 600; }
nav.haupt .zahl { font-family: var(--mono); font-size: 12px; background: var(--kobalt); color: #fff; padding: 0 7px; min-width: 22px; text-align: center; }
nav.haupt .trenner { height: 1px; background: var(--linie); margin: 16px 8px; }
nav.haupt .abmelden { margin-top: auto; }
nav.haupt .abmelden button { width: 100%; }
nav.mobil { display: none; }
main { flex: 1; min-width: 0; padding: 40px 48px 56px; display: flex; flex-direction: column; gap: 24px; max-width: 1400px; }
header.kopf { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
header.kopf > div { display: flex; flex-direction: column; gap: 4px; }
.schmal { max-width: 760px; display: flex; flex-direction: column; gap: 24px; }

/* Bausteine */
.karte { background: var(--flaeche); border: 1px solid var(--linie); padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.karte.dran { border-left: 4px solid var(--bernstein); }
.karte.kunde { border-left: 2px solid var(--grau-rand); }
.karte.gestrichelt { border-style: dashed; background: transparent; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.zwei { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stapel-rechts { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.zeile { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.aktion-gross { font-size: 21px; font-weight: 600; line-height: 1.3; }
.pille { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border: 1px solid var(--linie-stark); color: var(--text-2); white-space: nowrap; }
.pille.dran { background: var(--bernstein-flaeche); border-color: var(--bernstein-hell); color: var(--text); }
.pille.ki { border-style: dashed; color: var(--kobalt); border-color: var(--kobalt-blass); }
.pille.gut { border-color: var(--gruen); color: var(--gruen); }
.kasten { background: var(--flaeche-2); border: 1px solid var(--linie); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }

/* Heute */
.heute { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.spalte-haupt, .spalte-neben { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.schritt { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--bernstein); padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.wer { display: flex; gap: 12px; align-items: center; }
.wer > div:last-child { display: flex; flex-direction: column; }
.wer-name { font-weight: 600; }
.avatar { width: 40px; height: 40px; flex: none; background: var(--kobalt-hell); color: var(--kobalt); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.geldzeile { display: flex; gap: 20px; font-family: var(--mono); font-size: 15px; flex-wrap: wrap; }
.kontext { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--text-2); border-top: 1px solid var(--linie); padding-top: 12px; }
.marke-ki { font-size: 12px; font-weight: 600; color: var(--kobalt); }
.liste { display: flex; flex-direction: column; }
.liste h3 { margin-bottom: 6px; }
.listzeile { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--linie); text-decoration: none; color: var(--text); flex-wrap: wrap; }
.listzeile:hover { color: var(--kobalt); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; background: var(--kobalt-hell); border: 1px solid var(--kobalt-blass); color: var(--text); text-decoration: none; font-size: 14px; }
.chip.frei { background: transparent; border-style: dashed; color: var(--text-3); }
.fuss { border-top: 1px solid var(--linie); padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Knöpfe und Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--linie-stark);
  background: var(--flaeche); color: var(--text-2); font: inherit; cursor: pointer; text-decoration: none; gap: 6px; }
.btn:hover { border-color: var(--kobalt); color: var(--text); }
.btn.primaer { background: var(--kobalt); border-color: var(--kobalt); color: #fff; font-weight: 600; }
.btn.primaer:hover { background: var(--kobalt-dunkel); border-color: var(--kobalt-dunkel); color: #fff; }
.btn.klein { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.leise-btn { border-color: transparent; background: transparent; color: var(--text-3); }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form { margin: 0; }
form.feld { display: flex; flex-direction: column; gap: 12px; }
form.kompakt .felder { grid-template-columns: auto 1fr auto; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { min-height: 0; width: 18px; height: 18px; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); padding: 10px 12px; border: 1px solid var(--linie-stark); background: var(--flaeche); min-height: 44px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
textarea.mono { font-size: 13px; }
.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.felder .breit { grid-column: span 2; }
.upload { display: flex; gap: 10px; align-items: center; }

/* Pipeline */
.scroll { overflow-x: auto; padding-bottom: 8px; }
.spalten { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 16px; min-width: 1260px; }
.spalte { display: flex; flex-direction: column; gap: 10px; }
.vk { background: var(--flaeche); border: 1px solid var(--linie); padding: 14px 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.vk:hover { border-color: var(--kobalt-blass); }
.vk.alt { border-left: 4px solid var(--bernstein); } .vk.mittel { border-left: 3px solid var(--bernstein-mittel); }
.vk.frisch { border-left: 2px solid var(--bernstein-hell); } .vk.kunde { border-left: 2px solid var(--grau-rand); }
.leer { border: 1px dashed var(--linie-stark); padding: 14px 16px; color: var(--text-3); font-size: 14px; }
.leer.gross { padding: 32px; text-align: center; font-size: 16px; }
.parkplatz { border-top: 1px solid var(--linie); padding-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-3); }
.parkplatz b { color: var(--text-2); }

/* Verlauf */
.verlauf { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--linie); }
.verlauf.ereignis span:last-child { color: var(--text-2); font-size: 14px; }
.doks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.doks li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--text-3); font-weight: 600; padding: 6px 8px 6px 0; }
td { border-top: 1px solid var(--linie); padding: 9px 8px 9px 0; vertical-align: top; }
td.r, th.r { text-align: right; font-family: var(--mono); white-space: nowrap; }
tr.summe td { font-weight: 600; border-top: 2px solid var(--text); }
td.minus { color: var(--text-2); }

/* Geld */
.balken { position: relative; height: 18px; background: var(--linie); }
.balken.gross { height: 22px; margin: 6px 0 4px; }
.balken .wert { position: absolute; top: 0; bottom: 0; left: 0; background: var(--gruen); }
.balken .wert.offen { background: var(--kobalt-blass); }
.balken .strich { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--text); }
.messraster { display: grid; grid-template-columns: 160px minmax(0, 1fr) 170px; gap: 12px 20px; align-items: center; }

/* Status */
.marke-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border: 1px solid var(--linie-stark); color: var(--text-2); }
.marke-status.entwurf { border-style: dashed; }
.marke-status.freigegeben, .marke-status.verschickt { border-color: var(--kobalt); color: var(--kobalt); }
.marke-status.angenommen { border-color: var(--gruen); color: var(--gruen); }
.marke-status.ersetzt, .marke-status.abgelehnt { color: var(--text-3); text-decoration: line-through; }
.hinweis { background: var(--bernstein-flaeche); border: 1px solid var(--bernstein-hell); padding: 12px 16px; font-size: 14px; }
.fehler { background: var(--rot-hell); border: 1px solid var(--rot); padding: 12px 16px; }
.ok { background: var(--gruen-hell); border: 1px solid var(--gruen); padding: 12px 16px; }
.reiter { display: flex; gap: 4px; flex-wrap: wrap; }
.reiter a { padding: 7px 12px; border: 1px solid var(--linie); text-decoration: none; color: var(--text-2); background: var(--flaeche); font-size: 14px; }
.reiter a.aktiv { background: var(--kobalt-hell); color: var(--text); font-weight: 600; border-color: var(--kobalt-blass); }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 10px; }
.login { max-width: 380px; margin: 14vh auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.login .marke { padding: 0; }

@media (max-width: 1100px) {
  .heute, .zwei { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  nav.haupt { display: none; }
  nav.mobil { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--flaeche); border-top: 1px solid var(--linie);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
  nav.mobil a { min-height: 48px; display: grid; place-items: center; text-decoration: none; color: var(--text-2); font-weight: 600; }
  nav.mobil a.aktiv { color: var(--kobalt); }
  main { padding: 24px 16px 96px; }
  h1 { font-size: 22px; }
  .schritt { padding: 20px; }
  .aktion-gross { font-size: 19px; }
  .messraster { grid-template-columns: 1fr; }
  .felder .breit { grid-column: auto; }
  form.kompakt .felder { grid-template-columns: 1fr; }
  .btn { min-height: 48px; }
}
