:root {
  --ink: #17253f;
  --muted: #657187;
  --line: #d9e0e8;
  --canvas: #eceff2;
  --surface: #ffffff;
  --peach: #f5a999;
  --blue: #97bae2;
  --green: #78c3a7;
  --cream: #f9f3eb;
  --yellow: #f4dea0;
  --shadow: 0 4px 18px rgba(23, 37, 63, .08);
  font-family: Montserrat, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

/* V10 — Montserrat, ruhige Dokumentköpfe und druckfeste Angebotsseiten */
@font-face { font-family:"Montserrat"; src:local("Montserrat Light"),local("Montserrat"); font-style:normal; font-weight:300; font-display:swap; }
@font-face { font-family:"Montserrat"; src:local("Montserrat Medium"),local("Montserrat"); font-style:normal; font-weight:500; font-display:swap; }
@font-face { font-family:"Montserrat"; src:local("Montserrat Bold"),local("Montserrat"); font-style:normal; font-weight:700; font-display:swap; }

:root, body, button, input, textarea, select { font-family:"Montserrat", Arial, sans-serif !important; }
body { font-weight:300; }
p, textarea, .block-summary, .steps-cell, .questions-cell, .material-cell { font-weight:300 !important; }
button, label, strong, b, select, th, .eyebrow, .document-name, .schedule-head, .brand, .doc-button { font-weight:500 !important; }
h3, h4 { font-weight:500 !important; }
h1, h2, .inline-project-title { font-weight:700 !important; }
a { color:inherit; text-decoration:none; }
.paper-footer a:hover { text-decoration:underline; }

.paper-header { grid-template-columns:minmax(0,1fr) 112px; gap:20px; margin-bottom:23px; }
.paper-title { padding:0 0 14px; }
.inline-title-row { gap:16px; }
.date-combo { width:132px; min-width:132px; }
.date-combo .date-text { width:132px; min-width:132px; font-weight:700 !important; }
.inline-project-meta { min-height:22px; margin-top:7px; gap:8px; align-items:center; }
.inline-project-meta .time-combo { display:inline-flex; align-items:center; gap:5px; flex:0 0 auto; }
.inline-project-meta .time-combo input { width:55px; min-width:55px; padding:0; border:0; background:transparent; color:#5f6d82; font-size:9px; text-align:center; }
.inline-project-meta .document-name { color:#5f6d82; }
.paper-logo-wrap { height:68px; }
.paper-logo { max-width:108px; max-height:68px; }
.paper-content-title { margin-top:2px; }

.day-start-lock.in-plan { position:relative; display:inline-block; width:20px; height:20px; margin:-5px 4px -6px 0; padding:0; border:0; background:transparent; vertical-align:middle; }
.day-start-lock.in-plan i::before { top:8px; left:5px; }
.day-start-lock.in-plan i::after { top:3px; left:7px; }
.schedule-end-drop { min-height:38px; display:flex; align-items:center; justify-content:center; gap:9px; margin:7px 8px 0; border:1px dashed #b9c7d4; border-radius:8px; background:#f8fafb; color:#6e7c8f; font-size:8px; transition:transform .15s,background .15s,border-color .15s; }
.schedule-end-drop button { width:24px; height:24px; border:1px solid #b9c7d4; border-radius:50%; padding:0; background:#fff; color:var(--ink); font-size:16px; }
.schedule-end-drop.active { border-color:var(--green); background:#edf8f3; transform:scale(1.01); }

.custom-material-row { grid-template-columns:18px minmax(0,1fr) 58px 66px 20px; }
.custom-material-label { min-width:0; margin:0 !important; border:0; padding:4px 2px; background:transparent; font-size:9px; }
.add-custom-material { margin-top:10px; }

.schedule-question-section { margin-top:24px; border-top:1px solid var(--line); padding-top:18px; }
.schedule-question-section .section-heading { margin-bottom:12px; }
.schedule-question-section .section-heading h3 { margin:2px 0 3px; font-size:14px; }
.schedule-question-section .section-heading span, .schedule-question-section.empty { color:var(--muted); font-size:8px; }
.schedule-question-group { border-top-color:var(--question-color) !important; }
.schedule-question-group > strong { display:block; margin-bottom:10px; font-size:12px; }
.question-line.static { min-height:34px; border:1px solid #d6dfe7; border-radius:6px; padding:8px 9px; background:#fff; color:var(--ink); font-size:9px; line-height:1.35; }
.schedule-question-group small { display:block; margin-top:9px; color:var(--muted); font-size:7px; }

@media print {
  .paper-header { grid-template-columns:minmax(0,1fr) 29mm; gap:5mm; margin-bottom:6mm; }
  .paper-title { padding-bottom:3.6mm; }
  .inline-project-meta { margin-top:1.8mm; }
  .inline-project-meta .time-combo input { width:15mm; min-width:15mm; font-size:7.5pt; }
  .paper-footer a { text-decoration:none; }
  .custom-material-row { grid-template-columns:5mm minmax(0,1fr) 17mm; }
  .schedule-question-section { margin-top:5mm; padding-top:4mm; }
  .schedule-end-drop { display:none !important; }
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1040px; min-height: 100vh; background: var(--canvas); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin-top: 0; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-rows: 56px 1fr; }
.topbar { display: flex; align-items: center; gap: 22px; height: 56px; padding: 0 18px; background: #fff; border-bottom: 1px solid #d4dbe3; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 245px; font-size: 15px; font-weight: 850; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; object-fit: contain; }
.brand small { display: block; margin-top: 1px; color: #7b8797; font-size: 8px; letter-spacing: .09em; text-transform: uppercase; }
.topnav { display: flex; gap: 4px; }
.topnav button { border: 0; border-radius: 4px; padding: 9px 12px; background: transparent; color: #647187; font-size: 12px; font-weight: 800; }
.topnav button:hover, .topnav button.active { background: #edf1f5; color: var(--ink); }
.topbar-spacer { flex: 1; }
.offline-pill { display: flex; align-items: center; gap: 7px; color: #6b7789; font-size: 10px; font-weight: 700; }
.offline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(120,195,167,.15); }
.history-actions { display: flex; gap: 3px; }
.history-actions button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 17px; }
.history-actions button:disabled { opacity: .35; cursor: default; }

.button { border: 1px solid transparent; border-radius: 4px; padding: 9px 13px; background: #fff; font-size: 11px; font-weight: 800; transition: transform .12s, border-color .12s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--ink); color: #fff; }
.button.secondary { border-color: var(--line); }
.button.ghost { background: transparent; }
.button.danger { color: #a13e49; }
.button.small { padding: 7px 10px; font-size: 10px; }
.full-width { width: 100%; margin-bottom: 10px; }

.dashboard { width: 100%; max-width: 1500px; margin: 0 auto; padding: 48px clamp(34px, 6vw, 96px); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.hero h1 { margin-bottom: 8px; font-size: 34px; letter-spacing: -.045em; }
.hero p:last-child { margin-bottom: 0; color: var(--muted); }
.hero-actions { display: flex; gap: 8px; }
.eyebrow { margin: 0 0 7px; color: #7890ad; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.project-grid-compact { grid-template-columns: repeat(auto-fill, minmax(320px, 390px)); }
.project-card { min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fff; box-shadow: 0 4px 14px rgba(23,37,63,.035); transition: transform .14s, box-shadow .14s; }
.project-card[data-open-project] { cursor: pointer; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.project-card-top { display: flex; justify-content: space-between; gap: 12px; }
.project-card h3 { margin: 2px 0 6px; font-size: 18px; }
.project-card p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.status { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--green); }
.project-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.tag { border-radius: 999px; padding: 5px 8px; background: #eef2f6; color: #607087; font-size: 10px; font-weight: 800; }

.workspace { height: calc(100vh - 56px); display: grid; grid-template-columns: 220px minmax(720px, 1fr) 310px; overflow: hidden; transition: grid-template-columns .18s; }
.workspace.left-collapsed { grid-template-columns: 0 minmax(720px, 1fr) 310px; }
.workspace.right-collapsed { grid-template-columns: 220px minmax(720px, 1fr) 0; }
.workspace.left-collapsed.right-collapsed { grid-template-columns: 0 minmax(720px, 1fr) 0; }
.project-sidebar, .library-panel { overflow: auto; background: #fbfcfd; }
.project-sidebar { border-right: 1px solid var(--line); padding: 15px 10px; }
.library-panel { border-left: 1px solid var(--line); padding: 16px 12px; }
.left-collapsed .project-sidebar, .right-collapsed .library-panel { display: none; }
.editor-pane { position: relative; overflow: auto; padding: 46px 24px 28px; }
.workspace-controls { position: fixed; z-index: 20; top: 64px; display: flex; align-items: center; gap: 5px; margin-left: 0; padding: 4px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(23,37,63,.06); }
.workspace-controls button { height: 27px; border: 0; border-radius: 3px; padding: 0 8px; background: #edf1f5; font-size: 9px; font-weight: 800; }
.workspace-controls span { min-width: 38px; color: var(--muted); text-align: center; font-size: 9px; }
.workspace-controls .control-spacer { min-width: 4px; }
.back-button { border: 0; padding: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.project-title { margin-top: 17px; padding: 0 7px 17px; border-bottom: 1px solid var(--line); }
.project-title h2 { margin-bottom: 5px; font-size: 16px; }
.project-title p { margin-bottom: 0; color: var(--muted); font-size: 10px; }
.doc-list { display: grid; gap: 3px; margin-top: 14px; }
.doc-button { display: grid; grid-template-columns: 22px 1fr; align-items: center; width: 100%; border: 0; border-radius: 4px; padding: 7px 6px; background: transparent; text-align: left; font-size: 10.5px; font-weight: 800; }
.doc-button:hover { background: #f0f3f6; }
.doc-button.active { background: #e7edf4; }
.doc-icon { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 3px; background: #edf1f5; font-size: 9px; }
.sidebar-actions { display: grid; gap: 7px; margin-top: 18px; padding: 16px 7px; border-top: 1px solid var(--line); }

.paper, .schedule-editor-toolbar, .timing-alert, .drop-zone { zoom: var(--paper-zoom); }
.paper { position: relative; width: min(100%, 1160px); min-height: 820px; margin: 0 auto 34px; padding: 38px 52px 46px; background: #fff; box-shadow: var(--shadow); }
.paper-header { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 28px; align-items: start; margin-bottom: 22px; }
.paper-title { position: relative; padding: 3px 0 19px; border-bottom: 1px solid #d9dfe6; }
.paper-title h1 { margin-bottom: 7px; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.paper-title p { margin-bottom: 0; color: var(--muted); font-size: 10px; }
.paper-meta-edit { position: absolute; right: 0; bottom: 5px; border: 0; background: transparent; color: #8090a4; font-size: 8px; opacity: .58; }
.paper-title:hover .paper-meta-edit { opacity: 1; }
.paper-logo-wrap { position: relative; height: 86px; display: grid; place-items: center; }
.paper-logo { max-width: 125px; max-height: 84px; object-fit: contain; }
.logo-edit { position: absolute; inset: 0; border: 1px dashed transparent; border-radius: 6px; background: transparent; }
.logo-edit:hover { border-color: var(--blue); background: rgba(151,186,226,.08); }
.paper-content-title h2 { margin-bottom: 3px; font-size: 15px; letter-spacing: -.01em; }
.paper-content-title p { margin-bottom: 17px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.paper-footer { position: absolute; right: 52px; bottom: 19px; left: 52px; display: flex; justify-content: space-between; color: #697588; font-size: 7px; }

input, textarea, select { width: 100%; border: 1px solid #ccd6e0; border-radius: 6px; padding: 8px 9px; background: #fff; outline: none; line-height: 1.4; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #789bc4; box-shadow: 0 0 0 3px rgba(151,186,226,.18); }
label { color: #526076; font-size: 10px; font-weight: 800; }
label > input, label > textarea, label > select { display: block; margin-top: 6px; color: var(--ink); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: span 2; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.section-card { margin-bottom: 0; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.editable-document-head { display: grid; gap: 12px; margin-bottom: 18px; }
.add-document-item { margin-top: 14px; }

.mirror-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mirror-card { position: relative; min-height: 190px; border: 1px solid var(--line); border-left: 5px solid var(--green); padding: 18px; background: #fff; }
.mirror-card:nth-child(4n+1), .mirror-card:nth-child(4n+2) { border-left-color: var(--peach); }
.mirror-head { display: flex; align-items: center; gap: 10px; }
.mirror-head h3 { margin-bottom: 0; font-size: 15px; }
.mirror-index { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 6px; background: #f2f4f7; font-size: 11px; font-weight: 900; }
.mirror-card p { margin: 16px 0; font-size: 11px; line-height: 1.5; }
.mirror-question { border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; font-weight: 700; }
.card-edit { position: absolute; right: 10px; bottom: 8px; border: 0; background: transparent; color: #6f7d90; font-size: 8px; opacity: 0; }
.mirror-card:hover .card-edit { opacity: 1; }
.mirror-edit { display: grid; gap: 7px; }
.mirror-edit > div { display: flex; justify-content: flex-end; gap: 5px; }
.primary-mini { background: var(--ink) !important; color: #fff; }

.schedule-editor-toolbar { width: min(100%, 1160px); display: flex; align-items: center; justify-content: space-between; margin: 0 auto 9px; color: var(--muted); font-size: 10px; }
.schedule-editor-toolbar > div { display: flex; gap: 5px; }
.timing-alert { width: min(100%, 1160px); margin: 0 auto 9px; border-left: 4px solid #c45656; padding: 8px 10px; background: #fff2f2; color: #8b3030; font-size: 9px; }
.schedule-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 18px; margin: 4px 8px 14px; color: #24344d; font-size: 7.5px; }
.schedule-legend span { display: flex; align-items: center; gap: 6px; }
.legend-swatch { display: block; width: 15px; height: 23px; border: 1px solid rgba(23,37,63,.08); }
.legend-edit { margin-left: auto; border: 0; background: transparent; color: #718097; font-size: 8px; }
.schedule { border-top: 1px solid #d6dde6; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: var(--schedule-columns); }
.schedule-head { background: #f4f5f7; color: #25344d; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.schedule-head > div { padding: 7px 8px; }
.phase-row { position: relative; min-height: 30px; display: flex; align-items: center; border-top: 1px solid #d6dde6; padding: 7px 18px; background: #f1f2f4; color: #57647a; font-size: 10px; font-weight: 800; text-transform: uppercase; cursor: grab; }
.phase-row.repeated { cursor: default; }
.phase-actions { display: flex; gap: 4px; margin-left: auto; opacity: 0; }
.phase-row:hover .phase-actions { opacity: 1; }
.phase-actions button, .row-actions button { border: 1px solid #ccd5df; border-radius: 3px; padding: 3px 5px; background: rgba(255,255,255,.92); font-size: 8px; font-weight: 800; }
.schedule-row { position: relative; min-height: 68px; border-top: 1px solid #d6dde6; padding-left: 12px; background: #fff; font-size: 8.8px; line-height: 1.28; cursor: grab; }
.schedule-row > div:not(.row-actions) { padding: 8px; overflow-wrap: anywhere; }
.color-strip, .measure-strip { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 12px; border: 0; padding: 0; background: var(--category-color); }
.color-strip:hover { filter: brightness(.92); box-shadow: inset 0 0 0 2px rgba(23,37,63,.2); }
.block-title { margin-bottom: 4px; font-size: 9.8px; font-weight: 800; }
.block-summary { color: #667388; font-size: 8px; line-height: 1.35; }
.time-cell strong { display: block; margin-bottom: 3px; font-weight: 800; white-space: nowrap; }
.duration-line { display: flex; align-items: center; gap: 2px; }
.duration-line button { min-width: 17px; border: 1px solid #d1d9e1; border-radius: 3px; padding: 1px 3px; background: #fff; font-size: 8px; }
.duration-line .duration-value { border-color: transparent; color: #667388; white-space: nowrap; }
.time-issue, .time-anchor { display: block; margin-top: 3px; font-size: 7px; }
.time-issue.conflict { color: #b33f4a; font-weight: 800; }
.time-issue.gap { color: #4b8a73; font-weight: 800; }
.time-anchor { color: #77849a; }
.line-number { display: inline-block; min-width: 14px; }
.line-bullet { display: inline-block; min-width: 10px; font-weight: 800; }
.reserve-line { margin-top: 4px; color: #7a8494; }
.row-actions { position: absolute; z-index: 5; top: 3px; right: 3px; display: flex; gap: 2px; opacity: 0; }
.schedule-row:hover .row-actions { opacity: 1; }
.schedule-item.dragging { opacity: .4; }
.schedule-item.drop-target { box-shadow: inset 0 3px 0 var(--ink); }
.drop-zone { width: min(100%, 1160px); margin: -20px auto 30px; border: 1px dashed #bfc9d4; border-radius: 4px; padding: 14px; color: #718097; text-align: center; font-size: 10px; font-weight: 700; }
.drop-zone.active { border-color: var(--blue); background: rgba(151,186,226,.12); color: var(--ink); }
.pagination-measure { position: fixed; left: -200vw; top: 0; width: 1056px; visibility: hidden; pointer-events: none; }

.panel-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 16px; }
.panel-tabs button { border: 0; border-radius: 4px; padding: 8px 5px; background: #edf1f5; color: #6b788b; font-size: 9px; font-weight: 850; }
.panel-tabs button.active { background: var(--ink); color: #fff; }
.library-head h3 { margin-bottom: 4px; font-size: 14px; }
.library-head p { color: var(--muted); font-size: 10px; line-height: 1.4; }
.tool-cards { display: grid; gap: 6px; margin: 13px 0; }
.tool-card { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; border: 1px dashed #b9c5d1; border-radius: 4px; padding: 8px; background: #fff; cursor: grab; }
.tool-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 3px; background: #edf1f5; font-weight: 900; }
.tool-card strong, .tool-card span { display: block; }
.tool-card strong { font-size: 9px; }
.tool-card span { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.search-box { position: relative; margin: 13px 0; }
.search-box input { padding-left: 31px; }
.search-icon { position: absolute; z-index: 1; top: 9px; left: 10px; color: #7c8999; }
.method-list { display: grid; gap: 8px; }
.method-card { border: 1px solid var(--line); border-left: 4px solid var(--method-color); border-radius: 4px; padding: 10px; background: #fff; cursor: grab; }
.method-card h4 { margin-bottom: 4px; font-size: 10.5px; }
.method-card p { margin-bottom: 7px; color: var(--muted); font-size: 8.5px; line-height: 1.35; }
.method-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 8px; }
.method-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.method-tags span { border-radius: 3px; padding: 3px 5px; background: #eef2f5; font-size: 7.5px; font-weight: 800; }
.method-actions { display: flex; gap: 3px; }
.add-method, .edit-method { width: 23px; height: 23px; border: 0; border-radius: 3px; padding: 0; font-size: 13px; }
.add-method { background: var(--ink); color: #fff; }
.edit-method { background: #edf1f5; }
.library-page-search { max-width: 520px; }
.method-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.method-grid .method-card { cursor: default; min-height: 150px; }
.method-template-card { min-height: 150px; display: grid; place-items: center; align-content: center; border: 2px dashed #bdc8d4; border-radius: 8px; padding: 20px; background: rgba(255,255,255,.6); text-align: center; cursor: pointer; }
.method-template-card > div { font-size: 28px; }
.method-template-card h3 { margin: 5px 0; font-size: 15px; }
.method-template-card p { margin: 0; color: var(--muted); font-size: 11px; }

.document-list { display: grid; gap: 9px; }
.document-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.file-symbol { width: 46px; height: 52px; display: grid; place-items: center; border-radius: 4px; background: #edf1f5; color: #67758a; font-size: 8px; font-weight: 900; }
.document-title { border-color: transparent; padding: 2px 0; font-weight: 800; }
.document-row p { margin: 2px 0 7px; color: var(--muted); font-size: 8px; }
.document-actions { display: flex; gap: 4px; }
.survey-list { display: grid; gap: 9px; }
.survey-question { display: grid; grid-template-columns: 28px 1fr 24px; gap: 9px; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.survey-question > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #edf1f5; font-size: 10px; font-weight: 900; }
.survey-question select { width: 150px; margin-top: 5px; padding: 5px 7px; font-size: 9px; }
.question-group { border: 1px solid var(--line); border-top: 5px solid var(--green); padding: 13px; }
.question-group:nth-child(4n+1) { border-top-color: var(--peach); }
.question-group:nth-child(4n+2) { border-top-color: var(--blue); }
.question-lines { margin-top: 9px; }
.question-line { display: grid; grid-template-columns: 1fr 23px; gap: 4px; margin-bottom: 6px; }
.question-line input { padding: 6px 7px; font-size: 9px; }
.remove-line { border: 0; background: transparent; color: #a13e49; font-size: 15px; }
.worksheet-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.worksheet-tabs button { border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; background: #fff; font-size: 8.5px; font-weight: 800; }
.worksheet-tabs button.active { background: var(--ink); color: #fff; }
.worksheet-canvases { margin-top: 18px; }
.worksheet-canvases h3 { font-size: 11px; }
.worksheet-canvas { height: 240px; display: grid; place-items: center; border: 1px solid var(--line); background: repeating-linear-gradient(0deg,#fff,#fff 27px,#f1f3f6 28px); color: #95a0af; font-size: 10px; }
.worksheet-actions { display: flex; justify-content: space-between; margin-top: 12px; }
.empty-state { min-height: 330px; display: grid; place-items: center; color: var(--muted); text-align: center; font-size: 10px; }
.empty-state.compact { min-height: 130px; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }

.mini-button { border: 1px solid #cdd5df; border-radius: 3px; padding: 4px 6px; background: #fff; font-size: 8px; font-weight: 800; }
.mini-button.danger { color: #a13e49; }
.dialog { width: min(650px, calc(100vw - 40px)); border: 0; border-radius: 12px; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(17,28,48,.3); }
.dialog-wide { width: min(820px, calc(100vw - 40px)); }
.dialog-small { width: min(500px, calc(100vw - 40px)); }
.dialog::backdrop { background: rgba(13,24,43,.48); backdrop-filter: blur(3px); }
.dialog form { padding: 23px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.dialog-head h2 { margin-bottom: 0; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f0f3f6; font-size: 21px; line-height: 1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.dialog-actions.between { justify-content: space-between; }
.dialog-actions > div { display: flex; gap: 7px; }
.wrap-actions { flex-wrap: wrap; }
.helper { margin: 15px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.anchor-control { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; margin-top: 6px; }
.anchor-control span { color: var(--muted); font-size: 9px; font-weight: 400; }
.category-settings { display: grid; gap: 8px; }
.category-settings label { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: center; }
.category-settings i { width: 28px; height: 28px; border: 1px solid rgba(23,37,63,.1); }
.category-settings input { margin: 0; }
.column-settings { display: grid; gap: 8px; }
.column-settings label { display: grid; grid-template-columns: 140px 90px 20px; gap: 8px; align-items: center; }
.column-settings input { margin: 0; }
.color-popover { position: fixed; z-index: 100; width: 285px; border: 1px solid var(--line); border-radius: 7px; padding: 10px; background: #fff; box-shadow: 0 15px 45px rgba(23,37,63,.22); }
.color-popover > strong { display: block; margin: 2px 4px 7px; font-size: 10px; }
.color-popover button { width: 100%; display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; border: 0; border-radius: 4px; padding: 6px; background: #fff; text-align: left; font-size: 9px; }
.color-popover button:hover { background: #f0f3f6; }
.color-popover i { width: 22px; height: 22px; border: 1px solid rgba(23,37,63,.1); }
.toast { position: fixed; z-index: 200; right: 22px; bottom: 22px; border-radius: 7px; padding: 11px 15px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 10px; font-weight: 800; }

@media print {
  @page landscapePage { size: A4 landscape; margin: 0; }
  body { min-width: 0; background: #fff; }
  .topbar, .project-sidebar, .library-panel, .no-print, .pagination-measure, .color-popover { display: none !important; }
  .app-shell, .workspace { display: block; height: auto; }
  .editor-pane { padding: 0; overflow: visible; }
  .paper { zoom: 1; width: 297mm; height: 210mm; min-height: 210mm; margin: 0; padding: 11mm 14mm 12mm; overflow: hidden; box-shadow: none; break-after: page; }
  .paper:last-of-type { break-after: auto; }
  .paper-footer { right: 14mm; bottom: 7mm; left: 14mm; }
  .duration-line button:not(.duration-value) { display: none; }
  .duration-line .duration-value { border: 0; padding: 0; background: transparent; pointer-events: none; }
  input, textarea, select { border-color: transparent; padding-left: 0; box-shadow: none !important; }
}

/* V9 — einheitliche Kundenunterlagen, Angebotsimport und kompakter Dokumentkopf */
.paper-header { grid-template-columns:minmax(0,1fr) 108px; gap:18px; margin-bottom:12px; }
.paper-title { padding:0 0 9px; }
.inline-title-row { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:baseline; gap:12px; }
.date-combo { position:relative; display:block; flex:none; width:126px; min-width:126px; overflow:visible; }
.date-combo .date-text { width:126px; min-width:126px; padding-left:0; font-size:22px; }
.date-combo .calendar-button { position:absolute; top:1px; right:-23px; }
.inline-project-title { width:100%; min-width:0 !important; padding-left:0 !important; font-size:22px; }
.inline-project-meta { min-height:18px; margin-top:3px; gap:7px; }
.inline-project-meta .time-combo { margin-left:0; }
.inline-project-meta .time-combo input { width:55px; padding-left:0; }
.inline-project-meta .meta-divider { color:#a0a9b5; }
.inline-project-meta .meta-grow { flex:1; }
.inline-project-meta .customer-value { width:112px; text-align:right; }
.inline-project-meta .location-value { width:82px; text-align:right; }
.paper-logo-wrap { height:60px; }
.paper-logo { max-width:100px; max-height:60px; }
.paper-footer { gap:16px; }
.paper-footer > span:first-child { white-space:nowrap; }

.material-check-row { grid-template-columns:18px minmax(0,1fr) 58px 66px; }
.material-quantity { display:grid; grid-template-columns:34px 1fr; gap:3px; align-items:center; color:#788598; }
.material-quantity input { width:34px; min-width:0; margin:0; border:1px solid #d8e0e7; border-radius:6px; padding:4px 3px; background:#fff; color:#26354d; font-size:9px; font-weight:700; text-align:center; }
.material-quantity small { font-size:6.5px; }

@media print {
  .paper-header { grid-template-columns:minmax(0,1fr) 27mm; gap:5mm; margin-bottom:3mm; }
  .inline-title-row { gap:3.5mm; }
  .date-combo { width:33mm; min-width:33mm; }
  .date-combo .date-text { width:33mm; min-width:33mm; }
  .inline-project-meta { gap:2mm; margin-top:.8mm; }
  .inline-project-meta .meta-grow { min-width:2mm; }
  .inline-project-meta .customer-value,.inline-project-meta .location-value { min-width:18mm; max-width:32mm; text-align:right; }
  .paper-logo-wrap { height:16mm; }
  .paper-logo { max-width:27mm; max-height:16mm; }
  .paper-footer { font-size:6.5pt; }
  .material-check-row { grid-template-columns:5mm minmax(0,1fr) 17mm; }
  .material-quantity { grid-template-columns:8mm 1fr; }
  .material-quantity input { width:8mm; border:.25mm solid #aab5c1 !important; border-radius:1mm; padding:1mm !important; background:#fff !important; font-size:8pt; }
  .material-quantity small { font-size:6pt; }
}

.screen-schedule .time-range { display:none !important; }
.editable-days { display:grid; gap:8px; margin-top:24px; }
.overview-days-head { display:flex; align-items:center; justify-content:space-between; }
.editable-days article { display:grid; grid-template-columns:30px minmax(180px,1.5fr) minmax(150px,1fr) 120px 28px; gap:10px; align-items:end; border:1px solid #dde4eb; border-radius:11px; padding:11px; background:#fff; }
.editable-days article label { display:grid; gap:4px; color:#657187; font-size:8px; }
.editable-days article input { margin:0; }
.day-number { width:28px; height:28px; display:grid; place-items:center; align-self:center; border-radius:8px; background:#edf2f6; font-weight:800; }
.preline { white-space:pre-line; }

@media print {
  .screen-schedule .time-range { display:block !important; }
}

/* V7 — ruhige Interaktion, echtes Farbrad, Befragung und Drag-Papierkorb */
input.block-summary { min-height:20px; padding-block:2px; color:#718096; font-size:7.5px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.custom-color-trigger { display:flex; align-items:center; gap:8px; border:1px solid #d3dce5; background:#fff; border-radius:9px; padding:6px; color:var(--ink); cursor:pointer; }
.custom-color-trigger i { display:block; width:26px; height:26px; border-radius:7px; border:1px solid rgba(23,37,63,.18); }
.category-color-wheel.custom-color-trigger { display:grid; place-items:center; }
.category-color-wheel.custom-color-trigger i { width:100%; height:100%; }
.custom-color-popover { position:fixed; z-index:140; width:254px; padding:14px; border:1px solid #d7dfe7; border-radius:16px; background:#fff; box-shadow:0 24px 64px rgba(23,37,63,.24); }
.custom-color-head,.custom-color-value { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.custom-color-head button { border:0; background:transparent; font-size:20px; cursor:pointer; }
#color-wheel-canvas { display:block; width:220px; height:220px; border-radius:50%; cursor:crosshair; }
.brightness-control { display:grid; gap:5px; margin:10px 0; }
.custom-color-value i { width:34px; height:34px; border-radius:9px; border:1px solid #d3dce5; flex:none; }
.custom-color-value input { width:100%; }
.full-width { width:100%; }
.drag-trash { position:fixed; z-index:125; left:50%; bottom:24px; translate:-50% 30px; display:flex; align-items:center; gap:10px; padding:11px 18px; border:1px solid #e5b7b7; border-radius:999px; background:#fff7f7; color:#9c3434; box-shadow:0 14px 42px rgba(23,37,63,.2); opacity:0; pointer-events:none; transform:scale(.86); transition:opacity 150ms,transform 220ms var(--ease-out),background 150ms,translate 220ms var(--ease-out); }
.drag-trash span { font-size:20px; }
.schedule-dragging .drag-trash { opacity:1; pointer-events:auto; translate:-50% 0; transform:scale(1); }
.drag-trash.is-over { background:#b83b3b; color:#fff; border-color:#b83b3b; transform:scale(1.16); }
.survey-toolbar { display:flex; gap:8px; margin:0 0 16px; }
.survey-question { padding:12px; border:1px solid #dce3ea; border-radius:12px; background:rgba(255,255,255,.82); }
.survey-question-controls { display:flex; align-items:center; gap:14px; }
.survey-question-controls label { display:flex; flex-direction:row; align-items:center; gap:6px; font-size:9px; }
.survey-question-controls input[type="checkbox"] { width:auto; }
.survey-config { display:grid; grid-template-columns:minmax(0,1fr) 120px; gap:8px; margin-top:8px; padding:10px; border-radius:9px; background:#f5f7fa; }
.survey-config.scale-config { grid-template-columns:70px 70px 1fr 1fr; }
.survey-config label { font-size:8px; }
.survey-analysis { display:grid; grid-template-columns:1fr auto; gap:16px; margin-top:26px; padding:20px; border:1px solid #d7e0e8; border-radius:16px; background:linear-gradient(135deg,#f8fafc,#eef4f8); }
.survey-analysis h3 { margin:2px 0 6px; }
.survey-analysis p { margin:0; color:#657187; max-width:560px; }
.survey-analysis-actions { display:flex; gap:8px; align-items:start; }
.survey-return-drop { grid-column:1/-1; display:grid; place-items:center; gap:3px; min-height:82px; border:1px dashed #9fb0c3; border-radius:12px; color:#657187; transition:160ms; }
.survey-return-drop.active { border-color:#1f63c8; background:#eaf2ff; transform:scale(1.01); }
.survey-return-list { grid-column:1/-1; display:grid; gap:6px; }
.survey-return-list article { display:flex; justify-content:space-between; align-items:center; padding:9px 11px; background:#fff; border-radius:9px; }
.survey-return-list article div { display:grid; gap:2px; }
.survey-return-list article span { color:#718096; font-size:8px; }
.survey-return-list button { border:0; background:transparent; color:#a33; font-size:18px; cursor:pointer; }

@media print {
  .all-days-print > .paper { display:block !important; break-inside:avoid-page !important; page-break-inside:avoid !important; break-after:page !important; page-break-after:always !important; }
  .all-days-print > .paper:last-child { break-after:auto !important; page-break-after:auto !important; }
}

/* V4 — ruhige V2-Typografie, direkte Bearbeitung und moderne Mikrointeraktionen */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.2, .7, .2, 1);
  --focus-ring: 0 0 0 3px rgba(151, 186, 226, .2);
  --shadow: 0 6px 24px rgba(23, 37, 63, .065);
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
}

body { color: #1d2b43; }
.app-shell { grid-template-rows: 54px 1fr; }
.topbar { height: 54px; padding-inline: 17px; }
.brand { min-width: 235px; font-size: 15px; font-weight: 700; letter-spacing: -.025em; }
.brand-mark { width: 34px; height: 34px; }
.topnav button { padding: 8px 10px; font-size: 12px; font-weight: 700; transition: color 160ms var(--ease-soft), background 160ms var(--ease-soft); }
.offline-pill { font-weight: 600; }
.offline-pill [data-save-state] { min-width: 62px; transition: opacity 160ms; }
.offline-pill [data-save-state].saving { opacity: .56; }
.button { font-weight: 700; transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background 160ms; }
.button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23,37,63,.08); }
.eyebrow { font-weight: 700; }
.hero h1 { font-weight: 700; }
.project-card { transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 180ms; }
.project-card h3 { font-weight: 700; }
.tag { font-weight: 700; }

.workspace { height: calc(100vh - 54px); transition: grid-template-columns 260ms var(--ease-out); }
.project-sidebar, .library-panel { scrollbar-gutter: stable; }
.doc-button, .back-button { font-weight: 700; transition: background 150ms, color 150ms, transform 180ms var(--ease-out); }
.doc-button:hover { transform: translateX(2px); }
.workspace-controls { top: 63px; border-color: rgba(23,37,63,.09); border-radius: 7px; background: rgba(255,255,255,.82); box-shadow: 0 8px 24px rgba(23,37,63,.07); backdrop-filter: blur(16px) saturate(1.2); }
.workspace-controls button { background: transparent; color: #667489; font-weight: 700; transition: background 150ms, color 150ms; }
.workspace-controls button:hover { background: #edf1f5; color: var(--ink); }

.paper { box-shadow: var(--shadow); }
.paper-header { grid-template-columns: minmax(0, 1fr) 132px; gap: 32px; }
.paper-title { padding: 0 0 15px; }
.inline-title-row { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.inline-title-row input, .inline-project-meta input {
  width: auto; min-width: 0; border: 1px solid transparent; border-radius: 3px; padding: 2px 3px; background: transparent; box-shadow: none; transition: background 150ms, border-color 150ms, box-shadow 150ms;
}
.inline-title-row input:hover, .inline-project-meta input:hover { background: #f5f7f9; }
.inline-title-row input:focus, .inline-project-meta input:focus { border-color: #9bb9d9; background: #fff; box-shadow: var(--focus-ring); }
.inline-date-control { position: relative; flex: 0 0 auto; display: inline-grid; margin: 0; color: inherit; font-size: 22px; font-weight: 700; letter-spacing: -.025em; cursor: pointer; }
.inline-date-control span { grid-area: 1 / 1; padding: 2px 3px; border-radius: 3px; transition: background 150ms, box-shadow 150ms; }
.inline-date-control input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.inline-date-control:hover span { background: #f5f7f9; }
.inline-date-control:focus-within span { box-shadow: var(--focus-ring); }
.inline-project-title { flex: 1; font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.inline-project-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--muted); font-size: 9px; }
.inline-project-meta label { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 400; }
.inline-project-meta label > span { color: #8893a3; }
.inline-project-meta label:nth-child(1) input { width: 126px; }
.inline-project-meta label:nth-child(2) input { width: 72px; }
.inline-project-meta label:nth-child(3) input { width: 96px; }
.inline-project-meta input { margin: 0; color: var(--muted); font-size: 9px; font-weight: 400; }
.inline-end { margin-left: auto; white-space: nowrap; }
.paper-logo-wrap { transition: background 160ms, box-shadow 160ms; }
.paper-logo-wrap.file-drag-active { background: rgba(120,195,167,.12); box-shadow: inset 0 0 0 2px var(--green); }
.logo-edit { display: grid; place-items: end center; }
.logo-edit span { margin-bottom: 3px; border-radius: 10px; padding: 3px 6px; background: rgba(23,37,63,.76); color: #fff; font-size: 7px; opacity: 0; transform: translateY(3px); transition: opacity 160ms, transform 180ms var(--ease-out); }
.logo-edit:hover span { opacity: 1; transform: translateY(0); }

.schedule-editor-toolbar { min-height: 31px; margin-bottom: 8px; }
.schedule-editor-toolbar strong { font-weight: 700; }
.quiet-action { border: 0; border-radius: 4px; padding: 6px 8px; background: transparent; color: #657287; font-size: 9px; transition: color 150ms, background 150ms; }
.quiet-action:hover { background: rgba(255,255,255,.8); color: var(--ink); }
.schedule-head { font-weight: 700; }
.schedule-head > div { position: relative; }
.column-resizer { position: absolute; z-index: 8; top: 0; right: -5px; bottom: 0; width: 10px; border: 0; padding: 0; background: transparent; cursor: col-resize; touch-action: none; }
.column-resizer::after { content: ""; position: absolute; top: 22%; right: 4px; bottom: 22%; width: 1px; background: #b8c3cf; opacity: 0; transition: opacity 140ms, transform 180ms var(--ease-out); }
.column-resizer:hover::after, .resizing-columns .column-resizer::after { opacity: 1; transform: scaleY(1.4); }
.resizing-columns, .resizing-columns * { cursor: col-resize !important; user-select: none !important; }
.schedule-row { cursor: default; transition: box-shadow 180ms var(--ease-soft), background 180ms; }
.schedule-row:hover { background: #fdfefe; box-shadow: 0 2px 10px rgba(23,37,63,.035); }
.schedule-row > * { min-width: 0; }
.schedule-row > textarea, .schedule-row > .questions-wrap { padding: 8px; }
.block-cell { padding: 7px 8px !important; }
.inline-cell {
  display: block; width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 3px; padding: 2px 3px; background: transparent; box-shadow: none; resize: none; overflow: hidden; field-sizing: content; transition: background 150ms, border-color 150ms, box-shadow 150ms;
}
.inline-cell:hover { background: rgba(238,243,247,.62); }
.inline-cell:focus { border-color: #a6bfda; background: #fff; box-shadow: var(--focus-ring); }
input.block-title { margin: 0 0 3px; font-size: 9.5px; font-weight: 700; }
textarea.block-summary { min-height: 28px; color: #667388; font-size: 8px; line-height: 1.35; }
textarea.steps-cell, textarea.questions-cell, textarea.material-cell { min-height: 45px; font-size: 8.6px; line-height: 1.28; white-space: pre-wrap; }
.questions-wrap { overflow-wrap: anywhere; }
.questions-wrap textarea { padding: 2px 3px; }
.time-cell strong { font-weight: 700; }
.duration-line { min-height: 20px; }
.duration-line button { opacity: 0; transform: scale(.82); transition: opacity 130ms, transform 170ms var(--ease-out), background 130ms; }
.schedule-row:hover .duration-line button, .duration-line button:focus { opacity: 1; transform: scale(1); }
.duration-line button:hover { background: #edf2f6; }
.duration-value { display: inline-block; min-width: 37px; color: #69768a; text-align: center; font-size: 8px; white-space: nowrap; }
.time-range { transition: color 150ms; }
.time-range.time-tick { animation: timeTick 220ms var(--ease-out); }
@keyframes timeTick { 0% { color: #4e8f78; transform: translateY(2px); opacity: .55; } 100% { color: inherit; transform: translateY(0); opacity: 1; } }
.phase-row { font-weight: 700; cursor: grab; }
.phase-inline { min-width: 0; flex: 1; border: 1px solid transparent; border-radius: 3px; padding: 2px 3px; background: transparent; box-shadow: none; color: inherit; font-size: inherit; font-weight: 700; text-transform: uppercase; }
.phase-inline:hover { background: rgba(255,255,255,.55); }
.phase-inline:focus { border-color: #a6bfda; background: #fff; box-shadow: var(--focus-ring); }
.phase-actions, .row-actions { transition: opacity 140ms, transform 180ms var(--ease-out); transform: translateY(-2px); }
.phase-row:hover .phase-actions, .schedule-row:hover .row-actions { transform: translateY(0); }
.row-actions button, .phase-actions button { border-color: rgba(23,37,63,.12); background: rgba(255,255,255,.92); font-weight: 600; backdrop-filter: blur(8px); }
.color-strip { transition: filter 150ms, width 180ms var(--ease-out), box-shadow 150ms; }
.color-strip:hover { width: 16px; }
.schedule-item.dragging { opacity: .42; transform: scale(.992); }
.schedule-item.drop-target { box-shadow: inset 0 3px 0 var(--blue), 0 -6px 14px rgba(151,186,226,.13); }
.drop-zone { display: grid; gap: 2px; place-items: center; border-radius: 7px; padding: 12px; font-weight: 400; transition: border-color 180ms, background 180ms, transform 220ms var(--ease-out); }
.drop-zone span { font-weight: 700; }
.drop-zone small { font-size: 8px; }
.drop-zone.active { transform: translateY(-2px); }

.panel-tabs button, .tool-card strong, .method-tags span, .method-card h4 { font-weight: 700; }
.method-card, .tool-card { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 160ms; }
.method-card:hover, .tool-card:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(23,37,63,.06); }
.method-card h4 { font-size: 10px; }
.method-card p { font-size: 8px; }

.file-drop-surface { position: relative; min-height: 180px; border: 1px dashed transparent; border-radius: 8px; transition: border-color 180ms, background 180ms; }
.drop-overlay { position: absolute; inset: 0; z-index: 10; display: grid; place-content: center; gap: 4px; border: 1px dashed var(--green); border-radius: 8px; background: rgba(245,250,248,.94); text-align: center; opacity: 0; pointer-events: none; transform: scale(.99); transition: opacity 180ms, transform 220ms var(--ease-out); }
.drop-overlay strong { font-size: 14px; font-weight: 700; }
.drop-overlay span { color: var(--muted); font-size: 9px; }
.file-drop-surface.file-drag-active .drop-overlay { opacity: 1; transform: scale(1); }
.doc-button.file-drag-active, .project-card.file-drag-active, .schedule-row.file-drag-active { outline: 2px solid var(--green); outline-offset: -2px; background: rgba(120,195,167,.08); }
.empty-state span { display: block; margin-top: 5px; }

#block-dialog[open] {
  position: fixed; inset: 54px 0 0 auto; width: min(510px, 46vw); max-width: none; height: calc(100vh - 54px); max-height: none; margin: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: -24px 0 70px rgba(23,37,63,.16); animation: drawerIn 260ms var(--ease-out); overflow: auto;
}
#block-dialog[open] form { min-height: 100%; }
@keyframes drawerIn { from { opacity: .6; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
.dialog[open]:not(#block-dialog) { animation: dialogIn 210ms var(--ease-out); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.toast { font-weight: 700; animation: toastIn 240ms var(--ease-out); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.mirror-head h3, .mirror-index, .question-group input, .document-title { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .inline-title-row input, .inline-project-meta input, .inline-cell, .phase-inline { border: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
  .inline-project-meta label > span { display: none; }
  .duration-line { min-height: 0; }
  .duration-line button { display: none !important; }
}

/* V5 — mehrtägige Planung und ruhige Werkzeugleiste */
.workspace { grid-template-columns: 220px minmax(720px, 1fr) 44px 310px; }
.workspace.left-collapsed { grid-template-columns: 0 minmax(720px, 1fr) 44px 310px; }
.workspace.right-collapsed { grid-template-columns: 220px minmax(720px, 1fr) 44px 0; }
.workspace.left-collapsed.right-collapsed { grid-template-columns: 0 minmax(720px, 1fr) 44px 0; }
.right-collapsed .library-panel { display: none; }
.editor-pane { scroll-behavior: smooth; }

.day-navigation { display: grid; gap: 3px; margin: 3px 4px 8px 28px; padding: 3px 0 7px 8px; border-left: 1px solid #dce3ea; }
.day-nav-row { display: grid; grid-template-columns: minmax(0,1fr) 20px; align-items: center; border-radius: 5px; transition: background 150ms, transform 180ms var(--ease-out); }
.day-nav-row:hover { background: #f0f3f6; }
.day-nav-row.active { background: #e9eef4; }
.day-nav-row > button:first-child { min-width: 0; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 7px; align-items: center; border: 0; padding: 6px; background: transparent; text-align: left; }
.day-nav-row strong, .day-nav-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-nav-row strong { font-size: 9px; font-weight: 700; }
.day-nav-row small { margin-top: 1px; color: #7a8798; font-size: 7.5px; }
.day-calendar { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid #ccd5de; border-radius: 5px; background: #fff; color: #627187; font-size: 8px; font-weight: 700; }
.day-remove { width: 18px; height: 18px; border: 0; border-radius: 4px; padding: 0; background: transparent; color: #9b6670; opacity: 0; transition: opacity 140ms, background 140ms; }
.day-nav-row:hover .day-remove { opacity: 1; }
.day-remove:hover { background: #fff; }
.add-day { justify-self: start; border: 0; border-radius: 4px; padding: 5px 7px; background: transparent; color: #66758a; font-size: 8.5px; font-weight: 700; }
.add-day:hover { background: #f0f3f6; color: var(--ink); }

.tool-rail { z-index: 12; display: flex; flex-direction: column; align-items: center; gap: 5px; border-left: 1px solid var(--line); padding-top: 15px; background: rgba(251,252,253,.96); }
.tool-rail button { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; padding: 0; background: transparent; color: #687587; transition: color 150ms, background 150ms, border-color 150ms, transform 180ms var(--ease-out); }
.tool-rail button:hover { border-color: #d7dfe7; background: #fff; color: var(--ink); transform: translateX(-1px); }
.tool-rail button.active { border-color: #c8d3df; background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(23,37,63,.07); }
.tool-rail button span { font-size: 13px; font-weight: 600; line-height: 1; }
.right-panel-head { display: flex; align-items: center; justify-content: space-between; margin: -3px 0 15px; padding-bottom: 10px; border-bottom: 1px solid #e4e8ed; }
.right-panel-head strong { color: #718095; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.right-panel-head button { width: 25px; height: 25px; border: 0; border-radius: 5px; background: transparent; color: #748195; font-size: 16px; }
.right-panel-head button:hover { background: #edf1f5; }

.date-combo { position: relative; flex: 0 0 110px; display: flex; align-items: center; }
.date-combo .date-text { width: 91px; border: 1px solid transparent; padding: 2px 3px; background: transparent; font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.date-combo .calendar-button { width: 23px; height: 23px; flex: 0 0 23px; border: 0; border-radius: 4px; padding: 0; background: transparent; color: #738095; opacity: 0; transition: opacity 140ms, background 140ms; }
.date-combo:hover .calendar-button, .calendar-button:focus { opacity: 1; }
.date-combo .calendar-button:hover { background: #edf1f5; }
.native-date-picker { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.inline-project-title { font-size: 22px; font-weight: 700; }
.inline-project-meta { gap: 8px; }
.inline-project-meta > input { min-width: 80px; max-width: 150px; }
.inline-project-meta .customer-value { width: 125px; }
.inline-project-meta .location-value { width: 105px; }
.time-combo { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; white-space: nowrap; }
.time-combo input { width: 61px; margin: 0; border-color: transparent; padding: 2px 3px; background: transparent; color: var(--muted); font-size: 9px; }
.time-combo > span { color: var(--muted); }
.document-name { margin-left: auto; white-space: nowrap; }

.day-settings { width: min(100%,1160px); min-height: 32px; display: flex; align-items: center; gap: 13px; margin: 0 auto 5px; padding: 0 3px; color: #6a778a; font-size: 8px; }
.day-settings > input { width: auto; min-width: 165px; max-width: 310px; border-color: transparent; padding: 4px 5px; background: transparent; font-size: 10px; font-weight: 700; }
.day-settings > input:hover { background: rgba(255,255,255,.72); }
.day-settings label { display: inline-flex; align-items: center; gap: 4px; color: #6a778a; font-size: 8px; font-weight: 500; }
.day-settings label input { width: 13px; height: 13px; margin: 0; }
.day-settings button { margin-left: auto; border: 0; border-radius: 4px; padding: 5px 7px; background: transparent; color: #687689; font-size: 8px; }
.day-settings button:hover { background: rgba(255,255,255,.8); }

.insert-control { position: relative; z-index: 9; height: 0; overflow: visible; }
.insert-control button { position: absolute; top: -9px; left: -18px; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #cbd4dd; border-radius: 50%; padding: 0; background: #fff; color: #66768b; font-size: 13px; line-height: 1; opacity: 0; transform: scale(.82); transition: opacity 140ms, transform 180ms var(--ease-out), color 140ms, border-color 140ms; }
.schedule:hover .insert-control button, .insert-control button:focus { opacity: .72; transform: scale(1); }
.insert-control button:hover { border-color: #91adca; color: var(--ink); opacity: 1; }
.insert-end { height: 1px; }
.insert-end button { top: -8px; }

.block-grip, .phase-grip { position: absolute; z-index: 7; top: 7px; left: -22px; width: 18px; height: 25px; border: 0; border-radius: 5px; padding: 0; background: transparent; opacity: 0; cursor: grab; transition: opacity 140ms, background 140ms; }
.schedule-item:hover > .block-grip, .phase-row:hover > .phase-grip, .block-grip:focus, .phase-grip:focus { opacity: 1; }
.block-grip:hover, .phase-grip:hover { background: #e9eef3; }
.block-grip:active, .phase-grip:active { cursor: grabbing; }
.block-grip i, .phase-grip i { width: 9px; height: 14px; display: block; margin: auto; background-image: radial-gradient(circle, #6e7b8d 1.1px, transparent 1.2px); background-size: 4px 4px; }
.phase-grip { top: 3px; }
.schedule-row, .phase-row, .note-row { margin-left: 8px; }

.editor-start { display: flex; align-items: center; gap: 2px; margin-bottom: 2px; }
.editor-start input { width: 48px; border-color: transparent; padding: 2px 1px; background: transparent; color: #58667a; font-size: 8px; }
.editor-start input[readonly] { pointer-events: none; }
.time-lock { position: relative; width: 16px; height: 17px; border: 0; border-radius: 3px; padding: 0; background: transparent; color: #8190a2; }
.time-lock:hover { background: #edf1f5; }
.time-lock i::before { content: ""; position: absolute; top: 6px; left: 4px; width: 7px; height: 6px; border: 1px solid currentColor; border-radius: 2px; }
.time-lock i::after { content: ""; position: absolute; top: 2px; left: 6px; width: 4px; height: 5px; border: 1px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; transform-origin: left bottom; transform: rotate(-28deg); }
.time-lock.locked { color: #405f83; background: #e8eff6; }
.time-lock.locked i::after { transform: none; }
.timing-note { display: block; }
.responsible-line { display: inline-block; margin-top: 4px; border-radius: 9px; padding: 2px 5px; background: #eef2f5; color: #6b788a; font-size: 7px; }
.schedule-row.is-collapsed { min-height: 42px; }
.schedule-row.is-collapsed .block-summary, .schedule-row.is-collapsed .steps-cell, .schedule-row.is-collapsed .questions-wrap, .schedule-row.is-collapsed .material-cell, .schedule-row.is-collapsed .responsible-line { display: none; }

.note-row { position: relative; display: grid; grid-template-columns: minmax(110px,.32fr) minmax(0,1fr) auto; gap: 8px; align-items: start; border-top: 1px solid #d6dde6; border-left: 4px solid #bcc6d1; padding: 8px 10px; background: #fbfcfd; }
.note-row > input, .note-row > textarea { border-color: transparent; padding: 3px 4px; background: transparent; font-size: 8.5px; }
.note-row > input { font-weight: 700; }
.note-row .note-print { display: flex; align-items: center; gap: 4px; margin-top: 4px; white-space: nowrap; font-size: 7px; font-weight: 500; }
.note-row .note-print input { width: 12px; height: 12px; margin: 0; }

.action-popover { position: fixed; z-index: 120; width: 235px; border: 1px solid #d5dde5; border-radius: 10px; padding: 6px; background: rgba(255,255,255,.98); box-shadow: 0 18px 50px rgba(23,37,63,.19); backdrop-filter: blur(18px); animation: popoverIn 150ms var(--ease-out); }
.action-popover > strong { display: block; padding: 7px 9px 6px; color: #7c8898; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.action-popover button { width: 100%; display: grid; grid-template-columns: 24px 1fr; align-items: center; border: 0; border-radius: 6px; padding: 7px 8px; background: transparent; color: #445064; text-align: left; font-size: 10px; }
.action-popover button:hover { background: #edf1f5; color: var(--ink); }
.action-popover button span { color: #718095; text-align: center; }
.action-popover button.danger { color: #a14a55; }
@keyframes popoverIn { from { opacity: 0; transform: translateY(4px) scale(.985); } to { opacity: 1; transform: none; } }

.library-actions { display: flex; gap: 5px; margin: 7px 0 11px; }
.folder-list, .standalone-folder-list { display: grid; gap: 9px; }
.standalone-folder-list { grid-template-columns: repeat(auto-fit,minmax(290px,1fr)); align-items: start; }
.method-folder { border: 1px solid #dce2e8; border-top: 3px solid var(--folder-color); border-radius: 7px; background: rgba(255,255,255,.66); transition: border-color 160ms, box-shadow 180ms, transform 180ms var(--ease-out); }
.method-folder.folder-drop-active { border-color: var(--folder-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--folder-color) 22%, transparent); transform: translateY(-1px); }
.method-folder > header { display: grid; grid-template-columns: 1fr 27px; align-items: center; padding: 4px 5px; }
.folder-toggle { min-width: 0; display: grid; grid-template-columns: 12px 1fr auto; gap: 6px; align-items: center; border: 0; padding: 5px 3px; background: transparent; text-align: left; }
.folder-toggle i { width: 7px; height: 7px; border-right: 1px solid #718095; border-bottom: 1px solid #718095; transform: rotate(45deg) translateY(-2px); transition: transform 160ms; }
.method-folder.collapsed .folder-toggle i { transform: rotate(-45deg); }
.folder-toggle span { overflow: hidden; text-overflow: ellipsis; font-size: 9px; font-weight: 700; white-space: nowrap; }
.folder-toggle small { min-width: 18px; border-radius: 9px; padding: 2px 5px; background: #edf1f5; color: #718095; text-align: center; font-size: 7px; }
.folder-menu { width: 25px; height: 25px; border: 0; border-radius: 5px; padding: 0; background: transparent; color: #768397; font-size: 11px; }
.folder-menu:hover { background: #edf1f5; }
.folder-methods { display: grid; gap: 6px; padding: 3px 7px 7px; }
.method-folder.collapsed .folder-methods { display: none; }
.folder-empty { border: 1px dashed #d3dae2; border-radius: 5px; padding: 10px; color: #8a95a4; text-align: center; font-size: 7.5px; }

.timer-card, .manual-time { margin-bottom: 13px; border: 1px solid #dce2e8; border-radius: 8px; padding: 10px; background: #fff; }
.timer-card select, .timer-card input, .manual-time input, .manual-time select { margin-bottom: 7px; font-size: 9px; }
.timer-card.running { border-color: #aed8c7; box-shadow: inset 3px 0 0 var(--green); }
.timer-running { display: flex; align-items: center; gap: 7px; margin: 4px 0 10px; color: #4b7f6c; font-size: 10px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(120,195,167,.35); animation: timerPulse 1.8s infinite; }
@keyframes timerPulse { 60% { box-shadow: 0 0 0 7px rgba(120,195,167,0); } 100% { box-shadow: 0 0 0 0 rgba(120,195,167,0); } }
.manual-time h4 { margin-bottom: 8px; font-size: 10px; font-weight: 700; }
.manual-time > div { display: grid; grid-template-columns: 68px 1fr; gap: 5px; }
.time-entry-list { display: grid; gap: 5px; }
.time-entry-list article { display: grid; grid-template-columns: 1fr 22px; gap: 5px; align-items: center; border-bottom: 1px solid #e5e9ee; padding: 7px 2px; }
.time-entry-list strong, .time-entry-list span { display: block; }
.time-entry-list strong { font-size: 8.5px; font-weight: 700; }
.time-entry-list span { margin-top: 2px; color: #778397; font-size: 7.5px; }
.time-entry-list button { border: 0; background: transparent; color: #9b6770; }
.panel-empty { color: #8390a1; font-size: 8.5px; }
.project-notes { min-height: 340px; border-color: #dce2e8; background: #fff; font-size: 10px; line-height: 1.55; }
.file-shortcuts { display: grid; gap: 7px; }
.file-shortcuts button { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; border: 1px solid #dce2e8; border-radius: 7px; padding: 9px; background: #fff; text-align: left; }
.file-shortcuts button:hover { border-color: #becbd8; box-shadow: 0 4px 12px rgba(23,37,63,.05); }
.file-shortcuts button > span { font-size: 17px; }
.file-shortcuts strong, .file-shortcuts small { display: block; }
.file-shortcuts strong { font-size: 9px; }
.file-shortcuts small { margin-top: 2px; color: #7a8798; font-size: 7.5px; }

.all-days-print, .print-only { display: none; }

@media print {
  html, body, body *, .paper, .paper * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .tool-rail-stack, .tool-rail, .screen-schedule { display: none !important; }
  .all-days-print { display: block !important; }
  .print-only { display: inline !important; }
  .workspace { display: block !important; }
  .paper-title .date-combo { flex-basis: auto; }
  .date-combo .date-text { width: 34mm; min-width: 34mm; font-variant-numeric: tabular-nums; }
  .inline-project-meta .customer-value, .inline-project-meta .location-value { width: auto; min-width: 22mm; max-width: 42mm; }
  .time-combo input { width: 18mm; }
  .native-date-picker, .calendar-button, .editor-start, .note-row .note-print { display: none !important; }
  input::placeholder, textarea::placeholder { color: transparent !important; }
  .legend-swatch {
    width: 5mm !important;
    height: 7mm !important;
    border-style: solid !important;
    border-width: 2.5mm !important;
  }
  .schedule-row {
    border-left: 3mm solid var(--category-color) !important;
    padding-left: 0 !important;
  }
  .measure-strip { display: none !important; }
  .phase-row { background-color: #f1f2f4 !important; }
  .schedule-head { background-color: #f4f5f7 !important; }
  .note-row { margin-left: 0; border-left-width: 3px; }
  .note-row > strong { font-size: 8.5px; }
  .note-row > span { font-size: 8.5px; }
  .schedule-row, .phase-row { margin-left: 0; }
}

/* V5 Feinschliff — ruhige Zeitsteuerung und schwebende Werkzeuge */
.history-actions {
  gap: 2px;
  margin-right: 14px;
  border: 1px solid #dce3ea;
  border-radius: 9px;
  padding: 3px;
  background: #f7f9fb;
}
.history-actions button {
  width: 38px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f6d80;
  font-size: 16px;
  transition: background 150ms, color 150ms, transform 170ms var(--ease-out);
}
.history-actions button:hover:not(:disabled) { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(23,37,63,.07); transform: translateY(-1px); }

.editor-pane { padding-top: 14px; scroll-behavior: auto; }
.workspace-controls {
  position: sticky;
  top: 8px;
  width: min(100%,1160px);
  min-height: 34px;
  margin: 0 auto 10px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.workspace-controls button {
  height: 30px;
  border: 1px solid rgba(23,37,63,.1);
  border-radius: 7px;
  padding: 0 11px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 2px 8px rgba(23,37,63,.045);
}

.date-combo { flex-basis: 132px; }
.date-combo .date-text { width: 108px; }
.inline-title-row { gap: 11px; }
.inline-project-meta { min-height: 24px; }
.day-start-lock {
  position: relative;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border: 0;
  border-radius: 5px;
  padding: 0;
  background: transparent;
  color: #8793a3;
  transition: color 150ms, background 150ms;
}
.day-start-lock:hover { background: #edf1f5; color: #536176; }
.day-start-lock.locked { background: #e6f3ee; color: #3e846d; }
.day-start-lock i::before { content: ""; position: absolute; top: 9px; left: 6px; width: 8px; height: 7px; border: 1.4px solid currentColor; border-radius: 2px; }
.day-start-lock i::after { content: ""; position: absolute; top: 4px; left: 8px; width: 5px; height: 6px; border: 1.4px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; transform-origin: left bottom; transform: rotate(-25deg); }
.day-start-lock.locked i::after { transform: none; }
.time-combo input[readonly] { color: #465a70; cursor: default; }

.time-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; }
.block-start { display: block; min-height: 13px; color: #68768a; font-size: 8px; line-height: 1.2; white-space: nowrap; }
.duration-line {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-rows: 15px minmax(24px,auto) 15px;
  place-items: center;
  gap: 0;
}
.duration-line button {
  width: 22px;
  min-width: 22px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  padding: 0;
  background: transparent;
  color: #66758a;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transform: scale(.8);
}
.schedule-row:hover .duration-line button, .duration-line button:focus-visible { opacity: 1; transform: scale(1); }
.duration-line button:hover { background: #edf2f6; color: var(--ink); }
.duration-value {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  color: #26354d;
  line-height: 1;
}
.duration-value strong { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.duration-value small { color: #6a778a; font-size: 7.5px; font-weight: 500; }
.timing-note { width: 100%; }

textarea.block-title {
  min-height: 30px;
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.workspace { grid-template-columns: 220px minmax(720px, 1fr) 52px 310px; }
.workspace.left-collapsed { grid-template-columns: 0 minmax(720px, 1fr) 52px 310px; }
.workspace.right-collapsed { grid-template-columns: 220px minmax(720px, 1fr) 52px 0; }
.workspace.left-collapsed.right-collapsed { grid-template-columns: 0 minmax(720px, 1fr) 52px 0; }
.tool-rail-stack {
  position: sticky;
  z-index: 12;
  top: 14px;
  align-self: start;
  display: grid;
  gap: 10px;
  margin: 15px 5px 0;
}
.tool-rail {
  position: relative;
  top: auto;
  align-self: auto;
  height: auto;
  gap: 3px;
  margin: 0;
  border: 1px solid rgba(23,37,63,.1);
  border-radius: 13px;
  padding: 5px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 24px rgba(23,37,63,.07);
  backdrop-filter: blur(16px) saturate(1.15);
}
.tool-rail button, .zoom-rail button { width: 34px; height: 34px; border-radius: 8px; }
.tool-rail button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.tool-rail button.active { border-color: transparent; background: #edf2f6; box-shadow: none; }
.zoom-rail {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(23,37,63,.1);
  border-radius: 12px;
  padding: 5px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 24px rgba(23,37,63,.06);
  backdrop-filter: blur(16px) saturate(1.15);
}
.zoom-rail button {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  padding: 0;
  background: transparent;
  color: #526176;
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
  transition: color 150ms, background 150ms, border-color 150ms, transform 180ms var(--ease-out);
}
.zoom-rail button:hover { border-color:#d7dfe7; background:#fff; color:var(--ink); transform:translateX(-1px); }
.zoom-rail button:hover .tool-tip { opacity:1; transform:translate(0,-50%); }
.tool-tip {
  position: absolute;
  z-index: 30;
  top: 50%;
  right: 43px;
  border-radius: 6px;
  padding: 5px 7px;
  background: #233148;
  color: #fff;
  font-size: 8px !important;
  font-weight: 600 !important;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px,-50%);
  transition: opacity 120ms, transform 160ms var(--ease-out);
}
.tool-rail button:hover .tool-tip { opacity: 1; transform: translate(0,-50%); }

.library-head h3 { margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.tool-card { border-style: solid; border-color: #e1e6eb; background: rgba(255,255,255,.78); }
.tool-card:hover { border-color: #c7d2dd; }
.method-folder { border-top-width: 1px; border-left: 3px solid var(--folder-color); }
.method-folder > header { padding-left: 4px; }
.right-panel-head { margin-bottom: 11px; }

.project-archive { display: grid; gap: 24px; }
.project-year { overflow: hidden; border: 1px solid #dce3e9; border-radius: 16px; background: rgba(255,255,255,.52); box-shadow: 0 10px 30px rgba(23,37,63,.035); }
.project-year-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; background: rgba(255,255,255,.82); }
.project-year-head button, .project-month > header button { border: 0; background: transparent; color: var(--ink); }
.project-year-head [data-toggle-project-year] { min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.project-year-head [data-toggle-project-year] i, .project-month [data-toggle-project-folder] i { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 180ms var(--ease-out); }
.project-year-head small, .project-month small { color: var(--muted); font-size: 10px; font-weight: 600; }
.project-year-head [data-new-project-folder] { border: 1px solid #d9e0e7; border-radius: 8px; padding: 8px 11px; color: #546277; font-size: 10px; font-weight: 700; }
.project-months { display: grid; gap: 12px; padding: 14px; }
.project-year.collapsed .project-months { display: none; }
.project-year.collapsed .project-year-head [data-toggle-project-year] i { transform: rotate(-45deg); }
.project-month { border: 1px solid #e2e7ec; border-radius: 12px; background: #f8fafb; transition: border-color 160ms, background 160ms, box-shadow 160ms; }
.project-month > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; }
.project-month [data-toggle-project-folder] { min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 12px; }
.project-month [data-rename-project-folder] { width: 30px; height: 28px; border-radius: 7px; color: #7a8798; }
.project-month [data-rename-project-folder]:hover { background: #edf1f5; color: var(--ink); }
.project-month .project-grid { padding: 0 12px 12px; }
.project-month.collapsed .project-grid { display: none; }
.project-month.collapsed [data-toggle-project-folder] i { transform: rotate(-45deg); }
.project-month.project-folder-drop-active { border-color: #6bb69b; background: rgba(120,195,167,.09); box-shadow: 0 0 0 3px rgba(120,195,167,.13); }
.project-folder-empty { grid-column: 1 / -1; border: 1px dashed #cfd9e2; border-radius: 9px; padding: 20px; color: #8995a4; text-align: center; font-size: 10px; }
.project-card { position: relative; min-height: 154px; padding: 0; }
.project-card.dragging { opacity: .55; transform: scale(.985); }
.project-card-open { width: 100%; min-height: 154px; display: flex; flex-direction: column; justify-content: space-between; border: 0; border-radius: inherit; padding: 18px 46px 18px 18px; background: transparent; color: inherit; text-align: left; }
.project-card-menu { position: absolute; z-index: 2; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #7a8798; }
.project-card-menu:hover { background: #eef2f5; color: var(--ink); }
.project-popover { min-width: 250px; }

.multiday-toggle { display: flex !important; flex-direction: row !important; align-items: center; gap: 9px; width: max-content; border: 1px solid #dbe2e8; border-radius: 10px; padding: 10px 12px; background: #f8fafb; }
.multiday-toggle input { width: 16px; height: 16px; margin: 0; }
.multiday-end[hidden], .copy-target-day[hidden] { display: none !important; }

.day-settings { flex-wrap: wrap; }
.day-settings button { white-space: nowrap; }

/* V6 — flexible Farben, direkte Dauer und automatisch abgeleitete Materialseite */
.date-combo { flex-basis: 180px; min-width: 180px; overflow: visible; }
.date-combo .date-text { width: 150px; min-width: 150px; font-variant-numeric: tabular-nums; }
.inline-project-title { min-width: 180px !important; }

.schedule-legend { gap: 6px 13px; margin: 0 5px 10px; color: #536176; font-size: 7px; line-height: 1.15; }
.schedule-legend span { gap: 5px; white-space: nowrap; }
.legend-swatch { width: 9px; height: 9px; flex: 0 0 9px; border-width: 1px; border-radius: 2px; }
.legend-edit { padding: 3px 5px; }
.schedule-head > div { display: flex; align-items: center; justify-content: center; text-align: center; }
.day-settings button { margin-left: 0; }
.day-settings button:first-of-type { margin-left: auto; }

.duration-value { min-width: 58px; display: inline-flex; align-items: baseline; justify-content: center; gap: 3px; border: 0; padding: 0; color: #26354d; font-weight: 400; }
.duration-value input { width: 34px; min-width: 34px; border: 1px solid transparent; border-radius: 5px; padding: 2px 1px; background: transparent; color: #26354d; box-shadow: none; font-size: 18px; font-weight: 700; letter-spacing: -.03em; line-height: 1; text-align: right; }
.duration-value input:hover { background: #f2f5f7; }
.duration-value input:focus { border-color: #a8bfd8; background: #fff; box-shadow: 0 0 0 3px rgba(151,186,226,.18); }
.duration-value small { color: #6a778a; font-size: 7.5px; font-weight: 500; }

.category-settings { gap: 9px; }
.category-setting-row { display: grid; grid-template-columns: 38px 86px minmax(180px,1fr) 28px; gap: 8px; align-items: center; }
.category-setting-row input { margin: 0; }
.category-color-wheel { width: 38px; height: 36px; border: 1px solid #d3dce5; border-radius: 8px; padding: 3px; background: #fff; }
.category-hex { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-transform: lowercase; }
.category-hex.invalid, .color-input-pair input.invalid { border-color: #bd5a66; background: #fff5f6; }
.category-setting-row button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #a15b66; font-size: 17px; }
.category-setting-row button:hover { background: #f8edef; }
.category-row-spacer { width: 28px; }
.add-category { margin-top: 12px; }
.color-input-pair { display: grid; grid-template-columns: 90px 1fr; gap: 10px; margin-top: 12px; }
.color-input-pair input[type="color"] { height: 40px; padding: 3px; }
.color-input-pair input[name="folderHex"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.material-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d9e0e7; padding-bottom: 10px; }
.material-list-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.material-list-head p { margin: 0; color: #748095; font-size: 8px; }
.material-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 22px; }
.material-zone { min-width: 0; }
.material-zone-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 3px solid var(--blue); padding: 0 2px 8px; }
.material-zone:nth-child(2) .material-zone-title { border-bottom-color: var(--green); }
.material-zone-title h3 { margin: 0; font-size: 13px; font-weight: 700; }
.material-zone-title span { color: #7a8798; font-size: 7px; }
.material-checklist { display: grid; }
.material-check-row { min-height: 35px; display: grid; grid-template-columns: 18px minmax(0,1fr) auto 66px; gap: 8px; align-items: center; border-bottom: 1px solid #e3e8ed; padding: 6px 2px; color: #26354d; font-size: 9px; font-weight: 500; }
.material-check-row > input { width: 15px; height: 15px; margin: 0; accent-color: #17253f; }
.material-check-row small { color: #788598; font-size: 7px; white-space: nowrap; }
.material-check-row select { width: 66px; margin: 0; border-color: transparent; padding: 4px 18px 4px 5px; background-color: #f2f5f7; font-size: 8px; }
.material-empty { margin: 18px 2px; color: #8a96a5; font-size: 9px; }
.material-list-note { margin: 20px 0 0; border-radius: 7px; padding: 8px 10px; background: #f3f6f8; color: #6d7a8d; font-size: 8px; line-height: 1.4; }

@media print {
  .day-start-lock, .block-start, .duration-line { display: none !important; }
  textarea.block-title { min-height: 0; }
  .schedule-legend { margin-bottom: 3mm; gap: 2mm 5mm; font-size: 6.8pt; }
  .legend-swatch { width: 3mm !important; height: 3mm !important; border-width: .4mm !important; border-radius: .5mm; }
  .material-check-row { grid-template-columns: 5mm minmax(0,1fr) auto; min-height: 9mm; font-size: 9pt; }
  .material-check-row > input { appearance: none; width: 4mm; height: 4mm; border: .35mm solid #526076; border-radius: .5mm; }
  .material-check-row > input:checked::after { content: "✓"; display: block; font-size: 10pt; line-height: 3.4mm; text-align: center; }
}

@page offer { size:A4 portrait; margin:0; }

/* V8 — ein gemeinsames, ruhiges Dokumentraster */
.paper-header { grid-template-columns:minmax(0,1fr) 122px; gap:22px; margin-bottom:13px; }
.paper-title { padding:0 0 10px; }
.inline-title-row { justify-content:flex-start; gap:18px; }
.date-combo { flex:0 0 144px; min-width:144px; }
.date-combo .date-text { width:118px; min-width:118px; }
.inline-project-title { flex:0 1 560px; min-width:220px !important; }
.inline-project-meta { min-height:20px; margin-top:4px; gap:14px; }
.inline-project-meta .customer-value { width:120px; }
.inline-project-meta .location-value { width:105px; }
.document-name { margin-left:2px; white-space:nowrap; }
.paper-logo-wrap { height:72px; }
.paper-logo { max-width:112px; max-height:72px; }
.paper-footer { padding-top:6px; }

.schedule-legend { min-height:0; margin:1px 5px 9px; gap:5px 12px; }
.schedule-legend span { color:#536176; }
.schedule-legend:empty { display:none; }
.schedule-row { margin-left:0; padding-left:0; }
.schedule-row .color-strip { width:6px; }
.schedule-row .time-cell { padding-left:13px !important; }
.phase-row { margin-left:8px; margin-right:0; }

.worksheet-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:14px; }
.worksheet-toolbar .worksheet-tabs { flex:1; margin:0; }
.worksheet-toolbar > div:last-child { display:flex; gap:6px; }
.worksheet-person-grid { display:grid; grid-template-columns:1.25fr repeat(3,1fr); gap:13px; }
.worksheet-canvases { margin-top:11px; }
.worksheet-canvas { height:214px; background:#fff; }
.worksheet-guides { display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-top:16px; border-top:1px solid var(--line); padding-top:13px; }
.worksheet-guides label { overflow:hidden; border:1px solid var(--line); border-top:4px solid var(--green); background:#fff; }
.worksheet-guides label:nth-child(2) { border-top-color:var(--peach); }
.worksheet-guides strong { display:block; padding:8px 10px 4px; color:var(--ink); font-size:11px; }
.worksheet-guides textarea { min-height:118px; border:0; border-radius:0; padding:5px 10px 10px; font-size:8px; line-height:1.35; }
.worksheet-guide-print { padding:5px 10px 10px; font-size:7px; line-height:1.25; }
.worksheet-guide-print .line-number { min-width:15px; }
.worksheet-imports { margin-top:22px; border-top:1px solid var(--line); padding-top:14px; }
.worksheet-imports > div:first-child { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:9px; }
.worksheet-imports h3 { margin:0; font-size:12px; }
.worksheet-imports span { color:var(--muted); font-size:8px; }

@media print {
  body, .app-shell, .workspace, .editor-pane { height:auto !important; max-height:none !important; overflow:visible !important; }
  .paper-header { grid-template-columns:minmax(0,1fr) 31mm; gap:6mm; margin-bottom:3.5mm; }
  .paper-title { padding-bottom:2.8mm; }
  .inline-title-row { gap:5mm; }
  .date-combo { flex:0 0 34mm; min-width:34mm; }
  .date-combo .date-text { width:34mm; min-width:34mm; }
  .inline-project-meta { margin-top:1.2mm; gap:4mm; }
  .paper-logo-wrap { height:19mm; }
  .paper-logo { max-width:30mm; max-height:19mm; }
  .paper-footer { padding-top:1.5mm; }
  .schedule-row { border-left:2mm solid var(--category-color) !important; }
  .schedule-row .time-cell { padding-left:2.5mm !important; }
  .phase-row { margin-left:2mm !important; }
  .worksheet-canvas { height:68mm; }
  .worksheet-guides { gap:8mm; margin-top:4mm; padding-top:4mm; }
  .worksheet-guides label { border-top-width:1.2mm; }
  .worksheet-guides textarea { min-height:34mm; font-size:7pt; }
  .worksheet-guide-print { display:block !important; min-height:34mm; font-size:7pt; line-height:1.25; }
}

/* V9 final overrides */
.paper-header { grid-template-columns:minmax(0,1fr) 108px; gap:18px; margin-bottom:12px; }
.paper-title { padding:0 0 9px; }
.inline-title-row { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:baseline; gap:12px; }
.date-combo { position:relative; display:block; flex:none; width:126px; min-width:126px; overflow:visible; }
.date-combo .date-text { width:126px; min-width:126px; padding-left:0; font-size:22px; }
.date-combo .calendar-button { position:absolute; top:1px; right:-23px; }
.inline-project-title { width:100%; min-width:0 !important; padding-left:0 !important; font-size:22px; }
.inline-project-meta { min-height:18px; margin-top:3px; gap:7px; }
.inline-project-meta .time-combo { margin-left:0; }
.inline-project-meta .time-combo input { width:55px; padding-left:0; }
.inline-project-meta .meta-divider { color:#a0a9b5; }
.inline-project-meta .meta-grow { flex:1; }
.inline-project-meta .customer-value { width:112px; text-align:right; }
.inline-project-meta .location-value { width:82px; text-align:right; }
.paper-logo-wrap { height:60px; }
.paper-logo { max-width:100px; max-height:60px; }
.paper-footer { gap:16px; }
.paper-footer > span:first-child { white-space:nowrap; }

.material-check-row { grid-template-columns:18px minmax(0,1fr) 58px 66px; }
.material-quantity { display:grid; grid-template-columns:34px 1fr; gap:3px; align-items:center; color:#788598; }
.material-quantity input { width:34px; min-width:0; margin:0; border:1px solid #d8e0e7; border-radius:6px; padding:4px 3px; background:#fff; color:#26354d; font-size:9px; font-weight:700; text-align:center; }
.material-quantity small { font-size:6.5px; }

@media print {
  .paper-header { grid-template-columns:minmax(0,1fr) 27mm; gap:5mm; margin-bottom:3mm; }
  .inline-title-row { gap:3.5mm; }
  .date-combo { width:33mm; min-width:33mm; }
  .date-combo .date-text { width:33mm; min-width:33mm; }
  .inline-project-meta { gap:2mm; margin-top:.8mm; }
  .inline-project-meta .meta-grow { min-width:2mm; }
  .inline-project-meta .customer-value,.inline-project-meta .location-value { min-width:18mm; max-width:32mm; text-align:right; }
  .paper-logo-wrap { height:16mm; }
  .paper-logo { max-width:27mm; max-height:16mm; }
  .paper-footer { font-size:6.5pt; }
  .material-check-row { grid-template-columns:5mm minmax(0,1fr) 17mm; }
  .material-quantity { grid-template-columns:8mm 1fr; }
  .material-quantity input { width:8mm; border:.25mm solid #aab5c1 !important; border-radius:1mm; padding:1mm !important; background:#fff !important; font-size:8pt; }
  .material-quantity small { font-size:6pt; }
}

/* V11.3b — Angebotsfeinschliff, optionales Konzeptfoto und Fermentierlust-Format */

/* V11.3c — Fermentierlust-Bildwelt + Crew-Up-Mix */

/* V11.3d — Fermentierlust-Angebot finaler Layout-Feinschliff */

/* Fermentierlust-Cover: Inhalt oben, beide Welten unten nebeneinander */

/* Fermentierlust-Seite 2: zwei Textblöcke links, Sauerkrautbild mittig dazu rechts */

/* Strukturierte Fermentierlust-Preisübersicht */

/* Fermentierlust-Footer: eigene Absenderlogik auf jeder Seite */

/* Letzte Seite: Bild beginnt klar unterhalb der Heading-Linie */

/* Fermentierlust: Link-/Hinweisfarben innerhalb des eigenen Systems */


/* C27.0.5 · Projektarchiv: Löschen ohne versteckte Bedienwege */
.project-year-actions{display:flex;align-items:center;gap:8px}
.project-year-head .project-year-delete{border:1px solid #ead7da;border-radius:8px;padding:8px 10px;color:#9b4650;background:#fff;font-size:10px;font-weight:700}
.project-year-head .project-year-delete:hover{background:#fff4f5;border-color:#dfbbc0;color:#873640}
