:root { --primaer:#1a1a1a; --akzent:#d6127a; --akzent-text:#ffffff; --hell:#f7f5f6; --text:#232323; --muted:#6b6b6b; --line:#e4e2df; --bg:#f3f2ef; --card:#ffffff; --input:#fafaf8; --kopf:#1a1a1a; }
* { box-sizing:border-box; }
button, input, select, textarea { color:var(--text); font-family:inherit; }   /* kein iOS-Blau auf Schaltflächen */
.picker-btn { color:var(--text); }
/* Kein overflow auf html/body: jede Overflow-Regel dort macht am iPhone aus der Seite einen eigenen Scrollbereich, dann wandert die feste Leiste mit. Seitliches Überlaufen wird stattdessen im Inhaltsrahmen abgeschnitten. */
.wrap { overflow-x:hidden; }
html, body { margin:0; background:var(--bg); color:var(--text); font-family:"Inter", system-ui, sans-serif; font-size:16px; line-height:1.5; }
a { color:var(--akzent); text-decoration:none; }
h1 { font-size:22px; margin:0 0 8px; color:var(--primaer); }
.top { background:var(--primaer); color:#fff; display:flex; justify-content:space-between; align-items:center; padding:14px 18px; padding-top:calc(14px + env(safe-area-inset-top)); }
.top .brand { color:#fff; font-weight:700; font-size:17px; }
.top nav a { color:#fff; opacity:.85; margin-left:16px; font-size:14px; }
.wrap { max-width:720px; margin:0 auto; padding:18px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:18px; margin-bottom:16px; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.card h3 { margin:-18px -18px 14px; padding:12px 18px; background:var(--kopf); color:#fff; font-size:14px; letter-spacing:.04em; text-transform:uppercase; border-radius:12px 12px 0 0; }
.card h3 .btn { float:right; margin:-6px 0; padding:6px 12px; font-size:13px; }
.card.narrow { max-width:420px; margin:40px auto; }
.card.empty { text-align:center; color:var(--muted); padding:40px 18px; }
.card.item { display:block; color:var(--text); }
.card.item:active { background:var(--hell); }
.muted { color:var(--muted); }
.small { font-size:14px; }
.row { display:flex; gap:12px; align-items:center; }
.between { justify-content:space-between; }
label { display:block; font-weight:600; font-size:13px; color:#444; margin:12px 0 5px; }
input, textarea, select { width:100%; font:inherit; padding:11px 12px; border:1px solid #cfccc7; border-radius:8px; background:var(--input); }
input:focus, textarea:focus { outline:2px solid var(--akzent); border-color:transparent; }
.btn { display:inline-block; font:inherit; font-weight:600; padding:12px 18px; border-radius:10px; border:1px solid var(--line); background:#fff; color:var(--primaer); cursor:pointer; }
.btn.primary { background:var(--akzent); border-color:var(--akzent); color:var(--akzent-text, #fff); }
.btn.block { display:block; width:100%; margin-top:16px; text-align:center; }
.flash { padding:12px 14px; border-radius:10px; margin-bottom:14px; font-size:14px; }
.flash-success { background:#e8f7ee; color:#155d34; }
.flash-error { background:#fdeaea; color:#8a1c1c; }
.flash-info { background:var(--hell); color:var(--primaer); }
.status { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; padding:3px 8px; border-radius:6px; background:var(--hell); }
.s-angenommen { background:#e8f7ee; color:#155d34; }
.s-abgelehnt, .s-abgelaufen { background:#fdeaea; color:#8a1c1c; }
.s-versendet, .s-geoeffnet { background:#fff0f6; color:var(--akzent); }
table.kv { width:100%; border-collapse:collapse; }
table.kv th { text-align:left; font-weight:600; padding:8px 0; border-bottom:1px solid var(--line); width:50%; }
table.kv td { padding:8px 0; border-bottom:1px solid var(--line); }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.grid3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:0 12px; }
@media (max-width:560px) { .grid2, .grid3 { grid-template-columns:1fr; } }
.pos { background:var(--hell); border:1px solid var(--line); border-radius:10px; padding:4px 14px 12px; margin:12px 0; }
.pos label { margin-top:10px; }
.preisbox { background:var(--primaer); color:#fff; border-radius:10px; padding:14px 16px; margin:14px 0; }
.preisbox strong { color:#fff; }
textarea { min-height:80px; }
[x-cloak] { display:none !important; }
fieldset:disabled input, fieldset:disabled textarea, fieldset:disabled select { background:var(--hell); }
.kpis { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:14px; }
.kpis > div { background:var(--hell); border-radius:10px; padding:10px 14px; }
.kopf { background:var(--primaer); color:#fff; padding:14px 18px; margin:-18px -18px 14px; }
.kopf .chip { background:var(--akzent); color:#fff; font-size:12px; font-weight:600; padding:3px 10px; border-radius:6px; }
.label { font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin:14px 0 4px; }
.check { display:flex; gap:10px; align-items:flex-start; font-weight:600; margin:14px 0; }
.check input { width:auto; margin-top:4px; }
.pad { width:100%; height:auto; border:1px dashed #999; border-radius:10px; background:#fff; touch-action:none; }
.s-in_umsetzung, .s-abgenommen, .s-bezahlt { background:#e8f7ee; color:#155d34; }
.s-ersetzt { background:#eee; color:#555; }
h2 { font-size:19px; color:var(--primaer); }

/* Dashboard Angebote */
.wrap:has(.dash) { max-width:1320px; }
.dash-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:30px; }
.dash-title { font-size:36px; font-weight:700; margin:0 0 4px; color:var(--primaer); }
.dash-sub { margin:0; color:var(--muted); font-size:16px; }
.btn.big { height:54px; line-height:30px; padding:12px 22px; border-radius:12px; font-size:16px; white-space:nowrap; transition:background .15s, box-shadow .15s; }
.btn.primary.big:hover { background:#b90f68; box-shadow:0 2px 8px color-mix(in srgb, var(--akzent) 30%, transparent); }
.kpi-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin-bottom:30px; }
.kpi { display:flex; gap:16px; align-items:flex-start; background:#fff; border:1px solid var(--line); border-radius:16px; padding:24px; min-height:130px; box-shadow:0 1px 2px rgba(0,0,0,.03); }
.kpi-ico { flex:0 0 46px; width:46px; height:46px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
.kpi-ico.pink { background:color-mix(in srgb, var(--akzent) 12%, white); color:var(--akzent); }
.kpi-ico.gruen { background:#e6f6ec; color:#1f7a45; }
.kpi-ico.lila { background:#eeeafa; color:#5b4bb5; }
.kpi-label { font-size:14px; color:var(--muted); font-weight:500; }
.kpi-num { font-size:32px; font-weight:700; color:var(--primaer); line-height:1.15; margin:4px 0 2px; }
.kpi-sub { font-size:14px; color:var(--muted); }
.warnbox { background:#fff; border:1px solid var(--akzent); border-radius:14px; padding:16px 20px; margin-bottom:24px; }
.toolbar { display:flex; gap:12px; align-items:center; margin-bottom:22px; flex-wrap:wrap; }
.toolbar .search { position:relative; flex:0 1 38%; min-width:240px; margin:0; }
.toolbar .search svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--muted); }
.toolbar .search input { height:54px; padding-left:42px; border-radius:12px; background:#fff; }
.tabs { display:flex; gap:4px; align-items:center; background:#fff; border:1px solid var(--line); border-radius:12px; padding:4px; flex:1; min-width:0; overflow-x:auto; }
.tab { padding:10px 16px; border-radius:9px; color:#444; font-weight:500; white-space:nowrap; }
.tab:hover { background:var(--hell); }
.tab.on { background:color-mix(in srgb, var(--akzent) 12%, white); color:var(--akzent); font-weight:600; }
.tab-more { width:auto; border:0; background:transparent; padding:10px 8px; color:#444; font-weight:500; }
.toolbar .sort { width:auto; height:54px; border-radius:12px; background:#fff; margin-left:auto; }
.offers { display:flex; flex-direction:column; gap:14px; }
.offer { display:flex; align-items:center; gap:18px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px 26px; color:var(--text); transition:border-color .15s, box-shadow .15s; }
.offer:hover { border-color:#bdbab5; box-shadow:0 2px 10px rgba(0,0,0,.06); }
.offer-ico { flex:0 0 44px; width:44px; height:44px; border-radius:50%; background:var(--hell); color:#666; display:flex; align-items:center; justify-content:center; }
.offer-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.offer-firma { font-size:18px; font-weight:700; color:var(--primaer); }
.offer-titel { font-size:17px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.offer-meta { font-size:14px; color:var(--muted); }
.offer-right { display:flex; flex-direction:column; align-items:flex-end; gap:4px; white-space:nowrap; }
.offer-preis { font-size:24px; font-weight:700; color:var(--primaer); }
.offer-netto { font-size:13px; color:var(--muted); }
.offer-more { color:#bbb; }
.pill { font-size:12px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; padding:4px 10px; border-radius:999px; }
.pill.gruen { background:#e6f6ec; color:#1f7a45; }
.pill.offen { background:#fff3dc; color:#b26a00; }
.pill.rot { background:#fde8e8; color:#a12626; }
.pill.grau { background:#eeedeb; color:#555; }
.card.empty .btn { margin-top:12px; }
@media (max-width:980px) { .kpi-grid { grid-template-columns:1fr 1fr; } .kpi:last-child { grid-column:1 / -1; } }
@media (max-width:640px) {
  .kpi-grid { grid-template-columns:1fr; gap:12px; }
  .dash-title { font-size:28px; }
  .dash-head { flex-direction:column; }
  .btn.big { width:100%; text-align:center; }
  .toolbar .search { flex:1 1 100%; }
  .tabs { flex:1 1 100%; }
  .toolbar .sort { width:100%; margin-left:0; }
  .offer { flex-wrap:wrap; padding:18px; gap:12px; }
  .offer-info { flex:1 1 calc(100% - 56px); }
  .offer-right { flex-direction:row; align-items:center; justify-content:space-between; width:100%; gap:10px; }
  .offer-more { display:none; }
}

/* Seitenleiste */
html, body { background:#f7f7f9; }
body.has-side { display:flex; min-height:100vh; }
.side { width:240px; flex:0 0 240px; background:#fff; border-right:1px solid var(--line); padding:22px 14px; display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; height:100vh; overflow-y:auto; z-index:10; }
.side-brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px; color:var(--primaer); padding:6px 12px 22px; }
.side-dot { width:12px; height:12px; border-radius:4px; background:var(--akzent); }
.side-nav { display:flex; flex-direction:column; gap:4px; }
.side-nav a { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; color:#555; font-weight:500; font-size:15px; }
.side-nav a:hover { background:var(--hell); }
.side-nav a.on { background:color-mix(in srgb, var(--akzent) 12%, white); color:var(--akzent); font-weight:600; position:relative; }
.side-nav a.on::before { content:""; position:absolute; left:-14px; top:10px; bottom:10px; width:4px; border-radius:0 4px 4px 0; background:var(--akzent); }
.only-mobile { display:none !important; }
.side-foot { margin-top:auto; padding:12px 14px; display:flex; flex-direction:column; gap:4px; border-top:1px solid var(--line); }
.side-foot a { color:#777; }
.side-foot a:hover { color:var(--text); }
body.has-side .wrap { flex:1; min-width:0; max-width:none; padding:32px 40px; margin-left:240px; }
body.has-side .wrap > *:not(.dash):not(.flash) { max-width:760px; }
body.has-side .wrap .dash { max-width:1320px; }
@media (max-width:860px) {
  body.has-side { display:block; padding-bottom:70px; }
  .side { position:fixed; bottom:0; left:0; right:0; top:auto; width:auto; height:auto; flex-direction:row; align-items:center; padding:6px 4px; padding-bottom:calc(6px + env(safe-area-inset-bottom)); border-right:0; border-top:1px solid var(--line); z-index:20; }
  .side-brand, .side-foot { display:none; }
  .side-nav { flex-direction:row; width:100%; justify-content:space-around; }
  .side-nav a { flex-direction:column; gap:3px; padding:8px 6px; font-size:11px; border-radius:10px; }
  .side-nav a.on::before { display:none; }
  .side-nav a.only-mobile { display:flex !important; }
  body.has-side .wrap { padding:18px; margin-left:0; }
}
.steps { display:flex; gap:6px; margin:14px 0 20px; flex-wrap:wrap; }
.step { display:flex; align-items:center; gap:8px; padding:8px 14px; border-radius:999px; background:#fff; border:1px solid var(--line); color:#555; font-size:14px; font-weight:500; }
.step span { width:22px; height:22px; border-radius:50%; background:var(--hell); display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.step.ok span { background:#e6f6ec; color:#1f7a45; }
.step.on { background:color-mix(in srgb, var(--akzent) 12%, white); border-color:#f4b9d5; color:var(--akzent); }
.step.on span { background:var(--akzent); color:#fff; }

.msg { border-radius:12px; padding:12px 14px; margin:10px 0; max-width:92%; }
.msg-in { background:var(--hell); border:1px solid var(--line); }
.msg-out { background:color-mix(in srgb, var(--akzent) 12%, white); margin-left:auto; }
.msg-meta { font-size:12px; color:var(--muted); margin-bottom:4px; }

.avatar { width:36px; height:36px; border-radius:50%; background:var(--akzent); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:700; overflow:hidden; flex:0 0 36px; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.avatar.big { width:96px; height:96px; flex:0 0 96px; font-size:36px; }
.side-user { display:flex; gap:10px; align-items:center; color:var(--text); }
table.kv td.r { text-align:right; }

.wave { width:100%; height:70px; display:block; background:var(--hell); border-radius:12px; }
@media (max-width:860px) {
  input, textarea, select { font-size:16px; }   /* verhindert das Hineinzoomen und Wegspringen auf dem iPhone */
  .grid2, .grid3 { grid-template-columns:1fr; }
  .wrap { padding:14px; }
  .card { padding:14px; }
  .card h3 { margin:-14px -14px 12px; padding:10px 14px; }
  .kopf { margin:-14px -14px 14px; }
}

.rec-buttons { display:flex; gap:12px; margin-top:12px; }
.rec-buttons .btn { flex:1; }
.btn.rec-start { background:#1f9d55; border-color:#1f9d55; color:#fff; }
.btn.rec-start:hover { background:#188246; }
.btn.rec-stop { background:#d92d20; border-color:#d92d20; color:#fff; animation:recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 0%,100% { box-shadow:0 0 0 0 rgba(217,45,32,.45); } 50% { box-shadow:0 0 0 8px rgba(217,45,32,0); } }
@media (max-width:860px) {
  .rec-buttons { flex-direction:column; }
  .rec-buttons .btn { width:100%; padding:16px; font-size:17px; }
}

.layout-grid { display:grid; grid-template-columns:minmax(320px, 440px) 1fr; gap:20px; align-items:start; }
.preview-col { position:sticky; top:20px; }
.preview { width:100%; height:calc(100vh - 80px); min-height:600px; border:0; border-radius:8px; background:#eee; }
.rahmen-wahl { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin-top:6px; }
.rahmen { display:flex; flex-direction:column; gap:8px; align-items:center; border:2px solid var(--line); border-radius:12px; padding:10px; cursor:pointer; font-size:13px; text-align:center; font-weight:500; margin:0; }
.rahmen input { display:none; }
.rahmen.on { border-color:var(--akzent); background:color-mix(in srgb, var(--akzent) 12%, white); }
.rahmen-bild { width:70px; height:98px; background:#fff; border:1px solid #ddd; border-radius:4px; display:flex; flex-direction:column; gap:5px; padding:0 0 8px; overflow:hidden; }
.rahmen-bild .k { height:22px; background:var(--primaer); }
.rahmen-bild .z { height:5px; background:#ddd; margin:0 8px; border-radius:2px; }
.rahmen-bild .z.kurz { width:35px; }
.r-deckblatt { background:var(--primaer); }
.r-deckblatt .k { background:var(--akzent); height:8px; margin-top:auto; order:9; }
.r-deckblatt .z { background:#555; }
.r-briefkopf .k { background:#fff; border-bottom:2px solid var(--akzent); height:18px; }
.baustein { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; background:var(--hell); }
.baustein.aus { opacity:.5; }
.btn.mini { padding:4px 10px; font-size:13px; }
@media (max-width:1000px) { .layout-grid { grid-template-columns:1fr; } .preview-col { position:static; } .preview { height:70vh; } }

/* Auswertungen */
table.ztab th { width:auto; }
table.ztab td.r { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; width:1%; padding-left:18px; }
table.ztab td.h { font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:600; }
table.ztab tr.dim th, table.ztab tr.dim td { color:#aaa; }
table.ztab tr.sumrow th, table.ztab tr.sumrow td { font-weight:700; border-top:2px solid var(--primaer); border-bottom:0; }
.chart { display:flex; gap:6px; align-items:flex-end; height:180px; padding:4px 4px 0; margin-bottom:8px; }
.chart-col { flex:1; display:flex; flex-direction:column; align-items:center; height:100%; min-width:0; }
.chart-val { font-size:10px; color:var(--muted); height:14px; white-space:nowrap; }
.chart-bar-wrap { flex:1; width:100%; display:flex; align-items:flex-end; }
.chart-bar { width:100%; background:var(--akzent); border-radius:5px 5px 0 0; transition:height .3s; }
.chart-bar.leer { height:2px !important; background:var(--line); }
.chart-lbl { font-size:11px; color:var(--muted); margin-top:4px; }
.quartale { display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; }
.quartal { background:var(--hell); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; }
.q-name { font-size:12px; color:var(--muted); font-weight:600; }
.q-val { font-size:16px; font-weight:700; color:var(--primaer); font-variant-numeric:tabular-nums; }
.exports { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.export { display:flex; flex-direction:column; gap:4px; border:1px solid var(--line); border-radius:12px; padding:12px 14px; color:var(--text); background:#fff; }
.export:first-child { border-color:var(--akzent); background:color-mix(in srgb, var(--akzent) 5%, white); }
.export:hover { border-color:#bdbab5; }
.export strong { color:var(--primaer); }
.export span { font-size:13px; color:var(--muted); }
@media (max-width:640px) { .quartale { grid-template-columns:1fr 1fr; } .exports { grid-template-columns:1fr; } .chart { height:140px; gap:3px; } .chart-val { display:none; } .chart-lbl { font-size:9px; } }

.pakete { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:10px; margin-bottom:14px; }
.paket { display:flex; flex-direction:column; gap:2px; border:2px solid var(--line); border-radius:12px; padding:12px 14px; cursor:pointer; margin:0; font-weight:400; background:#fff; }
.paket input { display:none; }
.paket.on { border-color:var(--akzent); background:color-mix(in srgb, var(--akzent) 5%, white); }
.paket-preis { font-size:18px; font-weight:700; color:var(--primaer); margin-top:8px; }
.option { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; align-items:center; }
.option > span:first-of-type { flex:1; }
.option-preis { font-weight:700; color:var(--akzent); white-space:nowrap; }

.side-timer { margin:8px 0; padding:10px 12px; background:color-mix(in srgb, var(--akzent) 12%, white); border-radius:10px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
@media (max-width:860px) { .side-timer { display:none; } }

/* Buttonreihen: Abstand und gleiche Breite auf dem Handy */
.btn.block + .card, form + .card, .btn.block + div.card { margin-top:16px; }
@media (max-width:860px) {
  .card .row:not(.between):not(.side-timer) > .btn, .card .row:not(.between) > form > .btn { flex:1 1 calc(50% - 6px); text-align:center; }
  .card .row:not(.between) { flex-wrap:wrap; gap:12px; }
  .card .row:not(.between) > form { flex:1 1 calc(50% - 6px); margin:0; }
  .card .row:not(.between) > form > .btn { width:100%; }
  .btn.block { margin-bottom:16px; }
}

.row.halb { display:flex; gap:12px; }
.row.halb .btn { flex:1 1 0; text-align:center; }
.btn.block + .card, form + .card { margin-top:16px; }

.picker-btn { width:100%; display:flex; justify-content:space-between; align-items:center; gap:10px; text-align:left; font:inherit; padding:12px 14px; border:1px solid #cfccc7; border-radius:8px; background:var(--input); cursor:pointer; }
.picker-btn span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.picker-caret { color:var(--muted); }
.picker-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:100; display:flex; align-items:flex-end; justify-content:center; }
.picker-panel { width:92%; max-width:640px; max-height:85vh; background:#fff; border-radius:16px 16px 0 0; padding:14px; display:flex; flex-direction:column; gap:10px; box-shadow:0 -4px 30px rgba(0,0,0,.2); margin-bottom:0; }
.picker-panel input { font-size:16px; }
.picker-list { overflow-y:auto; flex:1; display:flex; flex-direction:column; gap:6px; -webkit-overflow-scrolling:touch; }
.picker-item { display:flex; flex-direction:column; gap:2px; text-align:left; font:inherit; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#fff; cursor:pointer; width:100%; }
.picker-item.on { border-color:var(--akzent); background:color-mix(in srgb, var(--akzent) 12%, white); }
.picker-item:active { background:var(--hell); }
@media (min-width:861px) { .picker-overlay { align-items:center; } .picker-panel { border-radius:16px; max-height:80vh; } }

/* Zahlungsoptionen */
.zo-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:10px 0; }
.zo-grid.editor { grid-template-columns:1fr; }
.zo-card { border:1px solid var(--line); border-radius:14px; padding:16px 18px; background:#fff; display:flex; flex-direction:column; gap:4px; position:relative; }
.zo-card.voraus { border:2px solid var(--akzent); background:color-mix(in srgb, var(--akzent) 5%, white); }
.zo-card.aus { opacity:.55; }
.zo-card.wahl { cursor:pointer; margin:0; font-weight:400; }
.zo-card.wahl input { position:absolute; opacity:0; }
.zo-card.wahl.on { box-shadow:0 0 0 3px color-mix(in srgb, var(--akzent) 30%, transparent); border-color:var(--akzent); }
.zo-card.wahl.on::after { content:"✓"; position:absolute; top:12px; right:14px; width:24px; height:24px; border-radius:50%; background:var(--akzent); color:#fff; font-size:14px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.zo-badge { align-self:flex-start; background:var(--akzent); color:#fff; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:3px 8px; border-radius:6px; margin-bottom:4px; }
.zo-preis { font-size:22px; font-weight:700; color:var(--primaer); margin:6px 0 2px; white-space:nowrap; }
.zo-calc .row { align-items:baseline; gap:12px; } .zo-calc strong, .zo-calc span { white-space:nowrap; }
.zo-card .grid3 label { font-size:13px; }
@media (min-width:1200px) { .zo-grid.editor { grid-template-columns:1fr 1fr; } }
.zo-calc { background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-top:8px; }
@media (max-width:860px) { .zo-grid { grid-template-columns:1fr; } }
/* Checkboxen und Radios in Magenta */
input[type="checkbox"], input[type="radio"] { accent-color: var(--akzent); width: 20px; height: 20px; min-width: 20px; margin: 0 8px 0 0; padding: 0; cursor: pointer; vertical-align: middle; }
.check input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; }

.rate { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; }
.rate.faellig { border-color:var(--akzent); background:color-mix(in srgb, var(--akzent) 5%, white); }
.rate.bezahlt { opacity:.75; }

/* Wischen in der Angebotsliste */
.swipe-wrap { position:relative; overflow:hidden; border-radius:16px; margin-bottom:12px; }
.swipe-wrap .offer { position:relative; z-index:2; margin:0; background:#fff; touch-action:pan-y; }
.swipe-bg { position:absolute; inset:0; display:flex; align-items:center; font-weight:700; color:#fff; font-size:15px; padding:0 22px; opacity:0; transition:opacity .15s; z-index:1; }
.swipe-bg.rechts { background:#1f9d55; justify-content:flex-start; }
.swipe-bg.links { background:#d92d20; justify-content:flex-end; }
.swipe-wrap.zieh-rechts .swipe-bg.rechts, .swipe-wrap.wahl-gruen .swipe-bg.rechts { opacity:1; }
.swipe-wrap.zieh-links .swipe-bg.links, .swipe-wrap.wahl-rot .swipe-bg.links { opacity:1; }
.swipe-confirm { position:absolute; inset:0; z-index:3; display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; padding:14px; color:#fff; font-weight:600; }
.swipe-wrap.wahl-gruen .swipe-confirm { background:#1f9d55; }
.swipe-wrap.wahl-rot .swipe-confirm { background:#d92d20; }
.swipe-confirm .btn.primary { background:#fff; color:#1a1a1a; border-color:#fff; }
.swipe-confirm .btn:not(.primary) { background:transparent; color:#fff; border-color:rgba(255,255,255,.6); }
.swipe-confirm-text { width:100%; text-align:center; }
/* Dauerhafte Färbung nach Status: dünner Rahmen rundum */
.swipe-wrap.gruen .offer { border:2px solid #1f9d55; background:#f4fbf7; }
.swipe-wrap.rot .offer { border:2px solid #d92d20; background:#fdf5f4; opacity:.9; }
.swipe-wrap.ablauf .offer { border:2px solid #d92d20; animation:ablaufblink 1.1s ease-in-out infinite; }
@keyframes ablaufblink { 0%, 100% { border-color:#d92d20; box-shadow:0 0 0 0 rgba(217,45,32,0); } 50% { border-color:rgba(217,45,32,.15); box-shadow:0 0 0 4px rgba(217,45,32,.12); } }
@media (prefers-reduced-motion: reduce) { .swipe-wrap.ablauf .offer { animation:none; } }
.swipe-wrap.fertig .offer { animation:statuspop .4s ease; }
@keyframes statuspop { 0% { transform:scale(.97); } 60% { transform:scale(1.01); } 100% { transform:scale(1); } }
@media (min-width:861px) { .swipe-bg, .swipe-confirm { display:none; } }

/* Dunkles Design */
html[data-theme="dark"] { --hell:#2a2a31; --text:#f0f0f2; --muted:#a8a8b2; --line:#34343b; --bg:#111113; --card:#1c1c20; --input:#2c2c33; --kopf:#26262c; color-scheme:dark; }
html[data-theme="dark"] body { background:var(--bg); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] .offer-firma, html[data-theme="dark"] .kpi-num, html[data-theme="dark"] .zo-preis, html[data-theme="dark"] .paket-preis, html[data-theme="dark"] .q-val, html[data-theme="dark"] .export strong, html[data-theme="dark"] .dash-title, html[data-theme="dark"] label, html[data-theme="dark"] strong { color:#fff; }
html[data-theme="dark"] .card { background:var(--card); border:1px solid var(--line); box-shadow:none; }
html[data-theme="dark"] .card h3 { background:var(--kopf); color:#fff; border-bottom:1px solid var(--line); }
html[data-theme="dark"] .side, html[data-theme="dark"] .bottom { background:#17171a; border-color:var(--line); }
html[data-theme="dark"] .side a, html[data-theme="dark"] .bottom a { color:#d6d6dc; }
html[data-theme="dark"] .side a.on, html[data-theme="dark"] .bottom a.on { color:var(--akzent); background:color-mix(in srgb, var(--akzent) 18%, transparent); }
html[data-theme="dark"] .side-foot a { color:#9a9aa4; }
html[data-theme="dark"] .top, html[data-theme="dark"] .kopf { background:#0c0c0e; }
/* Formularfelder deutlich heller als der Hintergrund */
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select, html[data-theme="dark"] .picker-btn { background:#2e2e36; color:#fff; border:1px solid #5a5a66; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] textarea:focus, html[data-theme="dark"] select:focus { border-color:var(--akzent); outline:none; box-shadow:0 0 0 3px color-mix(in srgb, var(--akzent) 30%, transparent); }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color:#8e8e98; }
html[data-theme="dark"] input:disabled, html[data-theme="dark"] select:disabled { opacity:.5; }
/* Schaltflächen klar abgesetzt */
html[data-theme="dark"] .btn { background:#3a3a44; color:#fff; border:1px solid #5e5e6a; }
html[data-theme="dark"] .btn:hover { background:#474752; }
html[data-theme="dark"] .btn.primary { background:var(--akzent); border-color:var(--akzent); color:var(--akzent-text); }
html[data-theme="dark"] .btn.primary:hover { filter:brightness(1.12); }
html[data-theme="dark"] .btn:disabled { opacity:.45; }
html[data-theme="dark"] .rec-buttons .btn.rec-start { background:#1f9d55; border-color:#1f9d55; color:#fff; } html[data-theme="dark"] .rec-buttons .btn.rec-stop { background:#d92d20; border-color:#d92d20; color:#fff; }
html[data-theme="dark"] .offer, html[data-theme="dark"] .kpi, html[data-theme="dark"] .toolbar, html[data-theme="dark"] .rate, html[data-theme="dark"] .zo-card, html[data-theme="dark"] .paket, html[data-theme="dark"] .option, html[data-theme="dark"] .export, html[data-theme="dark"] .picker-panel, html[data-theme="dark"] .picker-item, html[data-theme="dark"] .baustein, html[data-theme="dark"] .rahmen, html[data-theme="dark"] .karte, html[data-theme="dark"] .zo-calc, html[data-theme="dark"] .pos, html[data-theme="dark"] .quartal, html[data-theme="dark"] .swipe-wrap .offer, html[data-theme="dark"] .list .btn.block { background:#232329; border-color:var(--line); color:var(--text); box-shadow:none; }
html[data-theme="dark"] .offer:hover, html[data-theme="dark"] .picker-item:active { background:#2c2c33; }
html[data-theme="dark"] .offer-ico, html[data-theme="dark"] .kpi-ico { background:#2e2e36; }
html[data-theme="dark"] .zo-card.voraus, html[data-theme="dark"] .zo-card.wahl.on, html[data-theme="dark"] .paket.on, html[data-theme="dark"] .picker-item.on, html[data-theme="dark"] .rahmen.on, html[data-theme="dark"] .rate.faellig, html[data-theme="dark"] .export:first-child, html[data-theme="dark"] .side-timer { background:color-mix(in srgb, var(--akzent) 16%, #232329); border-color:var(--akzent); }
html[data-theme="dark"] .preisbox { background:#0c0c0e; color:#fff; border:1px solid var(--line); }
html[data-theme="dark"] .warnbox { background:#3a2f12; border-color:#6b5520; color:#f3e2b3; }
html[data-theme="dark"] .flash-success { background:#163b25; color:#bfe9cf; border-color:#1f9d55; }
html[data-theme="dark"] .flash-error { background:#3d1a17; color:#f3c2bd; border-color:#d92d20; }
html[data-theme="dark"] .flash-info { background:#1a2a3d; color:#c2d8f3; border-color:#2f6fbf; }
html[data-theme="dark"] .pill.gruen { background:#163b25; color:#8fe0ad; } html[data-theme="dark"] .pill.rot { background:#3d1a17; color:#f3a49c; } html[data-theme="dark"] .pill.offen { background:#3a2f12; color:#f0c96a; } html[data-theme="dark"] .pill.grau { background:#2e2e36; color:#c0c0c8; }
html[data-theme="dark"] table.kv th { color:var(--text); } html[data-theme="dark"] table.kv td, html[data-theme="dark"] table.kv th { border-color:var(--line); }
html[data-theme="dark"] .wave { background:#2a2a31; }
html[data-theme="dark"] .chart-bar.leer { background:#3a3a44; }
html[data-theme="dark"] .swipe-wrap.gruen .offer { background:#173124; border-color:#1f9d55; } html[data-theme="dark"] .swipe-wrap.rot .offer { background:#33191a; border-color:#d92d20; } html[data-theme="dark"] .swipe-wrap.ablauf .offer { border-color:#d92d20; }
html[data-theme="dark"] pre { background:#2a2a31 !important; color:#ddd; }
html[data-theme="dark"] .preview { background:#2a2a31; }
html[data-theme="dark"] .rahmen-bild { background:#2a2a31; border-color:#5a5a66; } html[data-theme="dark"] .rahmen-bild .z { background:#5a5a66; }
html[data-theme="dark"] .picker-overlay { background:rgba(0,0,0,.75); }
html[data-theme="dark"] details summary { color:#fff; }
html[data-theme="dark"] hr { border-color:var(--line); }
html[data-theme="dark"] .muted, html[data-theme="dark"] .small.muted { color:var(--muted); }

/* Rechnungen: Kopfbereich */
.re-neu { display:flex; gap:12px; align-items:center; }
.re-neu select { flex:1; min-width:0; height:54px; border-radius:12px; }
.re-links { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.re-links .btn { text-align:center; }
.re-links .btn.voll { grid-column:1 / -1; }
@media (max-width:860px) { .dash-head { align-items:stretch; } .re-neu { flex-direction:column; align-items:stretch; width:100%; } .re-neu select { width:100%; } .re-neu .btn { width:100%; } }

/* Projekt */
.task { padding:14px 16px; }
.task.erledigt, .task.abgenommen { border-color:#1f9d55; }
.task.abgenommen { opacity:.8; }
.task-nr { display:inline-flex; width:24px; height:24px; border-radius:50%; background:var(--akzent); color:var(--akzent-text, #fff); font-size:12px; font-weight:700; align-items:center; justify-content:center; }
.ampel { display:inline-block; width:10px; height:10px; border-radius:50%; vertical-align:middle; background:#bbb; }
.ampel.gruen { background:#1f9d55; } .ampel.gelb { background:#e0a800; } .ampel.rot { background:#d92d20; }
.fotos { display:flex; gap:8px; flex-wrap:wrap; margin:6px 0; }
.foto { position:relative; width:96px; height:96px; border-radius:10px; overflow:hidden; border:1px solid var(--line); display:block; }
.foto img { width:100%; height:100%; object-fit:cover; display:block; }
.foto-x { position:absolute; top:4px; right:4px; width:22px; height:22px; border-radius:50%; border:0; background:rgba(0,0,0,.6); color:#fff; font-size:14px; cursor:pointer; }
.chat { display:flex; flex-direction:column; gap:6px; margin:6px 0 8px; }
.msg { max-width:85%; padding:8px 12px; border-radius:14px; font-size:14px; line-height:1.4; }
.msg.out { align-self:flex-end; background:color-mix(in srgb, var(--akzent) 14%, white); border-bottom-right-radius:4px; }
.msg.in { align-self:flex-start; background:var(--hell); border-bottom-left-radius:4px; }
.msg-meta { display:block; font-size:11px; color:var(--muted); margin-top:3px; }
.fortschritt { height:10px; background:var(--hell); border-radius:5px; overflow:hidden; margin:6px 0; }
.fortschritt div { height:100%; background:#1f9d55; border-radius:5px; transition:width .3s; }
.k-task { border:1px solid var(--line); border-radius:12px; margin:8px 0; }
html[data-theme="dark"] .msg.out { background:color-mix(in srgb, var(--akzent) 25%, #232329); } html[data-theme="dark"] .msg.in { background:#2e2e36; }

.x-btn { width:34px; height:34px; border-radius:50%; border:1px solid var(--line); background:var(--card, #fff); color:var(--muted); font-size:20px; line-height:1; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.x-btn:hover { border-color:#d92d20; color:#d92d20; background:#fdf5f4; }

.nav-badge { display:inline-block; min-width:18px; padding:0 5px; height:18px; line-height:18px; border-radius:9px; background:var(--akzent); color:var(--akzent-text, #fff); font-size:11px; font-weight:700; text-align:center; margin-left:4px; vertical-align:middle; }
