/* Farben und Schriften kommen aus instanz.json (app.js setzt sie auf :root). Hier nur Rückfallwerte. */
:root {
  --bg: #121212; --bg2: #1c1c1c; --bg3: #262626; --line: #2e2b29;
  --ink: #f2eeea; --mute: #a39b94; --akzent: #b9a192; --akzent-d: #8c7768;
  --gut: #7fae8a; --warn: #d9a25b; --rot: #d77a6e;
  --head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--akzent); }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; }
.laden { padding: 3rem 1rem; color: var(--mute); text-align: center; }

/* Rahmen */
.kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.kopf img { height: 28px; width: auto; }
.kopf .name { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 1.1rem; }
.kopf .wer { margin-left: auto; color: var(--mute); font-size: .85rem; display: flex; gap: .6rem; align-items: center; }
.testmodus { background: var(--warn); color: #1a1408; font-size: .78rem; font-weight: 600; text-align: center; padding: .3rem 1rem; }
nav.reiter { display: flex; gap: .25rem; padding: .5rem 1rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
nav.reiter a { text-decoration: none; color: var(--mute); padding: .45rem .8rem; border-radius: 999px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
nav.reiter a[aria-current="page"] { background: var(--bg3); color: var(--ink); }
main { width: min(100% - 2rem, 76rem); margin: 1.25rem auto 6rem; display: grid; gap: 1.25rem; }
.kopf { flex-wrap: wrap; }
.kopf img { max-width: 34vw; object-fit: contain; }
@media (max-width: 700px) {
  .kopf { gap: .5rem; padding: .6rem .75rem; }
  .kopf .name { font-size: .95rem; flex: 1 1 8rem; }
  .kopf .wer { margin-left: 0; flex: 1 1 100%; justify-content: flex-end; }
  nav.reiter { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; justify-content: space-around; background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 0; padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom)); }
  nav.reiter a { padding: .45rem .55rem; font-size: .8rem; }
}

/* Bausteine */
.karte-box { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .6rem; align-content: start; }
.zeile { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.mute { color: var(--mute); font-size: .85rem; }
.quelle { color: var(--mute); font-size: .78rem; }
.knopf { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .85rem; cursor: pointer; font-weight: 600; font-size: .9rem; min-height: 40px; }
.knopf:hover { border-color: var(--akzent-d); }
.knopf.haupt { background: var(--akzent); color: #16120f; border-color: var(--akzent); }
.knopf.leise { background: transparent; }
.knopf.klein { padding: .25rem .6rem; min-height: 32px; font-size: .8rem; }
input[type=text], input[type=email], input[type=url], input[type=password], select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; width: 100%; min-height: 40px; }
textarea { min-height: 7rem; resize: vertical; }
label { display: grid; gap: .3rem; font-size: .85rem; color: var(--mute); }
.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.pille { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--bg3); color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.pille.warn { background: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn); }
.pille.gut { background: color-mix(in srgb, var(--gut) 22%, transparent); color: var(--gut); }
.text { white-space: pre-line; }
.leer { color: var(--mute); font-style: italic; font-size: .9rem; }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.login .karte-box { width: min(100%, 26rem); padding: 1.75rem; gap: 1rem; }
.login img { height: 46px; width: auto; }

/* Start */
.kennzahlen { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.kennzahlen .karte-box { padding: .75rem; gap: .35rem; }
.kennzahlen .wert { font-size: 1.8rem; }
.kennzahl .wert { font-family: var(--head); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.aufgabe { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-top: 1px solid var(--line); }
.aufgabe:first-of-type { border-top: 0; }
.aufgabe input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--akzent); flex: none; }
.aufgabe.erledigt span { text-decoration: line-through; color: var(--mute); }
.hinweis { border-left: 3px solid var(--warn); }
.warn-text { color: var(--warn); }
/* Woche Mo–So (Start, Leon 04.10.): am Handy untereinander, breit als sieben Spalten */
.woche { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); }
.woche .tag { gap: .35rem; padding: .7rem .8rem; }
.woche .tag.heute { border-color: var(--akzent); }
.woche .tag.vorbei { opacity: .55; }
.woche .eintrag { font-size: .85rem; line-height: 1.35; overflow-wrap: anywhere; color: inherit; }
.woche .eintrag.erledigt { text-decoration: line-through; color: var(--mute); }

/* Projekte */
.projekt { text-align: left; cursor: pointer; color: inherit; font: inherit; }
.projekt:hover { border-color: var(--akzent-d); }
.projekt[data-ampel="rot"] { border-left: 4px solid var(--rot); }
.projekt[data-ampel="gelb"] { border-left: 4px solid var(--warn); }
.projekt[data-ampel="gruen"] { border-left: 4px solid var(--gut); }
.ampel { width: 12px; height: 12px; border-radius: 50%; background: var(--mute); flex: none; }
.ampel.rot { background: var(--rot); } .ampel.gelb { background: var(--warn); } .ampel.gruen { background: var(--gut); }
.klemme { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; }
.mini.projekt[data-ampel="rot"] { border-left: 4px solid var(--rot); }
.mini.projekt[data-ampel="gelb"] { border-left: 4px solid var(--warn); }
.mini.projekt[data-ampel="gruen"] { border-left: 4px solid var(--gut); }
input[type=month], input[type=date] { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; width: 100%; min-height: 40px; color-scheme: dark; }
details > summary { font-weight: 600; }

