:root {
    --bg: #f3f6fa;
    --panel: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --line: #d9e2ec;
    --soft: #eef3f8;
    --primary: #1f4d7a;
    --primary-dark: #173a5c;
    --danger: #a52828;
    --ok: #167447;
    --warn: #8a5a00;
    --shadow: 0 10px 28px rgba(15, 34, 56, .08);
    --radius: 16px;
    --touch: 48px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.45;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    background: #fff;
    color: var(--primary);
    padding: 10px 12px;
    border-radius: 10px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; }
.container { width: min(1180px, calc(100% - 24px)); margin: 0 auto; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    background: #0f2238;
    color: #fff;
    border-bottom: 1px solid #0b1828;
    box-shadow: 0 8px 22px rgba(15, 34, 56, .18);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 58px;
    gap: 12px;
}
.brand {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: var(--touch);
}
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: #e5edf5;
    color: #0f2238;
    font-size: 13px;
    letter-spacing: .04em;
}
.nav-toggle {
    min-height: 42px;
    min-width: 76px;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.25);
    color: #fff;
}
.main-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 66px;
    background: #102944;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 8px;
}
.main-nav.open { display: grid; gap: 4px; }
.main-nav a {
    color: #e5edf5;
    display: flex;
    align-items: center;
    min-height: var(--touch);
    padding: 0 12px;
    border-radius: 12px;
}
.main-nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }

