/* PV-Kunden — modern, clean, für Handy & iPad optimiert */
:root {
  --bg: #f5f5f7; --panel: #fff; --panel2: #f9f9fb; --line: #e8e8ed; --line2: #d2d2d7;
  --text: #1d1d1f; --muted: #6e6e73; --faint: #a1a1a6;
  --accent: #f59e0b; --accent-strong: #d97706; --accent-soft: #fff4e0; --accent-text: #9a5b00;
  --green: #1f9d55; --green-soft: #e3f6ea; --red: #e5383b; --red-soft: #fde8e8; --gray-soft: #f0f0f3;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.25);
  --r: 16px; --r-sm: 12px;
  --top-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0e; --panel: #1a1a1d; --panel2: #222226; --line: #2a2a2f; --line2: #3a3a40;
    --text: #f2f2f4; --muted: #9b9ba3; --faint: #6c6c74;
    --accent: #f5a524; --accent-strong: #f5a524; --accent-soft: #3a2a0c; --accent-text: #fcd34d;
    --green: #3ecf7a; --green-soft: #12301d; --red: #ff6b6b; --red-soft: #3a1515; --gray-soft: #26262b;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0e; --panel: #1a1a1d; --panel2: #222226; --line: #2a2a2f; --line2: #3a3a40;
  --text: #f2f2f4; --muted: #9b9ba3; --faint: #6c6c74;
  --accent: #f5a524; --accent-strong: #f5a524; --accent-soft: #3a2a0c; --accent-text: #fcd34d;
  --green: #3ecf7a; --green-soft: #12301d; --red: #ff6b6b; --red-soft: #3a1515; --gray-soft: #26262b;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
* { touch-action: manipulation; } /* kein Doppeltipp-Zoom (iPad); spezifischere Regeln (Zeichenflächen: none) haben Vorrang */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; }
.ico { width: 20px; height: 20px; flex-shrink: 0; }

/* Knöpfe & Felder — mind. 44px Tippfläche */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line2); background: var(--panel); padding: 0 16px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background .15s, transform .1s, opacity .15s; }
.btn:active { transform: scale(.97); }
@media (hover: hover) { .btn:hover { background: var(--panel2); } .btn.primary:hover { background: var(--accent-strong); } }
.btn.primary { background: var(--accent); border-color: transparent; color: #1d1300; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.soft { border-color: transparent; background: var(--gray-soft); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { color: var(--red); border-color: transparent; background: var(--red-soft); }
.btn.block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; cursor: pointer; color: var(--text); padding: 0; flex-shrink: 0; }
.icon-btn:active { background: var(--gray-soft); }
.input { width: 100%; min-height: 46px; border: 1px solid var(--line2); background: var(--panel); border-radius: 12px; padding: 10px 14px; outline: none; font-size: 16px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { resize: vertical; }

/* Login */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); padding: 16px; }
.login-box { background: var(--panel); padding: 32px 28px; border-radius: 22px; width: min(380px, 100%); box-shadow: var(--shadow); display: grid; gap: 14px; text-align: center; }
.login-box .logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 4px; }
.login-box .logo .ico { width: 30px; height: 30px; }
.login-box h1 { font-size: 24px; }
.err { color: var(--red); font-size: 14px; min-height: 18px; }

/* Kopfzeile */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; min-height: var(--top-h); padding: env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.top-t .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1d1300; flex-shrink: 0; }
.logo .ico { width: 19px; height: 19px; }
.view { max-width: 1180px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-left)) calc(100px + var(--safe-b)); }

/* Statusauswahl als Pille */
.status-sel { appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; padding: 0 30px 0 12px; height: 34px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--gray-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; flex-shrink: 0; }
.status-sel.s-Offen { background-color: var(--accent-soft); color: var(--accent-text); }
.status-sel.s-Kunden { background-color: var(--green-soft); color: var(--green); }
.status-sel.s-Absage { background-color: var(--gray-soft); color: var(--muted); }

/* Segmente (Status-Filter, Tabs) */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 13px; background: var(--gray-soft); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; min-width: max-content; border: 0; background: transparent; border-radius: 10px; min-height: 38px; padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg button .n { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.seg button.on .n { color: var(--muted); }
.seg button .ico { width: 17px; height: 17px; }
.seg button .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ---------- Kundenliste ---------- */
.search { position: relative; margin: 4px 0 12px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 44px; background: var(--panel); border-color: transparent; box-shadow: var(--shadow); }
.list-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.list-bar .seg { flex: 1; }
.grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.kcard { display: flex; flex-direction: column; gap: 12px; background: var(--panel); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); transition: transform .12s; }
.kcard:active { transform: scale(.985); }
.kcard-h { display: flex; align-items: center; gap: 12px; }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-text); }
.kcard .nm { font-weight: 650; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .chev { color: var(--faint); }
.prog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prog > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.prog .l { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); gap: 4px; }
.prog .l b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.bar { height: 5px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .3s; }
.bar.full i { background: var(--green); }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--gray-soft); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.tpl { background: var(--accent-soft); color: var(--accent-text); }
.empty-box { text-align: center; padding: 28px 18px; color: var(--muted); border: 1.5px dashed var(--line2); border-radius: var(--r); }
.empty-box .ico { width: 32px; height: 32px; color: var(--faint); display: block; margin: 0 auto 8px; }

/* Schwebender Knopf (Handy) */
.fab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(20px + var(--safe-b)); z-index: 15; height: 56px; min-width: 56px; padding: 0 20px; border-radius: 18px; border: 0; background: var(--accent); color: #1d1300; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 8px 24px rgba(245,158,11,.4), 0 2px 6px rgba(0,0,0,.15); cursor: pointer; transition: transform .12s; }
.fab:active { transform: scale(.95); }
.fab .ico { width: 22px; height: 22px; }

