/* NBS Vertrieb – NBS Design-Manual: Fustat (Überschriften/UI), Merriweather Light (Lauftext) */
@font-face { font-family: Fustat; font-weight: 400; font-display: swap; src: url(fonts/fustat-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Fustat; font-weight: 500; font-display: swap; src: url(fonts/fustat-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Fustat; font-weight: 600; font-display: swap; src: url(fonts/fustat-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Fustat; font-weight: 700; font-display: swap; src: url(fonts/fustat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Merriweather; font-weight: 300; font-display: swap; src: url(fonts/merriweather-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: Merriweather; font-weight: 300; font-style: italic; font-display: swap; src: url(fonts/merriweather-latin-300-italic.woff2) format("woff2"); }
@font-face { font-family: Merriweather; font-weight: 400; font-display: swap; src: url(fonts/merriweather-latin-400-normal.woff2) format("woff2"); }

:root {
  --schwarz: #201d12;
  --offwhite: #f4f4f2;
  --navy: #17233c;
  --steel: #8396ac;
  --gruen: #4f9470;
  --gruen-d: #3d7558;
  --gruen-h: #b8d4c4;
  --gruen-hh: #e7f0eb;
  --blau: #0a5ea3;
  --blau-h: #abceeb;
  --orange: #cf783d;
  --orange-h: #ebc9b2;
  --rot: #b4412f;
  --rot-h: #f6dcd6;
  --linie: #e2e1dd;
  --grau: #6b6a66;
  --weiss: #fff;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(23,35,60,.06), 0 2px 8px rgba(23,35,60,.06);
  --fh: Fustat, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs: Merriweather, Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fh); color: var(--navy); background: var(--offwhite); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--blau); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--fh); font-weight: 600; margin: 0; letter-spacing: -.01em; }

/* ---------------- Kopfzeile */
header.top { background: var(--gruen); color: #fff; position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); }
header.top .innen { display: flex; align-items: center; gap: 22px; padding: 0 20px; min-height: 62px; }
.marke { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex-shrink: 0; }
.marke .logo-icon { height: 30px; width: auto; }
.marke .logo-wort { height: 15px; width: auto; }
.marke .logo-png { height: 32px; width: auto; display: block; }
.marke .trenner { width: 1px; height: 24px; background: rgba(255,255,255,.5); }
.marke .app { font-size: 1.05rem; font-weight: 500; color: #f1f4f2; }
header nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
header nav::-webkit-scrollbar { display: none; }
header nav a { color: #f1f4f2; text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
header nav a:hover, header nav a.aktiv { background: rgba(255,255,255,.18); color: #fff; }
header nav .zahl { background: #fff; color: var(--gruen-d); font-size: .75rem; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.kopf-rechts { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.abmelden { color: rgba(255,255,255,.85); font-size: .85rem; text-decoration: none; }
.abmelden:hover { color: #fff; }
.glocke { position: relative; background: transparent; border: 0; color: #fff; cursor: pointer; padding: 6px; border-radius: 8px; display: flex; }
.glocke:hover { background: rgba(255,255,255,.18); }
.glocke .badge { position: absolute; top: 0; right: -2px; background: var(--orange); color: #fff; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--gruen); }

/* ---------------- Buttons & Felder */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--linie); background: #fff; color: var(--navy); border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--steel); }
.btn.primaer { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primaer:hover { background: #22304f; }
.btn.gruen { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.btn.gruen:hover { background: var(--gruen-d); }
.btn.rot { color: var(--rot); border-color: var(--rot-h); }
.btn.rot:hover { background: var(--rot-h); }
.btn.hell { background: #fff; color: var(--gruen-d); border-color: #fff; }
.btn.klein { padding: 4px 10px; font-size: .85rem; }
.btn.gross { padding: 12px 22px; font-size: 1rem; }
.btn .plus { font-size: 1.2em; line-height: 1; }
.link { background: none; border: 0; color: var(--blau); cursor: pointer; padding: 0; font-weight: 500; }
.link:hover { text-decoration: underline; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=url], select, textarea {
  border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gruen-h); border-color: var(--gruen); }
textarea { resize: vertical; min-height: 70px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--grau); }
label.schalter { flex-direction: row; align-items: center; gap: 8px; font-size: .9rem; color: var(--navy); font-weight: 500; white-space: nowrap; }
.raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.raster .breit { grid-column: 1 / -1; }
.raster3 { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 12px; }

/* ---------------- Ansichten */
main#app { padding: 18px 20px 40px; }
.view > h2 { font-size: 1.4rem; margin-bottom: 14px; }

.kennzahlen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(240px, 1.6fr); gap: 10px; margin-bottom: 14px; }
.kz { background: #fff; border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--schatten); min-width: 0; }
.kz .w { font-size: 1.35rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.kz .l { font-size: .78rem; color: var(--grau); font-weight: 500; }
.kz.warn .w { color: var(--rot); }
.kz.ziel .balken { height: 8px; background: var(--gruen-hh); border-radius: 99px; overflow: hidden; display: flex; margin: 6px 0 4px; }
.kz.ziel .balken span { display: block; height: 100%; }
.kz.ziel .b1 { background: var(--gruen-d); }
.kz.ziel .b2 { background: var(--gruen); }
.kz.ziel .b3 { background: var(--gruen-h); }
.kz.ziel .leg { font-size: .72rem; color: var(--grau); display: flex; gap: 10px; flex-wrap: wrap; }
.kz.ziel .leg i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

.board-werkzeuge { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.board-werkzeuge input[type=search] { max-width: 320px; }
.board-werkzeuge select { max-width: 240px; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; min-height: 60vh; }
.spalte { background: #eaeae6; border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 200px; }
.spalte.drop { outline: 2px dashed var(--gruen); background: var(--gruen-hh); }
.spalte-kopf { padding: 10px 12px 8px; border-bottom: 1px solid #dcdcd7; }
.spalte-kopf .t { font-weight: 700; display: flex; justify-content: space-between; gap: 6px; }
.spalte-kopf .t small { color: var(--grau); font-weight: 500; }
.spalte-kopf .t-r { display: flex; align-items: center; gap: 4px; }
.stift { background: none; border: 0; cursor: pointer; color: var(--grau); padding: 0 4px; border-radius: 4px; font-size: .9rem; opacity: 0; transition: opacity .15s; }
.spalte:hover .stift { opacity: 1; }
.stift:hover { background: #dcdcd7; color: var(--navy); }
.spalte-neu { border: 2px dashed #cfcfca; background: transparent; border-radius: var(--radius); min-height: 120px; color: var(--grau); font-weight: 600; cursor: pointer; align-self: stretch; max-height: 200px; }
.spalte-neu:hover { border-color: var(--gruen); color: var(--gruen-d); background: var(--gruen-hh); }
.ph-kopf, .ph-zeile { display: grid; grid-template-columns: 54px minmax(0, 1.4fr) 64px minmax(0, 1.4fr) 76px 28px; gap: 6px; align-items: center; }
.ph-kopf { font-size: .74rem; color: var(--grau); font-weight: 600; }
.ph-zeile { margin-bottom: 6px; }
.ph-zeile.entfernt { background: var(--rot-h); border-radius: 8px; padding: 6px 0; font-size: .85rem; color: var(--rot); }
.ph-zeile .x { background: none; border: 0; cursor: pointer; color: var(--grau); font-size: 1.1rem; }
.ph-zeile .x:hover { color: var(--rot); }
.ph-pfeile { display: flex; gap: 2px; }
.ph-pfeile button { border: 1px solid var(--linie); background: #fff; border-radius: 6px; width: 24px; height: 30px; cursor: pointer; padding: 0; }
.ph-pfeile button:disabled { opacity: .35; cursor: default; }
.spalte-kopf .s { font-size: .78rem; color: var(--grau); margin-top: 2px; }
.spalte-kopf .pfeil { height: 3px; border-radius: 99px; background: var(--gruen-h); margin-top: 8px; overflow: hidden; }
.spalte-kopf .pfeil span { display: block; height: 100%; background: var(--gruen); }
.karten { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 60px; }
.karte { background: #fff; border-radius: 8px; padding: 10px 11px; box-shadow: var(--schatten); cursor: pointer; border-left: 3px solid transparent; position: relative; user-select: none; -webkit-user-select: none; }
.karte:hover { box-shadow: 0 2px 4px rgba(23,35,60,.08), 0 6px 16px rgba(23,35,60,.1); }
.karte.ziehen { opacity: .45; }
.karte.stillstand { border-left-color: var(--orange); }
.karte .kt { font-weight: 700; line-height: 1.25; padding-right: 18px; }
.karte .ks { font-size: .82rem; color: var(--grau); margin-top: 1px; }
.karte .ke { font-size: .85rem; margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; }
.karte .ke .wert { font-weight: 700; white-space: nowrap; }
.karte .mailpunkt { position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; color: var(--blau); }
.karte .mailpunkt::after { content: ""; position: absolute; top: -2px; right: -3px; width: 8px; height: 8px; background: var(--orange); border-radius: 50%; border: 2px solid #fff; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--offwhite); color: var(--navy); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip.geplant { background: var(--gruen-hh); color: var(--gruen-d); }
.chip.heute { background: #fff1c7; color: #7a5600; }
.chip.ueberfaellig { background: var(--rot-h); color: var(--rot); }
.chip.keiner { background: #fdeee4; color: #9a4c19; }
.chip.typ { background: #eef2f7; color: #3b4d6b; }
.karte .kf { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.karte .alter { font-size: .72rem; color: var(--grau); margin-left: auto; }
.leer-spalte { color: var(--grau); font-size: .85rem; text-align: center; padding: 18px 6px; }

/* ---------------- Panel (Deal-Detail) */
.schleier { position: fixed; inset: 0; background: rgba(23,35,60,.28); z-index: 40; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--offwhite); z-index: 50; box-shadow: -10px 0 30px rgba(23,35,60,.18); display: flex; flex-direction: column; }
.panel-kopf { background: #fff; padding: 16px 20px 12px; border-bottom: 1px solid var(--linie); padding-top: calc(16px + env(safe-area-inset-top)); }
.panel-kopf .zeile1 { display: flex; gap: 10px; align-items: flex-start; }
.panel-kopf h2 { font-size: 1.35rem; flex: 1; line-height: 1.25; }
.panel-kopf .unter { color: var(--grau); margin-top: 2px; font-size: .92rem; }
.panel-kopf .aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.zu { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--grau); padding: 2px 6px; border-radius: 6px; }
.zu:hover { background: var(--offwhite); }
.phasen { display: flex; gap: 3px; margin-top: 12px; }
.phasen button { flex: 1; border: 0; background: #e6e6e1; padding: 6px 4px; font-size: .74rem; font-weight: 600; cursor: pointer; color: var(--grau); clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%, 7px 50%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phasen button:first-child { clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.phasen button.erreicht { background: var(--gruen-h); color: var(--gruen-d); }
.phasen button.aktuell { background: var(--gruen); color: #fff; }
.status-band { margin-top: 10px; padding: 8px 12px; border-radius: 8px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.status-band.won { background: var(--gruen-hh); color: var(--gruen-d); }
.status-band.lost { background: var(--rot-h); color: var(--rot); }
.panel-body { overflow-y: auto; flex: 1; padding: 16px 20px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-content: start; }
.panel-body .haupt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-body .seite { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.box { background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); padding: 14px; }
.box h3 { font-size: .95rem; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.box h3 .link { font-size: .82rem; }
.feldliste { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: .88rem; }
.feldliste dt { color: var(--grau); }
.feldliste dd { margin: 0; overflow-wrap: anywhere; }
.feldliste dd a { text-decoration: none; }
.wertbox .gross { font-size: 1.5rem; font-weight: 700; }
.wertbox .klein { color: var(--grau); font-size: .82rem; }
.einheiten-tab { width: 100%; border-collapse: collapse; font-size: .88rem; }
.einheiten-tab td { padding: 3px 0; }
.einheiten-tab td.r { text-align: right; white-space: nowrap; }

/* Composer */
.composer .typen { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.composer .typen button { border: 1px solid var(--linie); background: #fff; border-radius: 99px; padding: 4px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--grau); }
.composer .typen button.aktiv { background: var(--navy); color: #fff; border-color: var(--navy); }
.composer .unten { display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.composer .unten input[type=datetime-local] { width: auto; }
.composer input.betreff { margin-bottom: 6px; }

/* Schritte */
.schritt { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.schritt:last-child { border-bottom: 0; }
.schritt input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gruen); flex-shrink: 0; cursor: pointer; }
.schritt .st { flex: 1; min-width: 0; }
.schritt .st .t { font-weight: 600; }
.schritt .st .d { font-size: .8rem; color: var(--grau); }
.schritt .st .d.ueberfaellig { color: var(--rot); font-weight: 600; }
.schritt .st .d.heute { color: #7a5600; font-weight: 600; }
.schritt .x { background: none; border: 0; color: var(--grau); cursor: pointer; font-size: 1.1rem; padding: 2px 6px; border-radius: 6px; }
.schritt .x:hover { background: var(--offwhite); color: var(--rot); }
.schritt-neu { display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin-top: 10px; }
.schritt-neu .schnell { grid-column: 1 / -1; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.schritt-neu .schnell button[data-tage] { border: 1px solid var(--linie); background: #fff; border-radius: 6px; padding: 3px 8px; font-size: .78rem; cursor: pointer; }
.schritt-neu .schnell button[data-tage].aktiv { border-color: var(--gruen); background: var(--gruen-hh); color: var(--gruen-d); font-weight: 600; }
.schritt-neu .schnell input { width: auto; padding: 3px 6px; font-size: .82rem; }
.leer-hinweis { background: #fdeee4; color: #9a4c19; border-radius: 8px; padding: 8px 10px; font-size: .88rem; font-weight: 500; }

/* Zeitverlauf */
.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-chips button { border: 0; background: var(--offwhite); border-radius: 99px; padding: 3px 10px; font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--grau); }
.filter-chips button.aktiv { background: var(--navy); color: #fff; }
.zeitleiste { position: relative; margin-top: 6px; }
.zeitleiste::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--linie); }
.ereignis { position: relative; display: flex; gap: 12px; padding: 8px 0; }
.ereignis .ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; z-index: 1; background: #fff; border: 2px solid var(--linie); color: var(--grau); }
.ereignis .ico svg { width: 16px; height: 16px; }
.ereignis.notiz .ico { border-color: #e9cf7a; color: #8a6a00; background: #fff8de; }
.ereignis.anruf .ico, .ereignis.termin .ico { border-color: var(--gruen-h); color: var(--gruen-d); background: var(--gruen-hh); }
.ereignis.email_in .ico { border-color: var(--blau-h); color: var(--blau); background: #eef5fc; }
.ereignis.email_out .ico { border-color: var(--blau-h); color: var(--blau); background: #fff; }
.ereignis.aufgabe .ico { border-color: var(--gruen); color: #fff; background: var(--gruen); }
.ereignis .inhalt { flex: 1; min-width: 0; background: #fff; }
.ereignis .meta { font-size: .78rem; color: var(--grau); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ereignis .meta .art { font-weight: 700; color: var(--navy); }
.ereignis .meta .aktion { margin-left: auto; display: flex; gap: 8px; opacity: 0; transition: opacity .15s; }
.ereignis:hover .meta .aktion { opacity: 1; }
.ereignis .titel { font-weight: 600; margin-top: 1px; overflow-wrap: anywhere; }
.ereignis .text { font-family: var(--fs); font-weight: 300; font-size: .88rem; line-height: 1.65; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ereignis.email_in .text, .ereignis.email_out .text { color: #3f4c62; }
.ereignis.klein-e .inhalt { font-size: .85rem; color: var(--grau); }
.ereignis.klein-e .ico { width: 32px; height: 22px; border: 0; background: transparent; }
.ereignis.klein-e .ico::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--steel); }
.mailvoll { margin-top: 6px; background: var(--offwhite); border-radius: 8px; padding: 10px; font-family: var(--fs); font-weight: 300; font-size: .85rem; white-space: pre-wrap; max-height: 400px; overflow: auto; line-height: 1.6; }

/* Glocke */
.glocke-panel { position: fixed; top: calc(64px + env(safe-area-inset-top)); right: 14px; width: min(400px, calc(100vw - 28px)); max-height: 70vh; overflow-y: auto; background: #fff; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(23,35,60,.25); z-index: 60; }
.gp-kopf { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: #fff; }
.note { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--linie); cursor: pointer; }
.note:hover { background: var(--offwhite); }
.note.ungelesen { background: #f3f8f5; }
.note .punkt { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 7px; flex-shrink: 0; }
.note.ungelesen .punkt { background: var(--gruen); }
.note .nt { font-weight: 600; font-size: .9rem; }
.note .nx { font-size: .82rem; color: var(--grau); overflow-wrap: anywhere; }
.note .nz { font-size: .72rem; color: var(--steel); margin-top: 2px; }
.note-leer { padding: 24px; text-align: center; color: var(--grau); }

/* Heute */
.heute-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.heute-raster .box h3 .anz { background: var(--offwhite); border-radius: 99px; padding: 0 8px; font-size: .8rem; }
.heute-zeile { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--linie); }
.heute-zeile:last-child { border-bottom: 0; }
.heute-zeile .hz { flex: 1; min-width: 0; cursor: pointer; }
.heute-zeile .hz .t { font-weight: 600; }
.heute-zeile .hz .d { font-size: .82rem; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heute-zeile .kontakt-links { display: flex; gap: 4px; }
.heute-zeile .kontakt-links a { font-size: .8rem; text-decoration: none; border: 1px solid var(--linie); border-radius: 6px; padding: 2px 8px; color: var(--navy); }
.heute-zeile input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gruen); }
.alles-gut { color: var(--gruen-d); font-weight: 600; padding: 6px 0; }

/* Liste & Auswertung */
.tabelle-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); overflow-x: auto; }
table.liste { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.liste th { text-align: left; font-size: .78rem; color: var(--grau); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
table.liste td { padding: 10px 12px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.liste tr.klickbar { cursor: pointer; }
table.liste tr.klickbar:hover td { background: var(--offwhite); }
table.liste td.r, table.liste th.r { text-align: right; white-space: nowrap; }
.status { font-size: .75rem; font-weight: 700; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.status.open { background: #eef2f7; color: #3b4d6b; }
.status.won { background: var(--gruen-hh); color: var(--gruen-d); }
.status.lost { background: var(--rot-h); color: var(--rot); }
.liste-werkzeuge { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.liste-werkzeuge input { max-width: 320px; }
.liste-werkzeuge select { width: auto; }
.liste-werkzeuge .rechts { margin-left: auto; }
.auswertung-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.balkenzeile { display: grid; grid-template-columns: 170px 1fr 60px; gap: 10px; align-items: center; font-size: .88rem; padding: 4px 0; }
.balkenzeile .b { height: 10px; background: var(--offwhite); border-radius: 99px; overflow: hidden; }
.balkenzeile .b span { display: block; height: 100%; background: var(--gruen); border-radius: 99px; }
.balkenzeile .b.rot span { background: var(--orange); }

/* Einstellungen */
.einst-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; max-width: 1100px; }
table.preise { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.preise th { font-size: .78rem; color: var(--grau); text-align: left; padding: 4px; }
table.preise td { padding: 4px; }
table.preise input { text-align: right; }
.hinweis { font-size: .85rem; color: var(--grau); margin: 6px 0 0; }
.hinweis.fehler { color: var(--rot); font-weight: 600; }
.mailstatus { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.mailstatus .p { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.mailstatus.ok .p { background: var(--gruen); }
.mailstatus.aus .p { background: var(--orange); }

/* Dialog */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(23,35,60,.3); color: var(--navy); }
dialog::backdrop { background: rgba(23,35,60,.35); }
.dlg-kopf { padding: 16px 20px; border-bottom: 1px solid var(--linie); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-kopf h2 { font-size: 1.2rem; }
.dlg-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.dlg-body fieldset { border: 0; padding: 0; margin: 0; }
.dlg-body legend { font-weight: 700; margin-bottom: 8px; font-size: .95rem; }
.dlg-fuss { padding: 12px 20px; border-top: 1px solid var(--linie); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: #fff; }
.einheit-zeile { display: grid; grid-template-columns: 1.3fr 1.2fr 80px 100px 30px; gap: 6px; margin-bottom: 6px; align-items: center; }
.einheit-zeile .x { background: none; border: 0; cursor: pointer; color: var(--grau); font-size: 1.1rem; }
.einheit-kopf { display: grid; grid-template-columns: 1.3fr 1.2fr 80px 100px 30px; gap: 6px; font-size: .74rem; color: var(--grau); font-weight: 600; margin-bottom: 4px; }
.summe { font-size: .9rem; margin-top: 6px; color: var(--grau); }
.summe strong { color: var(--navy); }

/* Toasts */
.toasts { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-weight: 500; pointer-events: auto; cursor: pointer; max-width: 92vw; }
.toast.fehler { background: var(--rot); }

/* Login */
.login-box { max-width: 420px; margin: 12vh auto; background: #fff; border-radius: 14px; padding: 32px; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 14px; }
.login-box h1 { font-size: 1.8rem; }
.login-box .lead { font-family: var(--fs); font-weight: 300; color: var(--grau); margin: 0; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }

/* ---------------- Responsiv */
@media (max-width: 1200px) {
  .kennzahlen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kennzahlen .kz.ziel { grid-column: span 3; }
}
@media (max-width: 900px) {
  .panel-body { grid-template-columns: 1fr; }
  .heute-raster, .auswertung-raster, .einst-raster { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  header.top .innen { flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px 0; }
  header nav { order: 3; flex-basis: 100%; padding-bottom: 6px; }
  .marke .logo-wort { display: none; }
  .abmelden { display: none; }
  main#app { padding: 12px 12px 40px; }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kennzahlen .kz.ziel { grid-column: span 2; }
  .kennzahlen .kz.nurdesk { display: none; }
  .board { grid-auto-columns: 84vw; scroll-snap-type: x mandatory; }
  .spalte { scroll-snap-align: start; max-height: none; }
  .board-werkzeuge { flex-wrap: wrap; }
  .board-werkzeuge input[type=search], .board-werkzeuge select { max-width: none; flex: 1 1 45%; }
  .raster, .raster3 { grid-template-columns: 1fr; }
  .einheit-zeile, .einheit-kopf { grid-template-columns: 1fr 1fr 64px 76px 26px; }
  .panel-body { padding: 12px 12px 40px; }
  .panel-kopf { padding-left: 14px; padding-right: 14px; }
  .phasen button { font-size: .66rem; }
  .stift { opacity: 1; }
  .spalte-neu { max-height: 120px; }
  .ph-kopf { display: none; }
  .ph-zeile { grid-template-columns: 54px minmax(0, 1fr) 60px 28px; border-bottom: 1px solid var(--linie); padding-bottom: 8px; }
  .ph-zeile [name=auto_titel] { grid-column: 2 / 3; }
  .ph-zeile [name=auto_tage] { grid-column: 3 / 4; }
  .ereignis .meta .aktion { opacity: 1; }
  .balkenzeile { grid-template-columns: 120px 1fr 50px; }
  dialog { max-height: calc(100vh - 20px); }
}