.main { padding: 18px 0 34px; }
.footer { display: none; border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); background: #fff; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(24px, 6vw, 34px); }
h2 { font-size: clamp(20px, 4.8vw, 24px); margin-top: 10px; }
h3 { font-size: 18px; margin-top: 18px; }
p { margin-top: 0; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(15,34,56,.04);
}
.page-head,
.project-headline {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.page-head .actions,
.project-headline .actions { margin-top: 0; width: 100%; }

.grid, .grid-3, .form-split, .wide-left, .filterbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

label { display: block; font-weight: 800; margin-bottom: 7px; }
input, textarea, select {
    width: 100%;
    min-height: var(--touch);
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}
input[type="file"] { padding: 10px; }
textarea { min-height: 112px; resize: vertical; }
.form-row { margin-bottom: 14px; }
.help { border-left: 4px solid var(--primary); background: #eef5fb; padding: 12px 14px; border-radius: 10px; color: #173a5c; }
.disclaimer { border-left: 4px solid var(--warn); padding: 10px 12px; background: #fff8e6; border-radius: 10px; }

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
}
.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--touch);
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 12px 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.15;
}
.button:hover, button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary { background: #fff; color: var(--primary); }
.button.danger { background: var(--danger); border-color: var(--danger); }
.button.ghost { background: transparent; color: var(--primary); border-color: transparent; }
.actions .button, .actions button { flex: 1 1 150px; }

.alert { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line); background: #fff; }
.alert-success { border-color: #b6dfca; background: #ecf9f2; color: #125c37; }
.alert-error { border-color: #f1b6b6; background: #fff0f0; color: #8a1f1f; }
.alert-warning { border-color: #f3d792; background: #fff8e6; color: #6f4700; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #eef3f8; color: #334155; font-size: 12px; font-weight: 700; }

/* Projekt-Navigation */
.project-tabs-wrap {
    position: sticky;
    top: 58px;
    z-index: 60;
    background: linear-gradient(var(--bg) 70%, rgba(243,246,250,0));
    margin: -2px -12px 12px;
    padding: 8px 12px 10px;
}
.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}
.tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 6px 16px rgba(31,77,122,.18); }

/* Wizard */
.wizard-mobile-summary {
    border: 1px solid var(--line);
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0;
}
.wizard-mobile-summary strong { display: block; font-size: 18px; margin-top: 2px; }
.wizard-steps {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 12px 0;
}
.wizard-steps::-webkit-scrollbar { display: none; }
.wizard-step {
    flex: 0 0 auto;
    min-width: 116px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
}
.wizard-step span {
    display: inline-flex;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #eef3f8;
    color: #334155;
    font-weight: 800;
    flex: 0 0 auto;
}
.wizard-step strong { font-size: 13px; color: inherit; }
.wizard-step.active { border-color: var(--primary); color: var(--primary); box-shadow: 0 6px 16px rgba(31,77,122,.12); }
.wizard-step.active span { background: var(--primary); color: #fff; }
.wizard-step.done { border-color: #b6dfca; color: var(--ok); }
.wizard-step.done span { background: #ecf9f2; color: var(--ok); }

/* Kennzahlen */
.progress-row { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; margin-top:14px; }
.progress-card { border:1px solid var(--line); background:#f8fafc; border-radius:14px; padding:12px; }
.progress-card strong { display:block; font-size:24px; line-height:1; color:var(--primary); margin-bottom:6px; }
.progress-card span { color:var(--muted); font-size:13px; }
.progress-box { display:flex; gap:8px; flex-wrap:wrap; width: 100%; }
.progress-box div { flex: 1 1 120px; border:1px solid var(--line); border-radius:14px; padding:10px 12px; background:#f8fafc; }
.progress-box strong { display:block; font-size:20px; color:var(--primary); }
.progress-box span { display:block; font-size:12px; color:var(--muted); }
.mini-progress { width:100%; height:9px; background:#e5eaf1; border-radius:999px; overflow:hidden; margin:9px 0 4px; }
.mini-progress span { display:block; height:100%; background:var(--primary); border-radius:999px; }

/* Karten statt Tabellen */
.project-card-list,
.heatpump-card-list,
.card-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.project-card,
.heatpump-card,
.card {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(15,34,56,.04);
}
.project-card h2,
.heatpump-card h3,
.card h3 { margin-top: 0; }
.project-card-title { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.project-meta { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 12px 0; }
.project-meta div { border: 1px solid var(--line); background: #f8fafc; border-radius: 12px; padding: 10px; }
.project-card-actions,
.heatpump-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 720px; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f0f4f8; font-size: 13px; color: #334155; }
.table tr:last-child td { border-bottom: 0; }
.compact-table th, .compact-table td { padding: 8px 10px; font-size: 14px; }
.desktop-only { display: none; }
.mobile-only { display: block; }
.table-actions { white-space: nowrap; }

/* Key-value und Listen */
.kv { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.kv div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv div:nth-child(odd) { color: var(--muted); padding-bottom: 0; font-size: 13px; }
.kv div:nth-child(even) { padding-top: 3px; font-weight: 700; }
.clean-list { list-style:none; padding:0; margin:0 0 16px; }
.clean-list li { padding:10px 0; border-bottom:1px solid var(--line); }
.clean-list li:last-child { border-bottom:0; }
.quick-actions { display:grid; grid-template-columns: 1fr; gap:8px; }

/* Checkkarten */
.check-card {
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
    padding:13px;
    margin-bottom:12px;
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    align-items:center;
}
.check-card strong { display:block; font-size: 16px; }
.checkline { display:flex; gap:8px; align-items:center; font-weight:400; margin:8px 0; }
.checkline input { width:auto; min-height: auto; }
.photo-requirements { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; margin-bottom:16px; }
.requirement { border:1px solid var(--line); background:#fff8e6; border-radius:14px; padding:12px; }
.requirement.ok { background:#ecf9f2; border-color:#b6dfca; }
.requirement strong { display:block; }
.requirement span { color:var(--muted); font-size:13px; }
.side-note { background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; padding: 14px; color: var(--muted); }

/* Fotos & Signaturen */
.photo-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.photo-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #f1f5f9; }
.photo-card .body { padding: 12px; }
.signature-canvas { width:100%; height:220px; background:#fff; border:2px dashed var(--line); border-radius:16px; touch-action:none; }
.signature-grid { display:grid; grid-template-columns: 1fr; gap:12px; }
.signature-card { border:1px solid var(--line); border-radius:16px; background:#fff; padding:14px; }
.signature-card img { width:100%; max-height:140px; object-fit:contain; background:#fff; border-bottom:1px solid var(--line); margin-bottom:10px; }
.logo-preview { border:1px solid var(--line); border-radius:16px; padding:12px; margin:10px 0; background:#fff; }
.logo-preview img { max-width:240px; max-height:90px; object-fit:contain; }

/* Filter */
.filter-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.inline-form { display: inline; }

/* Dokument */
.print-header { display: none; }
.document-cover { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; border-bottom:2px solid #111; padding-bottom:16px; }
.doc-logo { max-width:220px; max-height:90px; object-fit:contain; margin-bottom:12px; }
.document-title h1 { font-size:36px; }
.print-keep, .print-signature { page-break-inside:avoid; }
.severity-info { background:#eef3f8; }
.severity-warning { background:#fff8e6; color:#6f4700; }
.severity-critical { background:#fff0f0; color:#8a1f1f; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(15,34,56,.10);
    backdrop-filter: blur(10px);
}
.bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 13px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}
.bottom-nav a:hover { background: var(--soft); text-decoration: none; }

@media (max-width: 720px) {
    .field-work-page .side-note { display: none; }
    .field-work-page .actions {
        position: sticky;
        bottom: calc(66px + env(safe-area-inset-bottom));
        z-index: 50;
        background: rgba(255,255,255,.96);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px;
        box-shadow: var(--shadow);
        backdrop-filter: blur(8px);
    }
    .field-work-page .actions .button,
    .field-work-page .actions button { flex-basis: 100%; }
}

@media (min-width: 720px) {
    body { padding-bottom: 0; }
    .container { width: min(1180px, calc(100% - 32px)); }
    .footer { display: block; }
    .bottom-nav { display: none; }
    .main { padding: 28px 0 48px; }
    .topbar { position: sticky; }
    .nav-toggle { display: none; }
    .main-nav {
        display: flex;
        position: static;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        gap: 14px;
    }
    .main-nav a { min-height: 44px; padding: 0 4px; }
    .panel { padding: 20px; margin-bottom: 18px; }
    .page-head .actions,
    .project-headline .actions { width: auto; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .form-split { grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
    .wide-left { grid-template-columns: minmax(0, 1fr) 360px; }
    .filterbar { grid-template-columns: 220px 260px minmax(220px, 1fr) auto; gap: 12px; align-items: end; }
    .filter-actions { display:flex; gap:8px; flex-wrap:wrap; }
    .actions .button, .actions button { flex: 0 0 auto; }
    .project-tabs-wrap { top: 60px; margin: 0 0 16px; padding: 0; background: transparent; }
    .tabs { flex-wrap: wrap; overflow: visible; margin: 18px 0; }
    .wizard-mobile-summary { display: none; }
    .wizard-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); overflow: visible; gap: 10px; }
    .wizard-step { min-width: 0; }
    .progress-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap:12px; }
    .progress-box { width: auto; }
    .project-card-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
    .heatpump-card-list { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
    .project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-card-actions, .heatpump-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .desktop-only { display: block; }
    .mobile-only { display: none; }
    .kv { grid-template-columns: 210px minmax(0, 1fr); }
    .kv div:nth-child(odd) { padding: 10px 18px 10px 0; font-size: 14px; }
    .kv div:nth-child(even) { padding-top: 10px; font-weight: 400; }
    .compact-kv { grid-template-columns: 190px minmax(0, 1fr); }
    .quick-actions { display:flex; flex-wrap:wrap; gap:10px; }
    .check-card { grid-template-columns:minmax(0, 1fr) 180px minmax(180px, 1fr); }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .photo-requirements { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .signature-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

@media print {
    body { background: #fff; color: #000; padding-bottom: 0; }
    .topbar, .footer, .tabs, .project-tabs-wrap, .bottom-nav, .no-print, .actions { display: none !important; }
    .container { width: 100%; margin: 0; }
    .main { padding: 0; }
    .panel { border: 0; box-shadow: none; page-break-inside: avoid; padding: 0; margin: 0 0 22px; }
    .print-header { display: block; margin-bottom: 24px; }
    a { color: #000; text-decoration: none; }
    .table { min-width: 0; }
    .table th { background: #eee !important; }
    .progress-row { grid-template-columns: repeat(5, 1fr); }
    .progress-card { border:1px solid #aaa; background:#fff; }
    .progress-card strong { color:#000; }
    .document-cover { display:flex !important; }
    .doc-photos { grid-template-columns: repeat(2, 1fr); }
    .signature-card { border:1px solid #aaa; }
}


/* Security/CSP: ersetzt frühere Inline-Styles */
.panel-auth { max-width: 520px; margin: auto; }
.panel-setup { max-width: 680px; margin: auto; }
.panel-wide-centered { max-width: 820px; margin: auto; }
.status-col { width: 190px; }
.split-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; flex-wrap:wrap; }
.checkbox-input { width: auto; }
.mini-progress span { width: 0%; }

/* v9 Produkt-Landingpage */
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e7eef7;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.lead { font-size: clamp(17px, 4.3vw, 21px); color: #334155; max-width: 760px; }
.hero-product {
    display: grid;
    gap: 24px;
    align-items: center;
    padding: clamp(22px, 6vw, 48px);
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #eef5fb 62%, #e2edf7 100%);
}
.hero-copy h1 { font-size: clamp(30px, 8vw, 56px); max-width: 900px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 12px; }
.hero-actions .button { flex: 1 1 180px; }
.hero-card { display: flex; justify-content: center; }
.phone-preview {
    width: min(310px, 100%);
    border: 10px solid #102944;
    border-radius: 34px;
    background: #102944;
    box-shadow: 0 26px 70px rgba(15, 34, 56, .25);
}
.phone-top { height: 24px; background: #102944; border-radius: 22px 22px 0 0; }
.phone-screen { background: #f8fafc; border-radius: 22px; padding: 18px; }
.task-row {
    display: flex;
    align-items: center;
    min-height: 48px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 0 14px;
    margin-top: 10px;
    font-weight: 800;
}
.task-row.done { border-color: #b6dfca; background: #ecf9f2; color: #125c37; }
.task-row.active { border-color: #a8c7e6; background: #eef5fb; color: #173a5c; }
.section-block { margin: 28px 0; }
.section-head { max-width: 860px; margin-bottom: 16px; }
.feature-grid, .pricing-grid, .timeline-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.feature-card, .price-card, .timeline-grid > div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15,34,56,.04);
}
.feature-card strong { display: block; font-size: 18px; margin-bottom: 6px; }
.workflow-band {
    background: #102944;
    color: #fff;
    border-radius: 22px;
    padding: clamp(18px, 5vw, 34px);
}
.workflow-band .muted { color: #cbd5e1; }
.timeline-grid > div { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); box-shadow: none; }
.timeline-grid span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5edf5;
    color: #102944;
    font-weight: 900;
    margin-bottom: 10px;
}
.split-cta { display: grid; grid-template-columns: 1fr; gap: 14px; }
.dark-panel { background: #102944; color: #fff; }
.dark-panel .button.secondary { background: #fff; color: #102944; border-color: #fff; }
.page-hero-mini { padding: clamp(20px, 5vw, 34px); }
.price-card { position: relative; }
.price-card.featured { border-color: var(--primary); box-shadow: var(--shadow); }
.price { font-size: clamp(30px, 8vw, 44px); font-weight: 900; margin: 8px 0; color: var(--primary); }
.check-list { list-style: none; padding: 0; margin: 18px 0; }
.check-list li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 900; }
.inline-form { display: inline-flex; margin: 0; width: 100%; }
.inline-form button { width: 100%; }
.empty-state { text-align: left; }

/* v9 Abschlussmappe */
.doc-shell {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.doc-cover-pro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: clamp(24px, 6vw, 52px);
    background: linear-gradient(135deg, #102944 0%, #1f4d7a 58%, #e5edf5 58%, #f8fafc 100%);
    color: #fff;
}
.doc-cover-pro h1 { font-size: clamp(30px, 8vw, 54px); margin: 8px 0; }
.doc-cover-pro p { max-width: 700px; }
.doc-brand { display: inline-block; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #dbeafe; }
.doc-logo { max-height: 58px; max-width: 180px; background: #fff; border-radius: 12px; padding: 8px; margin-bottom: 10px; }
.doc-meta-box {
    background: rgba(255,255,255,.95);
    color: var(--text);
    border-radius: 18px;
    padding: 18px;
    align-self: start;
    box-shadow: 0 14px 32px rgba(15,34,56,.16);
}
.doc-section { padding: clamp(18px, 5vw, 34px); border-top: 1px solid var(--line); }
.doc-section h2 { margin-bottom: 18px; }
.exec-summary { background: #f8fafc; }
.doc-kpi-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.doc-kpi-row > div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}
.doc-kpi-row strong { display: block; font-size: 28px; color: var(--primary); line-height: 1; }
.doc-kpi-row span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.status-strip {
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
}
.status-ok { background: #ecf9f2; border-color: #b6dfca; color: #125c37; }
.status-critical { background: #fff0f0; border-color: #f1b6b6; color: #8a1f1f; }
.doc-two-col, .doc-device-grid, .check-summary-grid, .work-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.doc-info-card, .doc-device-card, .work-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
}
.doc-info-card span, .doc-device-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.doc-info-card strong, .doc-device-card strong { display: block; font-size: 18px; margin-bottom: 6px; }
.doc-device-card { display: grid; gap: 7px; }
.doc-flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.doc-flow div {
    position: relative;
    background: #eef5fb;
    color: #173a5c;
    border: 1px solid #c7d9eb;
    border-radius: 16px;
    padding: 14px;
    font-weight: 800;
}
.doc-note {
    background: #fff8e6;
    border: 1px solid #f3d792;
    border-radius: 16px;
    padding: 14px;
}
.check-summary-grid { grid-template-columns: 1fr; }
.check-pill {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}
.check-pill strong { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.check-pill span { display: block; font-weight: 800; margin: 4px 0; }
.check-pill em { font-style: normal; font-size: 13px; font-weight: 900; }
.check-pill.done { border-color: #b6dfca; background: #ecf9f2; }
.check-pill.open { border-color: #f3d792; background: #fff8e6; }
.check-pill.not_relevant { background: #f8fafc; color: #64748b; }
.work-card span { display: block; color: var(--muted); font-size: 13px; }
.severity-critical { border-left: 5px solid var(--danger); }
.severity-warning { border-left: 5px solid var(--warn); }
.severity-info { border-left: 5px solid var(--primary); }
.doc-footer-note { background: #f8fafc; }
.document-actions { margin-top: 0; margin-bottom: 14px; }

/* Öffentliche Beispielmappe */
.sample-document { margin-bottom: 24px; }
.sample-photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sample-photo-grid div {
    min-height: 110px;
    border: 2px dashed #a8c7e6;
    border-radius: 16px;
    background: #eef5fb;
    color: #173a5c;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    font-weight: 900;
}
.signature-line {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    display: grid;
    gap: 10px;
    max-width: 520px;
}
.signature-line span { color: var(--muted); }
.signature-line strong { font-size: 24px; font-family: Georgia, serif; font-style: italic; }

/* v9 Monteur-Modus besser auf Smartphone */
.field-work-page .panel:first-child { background: linear-gradient(135deg, #fff, #eef5fb); }
.progress-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}
.progress-box > div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}
.progress-box strong { display: block; font-size: 22px; color: var(--primary); }
.progress-box span { display: block; color: var(--muted); font-size: 12px; }
.check-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    margin-bottom: 12px;
    display: grid;
    gap: 10px;
}
.check-card strong { font-size: 16px; }
.photo-requirements {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.requirement {
    border: 1px solid #f3d792;
    background: #fff8e6;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.requirement.ok { border-color: #b6dfca; background: #ecf9f2; }
.side-note {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    height: fit-content;
}

@media (min-width: 760px) {
    .hero-product { grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); }
    .hero-actions .button { flex: 0 0 auto; }
    .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .timeline-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .split-cta { grid-template-columns: 1fr 1fr; }
    .inline-form { width: auto; }
    .doc-cover-pro { grid-template-columns: 1fr 300px; }
    .doc-kpi-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .doc-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .doc-device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .doc-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .check-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sample-photo-grid { grid-template-columns: repeat(3, 1fr); }
    .progress-box { width: auto; min-width: 260px; }
}

@media print {
    body { background: #fff; padding-bottom: 0; }
    .no-print, .topbar, .bottom-nav, .footer, .project-tabs-wrap, .actions { display: none !important; }
    .container { width: 100%; }
    .main { padding: 0; }
    .doc-shell { border: 0; box-shadow: none; border-radius: 0; }
    .doc-cover-pro { min-height: 260px; color: #111; background: #fff; border-bottom: 4px solid #111; }
    .doc-meta-box { border: 1px solid #999; box-shadow: none; }
    .doc-section { break-inside: avoid; page-break-inside: avoid; padding: 18px 0; }
    .photo-card, .doc-device-card, .doc-info-card, .work-card { break-inside: avoid; page-break-inside: avoid; }
    .doc-kpi-row, .doc-two-col, .doc-device-grid, .check-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v10: praxisnaher Monteur-Einsatzmodus */
.field-shell {
  max-width: 980px;
  margin: 0 auto;
  padding-bottom: 96px;
}
.field-status-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 64, 175, .92));
  color: #fff;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 14px;
}
.field-status-card .muted,
.field-status-card .eyebrow { color: rgba(255,255,255,.76); }
.field-status-card h1 { margin: 4px 0 4px; color: #fff; }
.field-status-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 10px;
  min-width: 260px;
}
.field-status-metrics div {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}
.field-status-metrics strong { display: block; font-size: 1.45rem; }
.field-status-metrics span { font-size: .78rem; color: rgba(255,255,255,.78); }
.field-stepbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.field-stepbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.field-stepbar a span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: .85rem;
}
.field-stepbar a.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.field-stepbar a.active span { background: #fff; color: #1d4ed8; }
.field-stepbar a.done { border-color: #bfdbfe; background: #eff6ff; }
.field-work-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.field-work-card h2 { margin-top: 0; }
.field-hint {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.55;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}
.field-summary-box {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 18px;
  padding: 16px;
  margin: 16px 0;
}
.field-summary-box p { margin-bottom: 0; }
.field-label {
  display: block;
  margin: 20px 0 8px;
  font-weight: 800;
  color: var(--text);
}
.field-choice-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.field-choice {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.field-choice input { position: absolute; opacity: 0; pointer-events: none; }
.field-choice.is-selected,
.field-choice:has(input:checked) {
  border-color: #1d4ed8;
  background: #eff6ff;
  color: #1d4ed8;
}
.photo-capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.photo-capture-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
  min-height: 164px;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 20px;
  padding: 16px;
}
.photo-capture-card.is-done {
  border-style: solid;
  border-color: #22c55e;
  background: #f0fdf4;
}
.photo-capture-card strong { font-size: 1.05rem; }
.photo-capture-card span { color: var(--muted); }
.camera-input {
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
}
.field-mini-checks {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}
.field-mini-checks > div {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.field-mini-checks label { display: block; font-weight: 800; margin-bottom: 8px; }
.thumb-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
}
.thumb-row div { flex: 0 0 110px; }
.thumb-row img {
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.thumb-row span { display: block; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.field-details {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.field-device-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.field-device-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
}
.field-device-list span { color: var(--muted); text-align: right; }
.quick-device-form,
.quick-work-box {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
}
.quick-work-box { margin-top: 16px; background: #f8fafc; }
.field-bottom-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}
.field-bottom-actions .button,
.field-bottom-actions button {
  min-height: 52px;
  font-size: 1rem;
}
.field-bottom-actions.multi > * { flex: 1 1 180px; }
.two-cols-mobile-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 760px) {
  .field-shell { padding-bottom: 122px; }
  .field-status-card {
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 0 0 24px 24px;
    padding: 18px 16px;
    display: block;
  }
  .field-status-metrics {
    margin-top: 14px;
    min-width: 0;
    grid-template-columns: repeat(3, 1fr);
  }
  .field-work-card {
    border-radius: 20px;
    padding: 18px 14px;
    margin-left: -6px;
    margin-right: -6px;
  }
  .field-stepbar {
    position: sticky;
    top: 0;
    z-index: 8;
    background: var(--bg);
    margin-left: -10px;
    margin-right: -10px;
    padding: 8px 10px 10px;
  }
  .field-stepbar a { min-height: 44px; padding: 9px 12px; }
  .field-choice-group { grid-template-columns: 1fr; }
  .field-choice {
    justify-content: flex-start;
    min-height: 58px;
    padding-left: 16px;
  }
  .photo-capture-grid { grid-template-columns: 1fr; }
  .photo-capture-card { min-height: 138px; }
  .two-cols-mobile-stack { grid-template-columns: 1fr; }
  .field-device-list div {
    display: block;
  }
  .field-device-list span { display: block; text-align: left; margin-top: 6px; }
  .field-bottom-actions {
    position: sticky;
    bottom: 62px;
    z-index: 9;
    background: rgba(248, 250, 252, .94);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px;
    margin-left: -8px;
    margin-right: -8px;
    backdrop-filter: blur(10px);
  }
  .field-bottom-actions > * { flex: 1 1 auto; }
  .field-bottom-actions .ghost { flex-basis: 100%; }
}

/* v11: radikaler Smartphone-Fix für den Einsatzmodus */
:root { --border: var(--line); }
.field-mobile-top { display: none; }
.field-stepbar a em { font-style: normal; }
.compact-details summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 900;
    color: var(--primary);
}

@media (max-width: 760px) {
    body.field-mode {
        background: #f8fafc;
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
        overscroll-behavior-y: contain;
    }
    body.field-mode .topbar,
    body.field-mode .bottom-nav,
    body.field-mode .project-tabs-wrap,
    body.field-mode .footer {
        display: none !important;
    }
    body.field-mode .container {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    body.field-mode .main {
        padding: 0;
    }
    body.field-mode .alert {
        margin: 10px;
        border-radius: 14px;
    }
    .field-mobile-top {
        position: sticky;
        top: 0;
        z-index: 120;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        align-items: center;
        min-height: 58px;
        padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
        background: #0f2238;
        color: #fff;
        box-shadow: 0 8px 20px rgba(15, 34, 56, .16);
    }
    .field-mobile-top strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        font-size: 16px;
    }
    .field-mobile-top span {
        font-weight: 900;
        color: #cbd5e1;
        font-size: 14px;
    }
    .field-back {
        color: #fff;
        font-weight: 900;
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        padding: 0 6px;
    }
    .field-back:hover { text-decoration: none; }

    .field-shell {
        max-width: none;
        margin: 0;
        padding: 0 0 120px;
    }
    .field-status-card {
        display: none;
    }
    .field-stepbar {
        position: sticky;
        top: calc(58px + env(safe-area-inset-top));
        z-index: 110;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        overflow: visible;
        margin: 0;
        padding: 8px 10px;
        background: rgba(248, 250, 252, .98);
        border-bottom: 1px solid var(--line);
        -webkit-overflow-scrolling: auto;
    }
    .field-stepbar a {
        min-width: 0;
        min-height: 36px;
        padding: 0;
        border-radius: 999px;
        justify-content: center;
        border-color: #d9e2ec;
        background: #fff;
    }
    .field-stepbar a em {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    .field-stepbar a span {
        width: 28px;
        height: 28px;
        font-size: 13px;
        background: transparent;
    }
    .field-stepbar a.active {
        background: var(--primary);
        border-color: var(--primary);
    }
    .field-stepbar a.done {
        background: #ecf9f2;
        border-color: #b6dfca;
    }
    .field-stepbar a.done span { color: #167447; }

    .field-work-card {
        margin: 10px;
        padding: 16px;
        border-radius: 18px;
        border: 1px solid var(--line);
        box-shadow: none;
    }
    .field-work-card h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    .field-hint {
        font-size: 15px;
        line-height: 1.4;
        padding: 12px;
        margin-bottom: 14px;
    }
    .field-summary-box {
        padding: 13px;
        margin: 12px 0;
        border-radius: 14px;
    }
    .field-label {
        margin: 16px 0 8px;
        font-size: 16px;
    }
    .field-choice-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .field-choice {
        min-height: 56px;
        justify-content: flex-start;
        border-radius: 14px;
        font-size: 16px;
        padding: 12px 14px;
    }
    .field-choice::before {
        content: "";
        width: 20px;
        height: 20px;
        border-radius: 999px;
        border: 2px solid #94a3b8;
        flex: 0 0 auto;
    }
    .field-choice.is-selected::before,
    .field-choice:has(input:checked)::before {
        border-color: var(--primary);
        background: radial-gradient(circle at center, var(--primary) 0 45%, transparent 48%);
    }
    body.field-mode textarea {
        min-height: 86px;
    }
    body.field-mode input,
    body.field-mode select,
    body.field-mode textarea,
    body.field-mode button,
    body.field-mode .button {
        font-size: 16px;
        border-radius: 14px;
    }

    .photo-capture-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 12px 0;
    }
    .photo-capture-card {
        min-height: auto;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px 12px;
        padding: 14px;
        border-radius: 16px;
    }
    .photo-capture-card strong,
    .photo-capture-card span {
        grid-column: 1;
    }
    .photo-capture-card .trigger-file {
        grid-column: 2;
        grid-row: 1 / span 2;
        min-width: 118px;
        min-height: 54px;
        padding: 10px 12px;
    }
    .thumb-row div { flex-basis: 86px; }
    .thumb-row img {
        width: 86px;
        height: 64px;
    }
    .field-mini-checks {
        gap: 10px;
        margin: 12px 0;
    }
    .field-mini-checks > div {
        padding: 12px;
        border-radius: 14px;
    }

    .quick-device-form,
    .quick-work-box,
    .field-details {
        border-radius: 16px;
        padding: 12px;
    }
    .compact-details {
        background: #f8fafc;
        margin: 12px 0;
    }
    .field-device-list {
        gap: 8px;
        margin: 12px 0;
    }
    .field-device-list div {
        border-radius: 14px;
        padding: 12px;
    }

    .field-bottom-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 130;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 0;
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--line);
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 0;
        box-shadow: 0 -10px 24px rgba(15, 34, 56, .12);
        backdrop-filter: blur(10px);
    }
    .field-bottom-actions > * {
        width: 100%;
        min-height: 56px;
        flex: none;
    }
    .field-bottom-actions:not(.multi) > *:only-child {
        grid-column: 1 / -1;
    }
    .field-bottom-actions.multi {
        grid-template-columns: 1fr;
    }
    .field-bottom-actions .ghost {
        grid-column: 1 / -1;
        min-height: 46px;
    }
}