/* ---------- Kundenseite ---------- */
.tabs { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top)); z-index: 10; margin: 0 -4px 14px; padding: 4px 4px 8px; background: var(--bg); }
.sec-h { display: flex; align-items: center; gap: 10px; margin: 4px 2px 12px; flex-wrap: wrap; }
.sec-h h2 { flex: 1; min-width: 0; }
.sum { background: var(--panel); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.sum .txt { flex: 1; min-width: 160px; display: grid; gap: 7px; }
.sum .txt b { font-size: 15px; }
.sum .txt span { color: var(--muted); font-weight: 500; }

/* Feinplanung: Kategorien */
.cats { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cats { grid-template-columns: 1fr 1fr; gap: 12px; } }
@media (min-width: 1100px) { .cats { grid-template-columns: 1fr 1fr 1fr; } }
.cat { background: var(--panel); border-radius: var(--r); padding: 12px 12px 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; border: 2px solid transparent; transition: border-color .15s, background .15s; }
.cat-h { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.cat-h .t { font-weight: 600; flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.25; }
.cat-h .t small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.check { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: transparent; border: 2px solid var(--line2); color: transparent; flex-shrink: 0; }
.check .ico { width: 14px; height: 14px; stroke-width: 3; }
.check.ok { background: var(--green); border-color: var(--green); color: #fff; }
.cat-acts { display: flex; gap: 6px; }
.cam-btn { width: 48px; height: 44px; border-radius: 12px; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--accent); color: #1d1300; }
.cam-btn:active { transform: scale(.95); }
.cam-btn.soft { background: var(--gray-soft); color: var(--text); }
.strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 0 -2px; padding-right: 12px; scroll-snap-type: x proximity; }
.strip::-webkit-scrollbar { display: none; }
.th { position: relative; flex: none; scroll-snap-align: start; }
.th img, .th .vid { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; cursor: pointer; background: var(--gray-soft); display: grid; place-items: center; }
.vid { color: var(--muted); }
.vid .ico { width: 26px; height: 26px; }
@media (min-width: 760px) { .th img, .th .vid { width: 92px; height: 92px; } }
.drag { border-color: var(--accent) !important; background: var(--accent-soft) !important; }

/* Unterlagen */
.slots { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .slots { grid-template-columns: repeat(3, 1fr); } }
.slot { background: var(--panel); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); border: 2px solid transparent; min-width: 0; }
.slot-h { display: flex; align-items: center; gap: 10px; }
.slot-h .t { font-weight: 650; font-size: 15.5px; flex: 1; min-width: 0; }
.slot .prev { width: 100%; aspect-ratio: 1.414; max-height: 260px; object-fit: cover; object-position: top; border-radius: 10px; background: var(--gray-soft); cursor: pointer; border: 1px solid var(--line); }
.slot .fn { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .st { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.slot .st.ok { color: var(--green); } .slot .st.warn { color: var(--accent-text); }
.slot .st .ico { width: 15px; height: 15px; }
.slot .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.slot .acts .btn { flex: 1 1 auto; }
.slot.empty { cursor: pointer; border: 2px dashed var(--line2); box-shadow: none; background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 170px; color: var(--muted); }
.slot.empty .slot-h { flex-direction: column; }
.slot.empty .big { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gray-soft); color: var(--text); }
.slot.off { opacity: .55; cursor: default; }
.slot.nodrop.empty { cursor: default; }
.share { margin-top: 14px; }

/* Drohne */
.dgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .dgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .dgrid { grid-template-columns: repeat(4, 1fr); } }
.dgrid img, .dgrid .vid { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; cursor: pointer; background: var(--gray-soft); display: grid; place-items: center; }
#drohne { border-radius: var(--r); border: 2px solid transparent; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; color: #fff; }
.lb-top { display: flex; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; }
.lb-top .t { flex: 1; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 4px; }
.lb-top .t small { color: rgba(255,255,255,.6); font-weight: 500; margin-left: 6px; }
.lb-b { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; flex-shrink: 0; }
.lb-b.txt { width: auto; padding: 0 14px; border-radius: 99px; font-weight: 600; font-size: 14px; gap: 6px; display: inline-flex; align-items: center; }
.lb-main { flex: 1; display: grid; place-items: center; min-height: 0; position: relative; touch-action: pan-y pinch-zoom; }
.lb-main img, .lb-main video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.14); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lb-nav.l { left: 12px; } .lb-nav.r { right: 12px; }
@media (pointer: coarse) and (max-width: 700px) { .lb-nav { display: none; } }
.lb-bot { padding: 8px 12px max(14px, env(safe-area-inset-bottom)); text-align: center; color: rgba(255,255,255,.6); font-size: 13px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%) translateY(30px); opacity: 0; background: rgba(29,29,31,.94); color: #fff; padding: 12px 18px; border-radius: 14px; transition: .22s; z-index: 10100; pointer-events: none; max-width: calc(100% - 32px); font-size: 15px; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--red); }
body.has-fab .toast { bottom: calc(90px + var(--safe-b)); }
.socam ~ .toast, body:has(.socam) .toast { bottom: auto; top: calc(max(14px, env(safe-area-inset-top)) + 100px); }

/* ---------- Sheets / Dialoge ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fadeIn .2s; }
.modal-panel { position: relative; background: var(--panel); border-radius: 22px; padding: 18px; width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-lg); animation: popIn .22s cubic-bezier(.2,.9,.3,1.1); }
.modal-panel.narrow { width: min(420px, 100%); }
.modal-panel h2 { font-size: 19px; }
.modal-h { display: flex; align-items: center; gap: 10px; }
.modal-h h2 { flex: 1; min-width: 0; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: -18px; background: var(--panel); padding: 12px 0 2px; margin-bottom: -2px; }
.modal-f .btn { flex: 1; max-width: 220px; }
@media (max-width: 600px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-panel, .modal-panel.narrow { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + var(--safe-b)); max-height: 92dvh; animation: sheetUp .28s cubic-bezier(.2,.9,.3,1); }
  .modal-panel::before { content: ""; width: 38px; height: 5px; border-radius: 99px; background: var(--line2); align-self: center; margin: -8px 0 2px; flex-shrink: 0; }
  .modal-f { bottom: calc(-18px - var(--safe-b)); padding-bottom: calc(2px + var(--safe-b)); }
  .modal-f .btn { max-width: none; }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } }
@keyframes sheetUp { from { transform: translateY(100%); } }
.dlg-msg { margin: 0; color: var(--muted); white-space: pre-line; }
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pool-i { position: relative; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--gray-soft); aspect-ratio: 4/3; }
.pool-i img, .pool-i .vid { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.pool-i.on { border-color: var(--accent); }
.pool-i .tick { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.35); border: 2px solid #fff; color: transparent; display: grid; place-items: center; }
.pool-i .tick .ico { width: 14px; height: 14px; stroke-width: 3; }
.pool-i.on .tick { background: var(--accent); border-color: var(--accent); color: #1d1300; }
.pool-i .d { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); padding: 12px 6px 4px; text-align: left; }
.menu-list { display: grid; gap: 4px; }
.menu-list button { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; text-align: left; padding: 0 12px; min-height: 50px; border-radius: 12px; cursor: pointer; font-size: 16px; font-weight: 500; }
.menu-list button:active { background: var(--gray-soft); }
.menu-list button.danger { color: var(--red); }
.menu-list .ico { color: var(--muted); }
.menu-list button.danger .ico { color: var(--red); }

/* Upload-Fortschritt */
.upbar { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 10200; pointer-events: none; }
.upbar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; }