/* Board */
.board-reiter { display: none; gap: .3rem; overflow-x: auto; }
.board { display: grid; grid-template-columns: repeat(var(--spalten, 6), minmax(10.5rem, 1fr)); gap: .75rem; overflow-x: auto; align-items: start; }
.spalte { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; display: grid; gap: .5rem; min-height: 8rem; }
.spalte h3 { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .2rem .2rem .4rem; font-size: .95rem; }
main.breit { width: min(100% - 2rem, 120rem); }
.mini { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: .65rem; cursor: pointer; display: grid; gap: .35rem; text-align: left; width: 100%; }
.mini:hover { border-color: var(--akzent-d); }
.mini b { font-weight: 600; font-size: .92rem; line-height: 1.35; }
@media (max-width: 900px) {
  .board-reiter { display: flex; }
  .board { grid-template-columns: 1fr; }
  .spalte:not(.aktiv) { display: none; }
}

/* Dialog */
dialog { margin: auto; width: min(100% - 1.5rem, 44rem); max-height: 92dvh; background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 0; }
dialog::backdrop { background: rgb(0 0 0 / .65); }
dialog .innen { padding: 1.25rem; display: grid; gap: .9rem; }
dialog .schliessen { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: .5rem .5rem 0; background: var(--bg2); }
.vorschau { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.vorschau img, .vorschau video { border-radius: 8px; border: 1px solid var(--line); width: 100%; }
.zitat { border-left: 3px solid var(--akzent); padding-left: .75rem; color: var(--mute); font-style: italic; }
.kommentar { border-top: 1px solid var(--line); padding-top: .5rem; }

#meldung { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .55rem 1rem; border-radius: 8px; font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; max-width: calc(100% - 2rem); }
#meldung.an { opacity: 1; }

/* Übersicht (DeepFrames-Zentrale): Fortschrittsbalken, Monatsleiste, Soll gegen Ist */
.balken { height: .5rem; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.fokus { border-left: 3px solid var(--akzent); }
.monate { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .5rem; margin-top: .4rem; }
.monate .monat { display: grid; gap: .1rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: .5rem; }
.monate .monat.aktiv { border-color: var(--akzent); }
.soll-ist { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .8rem 1.2rem; }
.soll-ist > div { display: grid; gap: .35rem; }

/* Präsentation je Sales-Call (Leon 04.10.): eine Folie füllt den Bildschirm, für den Screenshare im Call */
.deck { position: fixed; inset: 0; background: #0b0b0b; display: flex; flex-direction: column; outline: none; overflow: auto; }
.d-leiste { display: flex; gap: .8rem; align-items: center; padding: .5rem 1rem; font-size: .85rem; border-bottom: 1px solid var(--line); }
.d-leiste [data-folie-nr] { margin-left: auto; }
.d-folie { flex: 1; width: min(100%, 72rem); margin: 0 auto; padding: clamp(1.2rem, 4vw, 4rem) clamp(1rem, 5vw, 5rem); display: flex; flex-direction: column; gap: 1.1rem; justify-content: center; }
.d-folie h1 { font-size: clamp(1.8rem, 4.6vw, 3.6rem); line-height: 1.05; max-width: 22ch; }
.d-folie h1 em, .d-folie h3 em { font-style: normal; color: var(--akzent); }
.d-label { display: block; font: 700 .78rem/1 var(--body); letter-spacing: .3em; text-transform: uppercase; color: var(--akzent); }
.d-unter { font-size: clamp(1rem, 1.7vw, 1.4rem); color: #c9c2bb; max-width: 60ch; }
.d-klein { font-size: .9rem; color: var(--mute); display: block; }
.d-frage { margin-top: auto; border-top: 1px solid var(--line); padding-top: 1rem; }
.d-frage p { font-size: clamp(1.1rem, 2vw, 1.7rem); margin-top: .4rem; }
.d-art-titel { text-align: center; align-items: center; }
.d-art-titel h1 { max-width: 24ch; }
.d-logo { height: clamp(48px, 9vw, 96px); width: auto; margin-bottom: 1rem; }
.d-fuss { margin-top: 1.5rem; color: var(--mute); }
.d-zwei { display: grid; grid-template-columns: minmax(0, 18rem) 1fr; gap: clamp(1rem, 4vw, 3.5rem); align-items: center; }
.d-portrait { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.deck blockquote { border-left: 3px solid var(--akzent); padding: .3rem 0 .3rem 1.2rem; font-size: clamp(1rem, 1.7vw, 1.35rem); color: #e8e2dc; max-width: 55ch; }
.d-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.2rem 3rem; }
.d-feld { font-size: clamp(1.05rem, 1.9vw, 1.5rem); color: var(--warn); margin-top: .35rem; }
.d-feld.leer { color: var(--mute); font-style: italic; font-size: 1rem; }
.d-liste { columns: 2 16rem; gap: 2rem; list-style: none; font-size: clamp(1rem, 1.6vw, 1.3rem); color: #c9c2bb; }
.d-liste li { padding: .3rem 0; break-inside: avoid; }
.d-formel { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; font: 800 clamp(1rem, 2.4vw, 2rem)/1 var(--head); text-transform: uppercase; }
.d-formel.gross { font-size: clamp(1.8rem, 5vw, 4rem); }
.d-formel b { color: var(--akzent); font-weight: 400; }
.d-formel .null { color: var(--rot); }
.d-drei { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 2rem; }
.d-drei b { color: var(--akzent); } .d-drei p { color: #c9c2bb; }
.d-team img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; margin-bottom: .6rem; }
.d-saeulen { display: grid; gap: .6rem; }
.d-saeule { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.d-zahlen { display: flex; gap: .25rem; flex-wrap: wrap; }
.d-zahlen button { width: 2.1rem; height: 2.1rem; border-radius: 6px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; }
.d-zahlen button.an { background: var(--akzent); color: #121212; font-weight: 700; }
