/* CRM – Grundfarbe (--red) wird aus Einstellungen → Firma gesetzt.
   Voreinstellung: Bussmann Corporate Design 2025, HKS 14 K Rot #c0292f, HKS 92 K Grau #6a6d6e
   Schrift: Nunito Sans (Condensed-Schnitte über die wdth-Achse) */
:root {
  --red: #c0292f;
  --red-dark: #9e1f25;
  --red-50: #fbeced;
  --red-100: #f6d4d5;
  --grey: #6a6d6e;
  --grey-dark: #3d3f40;
  --ink: #232526;
  --muted: #6a6d6e;
  --line: #e3e4e5;
  --line-strong: #cfd1d2;
  --bg: #f4f4f3;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ok: #2e7d4f;
  --ok-50: #e8f4ec;
  --warn: #b26a00;
  --warn-50: #fff4e0;
  --note: #fff8dc;
  --note-line: #efd98a;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);
  --font: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --sidebar: 220px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-stretch: 87.5%; font-weight: 800; margin: 0; letter-spacing: .1px; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: 64px 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--surface); border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 30; }
.topbar .brand { display: flex; align-items: center; width: calc(var(--sidebar) - 20px); }
.topbar .brand img { height: 40px; display: block; }
.topbar .search { flex: 1; max-width: 520px; position: relative; }
.topbar .search input { width: 100%; padding: 9px 12px 9px 40px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface-2); }
.topbar .search input:focus { outline: none; border-color: var(--red); background: #fff; }
.topbar .search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 40; }
.search-results a { display: block; padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.active { background: var(--red-50); text-decoration: none; }
.topbar .spacer { flex: 1; }
.topbar .user { display: flex; align-items: center; gap: 10px; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 64px; height: calc(100vh - 64px); display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; color: var(--grey-dark); font-weight: 700; font-stretch: 87.5%; font-size: 16px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a.active { background: var(--red-50); color: var(--red); }
.nav a .badge { margin-left: auto; }
.sidebar .foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px 12px; }
.main { padding: 24px 28px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin-right: auto; }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card > .card-head h2, .card > .card-head h3 { margin-right: auto; }
.card > .card-body { padding: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--ink); line-height: 1.2; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.danger { color: var(--red); border-color: var(--red-100); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.icon { padding: 7px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 6px 6px 0; }
.btn-group .btn.on { background: var(--grey-dark); border-color: var(--grey-dark); color: #fff; position: relative; z-index: 1; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; }
.badge.grey { background: var(--line); color: var(--grey-dark); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--line); color: var(--grey-dark); white-space: nowrap; }
.chip.t-Kommune { background: #e6eef7; color: #2a5a8a; }
.chip.t-Privat { background: #efe9f6; color: #5d3d86; }
.chip.t-Landwirt { background: #eaf3e3; color: #3f6b22; }
.chip.t-Gartenbau { background: #eef6d8; color: #4f6a12; }
.chip.t-Forst { background: #e3f0ea; color: #22573d; }
.chip.t-Gewerbe { background: #f6ece0; color: #8a5420; }
.chip.red { background: var(--red-50); color: var(--red); }
.chip.ok { background: var(--ok-50); color: var(--ok); }
.chip.warn { background: var(--warn-50); color: var(--warn); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--grey); flex: none; font-stretch: 87.5%; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ico.lg { width: 22px; height: 22px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* Formulare */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 700; color: var(--grey-dark); }
.field .req { color: var(--red); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; min-height: 38px;
}
textarea { min-height: 80px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-50); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--red); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line-strong); background: #fff; border-radius: 18px; padding: 6px 12px; cursor: pointer; font-weight: 700; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--red); border-color: var(--red); color: #fff; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 200px; position: relative; }
.toolbar .grow input { padding-left: 40px; }
.toolbar .grow .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar select { width: auto; }

/* Tabelle */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 800; padding: 10px 12px; border-bottom: 2px solid var(--line); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
table.list td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover { background: var(--red-50); }
table.list td.name { font-weight: 800; }
.list-foot { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 13px; color: var(--muted); }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.stat .num { font-size: 28px; font-weight: 900; font-stretch: 87.5%; line-height: 1; }
.stat .lbl { font-size: 13px; color: var(--muted); font-weight: 700; }
.stat .ic { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--grey); }
.stat.alert .ic { background: var(--red-50); color: var(--red); }
.stat.alert .num { color: var(--red); }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.dash .side { display: flex; flex-direction: column; gap: 18px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.week .day { border-right: 1px solid var(--line); min-height: 260px; display: flex; flex-direction: column; }
.week .day:last-child { border-right: 0; }
.week .day-head { padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.week .day-head .dn { font-size: 12px; text-transform: uppercase; font-weight: 800; color: var(--muted); letter-spacing: .4px; }
.week .day-head .dd { font-size: 20px; font-weight: 900; font-stretch: 87.5%; }
.week .day.today .day-head { background: var(--red); color: #fff; }
.week .day.today .day-head .dn { color: rgba(255,255,255,.85); }
.week .day.weekend { background: #fcfcfc; }
.week .day-body { padding: 6px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.week .day-body.drop { background: var(--red-50); }
.ev { border-left: 3px solid var(--grey); background: var(--surface-2); border-radius: 4px; padding: 5px 7px; font-size: 12.5px; cursor: pointer; line-height: 1.3; overflow: hidden; }
.ev:hover { background: #f0f0f0; }
.ev .t { font-weight: 800; color: var(--muted); font-size: 11.5px; }
.ev .ttl { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev .who { font-size: 11px; color: var(--muted); }
.ev.done { opacity: .55; }
.ev.done .ttl { text-decoration: line-through; }
.ev.k-termin { border-left-color: var(--red); background: var(--red-50); }
.ev.k-besuch { border-left-color: #3f6b22; background: #eef5e8; }
.ev.k-anruf { border-left-color: #2a5a8a; background: #e9f0f8; }
.ev.k-wartung { border-left-color: #5b6b78; background: #eef1f4; }
.ev.k-angebot { border-left-color: #b26a00; background: #fdf3e2; }
.ev.bday { border-left-color: #c2185b; background: #fce8f1; cursor: pointer; }
.ev.overdue { box-shadow: inset 0 0 0 1px var(--red); }

.tasklist { list-style: none; margin: 0; padding: 0; }
.tasklist li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tasklist li:last-child { border-bottom: 0; }
.tasklist li:hover { background: var(--surface-2); }
.tasklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; flex: none; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-top: 1px; padding: 0; color: transparent; }
.tasklist .tick:hover { border-color: var(--ok); color: var(--ok); }
.tasklist .tick.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.tasklist .body { flex: 1; min-width: 0; }
.tasklist .ttl { font-weight: 700; }
.tasklist .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; align-items: center; }
.tasklist .due.over { color: var(--red); font-weight: 800; }
.tasklist .due.today { color: var(--warn); font-weight: 800; }
.group-title { padding: 8px 14px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.group-title.red { color: var(--red); }
.group-title.fold { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; font-family: inherit; }
.group-title.fold:hover { filter: brightness(.97); }
.fold-arrow { display: inline-block; transition: transform .15s; }
.group-title.closed .fold-arrow { transform: rotate(-90deg); }
.bdays li { cursor: pointer; }
.bday-ico { width: 34px; height: 34px; border-radius: 50%; background: #fce8f1; color: #c2185b; display: flex; align-items: center; justify-content: center; flex: none; font-size: 17px; }

/* ---------- Kundenakte ---------- */
.cust-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cust-head .title { margin-right: auto; min-width: 0; }
.cust-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cust { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; gap: 12px; padding: 8px 0; align-items: flex-start; word-break: break-word; }
.facts li .ico { color: var(--muted); margin-top: 2px; }
.facts li .k { font-size: 12px; color: var(--muted); font-weight: 700; display: block; }
.section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 16px 0 4px; }
.section-title:first-child { margin-top: 0; }
.infobox { background: var(--note); border: 1px solid var(--note-line); border-radius: var(--radius); margin-bottom: 18px; }
.infobox .card-head { border-bottom: 1px solid var(--note-line); display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.infobox .card-head h3 { margin-right: auto; display: flex; gap: 8px; align-items: center; }
.infobox textarea { border: 0; background: transparent; min-height: 90px; padding: 12px 14px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: none !important; font-size: 15px; }
.infobox .view { padding: 12px 14px; min-height: 44px; white-space: pre-wrap; cursor: text; }
.infobox .view.empty-note { color: #9a8a4a; font-style: italic; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 10px; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 800; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-stretch: 87.5%; font-size: 16px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--red); border-bottom-color: var(--red); }

.composer { padding: 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.composer .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.followups { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.followup { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px; background: #fff; position: relative; }
.followup .x { position: absolute; top: 6px; right: 6px; }
.followup .grid { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px 110px; gap: 10px; }
.followup .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 10px; align-items: center; }

.timeline { list-style: none; margin: 0; padding: 8px 16px 16px; position: relative; }
.timeline .day-sep { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 14px 0 6px 52px; }
.timeline .it { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; position: relative; padding: 6px 0; }
.timeline .it::before { content: ''; position: absolute; left: 19px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline .dot { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--line); color: var(--grey); position: relative; z-index: 1; }
.timeline .it.k-besuch .dot { border-color: #3f6b22; color: #3f6b22; background: #eef5e8; }
.timeline .it.k-telefonat .dot { border-color: #2a5a8a; color: #2a5a8a; background: #e9f0f8; }
.timeline .it.k-termin .dot { border-color: var(--red); color: var(--red); background: var(--red-50); }
.timeline .it.k-email .dot { border-color: #5d3d86; color: #5d3d86; background: #efe9f6; }
.timeline .it.k-system .dot { width: 28px; height: 28px; margin: 6px; border-width: 1px; }
.timeline .it.k-system .box { background: none; border: 0; padding: 10px 0 0; font-size: 13px; color: var(--muted); box-shadow: none; }
.timeline .box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.timeline .box .hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.timeline .box .hd b { color: var(--ink); }
.timeline .box .hd .acts { margin-left: auto; display: flex; gap: 2px; }
.timeline .box .linked { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.timeline .box .linked a { font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.files-drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); margin: 16px; cursor: pointer; }
.files-drop.over { border-color: var(--red); background: var(--red-50); color: var(--red); }

/* ---------- Kalender ---------- */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .dow { padding: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.month .cell { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.month .cell:nth-child(7n) { border-right: 0; }
.month .cell.other { background: #fafafa; }
.month .cell.other .num { color: #bbb; }
.month .cell .num { font-weight: 800; font-size: 13px; padding: 2px 4px; align-self: flex-start; border-radius: 10px; }
.month .cell.today .num { background: var(--red); color: #fff; }
.month .ev { padding: 2px 5px; font-size: 11.5px; }
.month .ev .ttl { -webkit-line-clamp: 1; }
.month .more { font-size: 11px; color: var(--muted); padding-left: 4px; }

/* ---------- Modal / Toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(30,32,33,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; border-top: 4px solid var(--red); }
.modal.wide { max-width: 980px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin-right: auto; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 10px 10px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--grey-dark); color: #fff; padding: 10px 18px; border-radius: 6px; box-shadow: var(--shadow-lg); font-weight: 700; animation: pop .2s ease; }
.toast.err { background: var(--red); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 360px; max-height: 70vh; overflow-y: auto; z-index: 50; }
.dropdown .item { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.dropdown .item.unread { background: var(--red-50); }
.dropdown .item:hover { background: var(--surface-2); }
.rel { position: relative; }
.picker-results { border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; max-height: 200px; overflow-y: auto; }
.picker-results div { padding: 7px 10px; cursor: pointer; font-size: 14px; }
.picker-results div:hover { background: var(--red-50); }
.selected-cust { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 6px; min-height: 38px; }
.selected-cust a { margin-right: auto; font-weight: 700; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--muted); font-weight: 700; }
.callout { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.callout.warn { background: var(--warn-50); border-color: #f0d199; }
.callout.info { background: #eef3f8; border-color: #cfdcea; }
code.url { display: block; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; word-break: break-all; font-size: 13px; }
.steps { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.steps li { margin: 3px 0; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(180deg, #fff 0, #fff 45%, var(--bg) 45%); }
.login .box { width: 100%; max-width: 400px; }
.login .logo { text-align: center; margin-bottom: 26px; }
.login .logo img { max-width: 300px; width: 100%; }
.login .card-body { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.login .slogan { text-align: center; color: var(--muted); font-weight: 700; font-stretch: 87.5%; margin-top: 6px; }

/* ---------- Mobil ---------- */
.mobile-nav { display: none; }
@media (max-width: 1200px) {
  .dash { grid-template-columns: 1fr; }
  .cust { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 58px 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar .brand { width: auto; }
  .topbar .brand img { height: 30px; }
  .topbar .user .uname { display: none; }
  .main { padding: 16px 14px 90px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .week { grid-template-columns: 1fr; }
  .week .day { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .week .day-head { display: flex; gap: 8px; align-items: baseline; }
  .week .day-body:empty { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .followup .grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 11px; font-weight: 700; color: var(--grey); }
  .mobile-nav a.active { color: var(--red); }
  .hide-m { display: none !important; }
  .month .cell { min-height: 70px; }
  .month .ev .ttl { font-size: 10px; }
  .dropdown { position: fixed; left: 8px; right: 8px; width: auto; top: 64px; }
  .modal-bg { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; }
}
@media (max-width: 560px) {
  .topbar .search { display: none; }
  .topbar .spacer { display: block; }
}
@media print { .sidebar, .topbar, .mobile-nav, .btn { display: none !important; } .shell { display: block; } }
.kv > .chip { justify-self: start; }
@media (min-width: 861px) { .shell { background: linear-gradient(to right, var(--surface) calc(var(--sidebar) - 1px), var(--line) calc(var(--sidebar) - 1px), var(--line) var(--sidebar), var(--bg) var(--sidebar)); } }

/* Bilder an Aufgaben */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .doc { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: 12px; text-align: center; word-break: break-all; color: var(--grey-dark); cursor: pointer; }
.thumb .del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; opacity: .85; }
.thumb .del .ico { width: 14px; height: 14px; }
.thumb .del:hover { background: var(--red); opacity: 1; }
.section-title .btn { text-transform: none; letter-spacing: 0; color: var(--ink); }
.bulkbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--red-50); border-bottom: 1px solid var(--red-100); font-weight: 700; }
.c-sel, #c-all { width: 17px; height: 17px; accent-color: var(--red); cursor: pointer; }

/* Kundenliste: Interessenten grün, Filter, Kontakt-Reiter */
:root { --lead: #e6f4e1; --lead-hover: #d6edcf; --lead-ink: #2f6b1f; }
table.list tbody tr.lead { background: var(--lead); }
table.list tbody tr.lead:hover { background: var(--lead-hover); }
table.list tbody tr.lead td:first-child { box-shadow: inset 4px 0 0 #5aa34a; }
.chip.lead { background: #cfe9c6; color: var(--lead-ink); }
.chip-btn { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; vertical-align: middle; }
.chip-btn:hover { filter: brightness(.95); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 14px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; }
.legend .sw.lead { background: var(--lead); box-shadow: inset 3px 0 0 #5aa34a; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters select { width: auto; }
.filters select.active { border-color: var(--red); color: var(--red); font-weight: 700; }
.seg button.lead-btn.on { background: #5aa34a; border-color: #5aa34a; }
.ctabs { overflow-x: auto; flex-wrap: nowrap; }
.ctabs button { white-space: nowrap; font-size: 15px; }
.bulkbar { flex-wrap: wrap; }
.buyer-check { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.parts { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line-strong); border-radius: 18px; cursor: pointer; font-size: 13px; font-weight: 700; background: #fff; user-select: none; }
.pchip input { display: none; }
.pchip:has(input:checked) { background: var(--red-50); border-color: var(--red); color: var(--red); }
.pchip.hidden { display: none; }

/* Schlagworte */
.chip.tagchip { background: #eef0f2; color: var(--grey-dark); font-weight: 700; }
.chip.tagchip .ico { width: 12px; height: 12px; }
.chip.tagchip.xs { font-size: 11px; padding: 1px 7px; }
button.chip.tagchip { border: 1px dashed var(--line-strong); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.tagrow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; font-weight: 400; }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
/* Maschinen */
.machines { display: flex; flex-direction: column; }
.machine { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.machine:hover { background: var(--surface-2); }
.machine .mi { width: 40px; height: 40px; border-radius: 8px; background: var(--red-50); color: var(--red); display: grid; place-items: center; flex: none; }
.machine .mb { flex: 1; min-width: 0; }
.machine .mt { font-weight: 800; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.machine .meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.svc { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; color: var(--grey-dark); }
.svc.soon { color: var(--warn); }
.svc.over { color: var(--red); }
/* Karten */
.cmap { height: 190px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.mapwrap { display: grid; grid-template-columns: 1fr 300px; gap: 14px; }
.mapcard { position: relative; overflow: hidden; }
#bigmap { height: calc(100vh - 250px); min-height: 420px; z-index: 0; }
.map-legend { position: absolute; left: 10px; bottom: 22px; z-index: 500; background: rgba(255,255,255,.94); border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 12px; box-shadow: var(--shadow); max-width: calc(100% - 20px); }
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.tour { display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 420px; }
.tour #tour-list { flex: 1; overflow: auto; }
.tourlist { margin: 0; padding: 6px 12px 6px 34px; }
.tourlist li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: flex-start; justify-content: space-between; }
.tourlist .acts { display: flex; flex: none; }
.tourlist .acts .ico { transform: rotate(90deg); }
.tourlist .acts [data-rm] .ico { transform: none; }
.tour-foot { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tour { position: relative; }
.tour-saved { padding: 10px 12px 0; }
.tour-mark { pointer-events: none; }
.ti-tbl { width: 100%; }
.ti-tbl td { vertical-align: middle; padding: 6px 8px; }
.ti-tbl select { width: 100%; }
.ti-tbl tr.ti-check td { background: #fff8e6; }
.ti-tbl tr.ti-none td { background: #fbeeee; }
#ti-text { width: 100%; font-family: inherit; }
.tour-mark span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #1f1f1f; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.35); color: #fff; font: 800 12px/1 'Nunito Sans', sans-serif; text-shadow: 0 1px 2px rgba(0,0,0,.5); box-sizing: border-box; }
.tour-saved { display: flex; flex-direction: column; gap: 2px; }
.tour-saved select { width: 100%; }
.tour-menu { position: absolute; right: 12px; bottom: 60px; z-index: 500; display: flex; flex-direction: column; padding: 6px; min-width: 230px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.tour-menu button { display: flex; gap: 8px; align-items: center; background: none; border: 0; padding: 9px 10px; text-align: left; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.tour-menu button:hover { background: var(--surface-2); }
.tour-menu button.danger { color: var(--red); }
.btn.primary-soft { border-color: var(--red); color: var(--red); }
.btn.disabled { opacity: .45; pointer-events: none; }
.mpop { font-family: var(--font); font-size: 13px; line-height: 1.45; min-width: 210px; }
.mpop b { font-size: 14px; }
.mpop-acts { display: flex; gap: 6px; margin-top: 8px; }
.mpop-acts .btn { color: var(--ink); }
.mpop-acts .btn.primary { color: #fff; }
.grow-s input { width: 180px; }
@media (max-width: 860px) {
  .mapwrap { grid-template-columns: 1fr; }
  #bigmap { height: 60vh; min-height: 320px; }
  .tour { min-height: 0; max-height: none; }
}

.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 3000; background: var(--ink); color: #fff; padding: 10px 12px 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; font-size: 14px; max-width: calc(100% - 24px); }
@media (max-width: 860px) { .update-bar { bottom: 80px; } }

/* Abwesenheiten */
.ev.absence { border-left-color: #8a8d8f; background: repeating-linear-gradient(135deg, #f1f1f0, #f1f1f0 6px, #e7e8e8 6px, #e7e8e8 12px); color: var(--grey-dark); font-weight: 700; }
.ev.absence.k-abs-urlaub { border-left-color: #1f8fbf; background: repeating-linear-gradient(135deg, #e6f3fa, #e6f3fa 6px, #d8ecf6 6px, #d8ecf6 12px); }
.ev.absence.k-abs-krank { border-left-color: #b26a00; background: repeating-linear-gradient(135deg, #fff4e0, #fff4e0 6px, #fbead0 6px, #fbead0 12px); }
.month .cell.away { background: repeating-linear-gradient(135deg, #fafafa, #fafafa 8px, #f2f3f3 8px, #f2f3f3 16px); }
.callout.warn { background: var(--warn-50); color: var(--warn); border-color: #f0d199; }

.mi-map { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; background: var(--surface-2); }
.mi-map summary { cursor: pointer; font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.mi-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 14px; margin-top: 10px; }
.mi-map-grid label { display: grid; grid-template-columns: 100px 1fr; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; }
.mi-map-grid label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-map-grid select { padding: 5px 8px; font-size: 13px; }
.mi-map-grid select.unmapped { border-color: var(--warn); background: var(--warn-50); }

/* Verkäufe */
.period { display: inline-flex; align-items: center; gap: 6px; }
.period b { min-width: 130px; text-align: center; font-size: 16px; }
table.list th.num, table.list td.num { text-align: right; }
table.list tfoot td { border-top: 2px solid var(--line); padding-top: 10px; padding-bottom: 10px; }
table.list.plain tbody tr { cursor: default; }
table.list.plain tbody tr[data-user] { cursor: pointer; }
.chip.sale { background: #eaf3e3; color: #3f6b22; }
.chip.buy { background: #e6eef7; color: #2a5a8a; }
.pct { display: inline-block; font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 10px; background: var(--line); color: var(--grey-dark); }
.pct.pos { background: #eaf3e3; color: #3f6b22; } .pct.mid { background: #fff4d6; color: #8a6200; } .pct.neg { background: #fbe6e6; color: #a51e24; }
.stat.good .ic { background: #eaf3e3; color: #3f6b22; }
.money { position: relative; } .money input { padding-right: 28px; text-align: right; } .money span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.db-box { padding: 8px 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); min-height: 38px; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.db-box .neg { color: #a51e24; }
@media (max-width: 860px) { .stat .num { font-size: 22px; } }
.stats > .stat { min-width: 0; }
.show-m-only { display: none; }
@media (max-width: 860px) { .show-m-only { display: block; } table.list td .pct { margin-top: 3px; } }

/* Verkaufsprojekte */
.kpis { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 6px; padding: 10px 12px; min-width: 0; }
.kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 800; }
.kpi .v { font-size: 20px; font-weight: 900; font-stretch: 87.5%; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.alert { background: var(--red-50); } .kpi.alert .v { color: var(--red); }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
table.list.projects td { font-size: 13.5px; }
table.list.projects th[data-k] { cursor: pointer; user-select: none; white-space: nowrap; }
table.list tbody tr.p-won { background: #f1f8ec; } table.list tbody tr.p-lost td { color: #999; }
.pstat { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px; font-weight: 800; background: var(--line); white-space: nowrap; }
.pstat.hot { background: #fbe6e6; color: #a51e24; } .pstat.won { background: #e3f1e4; color: #2e7d32; } .pstat.lost { background: #eee; color: #888; text-decoration: line-through; } .pstat.paused { background: #f1f1f1; color: #888; }
.ampel { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: transparent; vertical-align: -1px; }
.ampel.rot { background: #c0292f; box-shadow: 0 0 0 3px #f6d4d5; } .ampel.gelb { background: #e8a800; box-shadow: 0 0 0 3px #fbecc0; } .ampel.gruen { background: #3f8f2e; box-shadow: 0 0 0 3px #d6ebd0; }
.form-grid .sec { font-weight: 900; color: var(--red); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--red); padding-bottom: 3px; margin-top: 4px; }
.callout.ok { background: #eef7ea; border-color: #b9dbab; color: #2e5e1c; }
.offer-drop { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 2px dashed var(--red-100); border-radius: var(--radius); background: var(--red-50); cursor: pointer; transition: background .15s, border-color .15s; }
.offer-drop:hover, .offer-drop.over, .offer-drop:focus-visible { background: var(--red-50); border-color: var(--red); outline: none; }
.offer-drop.busy { opacity: .6; cursor: progress; }
.offer-drop .offer-ico { color: var(--red); flex: none; }
.ai-filled { background: #fff8d6 !important; border-color: #e8c95a !important; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-tag { font-weight: 900; color: var(--red); }
td .wrap { white-space: normal; max-width: 220px; }
.hide-l-only { display: none; }
@media (max-width: 1500px) { .hide-l { display: none; } .hide-l-only { display: block; } }
.more-links { display: flex; gap: 10px; flex-wrap: wrap; } .more-links .btn { flex: 1; justify-content: center; }

/* Gebrauchtmaschinen */
.tabs-page { margin-bottom: 14px; }
.page-head + .tabs { margin: -4px 0 14px; padding: 0; }
.tabs a { padding: 10px 14px; font-weight: 800; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; font-size: 15px; }
.tabs a.on { color: var(--red); border-bottom-color: var(--red); }
.kpis.kpis-6 { grid-template-columns: repeat(6, 1fr); }
.kpi.alert.ok { background: #eef7ea; border-left-color: #4c8c2b; } .kpi.alert.ok .v { color: #3f6b22; }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 5px; display: block; background: var(--surface-2); }
.empty-thumb { display: flex; align-items: center; justify-content: center; color: #b5b7b8; border: 1px dashed var(--line); }
tr.click { cursor: pointer; }
.ustat { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 10px; background: #eaf3e3; color: #3f6b22; }
.ustat.reserviert { background: #fff4d6; color: #8a6200; } .ustat.verkauft { background: var(--line); color: var(--grey-dark); }
.warn-t { color: #a06a00; }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.ph-item { position: relative; flex: none; }
.ph-item img { width: 150px; height: 112px; object-fit: cover; border-radius: 6px; display: block; cursor: zoom-in; }
.ph-badge { position: absolute; left: 6px; bottom: 6px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 8px; }
.ph-del, .ph-first { position: absolute; top: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.ph-del { right: 5px; } .ph-first { left: 5px; font-size: 14px; }
.ph-del .ico { width: 14px; height: 14px; }
.ph-add { flex: none; width: 150px; height: 112px; border: 2px dashed var(--red-100); border-radius: 6px; background: var(--red-50); color: var(--red); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-weight: 700; font-size: 13px; text-align: center; padding: 6px; }
.ph-add:hover { background: var(--red-100); }
@media (max-width: 1100px) { .kpis.kpis-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .kpis.kpis-6 { grid-template-columns: repeat(2, 1fr); } .ph-item img, .ph-add { width: 120px; height: 90px; } }

/* Kopplung Projekt <-> Gebrauchte / Suchauftrag */
.used-link { display: flex; gap: 12px; align-items: center; }
.used-link .grow, .match-row .grow { flex: 1; min-width: 0; }
.match-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.thumb.sm { width: 48px; height: 36px; }
.web-btn { margin: 2px 2px 2px 0; }
#pf-used .callout + .callout { margin-top: 8px; }

/* netto / brutto */
.vat-tg { display: inline-flex; margin-left: 6px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.vat-tg button { border: 0; background: transparent; font: inherit; font-size: 11px; font-weight: 700; padding: 1px 8px; color: var(--muted); cursor: pointer; }
.vat-tg button.on { background: var(--red, #c0292f); color: #fff; }
.vat-hint { font-size: 12px; color: var(--muted); margin-top: 3px; text-align: right; min-height: 15px; }

.homepage-box { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.homepage-box .check { margin-bottom: 4px; }

.ti-excel { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

.ev .ttl .rep svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 3px; opacity: .7; }

/* Saison-Aktionen */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.camp { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.camp.off { opacity: .6; }
.camp.running { border-color: var(--ok, #2e7d32); }
.camp-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.camp-head h3 { margin: 2px 0 0; font-size: 17px; }
.camp-when { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.camp-bar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin: 4px 0; }
.camp-bar span { text-align: center; font-size: 10px; font-weight: 700; padding: 3px 0; border-radius: 3px; background: var(--surface-2); color: var(--muted); }
.camp-bar span.on { background: var(--red); color: #fff; }
.camp-bar span.now { outline: 2px solid var(--text, #222); outline-offset: -2px; }
.camp-desc { white-space: pre-wrap; }
.camp-count { margin-top: 4px; font-size: 13px; }
.camp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 12px; }
.camp .chip { white-space: normal; max-width: 100%; }
.chip.soc { background: #e8f0fe; color: #1a56c4; }

/* Firmen-Schriftzug, wenn kein Logo hochgeladen ist */
.logo-text { font-weight: 900; font-stretch: 87.5%; color: var(--red); font-size: 22px; line-height: 1.1; letter-spacing: .2px; }
.brand .logo-text { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; display: inline-block; vertical-align: middle; }
.login .logo .logo-text { font-size: 30px; display: block; margin-bottom: 4px; }
.co-logo { min-height: 48px; display: flex; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.co-logo img { max-height: 56px; max-width: 240px; display: block; }

/* Zusatzkosten und Aufschlag-Rechner (Maschinen) */
.calc-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.cost-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.cost-add { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.calc-sum { padding: 8px 0; border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); margin-bottom: 10px; }
.markup { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.markup .pct-in { width: 90px; }
@media (max-width: 640px) { .cost-row { grid-template-columns: 1fr 110px auto; } }

/* Angebote */
.opos { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.opos-nr { width: 22px; font-weight: 800; color: var(--muted); padding-top: 8px; }
.opos-main { flex: 1; min-width: 0; }
.opos-top { display: flex; gap: 8px; align-items: flex-start; }
.opos-top textarea { flex: 1; min-height: 38px; resize: vertical; font-family: inherit; }
.opos-top input.opos-art { width: 90px; flex: 0 0 90px; }
.opos-top textarea { width: auto; flex: 1 1 auto; }
.opos-nums { display: flex; gap: 10px; align-items: flex-end; margin-top: 6px; flex-wrap: wrap; }
.opos-nums label { font-size: 12px; color: var(--muted); font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.opos-nums label > input { width: 80px; }
.opos-nums .money { width: 150px; }
.opos-tot { display: flex; flex-direction: column; min-width: 110px; text-align: right; margin-left: auto; }
.opos-btns { display: flex; gap: 2px; }
.offer-sum { padding: 9px 0; }
.ostat { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.ostat.angenommen { background: var(--ok-50); color: var(--ok); border-color: transparent; }
.ostat.abgelehnt { color: var(--muted); text-decoration: line-through; }
.ostat.offen { background: var(--red-50); color: var(--red); border-color: transparent; }
.pick-list { display: grid; gap: 6px; }
.pick-row { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 6px 10px; cursor: pointer; font: inherit; }
.pick-row:hover { border-color: var(--red); }
.red { color: var(--red); }