/* ---------- Kamera (Port aus dem Office) ---------- */
.socam {
  position: fixed; inset: 0; z-index: 10050; background: #000; color: #fff;
  touch-action: none; user-select: none; -webkit-user-select: none;
  font-family: inherit;
}
.socam [hidden] { display: none !important; }
.socam button { font: inherit; cursor: pointer; border: 0; }
.socam .ico { width: 22px; height: 22px; }
.socam-stage { position: absolute; inset: 0; overflow: hidden; }
.socam-v, .socam-view, .socam-viewv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.socam-view, .socam-viewv { background: #000; z-index: 3; }
.socam-grid { position: absolute; inset: 0; pointer-events: none; }
.socam-grid::before, .socam-grid::after, .socam-grid i { content: ""; position: absolute; background: rgba(255,255,255,.35); }
.socam-grid::before { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.socam-grid::after { left: 66.66%; top: 0; bottom: 0; width: 1px; }
.socam-grid i:first-child { top: 33.33%; left: 0; right: 0; height: 1px; }
.socam-grid i:last-child { top: 66.66%; left: 0; right: 0; height: 1px; }
.socam-focus { position: absolute; width: 72px; height: 72px; margin: -36px 0 0 -36px; border: 2px solid #ffd60a; border-radius: 14px; pointer-events: none; }
.socam-focus.go { animation: socamFocus .35s ease-out; }
@keyframes socamFocus { from { transform: scale(1.5); opacity: 0; } }
.socam-zlbl { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.5); padding: 6px 14px; border-radius: 99px; font-weight: 600; font-variant-numeric: tabular-nums; }
.socam-count { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 120px; font-weight: 700; text-shadow: 0 4px 24px rgba(0,0,0,.5); font-variant-numeric: tabular-nums; pointer-events: none; }
.socam-fx { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.socam-fx.go { animation: socamFx .25s ease-out; }
@keyframes socamFx { 0% { opacity: .85; } 100% { opacity: 0; } }
.socam-sflash { position: absolute; inset: 0; background: #fff; z-index: 2; }
.socam-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.socam-msg p { margin: 0; color: rgba(255,255,255,.8); }

.socam-top { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: max(14px, env(safe-area-inset-top)) 14px 24px; background: linear-gradient(rgba(0,0,0,.5), transparent); }
.socam-sp { flex: 1; }
.socam-g { width: 44px; height: 44px; border-radius: 50%; padding: 0; position: relative; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.socam-g.sm { width: 38px; height: 38px; }
.socam-g small { position: absolute; right: 5px; bottom: 4px; font-size: 10px; font-weight: 700; line-height: 1; }
.socam-g.on { background: #ffd60a; color: #000; }
.socam-timer { background: #ff3b30; padding: 4px 14px; border-radius: 99px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.socam.recording .socam-top { background: none; }
.socam-hint, .socam-target { position: absolute; left: 50%; transform: translateX(-50%); z-index: 4; background: rgba(0,0,0,.55); padding: 6px 14px; border-radius: 99px; font-size: 14px; font-weight: 500; backdrop-filter: blur(10px); white-space: nowrap; pointer-events: none; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; }
.socam-hint { top: calc(max(14px, env(safe-area-inset-top)) + 58px); }
.socam-target { top: calc(max(14px, env(safe-area-inset-top)) + 58px); font-size: 12.5px; opacity: .85; }
.socam-hint:not([hidden]) ~ .socam-target { top: calc(max(14px, env(safe-area-inset-top)) + 96px); }
.socam.sharp .socam-hint { background: rgba(48,209,88,.85); color: #000; }
.socam-menu { position: absolute; z-index: 6; right: 14px; top: calc(max(14px, env(safe-area-inset-top)) + 52px); min-width: 240px; background: rgba(28,28,30,.96); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.socam-menu button { background: none; color: #fff; text-align: left; padding: 11px 12px; border-radius: 9px; font-size: 14.5px; }
.socam-menu button:hover, .socam-menu button:active { background: rgba(255,255,255,.1); }

.socam-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 30px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.socam-zoom { display: flex; gap: 6px; background: rgba(0,0,0,.35); border-radius: 99px; padding: 4px; }
.socam-zoom:empty, .socam.viewing .socam-zoom, .socam.viewing .socam-modes { display: none; }
.socam-zoom button { min-width: 38px; height: 34px; padding: 0 8px; border-radius: 99px; background: transparent; color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.socam-zoom button.on { background: rgba(255,255,255,.2); color: #ffd60a; }
.socam-modes { display: flex; gap: 4px; }
.socam-modes button { background: transparent; color: rgba(255,255,255,.7); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; }
.socam-modes button.on { color: #ffd60a; background: rgba(0,0,0,.3); }
.socam-bar { position: relative; width: 100%; max-width: 520px; display: flex; justify-content: space-between; align-items: center; padding: 6px 28px max(26px, env(safe-area-inset-bottom)); }
.socam-left { position: relative; width: 52px; height: 52px; }
.socam-thumb { width: 52px; height: 52px; border-radius: 12px; padding: 0; overflow: hidden; position: relative; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.6) !important; }
.socam-thumb:empty { visibility: hidden; }
.socam-thumb img { width: 100%; height: 100%; object-fit: cover; }
.socam-thumb .ico { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; fill: #fff; filter: drop-shadow(0 1px 3px #000); }
.socam-badge { position: absolute; left: 40px; top: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent, #0a84ff); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.socam-badge:empty { display: none; }
.socam-side { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 52px; }
.socam-shoot { width: 76px; height: 76px; border-radius: 50%; padding: 0; background: #fff; border: 4px solid rgba(255,255,255,.35) !important; background-clip: padding-box; transition: transform .15s, border-radius .15s, background .15s; }
.socam-shoot.video { background: #ff3b30; background-clip: padding-box; }
.socam-shoot.rec { border-radius: 16px; transform: scale(.62); }
.socam.sharp[data-mode="photo"] .socam-shoot { border-color: #30d158 !important; box-shadow: 0 0 0 3px rgba(48,209,88,.35); }
.socam-viewbar { display: flex; gap: 10px; justify-content: center; padding: 6px 16px max(26px, env(safe-area-inset-bottom)); }
.socam-pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 99px; background: rgba(255,255,255,.16); color: #fff; font-weight: 600; font-size: 14px; }
.socam-pill .ico { width: 18px; height: 18px; }
.socam-danger { background: #ff3b30; }
.socam-use { position: absolute; right: 16px; bottom: calc(max(26px, env(safe-area-inset-bottom)) + 96px); background: var(--accent, #0a84ff); }
.socam-strip { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 4px 16px; scrollbar-width: none; }
.socam-th { position: relative; flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.socam-th.on { border-color: #ffd60a; }
.socam-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.socam-th-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; }
.socam-th-x .ico { width: 12px; height: 12px; }
.socam-ask { position: absolute; z-index: 7; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(0,0,0,.7); }
.socam-ask p { margin: 0; font-size: 17px; font-weight: 600; }
.socam-ask div { display: flex; gap: 10px; }
@media (orientation: landscape) and (max-height: 520px) {
  .socam-bottom { left: auto; top: 0; width: auto; flex-direction: row-reverse; padding: 0 max(14px, env(safe-area-inset-right)) 0 30px; background: linear-gradient(90deg, transparent, rgba(0,0,0,.6)); }
  .socam-bar { flex-direction: column-reverse; height: 100%; padding: 16px 0; width: auto; }
  .socam-modes, .socam-zoom { flex-direction: column; }
  .socam-strip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .socam-fx.go, .socam-focus.go { animation: none; } }
/* APK: Camera2-Bild liegt HINTER dem durchsichtigen WebView → alles andere unsichtbar */
html.so-nativecam, html.so-nativecam body { background: transparent !important; }
html.so-nativecam body > :not(.socam):not(#toast):not(.upbar) { visibility: hidden !important; }
html.so-nativecam .socam { background: transparent; }
html.so-nativecam .socam-v { display: none; }
/* Ziel-Kategorie (antippen = wechseln) */
.socam-target { pointer-events: auto; border: 0; color: #fff; display: inline-flex; align-items: center; gap: 6px; font-size: 14px !important; font-weight: 600; opacity: 1 !important; padding: 8px 14px !important; }
.socam-target.pick { background: rgba(245,158,11,.92) !important; color: #1d1300; }
.socam-target .ico { width: 16px; height: 16px; }
.socam-target span { overflow: hidden; text-overflow: ellipsis; }
.socam-menu.targets { left: 50%; right: auto; transform: translateX(-50%); top: calc(max(14px, env(safe-area-inset-top)) + 100px); width: min(360px, calc(100% - 28px)); max-height: 55vh; overflow-y: auto; }
.socam-menu.targets button { display: flex; justify-content: space-between; gap: 10px; }
.socam-menu.targets button.on { background: rgba(245,158,11,.25); color: #ffd60a; }
.socam-menu.targets small { color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.socam-badge { background: #f59e0b; color: #1d1300; }

/* ---------- Angebot: Formular, Unterschrift (angebot.js) ---------- */
/* Geführtes Formular */
body.noscroll { overflow: hidden; }
.wiz { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 12px; }
.wiz-panel { background: var(--panel); border-radius: 16px; width: min(720px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.wiz-panel.narrow { width: min(520px, 100%); }
.wiz-panel > p { padding: 20px; }
.wiz-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 8px; }
.wiz-steps { display: flex; gap: 4px; padding: 4px 18px 10px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.wdot { display: flex; align-items: center; gap: 6px; border: 0; background: var(--gray-soft); color: var(--muted); border-radius: 99px; padding: 4px 10px 4px 4px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.wdot span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); font-weight: 700; }
.wdot em { font-style: normal; }
.wdot.done { color: var(--green); }
.wdot.on { background: var(--accent); color: #fff; }
.wdot.on span { color: var(--accent); }
@media (max-width: 640px) { .wdot:not(.on) em { display: none; } }
.wiz-b { padding: 14px 18px; overflow-y: auto; flex: 1; }
.wiz-f { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.wf { margin-bottom: 14px; }
.wf.main .input { font-size: 18px; font-weight: 600; }
.wl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.wh { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.wh.ok { color: var(--green); } .wh.bad, .bad { color: var(--red); }
.wr, .wchecks { display: grid; gap: 6px; }
.wchecks { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 6px; }
.wopt { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 14px; }
.wopt.on { border-color: var(--accent); background: var(--accent-soft); }
.wopt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.wrow { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; border-bottom: 1px dashed var(--line); margin-bottom: 10px; }
@media (max-width: 640px) { .wrow { grid-template-columns: 1fr; } }
.wsum { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 4px; }
.wsum div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 3px 0; }
.wsum span { color: var(--muted); }
.wsum b { font-weight: 600; text-align: right; }
.wgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .wgrid { grid-template-columns: 1fr; } }
.wmore { margin-top: 6px; } .wmore summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
textarea.input { resize: vertical; }

/* Fehlende Pflichtangaben */
.wf.miss .input { border-color: var(--red); background: var(--red-soft, #fee2e2); }
.wf.miss .wopt { border-color: var(--red); }
.wf.miss > .wl { color: var(--red); }
.miss-t { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: #fff; background: var(--red); border-radius: 99px; padding: 1px 7px; vertical-align: 1px; }
.wdot.miss { background: var(--red); color: #fff; }
.wdot.miss span { color: var(--red); }
.wmiss { border: 1px solid var(--red); background: var(--red-soft, #fee2e2); border-radius: 10px; padding: 10px 12px; margin-top: 12px; display: grid; gap: 6px; color: var(--red); }
.wmiss-i { text-align: left; border: 0; background: transparent; color: inherit; padding: 2px 0; cursor: pointer; font-size: 14px; }
.wmiss-i span { font-weight: 700; }
.wmiss-i:hover { text-decoration: underline; }

/* Unterschreiben im PDF */
.sign { position: fixed; inset: 0; z-index: 46; background: var(--bg); display: flex; flex-direction: column; }
.sign-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sign-tt { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.sign-prog { display: flex; gap: 8px; font-size: 13px; }
.sign-prog span { background: var(--gray-soft); padding: 4px 10px; border-radius: 99px; }
.sign-prog span.ok { background: var(--green-soft); color: var(--green); }
.sign-note { background: var(--accent-soft); color: var(--accent-text); padding: 8px 14px; font-size: 13px; }
.sign-scroll { flex: 1; overflow-y: auto; padding: 14px 10px 30px; -webkit-overflow-scrolling: touch; }
.sign-intro { max-width: 900px; margin: 0 auto 12px; color: var(--muted); font-size: 14px; }
.sign-page { position: relative; max-width: 900px; margin: 0 auto 14px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.sign-page > img { width: 100%; height: 100%; display: block; }
.sign-pno { position: absolute; right: 8px; bottom: -18px; font-size: 11px; color: var(--muted); }
.sign-field { position: absolute; border: 2px dashed #d97706; background: rgba(254, 243, 199, .75); border-radius: 4px; cursor: pointer; padding: 0; display: grid; place-items: center; animation: sfPulse 1.8s ease-in-out infinite; color: #92400e; overflow: hidden; }
.sign-field .sf-empty { font-size: clamp(9px, 1.7vw, 14px); font-weight: 700; line-height: 1.15; display: flex; flex-direction: column; align-items: center; }
.sign-field .sf-empty em { font-style: normal; font-weight: 500; font-size: .78em; opacity: .85; }
.sign-field .sf-img { display: none; max-width: 100%; max-height: 100%; }
.sign-field.done { border: 1px solid transparent; background: transparent; animation: none; }
.sign-field.done:hover { border-color: #d97706; }
.sign-field.done .sf-empty { display: none; }
.sign-field.done .sf-img { display: block; }
@keyframes sfPulse { 50% { background: rgba(253, 230, 138, .95); } }
.sign-foot { display: flex; gap: 10px; align-items: center; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); flex-wrap: wrap; }
.sign-list { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.sg-chip { border: 1px solid var(--line2); background: var(--panel); border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--text); }
.sg-chip.ok { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.pad { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 10px; }
.pad-box { background: var(--panel); border-radius: 14px; width: min(860px, 100%); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pad-h { display: flex; flex-direction: column; }
.pad-wrap { display: flex; justify-content: center; }
.pad-area { position: relative; background: #fff; border: 2px solid #d97706; border-radius: 4px; touch-action: none; box-shadow: inset 0 0 0 4px #fef3c7; }
.pad-area canvas { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.pad-line { position: absolute; left: 3%; right: 3%; border-top: 1.5px solid #9ca3af; pointer-events: none; }
.pad-x { position: absolute; left: 1.5%; color: #9ca3af; font-size: 18px; pointer-events: none; }
.pad-tip { display: none; font-size: 12px; color: var(--accent-text); }
@media (orientation: portrait) and (max-width: 700px) { .pad-tip { display: block; } }
.pad-box { max-height: calc(100dvh - 20px); overflow: auto; }
.pad-f { display: flex; gap: 8px; align-items: center; }

.sign-del { position: absolute; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 12px; cursor: pointer; display: grid; place-items: center; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); z-index: 2; }
.sign-del[hidden] { display: none; }


/* Unterschreiben: nichts markieren, kein Lupen-/Kontextmenü, kein Bild-Ziehen */
.sign, .pad { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.sign img, .pad img { -webkit-user-drag: none; pointer-events: none; }
.sign .sign-field img { pointer-events: none; }
.pad, .pad-area, .pad canvas { touch-action: none; overscroll-behavior: contain; }

/* Einwilligung + „Was fehlt noch?“ beim Unterschreiben */
.sign-consent { display: flex; gap: 10px; align-items: flex-start; flex: 1 1 100%; font-size: 13.5px; line-height: 1.4; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; }
.sign-consent input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.sign-done { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
.sign-why { flex: 1; min-width: 160px; font-size: 13px; color: var(--accent-text); }
#sgDone.blocked { opacity: .55; }

/* Angebot-Feinschliff für Touch */
.wiz-panel { border-radius: 22px; }
.wopt { min-height: 46px; border-radius: 12px; }
.wdot { min-height: 32px; }
@media (max-width: 600px) {
  .wiz { padding: 0; align-items: end; }
  .wiz-panel, .wiz-panel.narrow { width: 100%; max-height: 96dvh; border-radius: 22px 22px 0 0; }
  .wiz-f { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
.sum.warnbox { border: 2px solid var(--red); }
.sum.warnbox b { color: var(--red); }
/* Handy: Kamera-Knopf schwebt unten → kein zweiter im Kopf; schmale Segmente */
@media (pointer: coarse) { body.has-fab #camAll { display: none; } }
@media (max-width: 430px) { .seg button { padding: 0 10px; font-size: 13.5px; } }

/* ---------- Status-Board (Kundenliste) ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--gray-soft); border-radius: 20px; padding: 10px; min-height: 160px; border: 2px solid transparent; transition: border-color .15s, background .15s; }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 15px; }
.col-h b { flex: 1; }
.col-h .n { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--panel); border-radius: 99px; padding: 1px 9px; font-variant-numeric: tabular-nums; }
.col-h .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.col-h .dot.s-Offen { background: var(--accent); }
.col-h .dot.s-Kunden { background: var(--green); }
.col-b { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.col .kcard { min-width: 0; }
.col-empty { text-align: center; color: var(--faint); font-size: 14px; padding: 28px 10px; border: 1.5px dashed var(--line2); border-radius: 14px; }
.col .kcard { padding: 14px; gap: 10px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-x pan-y; }
.col .kcard .av { width: 36px; height: 36px; font-size: 13.5px; }
.col .kcard .nm { font-size: 15.5px; }
.col .kcard .chev { display: none; }
.col .prog { gap: 8px; }
.col .prog .l { font-size: 11.5px; }
@media (hover: hover) { .col .kcard { cursor: grab; } }
.kcard.dragging { opacity: .35; }
.kcard.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: var(--shadow-lg); opacity: .96; transition: none; }
body.dragging-card { cursor: grabbing; -webkit-user-select: none; user-select: none; }
/* iPad hochkant: Karten-Fortschritt kompakter */
@media (max-width: 1000px) { .col .prog { grid-template-columns: 1fr; gap: 6px; } .col .prog > div { flex-direction: row; align-items: center; gap: 8px; } .col .prog .l { min-width: 110px; } .col .prog .bar { flex: 1; } }
/* Handy: Spalten nebeneinander zum Wischen, jede fast bildschirmbreit */
@media (max-width: 700px) {
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .col { flex: 0 0 86%; scroll-snap-align: center; }
}

/* Kontextmenü (Rechtsklick auf Kundenkarte) */
.ctx { position: fixed; z-index: 60; min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg); display: grid; gap: 2px; animation: popIn .12s ease-out; }
.ctx-t { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.ctx button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 0 10px; min-height: 38px; border-radius: 9px; cursor: pointer; font-size: 14.5px; }
.ctx button:hover { background: var(--gray-soft); }
.ctx button .ico { width: 17px; height: 17px; color: var(--muted); }
.ctx button.danger { color: var(--red); }
.ctx button.danger .ico { color: var(--red); }
.ctx button.danger:hover { background: var(--red-soft); }

/* 5 Status: Terminiert · Offen · Unterschrieben · Kunden · Absage */
:root { --blue: #2563eb; --blue-soft: #e6eefe; --violet: #7c3aed; --violet-soft: #efe8fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --blue: #60a5fa; --blue-soft: #14233d; --violet: #a78bfa; --violet-soft: #251a3f; } }
:root[data-theme="dark"] { --blue: #60a5fa; --blue-soft: #14233d; --violet: #a78bfa; --violet-soft: #251a3f; }
.col-h .dot.s-Terminiert { background: var(--blue); }
.col-h .dot.s-Unterschrieben { background: var(--violet); }
.status-sel.s-Terminiert { background-color: var(--blue-soft); color: var(--blue); }
.status-sel.s-Unterschrieben { background-color: var(--violet-soft); color: var(--violet); }
.board { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.view:has(.board) { max-width: 1680px; }
/* schmaler als 5 bequeme Spalten → waagerecht wischen */
@media (max-width: 1400px) {
  .board { display: flex; overflow-x: auto; scroll-snap-type: x proximity; gap: 12px; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: thin; }
  .col { flex: 0 0 290px; scroll-snap-align: start; }
}
@media (max-width: 700px) { .col { flex-basis: 86%; scroll-snap-align: center; } }
/* Spalten nicht schmal: Fortschritt wieder dreispaltig */
@media (max-width: 1000px) and (min-width: 701px) { .col .prog { grid-template-columns: 1fr; } }

/* ---------- Bezahlung ---------- */
.pay-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 520px) { .pay-opts { grid-template-columns: 1fr; } }
.pay-opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: var(--r); border: 2px solid transparent; background: var(--panel); box-shadow: var(--shadow); cursor: pointer; min-height: 72px; }
.pay-opt b { display: block; font-size: 16.5px; }
.pay-opt small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.pay-opt .radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line2); flex-shrink: 0; display: grid; place-items: center; }
.pay-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.pay-opt.on .radio { border-color: var(--accent); }
.pay-opt.on .radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.pay-card { background: var(--panel); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.pay-card h2 { margin-bottom: 12px; }
.lz { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lz-in { display: flex; align-items: center; gap: 10px; }
.lz-in .input { width: 120px; font-size: 20px; font-weight: 700; text-align: center; }
.lz-in span { color: var(--muted); font-weight: 600; }
.lz-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-width: 48px; min-height: 42px; border-radius: 12px; border: 0; background: var(--gray-soft); font-weight: 700; cursor: pointer; }
.chip.on { background: var(--accent); color: #1d1300; }
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .docs { grid-template-columns: 1fr; } }
.doc { display: flex; flex-direction: column; gap: 8px; border: 1.5px dashed var(--line2); border-radius: 14px; padding: 10px; min-width: 0; }
.doc.has { border-style: solid; border-color: var(--line); background: var(--panel2); }
.doc-ph, .doc-prev { width: 100%; aspect-ratio: 1.58; border-radius: 10px; background: var(--gray-soft); display: grid; place-items: center; color: var(--faint); object-fit: cover; }
.doc-prev { cursor: pointer; }
.doc-ph .ico, .doc-prev .ico { width: 30px; height: 30px; }
@media (max-width: 640px) { .doc { flex-direction: row; flex-wrap: wrap; align-items: center; } .doc-ph, .doc-prev { width: 84px; aspect-ratio: 1.4; } .doc-t { flex: 1; } .doc-acts { width: 100%; } }
.doc-t { display: flex; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; }
.doc-t .check { width: 22px; height: 22px; }
.doc-acts { display: flex; gap: 6px; }
.doc-acts .btn:first-child { flex: 1; }
.checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.checks li .ico { width: 20px; height: 20px; flex-shrink: 0; padding: 3px; border-radius: 50%; stroke-width: 3; }
.checks li.ok .ico { background: var(--green); color: #fff; }
.checks li.miss .ico { background: var(--red-soft); color: var(--red); }
.checks li.opt { color: var(--muted); }
.checks li.opt .ico { background: var(--gray-soft); color: var(--muted); }
.doc-ph, .doc-prev { max-height: 170px; }

/* ---------- Board ohne Seitwärts-Scrollen ab Tablet ---------- */
.prog .l i { font-style: normal; }
.prog .l .li { display: none; width: 14px; height: 14px; }
@media (min-width: 701px) {
  .board { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 8px; overflow: visible; margin: 0; padding: 0; }
  .col { flex: none; padding: 6px; border-radius: 16px; }
  .col-h { padding: 4px 6px 8px; font-size: 14px; gap: 6px; }
  .col-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .col-b { gap: 6px; }
  .view:has(.board) { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
}
/* Karte richtet sich nach der Spaltenbreite (nicht nach dem Bildschirm) */
.col { container-type: inline-size; container-name: col; }
/* breite Spalte: drei Zeilen Label · Zahl · Balken */
@container col (min-width: 241px) {
  .col .prog { grid-template-columns: 1fr; gap: 5px; }
  .col .prog > div { flex-direction: row; align-items: center; gap: 8px; }
  .col .prog .l { min-width: 108px; }
  .col .prog .bar { flex: 1; }
}
/* schmale Spalte (iPad): kompakt, Symbole statt Wörter */
@container col (max-width: 240px) {
  .col .kcard { padding: 10px; gap: 8px; border-radius: 13px; }
  .col .kcard-h { gap: 8px; align-items: flex-start; flex-wrap: wrap; }
  .col .kcard .av { display: none; }
  .col .kcard .nm { font-size: 14.5px; white-space: normal; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1 1 100%; }
  .col .kcard .pill { font-size: 10.5px; padding: 1px 7px; order: 2; }
  .col .prog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .col .prog > div { flex-direction: column; align-items: stretch; gap: 4px; }
  .col .prog .l { min-width: 0; justify-content: flex-start; align-items: center; gap: 3px; font-size: 11.5px; }
  .col .prog .l i { display: none; }
  .col .prog .l .li { display: block; color: var(--faint); }
  .col .prog .bar { height: 4px; }
  .col-empty { padding: 18px 6px; font-size: 12.5px; }
}
@container col (max-width: 240px) {
  .col-h { font-size: 12.5px; gap: 5px; padding: 4px 4px 8px; }
  .col-h .dot { width: 7px; height: 7px; flex-shrink: 0; }
  .col-h .n { font-size: 11px; padding: 0 6px; }
  .col .prog { gap: 4px; }
  .col .prog .l { font-size: 10.5px; gap: 2px; white-space: nowrap; }
  .col .prog .l .li { width: 12px; height: 12px; flex-shrink: 0; }
}
/* Spaltenkopf sitzt außerhalb des Containers → eigene Abfrage über die Bildschirmbreite */
@media (min-width: 701px) and (max-width: 1100px) {
  .col-h { font-size: 12.5px; gap: 5px; padding: 4px 4px 8px; }
  .col-h .dot { width: 7px; height: 7px; flex-shrink: 0; }
  .col-h .n { font-size: 11px; padding: 0 6px; }
}
/* Spaltenname darf auf schmalen Tablets umbrechen (Unter-schrieben) statt abgeschnitten zu werden */
@media (min-width: 701px) and (max-width: 1100px) {
  .col-h { align-items: flex-start; }
  .col-h .dot { margin-top: 5px; }
  .col-h b { white-space: normal; overflow: visible; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; line-height: 1.2; }
}
/* sehr schmale Spalte: Symbol über der Zahl, damit nichts aneinanderklebt */
@container col (max-width: 200px) {
  .col .prog .l { flex-direction: column; align-items: center; gap: 1px; }
}
.slot .as-bild { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: inherit; font-size: 13px; font-weight: 600; }
.slot .as-bild:hover { text-decoration: underline; }
.pay-src { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 10px; font-size: 14.5px; }
.pay-src > .ico { color: var(--accent-strong); }
.pay-src span { flex: 1; min-width: 0; }
.pay-hint { margin: 0 2px 10px; }
.pay-opts.locked .pay-opt { cursor: default; }
.pay-opts.locked .pay-opt:not(.on) { opacity: .45; box-shadow: none; }

/* ---------- Datei-Popup (PDF/Foto ansehen & bearbeiten) ---------- */
html.fv-open, html.fv-open body { overflow: hidden; }
.fv { position: fixed; inset: 0; z-index: 38; display: flex; align-items: center; justify-content: center; padding: 18px; }
.fv-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fvFade .15s; }
.fv-win { position: relative; width: min(1280px, 100%); height: 100%; max-height: 100%; background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: fvIn .18s ease-out; }
@keyframes fvFade { from { opacity: 0; } }
@keyframes fvIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.fv-head { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); min-height: 58px; }
.fv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 6px; line-height: 1.25; }
.fv-title b, .fv-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-title b { font-size: 15.5px; }
.fv-title small { font-size: 12.5px; color: var(--muted); }
.fv-ib { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text); display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.fv-ib:hover { background: var(--gray-soft); }
.fv-save { margin-left: 4px; }
.fv-tools { display: flex; align-items: center; flex-wrap: nowrap; gap: 1px; padding: 3px 8px; border-bottom: 1px solid var(--line); background: var(--panel); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; flex-shrink: 0; }
.fv-tools::-webkit-scrollbar { display: none; }
.fv-tg { display: flex; align-items: center; gap: 1px; flex-shrink: 0; }
.fv-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex-shrink: 0; }
.fv-tb { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.fv-tb .ico { width: 18px; height: 18px; }
.fv-tb span { display: none; }
@media (hover: hover) { .fv-tb:hover:not(:disabled) { background: var(--gray-soft); color: var(--text); } }
.fv-tb.on { background: var(--accent-soft); color: var(--accent-text); }
.fv-tb:disabled { opacity: .3; cursor: default; }
.fv-zl { font-size: 12px; font-weight: 500; min-width: 44px; padding: 0 2px; font-variant-numeric: tabular-nums; }
.fv-col { width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(127,127,127,.35); cursor: pointer; margin: 0 3px; padding: 0; flex-shrink: 0; }
.fv-col.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent); }
.fv-wd { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.fv-wd i { display: block; width: 14px; background: var(--muted); border-radius: 9px; }
.fv-wd.on { background: var(--accent-soft); }
.fv-wd.on i { background: var(--accent-text); }
.fv-sub { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.fv-adjs { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; width: 100%; }
.fv-adj { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.fv-adj input { width: 140px; accent-color: var(--accent); }
.fv-adj b { width: 42px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fv-body { flex: 1; min-height: 0; position: relative; background: #e9e9ee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fv-body { background: #101012; } }
:root[data-theme="dark"] .fv-body { background: #101012; }
.fv-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); text-align: center; padding: 20px; }
.fv-busy .ico { width: 40px; height: 40px; }
.fv-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: fvSpin .8s linear infinite; }
@keyframes fvSpin { to { transform: rotate(360deg); } }
.fv-center { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.fv-center video { max-width: 100%; max-height: 100%; }
.fv-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
/* PDF */
.fv-pdf { position: absolute; inset: 0; display: flex; }
.fv-side { width: 150px; flex-shrink: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); background: var(--panel2); }
.fv-th { border: 0; background: transparent; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.fv-th canvas { width: 100%; height: auto; background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px var(--line2); }
.fv-th.cur canvas { box-shadow: 0 0 0 2.5px var(--accent); }
.fv-th.cur span { color: var(--accent-text); font-weight: 700; }
.fv-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
.fv-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 24px 40px; width: max-content; min-width: 100%; }
.fv-page { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 6px 20px rgba(0,0,0,.08); flex-shrink: 0; }
.fv-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fv-page .ov { touch-action: pan-x pan-y; }   /* Zwei-Finger-Zoom macht fileview.js selbst */
.fv-pno { position: absolute; right: -6px; bottom: -22px; font-size: 11.5px; color: var(--faint); }
.fv-page.cur { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent), 0 6px 20px rgba(0,0,0,.08); }
.fv-drawing .ov { touch-action: none; cursor: crosshair; }
.fv-body[data-tool="select"] .ov, .fv-body[data-tool="erase"] .ov { cursor: pointer; }
.fv-body[data-tool="text"] .ov { cursor: text; }
/* Foto */
.fv-img { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.fv-stage { position: absolute; left: 50%; top: 50%; box-shadow: 0 4px 24px rgba(0,0,0,.18); }
.fv-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fv-img, .fv-img * { touch-action: none; }   /* Zoomen/Verschieben macht fileview.js */
/* kleine Dialoge im Popup */
.fv-pad { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(0,0,0,.45); padding: 14px; }
.fv-pad-box { background: var(--panel); border-radius: 18px; padding: 18px; width: min(640px, 100%); box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.fv-pad-box.narrow { width: min(440px, 100%); }
.fv-pad-box h3 { margin: 0; font-size: 17px; }
.fv-pad-box textarea { resize: vertical; min-height: 90px; }
.fv-pad-f { display: flex; gap: 8px; justify-content: flex-end; }
.fv-sigwrap { position: relative; height: 220px; background: #fff; border-radius: 12px; border: 1px solid var(--line2); }
.fv-sigwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.fv-sigline { position: absolute; left: 8%; right: 8%; bottom: 52px; border-bottom: 1.5px dashed #c7c7cc; pointer-events: none; }
@media (max-width: 720px) {
  .fv { padding: 0; }
  .fv-win { border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: var(--safe-b); }
  .fv-head { min-height: 52px; padding: 4px 6px; }
  .hide-s { display: none !important; }
  .fv-tools { order: 9; border-bottom: 0; border-top: 1px solid var(--line); }
  .fv-sub { order: 8; border-bottom: 0; border-top: 1px solid var(--line); }
  .fv-pages { padding: 10px 8px 34px; }
  .fv-tb { min-width: 36px; height: 36px; }
}

/* ---------- Notizen ---------- */
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.nt-card { background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; min-width: 0; transition: transform .1s; }
.nt-card:active { transform: scale(.985); }
.nt-prev { height: 170px; overflow: hidden; position: relative; pointer-events: none; border-bottom: 1px solid var(--line); }
.nt-prev.ink { background: #fff; }
.nt-prev.ink canvas { width: 100%; height: 100%; display: block; }
.nt-prev.md { padding: 10px 14px; font-size: 13px; line-height: 1.4; color: var(--muted); -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.nt-prev.md :is(h2, h3, h4, h5) { font-size: 14px; color: var(--text); margin: 0 0 4px; }
.nt-prev.md :is(p, ul, ol, blockquote, pre) { margin: 0 0 6px; }
.nt-prev.md :is(ul, ol) { padding-left: 18px; }
.nt-prev.md li.task { list-style: none; margin-left: -18px; }
.nt-f { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; }
.nt-ic { color: var(--accent-strong); display: grid; }
.nt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nt-t b, .nt-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-t b { font-size: 14.5px; }
.nt-t small { font-size: 12px; color: var(--muted); }
.nt-head-r { display: flex; align-items: center; }
.nt-mode button { min-height: 34px; padding: 0 10px; font-size: 13.5px; }
.nt-body { background: var(--panel); }
.nt-ta { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; outline: none; resize: none; padding: 18px max(18px, calc((100% - 760px) / 2)) 40vh; background: var(--panel); font-size: 17px; line-height: 1.55; }
.nt-md { position: absolute; inset: 0; overflow-y: auto; padding: 18px max(18px, calc((100% - 760px) / 2)) 80px; font-size: 16.5px; line-height: 1.55; -webkit-overflow-scrolling: touch; }
.nt-md h2 { font-size: 24px; margin: 18px 0 8px; } .nt-md h3 { font-size: 20px; margin: 16px 0 6px; } .nt-md :is(h4, h5) { font-size: 17px; margin: 14px 0 6px; }
.nt-md > :first-child { margin-top: 0; }
.nt-md :is(p, ul, ol, pre, blockquote) { margin: 0 0 12px; }
.nt-md li.task { list-style: none; margin-left: -22px; display: flex; gap: 8px; align-items: flex-start; }
.nt-md li.task input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.nt-md li.task.done span { text-decoration: line-through; color: var(--muted); }
.nt-md code, .nt-md pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--gray-soft); border-radius: 6px; }
.nt-md code { padding: 1px 5px; } .nt-md pre { padding: 10px 12px; overflow-x: auto; }
.nt-md blockquote { border-left: 3px solid var(--line2); padding-left: 12px; color: var(--muted); }
.nt-md a { color: var(--accent-text); text-decoration: underline; }
.nt-md hr { border: 0; border-top: 1px solid var(--line2); margin: 16px 0; }
.nt-cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; display: block; }
.nt-body[data-tool="hand"] .nt-cv { cursor: grab; }
.nt-body[data-tool="erase"] .nt-cv { cursor: cell; }
.nt-sb { position: absolute; top: 6px; bottom: 6px; right: 3px; width: 4px; pointer-events: none; }
.nt-sb i { position: absolute; left: 0; right: 0; border-radius: 4px; background: rgba(0,0,0,.25); }
.nt-hint { font-size: 12px; color: var(--faint); white-space: nowrap; padding: 0 8px; }
@media (max-width: 720px) { .nt-hint { display: none; } .nt-mode button .ico { display: none; } }

/* ---------- Offline ---------- */
.netpill { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(24px + var(--safe-b)); z-index: 14; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 120px); padding: 9px 14px; border-radius: 999px; border: 0; background: var(--panel); color: var(--text); font: 600 13.5px/1.2 inherit; box-shadow: var(--shadow), 0 4px 16px rgba(0,0,0,.12); cursor: pointer; }
.netpill[hidden] { display: none; }
.netpill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.netpill .ico { width: 17px; height: 17px; flex: none; color: var(--accent-strong); }
.netpill.off { background: var(--gray-soft); }
.netpill.off .ico { color: var(--red); }
.th.pend, img.pend, .vid.pend { opacity: .55; outline: 2px dashed var(--accent); outline-offset: -2px; }
.off-rows { display: grid; gap: 2px; margin-bottom: 8px; }
.off-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.off-rows > div:last-child { border-bottom: 0; }
.off-rows span { color: var(--muted); }
.off-rows b.good { color: var(--green); }
.off-rows b.bad { color: var(--red); }
.nt-prev.nt-leer { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--faint); font-size: 13px; background: var(--panel2); }
.nt-prev.nt-leer .ico { width: 30px; height: 30px; }
.nt-prev.td-prev { padding: 12px 14px; font-size: 13.5px; }
.nt-prev.td-prev ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nt-prev.td-prev li { display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-prev.td-prev li::before { content: ''; width: 13px; height: 13px; border: 1.5px solid var(--line2); border-radius: 4px; flex-shrink: 0; }
.nt-badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--accent); color: #1d1300; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; margin-right: 10px; }
.nt-f { min-height: 52px; }
/* ToDo-Editor */
.td { position: absolute; inset: 0; overflow-y: auto; padding: 18px max(16px, calc((100% - 720px) / 2)) 60px; -webkit-overflow-scrolling: touch; }
.td-add { display: flex; gap: 8px; margin-bottom: 14px; }
.td-add .input { flex: 1; min-width: 0; }
.td-list { display: grid; gap: 2px; }
.td-row { display: flex; align-items: center; gap: 6px; padding: 2px 2px 2px 4px; border-radius: 12px; }
.td-row:focus-within { background: var(--panel2); }
.td-cb { position: relative; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.td-cb input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.td-cb i { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line2); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.td-cb i .ico { width: 16px; height: 16px; stroke-width: 3; }
.td-row.done .td-cb i { background: var(--green); border-color: var(--green); color: #fff; }
.td-tx { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16.5px; padding: 10px 4px; }
.td-row.done .td-tx { text-decoration: line-through; color: var(--muted); }
.td-del { color: var(--faint); }
@media (hover: hover) { .td-row .td-del { opacity: 0; } .td-row:hover .td-del, .td-row:focus-within .td-del { opacity: 1; } }
.td-empty { color: var(--muted); text-align: center; padding: 24px 8px; margin: 0; }
.td-done-h { display: flex; justify-content: space-between; margin: 14px 0 4px; color: var(--muted); }
@media (max-width: 720px) { .td-add .btn span { display: none; } .td-add .btn { padding: 0 14px; } }

/* iPad: beim Schreiben/Zeichnen nichts markieren, keine Lupe, kein Kontextmenü */
.fv-win, .nt-body:has(.nt-cv) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.fv-win input, .fv-win textarea { -webkit-user-select: text; user-select: text; }
.fv-page canvas, .fv-stage canvas, .nt-cv { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Dachplanung mit SolarPro (Unterlagen) */
.plan-card { margin-top: 12px; background: var(--panel); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.plan-card .slot-h .big { color: var(--accent-text); }
.plan-card .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-st { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.plan-st .ico { width: 16px; height: 16px; flex-shrink: 0; }
.plan-st.ok { color: var(--green); } .plan-st.warn { color: var(--accent-text); } .plan-st.bad { color: var(--red); } .plan-st.run { color: var(--muted); }
.plan-sum { font-size: 14px; }
.plan-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: planSpin .8s linear infinite; flex-shrink: 0; }
@keyframes planSpin { to { transform: rotate(360deg); } }
.plan-rep { font-size: 13px; color: var(--muted); }
.plan-rep summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 4px 0; }
.plan-rep div { padding: 2px 0; }
.plan-rep .ok { color: var(--green); } .plan-rep .bad { color: var(--red); }
.plan-erk { color: var(--text); padding-bottom: 6px !important; }
