:root {
  --bg: #F3F7F7;
  --surface: #ffffff;
  --soft: #eef5f3;
  --text: #14201d;
  --muted: #64736f;
  --line: #d6e1de;
  --primary: #07967F;
  --primary-dark: #0D352D;
  --lime: #84B241;
  --nav: #0D2520;
  --warning-bg: #fff7e8;
  --warning-text: #7c5212;
  --danger: #b03b3b;
  --shadow: 0 18px 50px rgba(20, 46, 40, 0.10);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(7, 150, 127, .12), transparent 34rem),
    radial-gradient(circle at top left, rgba(114, 211, 65, .10), transparent 30rem),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: var(--nav);
  color: #fff;
  padding: 28px 20px;
}

.brand {
  display: grid;
  gap: 12px;
  align-items: start;
  margin-bottom: 22px;
  padding: 12px;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
}

.brand-logo {
  width: 100%;
  max-width: 230px;
  height: auto;
  display: block;
}

.brand-copy strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--text);
}

.brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.edition-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, white);
  color: var(--primary-dark);
  font-style: normal;
  font-size: .72rem;
  font-weight: 900;
}

.brand-copy em {
  display: block;
  margin-top: 3px;
  color: #8fd1c5;
  font-style: normal;
  font-size: .8rem;
}


.progress { margin-bottom: 26px; }
.progress-track {
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
}
.progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #d84a43 0%, #f0a022 50%, #72d341 100%);
  clip-path: inset(0 80% 0 0);
  transition: clip-path .25s ease;
}
.progress-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: #c1d4cf;
  font-size: .78rem;
}

.step-nav { display: grid; gap: 8px; }
.step-nav button {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 11px;
  color: #d4e2df;
  background: transparent;
  text-align: left;
}
.step-nav button:hover { background: rgba(255,255,255,.06); }
.step-nav button.active { background: rgba(255,255,255,.13); color: #fff; }
.step-nav button span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  font-weight: 800;
}
.step-nav button.active span {
  background: var(--lime);
  color: #163228;
  border-color: transparent;
}

.side-actions { display: grid; gap: 9px; margin-top: 28px; }
.side-actions button {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 11px;
  border-radius: 10px;
}
.side-actions button:hover { background: rgba(255,255,255,.11); }

.sidebar-note {
  margin-top: 24px;
  color: #aac2bc;
  font-size: .78rem;
  line-height: 1.5;
}

.sidebar-copyright {
  margin-top: 18px;
  color: #7eb3a7;
  font-size: .76rem;
  font-weight: 800;
}

main {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 38px clamp(18px, 4vw, 58px) 60px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}
.page-head h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; }
.page-head p { margin: 9px 0 0; color: var(--muted); line-height: 1.5; }
.save-badge {
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 999px;
  background: #e5f5ee;
  color: var(--primary-dark);
  font-size: .8rem;
  font-weight: 800;
}

.step { display: none; }
.step.active { display: block; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card + .card { margin-top: 18px; }

.card-head { margin-bottom: 18px; }
.card-head.split {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.card h2 { margin: 0; font-size: 1.18rem; }
.card-head p, .card > p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }

.form-grid {
  display: grid;
  gap: 15px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

label, .full-label {
  display: grid;
  gap: 7px;
  font-size: .87rem;
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #c8d6d2;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 150, 127, .12);
}
textarea { min-height: 100px; resize: vertical; }

.top-gap { margin-top: 17px; }
.section-title { margin: 22px 0 12px; }

.choice-grid { display: grid; gap: 12px; }
.choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.choice, .system-card { position: relative; display: block; }
.choice input, .system-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice span, .system-card span {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: .15s ease;
}
.choice input:checked + span, .system-card input:checked + span {
  border-color: var(--primary);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.choice small, .system-card small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.system-card b { color: var(--primary-dark); font-size: .8rem; margin-top: auto; }

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
.actions.end { justify-content: flex-end; }
button.primary, button.secondary, button.danger {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 850;
}
button.primary { background: var(--primary); color: #fff; }
button.primary:hover { background: var(--primary-dark); }
button.secondary { background: #e6eeec; color: var(--text); }
button.secondary:hover { background: #dce7e4; }
button.danger { background: #fff0f0; color: var(--danger); }

.inline-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.summary-strip {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--soft);
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 14px;
}

.room-list { display: grid; gap: 11px; }
.room-row {
  display: grid;
  grid-template-columns: minmax(190px,1.4fr) minmax(150px,1fr) minmax(90px,.55fr) 96px auto;
  gap: 10px;
  align-items: end;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfdfd;
}

.feature-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}
.feature-toolbar > label { min-width: 320px; }

.feature-groups { display: grid; gap: 16px; }
.feature-group {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}
.feature-group h3 {
  margin: 0;
  padding: 13px 15px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-size: .98rem;
}
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 156px);
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid #edf1f0;
}
.feature-item:nth-child(odd) { border-right: 1px solid #edf1f0; }
.feature-name { font-weight: 800; }
.feature-help { margin-top: 3px; color: var(--muted); font-size: .79rem; line-height: 1.35; }
.qty {
  display: grid;
  grid-template-columns: 36px minmax(54px, 68px) 36px;
  gap: 6px;
  align-items: center;
}
.qty button {
  min-width: 36px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8d6d2;
  background: #fff;
  border-radius: 10px;
  font-weight: 900;
  font-size: 1.05rem;
}
.qty input { min-width: 0; width: 100%; padding: 7px 6px; text-align: center; border: 1px solid #c8d6d2; border-radius: 10px; background: #fff; font-variant-numeric: tabular-nums; }
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input[type="number"] { appearance: textfield; -moz-appearance: textfield; }

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.system-card span { min-height: 155px; }
.system-card strong { font-size: 1.05rem; }

.catalog-help { margin: 14px 0; }
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}
.catalog-toolbar label { max-width: 280px; width: 100%; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th, .data-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th {
  color: var(--muted);
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.data-table input { min-width: 105px; padding: 7px 8px; }
.data-table a { color: var(--primary-dark); font-weight: 750; }

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .62fr);
  gap: 18px;
  align-items: start;
}
.result-main { min-width: 0; }

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}
.metrics > div {
  padding: 15px;
  border-radius: 13px;
  border: 1px solid #dbe7e4;
  background: #f1f7f5;
}
.metrics small { color: var(--muted); }
.metrics strong { display: block; margin-top: 4px; font-size: 1.35rem; }

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.comparison-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.comparison-card.selected {
  border-color: var(--primary);
  background: var(--soft);
}
.comparison-card small { color: var(--muted); }
.comparison-card strong { display: block; font-size: 1.35rem; margin: 5px 0; }
.comparison-card span { font-size: .8rem; color: var(--muted); }

.cost-card { position: sticky; top: 22px; }
.total-box {
  margin: 18px 0;
  padding: 18px;
  border-radius: 15px;
  background: var(--nav);
  color: #fff;
}
.total-box small { color: #bdd1cc; }
.total-box strong { display: block; margin-top: 5px; font-size: 2rem; }
.cost-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.warning {
  margin-top: 15px;
  padding: 13px;
  border: 1px solid #efd49e;
  border-radius: 11px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: .82rem;
  line-height: 1.45;
}
.export-buttons { display: grid; gap: 9px; margin-top: 15px; }

.room-book-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.room-book-title { display: flex; justify-content: space-between; gap: 15px; }
.room-book-features { margin-top: 6px; color: var(--muted); font-size: .85rem; line-height: 1.55; }

.price-date {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef3f2;
  color: var(--muted);
  font-size: .77rem;
  font-weight: 800;
}

.validation-box {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff0f0;
  color: #8d2f2f;
  border: 1px solid #efbbbb;
  font-weight: 750;
}
.hidden { display: none !important; }

.badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
}
.badge.online { background: #e3f5ed; color: #07654f; }
.badge.plan { background: #fff3dd; color: #805616; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff;
  background: var(--nav);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .app { grid-template-columns: 230px minmax(0, 1fr); }
  .form-grid.four, .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-layout { grid-template-columns: 1fr; }
  .cost-card { position: static; }
}

@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { position: static; height: auto; padding: 18px; }
  .step-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .step-nav button { display: flex; justify-content: center; padding: 7px; }
  .step-nav button:not(.active) { color: transparent; }
  .step-nav button span { color: #fff; flex: 0 0 30px; }
  .side-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-note { display: none; }
  main { padding: 24px 14px 44px; }
  .page-head, .card-head.split, .feature-toolbar, .catalog-toolbar { display: block; }
  .save-badge { display: inline-flex; margin-top: 12px; }
  .form-grid.two, .form-grid.three, .form-grid.four,
  .choice-grid.three, .system-grid, .metrics, .comparison-cards {
    grid-template-columns: 1fr;
  }
  .room-row { grid-template-columns: 1fr 1fr; }
  .room-row label:first-child { grid-column: 1 / -1; }
  .feature-toolbar > label { min-width: 0; margin-bottom: 12px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-item:nth-child(odd) { border-right: 0; }
  .actions { flex-direction: column-reverse; }
  .actions button { width: 100%; }
}

@page {
  size: A4 portrait;
  margin: 27mm 11mm 17mm;
}


.project-code-field { grid-column: span 2; }
.project-code-input-row { display: grid; grid-template-columns: minmax(150px,1fr) auto auto; gap: 8px; align-items: center; }
.project-code-input-row input { font-weight: 900; letter-spacing: .08em; background: var(--soft); }
.compact-button { padding: 9px 12px; min-height: 40px; }
.full-span { grid-column: 1 / -1; }
.theme-settings { display: grid; grid-template-columns: repeat(5,minmax(110px,1fr)); gap: 10px; margin-top: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); }
.theme-settings-head { grid-column: 1 / -1; display: grid; gap: 3px; }
.theme-settings-head small { color: var(--muted); }
.theme-settings label { display: grid; gap: 6px; font-size: .78rem; }
.theme-settings input[type="color"] { width: 100%; min-height: 42px; padding: 3px; }
.website-config-content { display: grid; gap: 16px; }
.website-config-note { padding: 13px 15px; border-radius: 12px; background: var(--warning-bg); color: var(--warning-text); line-height: 1.5; }
.website-toggle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.website-toggle-grid label { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: start; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.website-toggle-grid span { display: grid; gap: 3px; min-width: 0; }
.website-toggle-grid small { color: var(--muted); line-height: 1.35; }
.website-toggle-grid input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1.5px solid #bfd0cb; border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.website-toggle-grid input[type="checkbox"]::after { content: ""; width: 8px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transform-origin: center; transition: transform .16s ease; margin-top: -1px; }
.website-toggle-grid input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(54, 166, 47, 0.12); }
.website-toggle-grid input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
.website-toggle-grid input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(54, 166, 47, 0.18); }
.website-preview-url { display: block; margin-top: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--primary-dark); overflow-wrap: anywhere; }
#websiteEmbedCode { min-height: 110px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; }
.project-code-result { display: grid; grid-template-columns: 1fr auto; gap: 4px 9px; align-items: center; margin-bottom: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.project-code-result span { color: var(--muted); font-size: .76rem; font-weight: 800; }
.project-code-result strong { color: var(--primary-dark); letter-spacing: .08em; }
.project-code-result button { grid-row: 1 / span 2; grid-column: 2; }
@media (max-width: 900px) {
  .project-code-field { grid-column: 1 / -1; }
  .theme-settings { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .website-toggle-grid { grid-template-columns: 1fr; }
}

@media print {
  :root {
    --print-green: #0d342d;
    --print-mint: #e9f4f1;
    --print-red: #d3463e;
    --print-line: #c9d7d3;
  }

  html,
  body {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    background: #fff !important;
    color: #17231f;
    font-size: 8.2pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sidebar,
  .page-head,
  .actions,
  .export-buttons,
  .warning,
  .catalog-card,
  .company-print-settings,
  .toast {
    display: none !important;
  }

  .print-document-header {
    position: fixed;
    top: -22mm;
    left: 0;
    right: 0;
    height: 17mm;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8mm;
    padding: 0 0 3mm;
    border-bottom: 1.2pt solid var(--print-green);
    background: #fff;
    z-index: 1000;
  }

  .print-document-brand {
    min-width: 0;
    display: grid;
    gap: .7mm;
  }

  .print-document-brand > strong {
    color: var(--print-green);
    font-size: 14pt;
    line-height: 1;
    letter-spacing: -.02em;
  }

  .print-document-brand > span {
    overflow: hidden;
    color: #263a34;
    font-size: 8.2pt;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .print-document-brand > small {
    color: #667871;
    font-size: 6.8pt;
  }

  .print-document-company {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4mm;
    max-width: 92mm;
    text-align: right;
  }

  .print-company-copy {
    display: grid;
    gap: .8mm;
    max-width: 55mm;
  }

  .print-company-copy strong {
    color: var(--print-green);
    font-size: 8pt;
  }

  .print-company-copy span {
    color: #5e706a;
    font-size: 6.5pt;
    line-height: 1.28;
    white-space: pre-line;
  }

  .print-document-company img {
    width: auto;
    max-width: 38mm;
    height: auto;
    max-height: 13mm;
    object-fit: contain;
  }

  .print-document-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -11mm;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-top: 2mm;
    border-top: .7pt solid var(--print-line);
    color: #72817c;
    font-size: 6.5pt;
  }

  .app {
    display: block;
    min-height: 0;
  }

  main {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .step {
    display: none !important;
  }

  #step5 {
    display: block !important;
  }

  #validationBox {
    display: none !important;
  }

  .result-layout {
    display: flex;
    flex-direction: column;
    gap: 4mm;
    align-items: stretch;
  }

  .result-main {
    display: contents;
  }

  .result-main > .card:first-child { order: 1; }
  .cost-card { order: 2; }
  #logicResultCard { order: 3; }
  #prePlanningResultCard { order: 4; }
  #offerPlanningResultCard { order: 5; }
  #executionResultCard { order: 6; }
  #bomPrintCard { order: 7; }
  #roomBookPrintCard { order: 8; }

  .card,
  details.card {
    margin: 0 !important;
    padding: 4mm;
    border: .7pt solid var(--print-line);
    border-radius: 3.5mm;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .result-main > .card:first-child {
    padding: 0;
    overflow: hidden;
    border-color: #b9cbc6;
  }

  .result-main > .card:first-child > .card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6mm;
    margin: 0;
    padding: 4.5mm 5mm 4mm;
    background: linear-gradient(120deg, var(--print-green), #176657);
    color: #fff;
  }

  .result-main > .card:first-child > .card-head h2 {
    color: #fff;
    font-size: 15pt;
    line-height: 1.05;
  }

  .result-main > .card:first-child > .card-head p {
    margin-top: 1.5mm;
    color: #d7ebe6;
    font-size: 7.4pt;
  }

  .result-head-meta {
    display: grid;
    justify-items: end;
    gap: 1.2mm;
    min-width: 42mm;
  }

  .phase-badge,
  .package-badge,
  .price-date {
    padding: 1.2mm 2.2mm;
    border: .5pt solid rgba(255,255,255,.38);
    border-radius: 99mm;
    background: rgba(255,255,255,.13) !important;
    color: #fff !important;
    font-size: 6.5pt;
    font-weight: 850;
  }

  .metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5mm;
    padding: 3mm 4mm 1.5mm;
  }

  .metrics > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.2mm;
    padding: 2mm 2.3mm;
    border: .55pt solid #d5e3df;
    border-radius: 2.2mm;
    background: #f2f7f5;
  }

  .metrics small {
    color: #5e706a;
    font-size: 6pt;
    line-height: 1.15;
  }

  .metrics strong {
    margin: 0;
    color: var(--print-green);
    font-size: 9.4pt;
    line-height: 1;
    white-space: nowrap;
  }

  .result-main > .card:first-child > .section-title {
    margin: 2.2mm 4mm 1.5mm;
    color: #435b54;
    font-size: 7pt;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .comparison-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6mm;
    padding: 0 4mm 4mm;
  }

  .comparison-card {
    min-height: 0;
    padding: 2.4mm;
    border: .6pt solid #d3dfdc;
    border-radius: 2.4mm;
    background: #fff;
  }

  .comparison-card.selected {
    border: 1.2pt solid var(--print-green);
    background: var(--print-mint);
  }

  .comparison-system-label {
    min-height: 0;
  }

  .comparison-system-name {
    color: #20332d;
    font-size: 7.4pt;
    font-weight: 900;
  }

  .comparison-system-mode {
    color: #71817c;
    font-size: 6pt;
  }

  .comparison-card strong {
    margin: 1mm 0;
    color: var(--print-green);
    font-size: 11pt;
    line-height: 1;
  }

  .comparison-card span {
    color: #667771;
    font-size: 5.8pt;
    line-height: 1.22;
  }

  .cost-card {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
    column-gap: 6mm;
    align-items: start;
    padding: 4.5mm 5mm;
    border: 1pt solid #aec5bf;
    background: linear-gradient(120deg, #f8fbfa, #eef6f3);
  }

  .cost-card > h2,
  .cost-card > p,
  .cost-card > .total-box {
    grid-column: 1;
  }

  .cost-card > h2 {
    margin: 0;
    color: var(--print-green);
    font-size: 11pt;
  }

  .cost-card > p {
    margin: 1.5mm 0 0;
    color: #667771;
    font-size: 6.6pt;
    line-height: 1.35;
  }

  .total-box {
    position: relative;
    margin: 4mm 0 0;
    padding: 5mm 4mm 4mm;
    overflow: hidden;
    border: 0;
    border-radius: 3mm;
    background: linear-gradient(135deg, var(--print-green), #176657);
    color: #fff;
  }

  .total-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 2.3mm;
    height: 100%;
    background: var(--print-red);
  }

  .total-box small {
    color: #cde3dd;
    font-size: 7pt;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .total-box strong {
    margin-top: 2mm;
    font-size: 20pt;
    line-height: 1;
    letter-spacing: -.03em;
  }

  .cost-row {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    gap: 4mm;
    padding: 1.25mm 0;
    border-bottom: .45pt solid #d6e1de;
    font-size: 6.8pt;
    line-height: 1.15;
  }

  .cost-row strong {
    color: #1d332d;
    white-space: nowrap;
  }

  .cost-row.sub-cost {
    padding-left: 4mm;
    color: #6d7d78;
  }

  .logic-summary {
    min-height: 0;
    padding: 3mm 3.5mm;
    background: #f7faf9;
  }

  .logic-summary::after,
  .logic-card[open] .logic-summary::after {
    display: none !important;
    content: none !important;
  }

  .logic-summary-copy {
    gap: .8mm;
  }

  .logic-summary-copy strong {
    color: var(--print-green);
    font-size: 9pt;
  }

  .logic-summary-copy small {
    color: #697a74;
    font-size: 6.3pt;
  }

  .logic-summary-hours {
    padding: 1.2mm 2.3mm;
    background: var(--print-mint);
    color: var(--print-green);
    font-size: 7pt;
  }

  .logic-card-content {
    padding: 3mm 3.5mm;
  }

  .card-head {
    margin-bottom: 3mm;
  }

  .card h2 {
    color: var(--print-green);
    font-size: 10pt;
  }

  .card-head p,
  .card > p {
    margin-top: 1mm;
    color: #6b7b76;
    font-size: 6.5pt;
  }

  .table-scroll {
    overflow: visible;
  }

  .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 6.6pt;
  }

  .data-table thead {
    display: table-header-group;
  }

  .data-table tr,
  .room-book-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .data-table th,
  .data-table td {
    padding: 1.55mm 1.4mm;
    border-bottom: .45pt solid #d9e3e0;
  }

  .data-table th {
    background: #eef5f3;
    color: #4d625c;
    font-size: 5.8pt;
    letter-spacing: .035em;
  }

  .badge {
    padding: .8mm 1.4mm;
    font-size: 5.4pt;
  }

  .offer-result-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5mm;
    margin-bottom: 3mm;
  }

  .offer-result-meta > div {
    padding: 2mm;
    border-radius: 2mm;
  }

  .offer-result-meta small {
    font-size: 5.6pt;
  }

  .offer-result-meta strong {
    margin-top: .7mm;
    font-size: 6.7pt;
  }

  .room-book-item {
    padding: 2.3mm 0;
  }

  .room-book-title {
    gap: 4mm;
    font-size: 7pt;
  }

  .room-book-features {
    margin-top: 1mm;
    color: #65766f;
    font-size: 6.3pt;
    line-height: 1.35;
  }

  #bomPrintCard,
  #roomBookPrintCard {
    break-before: page;
    page-break-before: always;
  }
}


.work-rate-table td:first-child {
  min-width: 250px;
  font-weight: 800;
}

.work-rate-table input {
  min-width: 120px;
  text-align: right;
}

.work-rate-table td:last-child {
  min-width: 150px;
  color: var(--primary-dark);
}


.logic-mode-field {
  min-width: 210px;
}

.logic-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.logic-toolbar .summary-strip {
  margin: 0;
  flex: 1;
}

.logic-groups {
  display: grid;
  gap: 14px;
}

.logic-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.logic-group h3 {
  margin: 0;
  padding: 12px 14px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}

.logic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}

.logic-table th,
.logic-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf1f0;
  text-align: left;
  vertical-align: middle;
}

.logic-table tr:last-child td {
  border-bottom: 0;
}

.logic-table th {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
}

.logic-table input {
  min-width: 82px;
  max-width: 110px;
  padding: 7px 8px;
}

.logic-hours {
  white-space: nowrap;
  font-weight: 850;
  color: var(--primary-dark);
}

.logic-manual-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
}

.sub-cost {
  padding-left: 12px;
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 760px) {
  .logic-toolbar {
    display: block;
  }
  .logic-toolbar button {
    width: 100%;
    margin-top: 10px;
  }
  .logic-mode-field {
    min-width: 0;
    margin-top: 12px;
  }
}


/* Paketauswahl und einklappbare Programmierleistungen */
.logic-card {
  padding: 0;
  overflow: hidden;
}

.logic-card > summary {
  list-style: none;
}

.logic-card > summary::-webkit-details-marker {
  display: none;
}

.logic-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  background: #fff;
  transition: background .15s ease;
}

.logic-summary:hover {
  background: #f7faf9;
}

.logic-summary-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.logic-summary-copy strong {
  font-size: 1.06rem;
}

.logic-summary-copy small {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}

.logic-summary-hours {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 850;
}

.logic-summary::after {
  content: "öffnen";
  color: var(--primary-dark);
  font-size: .76rem;
  font-weight: 850;
  white-space: nowrap;
}

.logic-card[open] .logic-summary::after {
  content: "schließen";
}

.logic-card[open] .logic-summary {
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.logic-card-content {
  padding: 22px;
}

.logic-card-head {
  margin-bottom: 16px;
}

.result-head-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.package-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid transparent;
}

.package-badge.basis {
  background: #eef1f2;
  color: #53615d;
  border-color: #d7dfdd;
}

.package-badge.komfort {
  background: #e5f5ee;
  color: var(--primary-dark);
  border-color: #c5e7db;
}

.package-badge.premium {
  background: #fff4d9;
  color: #7a5410;
  border-color: #ead6a3;
}

.package-badge.benutzer {
  background: #e9eef9;
  color: #314e86;
  border-color: #cbd6ee;
}

.package-btn.active-package {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 760px) {
  .logic-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .logic-summary::after {
    width: 100%;
  }
  .logic-summary-hours {
    margin-left: auto;
  }
  .result-head-meta {
    justify-content: flex-start;
    margin-top: 12px;
  }
}


/* Einheitliche aufklappbare Einstellungsbereiche */
.settings-card,
.catalog-card {
  padding: 0;
  overflow: hidden;
}

.logic-summary-hours {
  margin-left: auto;
}

.logic-summary::after {
  margin-left: 0;
  min-width: 58px;
  text-align: right;
}

.catalog-card .catalog-help {
  margin-top: 0;
}

.package-btn.active-package {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(7, 150, 127, .14);
}

.package-btn[aria-pressed="true"] {
  background: var(--primary) !important;
  color: #fff !important;
}


/* Einheitliche Spaltenbreiten für alle Tabellen der Zusatzprogrammierung */
.logic-table {
  table-layout: fixed;
  min-width: 820px;
}

.logic-table col.logic-col-function { width: 48%; }
.logic-table col.logic-col-minimum { width: 13%; }
.logic-table col.logic-col-maximum { width: 13%; }
.logic-table col.logic-col-quantity { width: 12%; }
.logic-table col.logic-col-hours { width: 14%; }

.logic-table th,
.logic-table td {
  box-sizing: border-box;
}

.logic-table th:nth-child(2),
.logic-table th:nth-child(3),
.logic-table th:nth-child(4),
.logic-table th:nth-child(5),
.logic-table td:nth-child(2),
.logic-table td:nth-child(3),
.logic-table td:nth-child(4),
.logic-table td:nth-child(5) {
  text-align: right;
}

.logic-table td:nth-child(4) input,
.logic-table td:nth-child(5) input {
  width: 100%;
  min-width: 0;
  max-width: none;
  text-align: right;
}

#resetRoomStandardBtn {
  border: 1px solid #c9d8d4;
}

#resetRoomStandardBtn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}


/* Globale und raumweise Paketauswahl */
.global-package-card {
  border-color: #c7ddd7;
  background:
    linear-gradient(135deg, rgba(7, 150, 127, .055), rgba(114, 211, 65, .035)),
    var(--surface);
}

.global-package-actions {
  align-items: center;
}

.global-package-btn {
  border: 1px solid #c9d8d4;
}

.global-package-btn.active-package,
.global-package-btn[aria-pressed="true"] {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(7, 150, 127, .14);
}

#globalPackageStatus.gemischt {
  background: #f0edf8;
  color: #5a4385;
  border-color: #d8cfea;
}

@media (max-width: 760px) {
  .global-package-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .global-package-actions button {
    width: 100%;
  }
}


.side-action-link {
  display: block;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 11px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.side-action-link:hover {
  background: rgba(255,255,255,.11);
}


/* Projektphasen und Ausführungsplanung */
.field-hint {
  display: block;
  min-height: 1.1em;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.35;
}

.phase-field {
  align-content: start;
}

#reserveField.phase-inactive {
  opacity: .62;
}

#reserveField.phase-inactive input {
  background: #eef2f1;
  cursor: not-allowed;
}

.phase-notice {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #c8ddd7;
  border-radius: 11px;
  background: #f0f7f5;
  color: #37554e;
  font-size: .84rem;
  line-height: 1.5;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #c9d8d4;
  border-radius: 999px;
  background: #f0f5f4;
  color: #37554e;
  font-size: .77rem;
  font-weight: 850;
}

.phase-badge.estimate {
  border-color: #efd49e;
  background: #fff7e8;
  color: #7c5212;
}

.phase-badge.execution {
  border-color: #b9d8cf;
  background: #e6f5f0;
  color: var(--primary-dark);
}

.execution-table {
  table-layout: fixed;
  min-width: 920px;
}

.execution-table th:first-child,
.execution-table td:first-child {
  width: 36%;
}

.execution-table th:not(:first-child),
.execution-table td:not(:first-child) {
  width: 16%;
  text-align: right;
}

.execution-table input {
  width: 100%;
  min-width: 105px;
  text-align: right;
}

.execution-row-total {
  white-space: nowrap;
  color: var(--primary-dark);
  font-weight: 900;
}

.execution-card.hidden,
.execution-result-card.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .phase-badge {
    margin-bottom: 7px;
  }
}


/* Vorplanung und Angebotsplanung */
.phase-service-card.hidden,
.phase-result-card.hidden {
  display: none !important;
}

.offer-data-grid textarea {
  min-height: 88px;
}

.offer-result-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.offer-result-meta > div {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f5f8f7;
}

.offer-result-meta small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
}

.offer-result-meta strong {
  display: block;
  margin-top: 4px;
  font-size: .9rem;
  white-space: pre-wrap;
}

.discount-row strong {
  color: #8a3434;
}

@media (max-width: 900px) {
  .offer-result-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .offer-result-meta {
    grid-template-columns: 1fr;
  }
}


/* Realistische Arbeitszeiten je System */
.work-rate-table {
  min-width: 1080px;
}

.work-rate-table th:nth-child(4),
.work-rate-table td:nth-child(4) {
  min-width: 235px;
}


/* Getrennte Systembezeichnung und Bauart */
.system-card .system-mode {
  display: block;
  margin-top: -3px;
  color: #506a63;
  font-size: .88rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
}

.system-card .system-mode:empty,
.system-setting-label small:empty,
.system-table-label small:empty,
.comparison-system-mode:empty {
  display: none;
}

.system-setting-label,
.system-table-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.system-setting-label strong,
.system-table-label strong {
  font-size: .9rem;
}

.system-setting-label small,
.system-table-label small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.comparison-system-label {
  min-height: 38px;
}

.comparison-system-name {
  display: block;
  color: var(--text);
  font-size: .88rem;
  font-weight: 850;
}

.comparison-system-mode {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
}

.master-data-status {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  color: #bcd2cc;
  background: rgba(255,255,255,.035);
  font-size: .74rem;
  font-weight: 750;
  line-height: 1.35;
}

.master-data-status.active {
  border-color: rgba(114, 211, 65, .34);
  color: #d4edc7;
  background: rgba(114, 211, 65, .08);
}


/* Bedienstellen und projektweite Ausstattung */
.project-feature-group {
  border-color: #bcd8d0;
  background: linear-gradient(135deg, rgba(7,150,127,.045), rgba(114,211,65,.025));
}
.project-feature-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-feature-badge {
  padding: 4px 8px;
  border: 1px solid #bcd8d0;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #eef8f5;
  font-size: .72rem;
  font-weight: 850;
}
.project-book-item { border-color: #bcd8d0; }


/* Raumflächensumme */

.summary-strip.area-match {
  background: #edf7e9;
  color: #2f6330;
}

.summary-strip.area-warning {
  background: #fff5df;
  color: #7a5415;
}


/* Firmendaten für den PDF Druck */
.print-document-header,
.print-document-footer {
  display: none;
}

.company-print-settings {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f7faf9;
  overflow: hidden;
}

.company-print-settings > summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 15px;
}

.company-print-settings > summary::-webkit-details-marker {
  display: none;
}

.company-print-settings > summary span {
  display: grid;
  gap: 3px;
}

.company-print-settings > summary strong {
  font-size: .9rem;
}

.company-print-settings > summary small {
  color: var(--muted);
  font-size: .77rem;
}

.company-print-settings > summary::after {
  content: "Angaben bearbeiten";
  float: right;
  margin-top: -28px;
  color: var(--primary-dark);
  font-size: .75rem;
  font-weight: 850;
}

.company-print-settings[open] > summary::after {
  content: "schließen";
}

.company-print-fields {
  padding: 0 15px 15px;
}

.company-print-fields textarea {
  min-height: 82px;
}


/* Pakete und Rollen */
body[data-app-mode="free"] .admin-only,
body[data-app-mode="free"] .premium-only,
body[data-app-mode="premium"] .admin-only {
  display: none !important;
}

body[data-app-edition="electrician-pro"] .branding-only,
body[data-app-edition="electrician-pro"] .catalog-only,
body[data-app-edition="electrician-pro"] .masterdata-only,
body[data-app-edition="endcustomer-free"] .website-only,
body[data-app-edition="endcustomer-pro"] .website-only,
body[data-app-edition="electrician-free"] .website-only {
  display: none !important;
}

body[data-app-mode="free"] .save-badge {
  background: #eef3f2;
  color: #5f706b;
}

.branding-editor {
  display: grid;
  grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr);
  gap: 18px;
  padding: 0 15px 15px;
}

.branding-logo-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.branding-logo-panel img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 9px;
  background: #f5f8f7;
}

.branding-logo-panel small {
  color: var(--muted);
  line-height: 1.45;
}

.print-document-company-left {
  justify-content: flex-start;
  text-align: left;
}

.print-document-company-left .print-company-copy {
  text-align: left;
}

@media (max-width: 760px) {
  .branding-editor {
    grid-template-columns: 1fr;
  }
}


/* Optionale Planungsreserve */
.reserve-option-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr);
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  overflow: hidden;
  position: relative;
}

.reserve-option-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--lime));
}

.reserve-option-copy {
  padding-left: 8px;
}

.reserve-option-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reserve-option-copy h2 {
  margin: 0;
  font-size: 1.22rem;
}

.reserve-option-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.reserve-option-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.reserve-option-benefits span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: .74rem;
  font-weight: 800;
}

.reserve-option-toggle {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid #c6ddd7;
  border-radius: 15px;
  background: linear-gradient(145deg, #f4faf8, #e8f4f0);
  cursor: pointer;
}

.reserve-option-toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid #bfd0cb;
  border-radius: 5px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(20, 36, 43, 0.05);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.reserve-option-toggle input::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .16s ease;
  margin-top: -1px;
}

.reserve-option-toggle input:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 166, 47, 0.12);
}

.reserve-option-toggle input:checked::after {
  transform: rotate(-45deg) scale(1);
}

.reserve-option-toggle input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(54, 166, 47, 0.18);
}

.reserve-option-toggle span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.reserve-option-toggle strong {
  color: var(--primary-dark);
  font-size: .98rem;
}

.reserve-option-toggle small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 750;
}

.reserve-option-toggle #reserveOptionPercent {
  display: inline;
}

@media (max-width: 850px) {
  .reserve-option-card {
    grid-template-columns: 1fr;
  }
}


/* Copyright Link */
.sidebar-copyright a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease, opacity .15s ease;
}

.sidebar-copyright a:hover,
.sidebar-copyright a:focus-visible {
  color: #b7e2d7;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* Zentraler Projektumfang */
.project-scope-card { margin-top: 18px; overflow: hidden; }
.scope-kicker {
  display: inline-flex; margin-bottom: 7px; color: var(--primary-dark);
  font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
}
.scope-status {
  display: inline-flex; align-items: center; justify-content: center; padding: 9px 13px;
  border: 1px solid #c5e3db; border-radius: 999px; background: #eaf6f2;
  color: var(--primary-dark); font-size: .78rem; font-weight: 900; white-space: nowrap;
}
.scope-status.has-disabled { border-color: #ead6a3; background: #fff4d9; color: #7a5410; }
.project-scope-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px;
}
.project-scope-item {
  display: flex; align-items: flex-start; gap: 11px; min-height: 112px; padding: 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.project-scope-item:hover { transform: translateY(-1px); border-color: #a9cbc2; }
.project-scope-item.active { border-color: #b7dcd2; background: linear-gradient(145deg, #fbfefd, #eef8f5); }
.project-scope-item.inactive { border-color: #dfd3bb; background: #fbf8f1; }
.scope-switch { position: relative; width: 42px; height: 24px; flex: 0 0 42px; }
.scope-switch input { position: absolute; opacity: 0; pointer-events: none; }
.scope-switch i { position: absolute; inset: 0; border-radius: 999px; background: #c6d1ce; transition: .18s ease; }
.scope-switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.16); transition: .18s ease;
}
.scope-switch input:checked + i { background: var(--primary); }
.scope-switch input:checked + i::after { transform: translateX(18px); }
.scope-item-copy { display: grid; gap: 4px; min-width: 0; }
.scope-item-copy strong { color: var(--text); font-size: .94rem; }
.scope-item-copy small { color: var(--muted); font-size: .76rem; line-height: 1.32; }
.scope-item-copy em { margin-top: 3px; color: var(--primary-dark); font-size: .7rem; font-style: normal; font-weight: 850; }
.project-scope-item.inactive .scope-item-copy strong,
.project-scope-item.inactive .scope-item-copy em { color: #765c29; }
.scope-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.scope-details { margin-top: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfa; }
.scope-details > summary { list-style: none; cursor: pointer; padding: 14px 15px; }
.scope-details > summary::-webkit-details-marker { display: none; }
.scope-details > summary span { display: grid; gap: 3px; }
.scope-details > summary strong { color: var(--primary-dark); font-size: .9rem; }
.scope-details > summary small { color: var(--muted); font-size: .76rem; }
.scope-details > summary::after {
  content: "öffnen"; float: right; margin-top: -28px; color: var(--primary-dark); font-size: .74rem; font-weight: 900;
}
.scope-details[open] > summary::after { content: "schließen"; }
.scope-detail-grid { display: grid; gap: 12px; padding: 0 15px 15px; }
.scope-detail-section { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.scope-detail-section-disabled { opacity: .65; }
.scope-detail-head {
  display: flex; justify-content: space-between; gap: 14px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: var(--soft);
}
.scope-detail-head strong { font-size: .84rem; }
.scope-detail-head small { color: var(--muted); font-size: .7rem; }
.scope-detail-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scope-feature-toggle {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px;
  border-bottom: 1px solid #edf1f0; cursor: pointer;
}
.scope-feature-toggle:nth-child(odd) { border-right: 1px solid #edf1f0; }
.scope-feature-toggle input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--primary); }
.scope-feature-toggle span { display: grid; gap: 3px; }
.scope-feature-toggle strong { font-size: .8rem; }
.scope-feature-toggle small { color: var(--muted); font-size: .7rem; line-height: 1.3; }
.scope-notice {
  margin-top: 13px; padding: 11px 13px; border: 1px solid #c8ddd7; border-radius: 11px;
  background: #eef7f4; color: #315d52; font-size: .79rem; font-weight: 750; line-height: 1.42;
}
.feature-item.centrally-disabled { background: #f7f4ed; opacity: .66; }
.feature-item.centrally-disabled .qty button,
.feature-item.centrally-disabled .qty input { cursor: not-allowed; }
.central-disabled-badge {
  display: inline-flex; margin-left: 8px; padding: 3px 6px; border-radius: 999px;
  background: #f3e7cc; color: #765c29; font-size: .62rem; font-weight: 900; vertical-align: middle;
}
@media (max-width: 1150px) {
  .project-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .project-scope-grid, .scope-detail-items { grid-template-columns: 1fr; }
  .scope-feature-toggle:nth-child(odd) { border-right: 0; }
}
@media print { .project-scope-card { display: none !important; } }


/* Hersteller, Produktrollen und Importbericht */
.side-report-button {
  width: 100%;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: .76rem;
}

.role-admin-card {
  margin-top: 18px;
}

.role-admin-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, .5fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #c9ddd7;
  border-radius: 14px;
  background: linear-gradient(145deg, #f7fcfa, #edf7f4);
}

.role-admin-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--primary-dark);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.role-admin-intro h3 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.08rem;
}

.role-admin-intro p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.role-assignment-summary {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 14px;
  border-radius: 13px;
  background: var(--primary-dark);
  color: #fff;
  text-align: center;
  font-size: .86rem;
  font-weight: 850;
  line-height: 1.45;
}

.role-toolbar {
  display: grid;
  grid-template-columns: 190px minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.role-toolbar label,
.catalog-search-field {
  display: grid;
  gap: 6px;
}

.role-assignment-table select {
  min-width: 330px;
}

.role-assignment-table .role-name {
  display: grid;
  gap: 4px;
}

.role-assignment-table .role-name strong {
  color: var(--primary-dark);
  font-size: .84rem;
}

.role-assignment-table .role-name small {
  color: var(--muted);
  font-size: .69rem;
}

.role-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf6f2;
  color: #26584c;
  font-size: .68rem;
  font-weight: 900;
}

.role-status.warning {
  background: #fff0d1;
  color: #81570b;
}

.role-admin-note {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f4f7f6;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.master-report-dialog {
  width: min(900px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(12, 40, 34, .32);
}

.master-report-dialog::backdrop {
  background: rgba(8, 27, 23, .58);
  backdrop-filter: blur(3px);
}

.master-report-shell {
  display: grid;
  max-height: calc(100vh - 28px);
  background: #fff;
}

.master-report-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  background: var(--primary-dark);
  color: #fff;
}

.master-report-head span {
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  opacity: .78;
}

.master-report-head h2 {
  margin: 4px 0 0;
  color: #fff;
}

.dialog-close {
  align-self: flex-start;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
}

.master-report-content {
  overflow: auto;
  padding: 20px 22px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.report-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfa;
}

.report-summary-grid small {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
}

.report-summary-grid strong {
  color: var(--primary-dark);
  font-size: 1.05rem;
}

.report-section {
  margin-top: 16px;
}

.report-section h3 {
  margin: 0 0 8px;
  font-size: .95rem;
}

.report-message {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 11px;
  border-bottom: 1px solid #edf1f0;
  font-size: .77rem;
  line-height: 1.4;
}

.report-message b {
  color: var(--primary-dark);
  font-size: .68rem;
  text-transform: uppercase;
}

.report-message.error {
  background: #fff2f2;
}

.report-message.warning {
  background: #fff8e8;
}

.report-message.info {
  background: #f1f8f6;
}

.master-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  background: #f8fbfa;
}

.catalog-toolbar {
  grid-template-columns: 180px 210px minmax(220px, 1fr) auto;
}

@media (max-width: 1050px) {
  .role-admin-intro,
  .role-toolbar,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .role-assignment-table select {
    min-width: 240px;
  }

  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .report-summary-grid {
    grid-template-columns: 1fr;
  }

  .report-message {
    grid-template-columns: 1fr;
  }
}


/* Softwarebasierte Masterverwaltung */
.software-master-workflow {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid #c5ddd6;
  border-radius: 13px;
  background: linear-gradient(145deg, #f4faf8, #eaf5f1);
}

.software-master-workflow strong {
  color: var(--primary-dark);
  font-size: .82rem;
}

.software-master-workflow span {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.82);
  color: #3f5e56;
  font-size: .73rem;
  font-weight: 780;
  line-height: 1.35;
}

.catalog-main-actions {
  grid-column: 1 / -1;
}

.catalog-category {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .67rem;
}

.catalog-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 190px;
}

.catalog-role-list em {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eaf5f1;
  color: var(--primary-dark);
  font-size: .64rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
}

.catalog-edit-btn {
  white-space: nowrap;
}

.product-editor-dialog {
  width: min(980px, calc(100vw - 28px));
}

.product-editor-content {
  overflow: auto;
  padding: 20px 22px;
}

.product-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.product-editor-grid label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: .76rem;
  font-weight: 850;
}

.product-editor-grid input,
.product-editor-grid select {
  width: 100%;
}

.product-editor-wide {
  grid-column: 1 / -1;
}

.product-editor-manufacturer-action {
  display: flex;
  align-items: end;
}

.product-editor-manufacturer-action button {
  width: 100%;
}

.product-editor-role-section {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fbfa;
}

.product-editor-role-section > div:first-child {
  margin-bottom: 12px;
}

.product-editor-role-section strong {
  color: var(--primary-dark);
}

.product-editor-role-section p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.45;
}

.product-editor-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.product-role-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d9e5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.product-role-choice input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.product-role-choice span {
  display: grid;
  gap: 3px;
}

.product-role-choice strong {
  color: var(--text);
  font-size: .78rem;
}

.product-role-choice small {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}

.product-active-toggle {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid #c5ddd6;
  border-radius: 11px;
  background: #eef7f4;
  cursor: pointer;
}

.product-active-toggle input {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.product-active-toggle span {
  display: grid;
  gap: 3px;
}

.product-active-toggle small {
  color: var(--muted);
  font-size: .7rem;
}

.product-editor-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border: 1px solid #ead6a3;
  border-radius: 9px;
  background: #fff4d9;
  color: #7a5410;
  font-size: .76rem;
}

.role-assignment-table select {
  min-width: 390px;
}

@media (max-width: 900px) {
  .software-master-workflow {
    grid-template-columns: 1fr;
  }

  .product-editor-grid,
  .product-editor-roles {
    grid-template-columns: 1fr;
  }

  .product-editor-wide {
    grid-column: auto;
  }

  .role-assignment-table select {
    min-width: 280px;
  }
}


/* Oberflächenanpassungen */
.feature-item.project-feature-item {
  border-color: #c8ddd7;
  background: linear-gradient(145deg, #ffffff, #f4faf8);
}

.item-project-badge {
  margin-left: 7px;
  transform: translateY(-1px);
}

@media (max-width: 680px) {
  .item-project-badge {
    display: inline-flex;
    margin-top: 5px;
    margin-left: 0;
  }
}


/* v42 Länder und Paketdarstellung */
.country-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf8ed;
  color: var(--primary-dark, #0D352D);
  font-size: 12px;
  font-weight: 800;
}
.package-rights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.package-rights-grid article {
  padding: 14px;
  border: 1px solid #dfe8e3;
  border-radius: 14px;
  background: #fbfdfc;
}
.package-rights-grid strong { display: block; margin-bottom: 5px; }
.package-rights-grid small { color: #60716b; line-height: 1.45; }
@media (max-width: 850px) { .package-rights-grid { grid-template-columns: 1fr; } }


/* Systemfreigabe v42 */
body[data-app-edition^="endcustomer-"] .electrician-only {
  display: none !important;
}

.system-card.system-unavailable {
  display: none !important;
}

.system-availability-note {
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, #d8e2df);
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 7%, #ffffff);
  color: #41554f;
  line-height: 1.55;
}

.system-availability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.system-availability-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid #d7e1de;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.system-availability-grid label:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, #ffffff);
}

.system-availability-grid input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid #bfd0cb;
  border-radius: 5px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(20, 36, 43, 0.05);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.system-availability-grid input::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .16s ease;
  margin-top: -1px;
}

.system-availability-grid input:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 166, 47, 0.12);
}

.system-availability-grid input:checked::after {
  transform: rotate(-45deg) scale(1);
}

.system-availability-grid input:disabled {
  background: #eef1f0;
  border-color: #c9d2cf;
}

.system-availability-grid input:disabled::after {
  transform: rotate(-45deg) scale(1);
  border-left-color: #ffffff;
  border-bottom-color: #ffffff;
}

.system-availability-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.system-availability-grid small {
  color: #64756f;
  line-height: 1.35;
}

.system-availability-grid .system-required {
  cursor: default;
  background: #f3f6f5;
}

@media (max-width: 900px) {
  .system-availability-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .system-availability-grid { grid-template-columns: 1fr; }
}


/* v43 Paketkennung, Projektcodesuche und Preisreparatur */
.edition-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
}

.project-code-lookup-field {
  grid-column: span 2;
}

.pricing-defaults-row {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 5%, white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pricing-defaults-row div {
  display: grid;
  gap: 4px;
}

.pricing-defaults-row small {
  color: var(--muted);
}

@media (max-width: 760px) {
  .project-code-lookup-field {
    grid-column: auto;
  }
  .pricing-defaults-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* V46: einfache Free Oberfläche, erweiterte Endkunden und Elektriker Einstellungen */
body[data-app-edition="endcustomer-free"] .switch-program-setting {
  display: none !important;
}

body[data-app-edition="endcustomer-free"] .free-hide,
body[data-app-edition="electrician-free"] .free-hide {
  display: none !important;
}

.customer-output-settings {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(20, 36, 43, 0.12);
}

.customer-output-settings h3 {
  margin: 0 0 4px;
}

.customer-output-settings p {
  margin: 0;
}

.output-visibility-grid {
  margin-top: 12px;
}

.customer-hidden {
  display: none !important;
}

.customer-hidden-cell {
  display: none !important;
}

#reserveCostRow span {
  white-space: nowrap;
}

.switch-program-setting small {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
  color: var(--muted, #66757b);
}


/* ============================================================
   UI Feinschliff
   Ruhigere Abstände, konsistente Bedienelemente, responsive
   Optimierung und hochwertigere Ergebnisdarstellung.
   ============================================================ */
:root {
  --shadow: 0 10px 32px rgba(20, 46, 40, 0.075);
}

body {
  line-height: 1.45;
}

main {
  padding-top: 34px;
}

.page-head {
  margin-bottom: 24px;
}

.page-head h1 {
  letter-spacing: -0.025em;
}

.card {
  padding: 22px;
  box-shadow: var(--shadow);
}

.card-head {
  margin-bottom: 16px;
}

.card-head.split {
  align-items: center;
}

.card h2,
.card h3 {
  letter-spacing: -0.012em;
}

.form-grid {
  gap: 14px;
}

label,
.full-label {
  gap: 6px;
  line-height: 1.3;
}

input,
select,
textarea {
  min-height: 42px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aebfba;
}

button.primary,
button.secondary,
button.danger {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

button.primary {
  box-shadow: 0 4px 12px rgba(36, 117, 33, .14);
}

button.primary:hover {
  box-shadow: 0 5px 16px rgba(36, 117, 33, .18);
}

button.secondary {
  border-color: #d4dfdc;
  background: #edf2f1;
}

button.primary:active,
button.secondary:active,
button.danger:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(54, 166, 47, .18);
}

.actions {
  margin-top: 20px;
}

.inline-buttons {
  gap: 9px;
}

.summary-strip {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
}

.room-list {
  gap: 10px;
}

.room-row {
  padding: 12px 13px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 46, 40, .025);
}

.room-row:focus-within {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

.feature-groups {
  gap: 14px;
}

.feature-group {
  border-radius: 14px;
  background: #fff;
}

.feature-group h3 {
  padding: 12px 15px;
}

.feature-item {
  min-height: 82px;
  padding: 12px 15px;
}

.feature-name {
  line-height: 1.25;
}

.feature-help {
  max-width: 58ch;
}

.qty {
  justify-content: end;
}

.qty button {
  min-height: 38px;
  box-shadow: none;
}

.qty button:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--soft);
}

.qty input {
  height: 38px;
  min-height: 38px;
  font-weight: 800;
  font-size: .95rem;
}

/* Ruhigere Konfigurationsblöcke */
.website-config-content,
.customer-output-settings {
  gap: 14px;
}

.website-toggle-grid {
  align-items: stretch;
}

.website-toggle-grid label {
  min-height: 72px;
  align-content: center;
  padding: 12px 13px;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.website-toggle-grid label:hover {
  border-color: #bfcfca;
  background: #fbfdfc;
}

.website-toggle-grid label:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: color-mix(in srgb, var(--soft) 52%, white);
}

.website-toggle-grid strong {
  line-height: 1.25;
}

.output-visibility-grid {
  gap: 9px 10px;
}

/* Ergebnisansicht */
.result-layout {
  gap: 20px;
}

#systemComparisonCard {
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
}

.result-head-meta {
  gap: 7px;
}

.price-date {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f4f7f6;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.metrics {
  gap: 10px;
}

.metrics > div {
  min-height: 88px;
  padding: 14px;
  border-color: #dce6e3;
  background: #f7faf9;
}

.metrics small {
  display: block;
  line-height: 1.25;
}

.metrics strong {
  margin-top: 6px;
  font-size: 1.42rem;
  letter-spacing: -0.025em;
}

.comparison-cards {
  gap: 10px;
}

.comparison-card {
  position: relative;
  min-height: 124px;
  padding: 15px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.comparison-card:hover {
  border-color: #b9cbc6;
  box-shadow: 0 5px 18px rgba(20, 46, 40, .055);
}

.comparison-card.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--soft) 68%, white);
  box-shadow: inset 3px 0 0 var(--primary), 0 5px 18px rgba(20, 46, 40, .055);
}

.comparison-card strong {
  letter-spacing: -0.025em;
}

.cost-card {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
}

.cost-card > h2 {
  margin-top: 0;
  margin-bottom: 4px;
}

.cost-card > p {
  margin-top: 0;
}

.project-code-result {
  margin-top: 15px;
  border-color: #dce6e3;
  background: #f7faf9;
}

.total-box {
  position: relative;
  overflow: hidden;
  margin: 16px 0 12px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(20, 36, 43, .13);
}

.total-box::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -50px;
  top: -54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .055);
  pointer-events: none;
}

.total-box strong {
  letter-spacing: -0.035em;
}

.cost-row {
  align-items: baseline;
  padding: 9px 0;
  line-height: 1.3;
}

.cost-row span {
  color: #455650;
}

.cost-row strong {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.warning {
  margin-top: 14px;
  border: 1px solid #f1dfbc;
  border-radius: 11px;
  line-height: 1.45;
}

.export-buttons {
  gap: 8px;
}

.export-buttons button {
  width: 100%;
}

.data-table th {
  background: #f6f9f8;
}

.data-table tbody tr:hover {
  background: #fbfdfc;
}

.room-book-item:last-child {
  border-bottom: 0;
}

/* Tablet */
@media (max-width: 1180px) {
  .feature-item {
    grid-template-columns: minmax(0, 1fr) minmax(136px, 150px);
  }

  .result-head-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  main {
    padding: 28px 18px 48px;
  }

  .card {
    padding: 20px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature-item:nth-child(odd) {
    border-right: 0;
  }

  .website-toggle-grid,
  .output-visibility-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Smartphone */
@media (max-width: 760px) {
  .sidebar {
    padding: 14px;
  }

  .brand {
    margin-bottom: 14px;
    padding: 10px;
  }

  .brand-logo {
    max-width: 185px;
  }

  .progress {
    margin-bottom: 14px;
  }

  .step-nav {
    gap: 6px;
  }

  .step-nav button {
    min-height: 42px;
    border-radius: 10px;
  }

  main {
    padding: 22px 12px 38px;
  }

  .page-head {
    margin-bottom: 18px;
  }

  .page-head h1 {
    font-size: clamp(1.7rem, 8vw, 2.05rem);
  }

  .card {
    padding: 16px;
    border-radius: 15px;
  }

  .card + .card {
    margin-top: 14px;
  }

  .card-head {
    margin-bottom: 14px;
  }

  .inline-buttons {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 12px;
  }

  .inline-buttons button {
    width: 100%;
  }

  .room-row {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 12px;
  }

  .room-row label:first-child,
  .room-row button.danger {
    grid-column: 1 / -1;
  }

  .room-row button.danger {
    width: 100%;
  }

  .feature-toolbar {
    margin-bottom: 14px;
  }

  .feature-item {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 78px;
    gap: 9px;
    padding: 12px;
  }

  .qty {
    grid-template-columns: 34px 54px 34px;
    gap: 5px;
  }

  .qty button {
    min-width: 34px;
    width: 34px;
    height: 36px;
    min-height: 36px;
  }

  .qty input {
    width: 54px;
    height: 36px;
    min-height: 36px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metrics > div {
    min-height: 80px;
    padding: 12px;
  }

  .metrics strong {
    font-size: 1.25rem;
  }

  .comparison-cards {
    grid-template-columns: 1fr;
  }

  .comparison-card {
    min-height: auto;
  }

  .result-head-meta {
    margin-top: 10px;
    justify-content: flex-start;
  }

  .project-code-result {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cost-row {
    gap: 10px;
    font-size: .86rem;
  }

  .actions {
    gap: 8px;
    margin-top: 16px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .feature-item {
    grid-template-columns: 1fr;
  }

  .qty {
    justify-content: start;
    margin-top: 2px;
  }

  .project-code-input-row,
  .project-code-result {
    grid-template-columns: 1fr;
  }

  .project-code-result button,
  .project-code-result strong,
  .project-code-result span {
    grid-column: 1;
    grid-row: auto;
  }

  .project-code-result button {
    width: 100%;
  }

  .cost-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}


/* Systemkarten Feinschliff */
.system-grid {
  gap: 14px;
}

.system-card {
  cursor: pointer;
}

.system-card span {
  position: relative;
  min-height: 148px;
  padding: 18px 50px 17px 18px;
  gap: 7px;
  border: 1px solid #d9e3e0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(20, 36, 43, 0.035);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.system-card span::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 15px;
  width: 22px;
  height: 22px;
  border: 1.5px solid #c5d3cf;
  border-radius: 50%;
  background: #ffffff;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(20, 36, 43, 0.04);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.system-card:hover span {
  border-color: #b9cfca;
  box-shadow: 0 7px 20px rgba(20, 46, 40, 0.07);
  transform: translateY(-1px);
}

.system-card input:focus-visible + span {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 166, 47, 0.14);
}

.system-card input:checked + span {
  border-color: color-mix(in srgb, var(--primary) 72%, #b9cfca);
  background: color-mix(in srgb, var(--primary) 4%, #ffffff);
  box-shadow: 0 8px 24px rgba(36, 117, 33, 0.09);
}

.system-card input:checked + span::after {
  content: "✓";
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 166, 47, 0.10);
}

.system-card strong {
  padding-right: 4px;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.system-card .system-mode {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f4;
  color: #567069;
  font-size: .74rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
}

.system-card input:checked + span .system-mode {
  background: color-mix(in srgb, var(--primary) 10%, #ffffff);
  color: var(--primary-dark);
}

.system-card small {
  color: #667873;
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.45;
}

.system-card b {
  width: 100%;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #edf2f0;
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.25;
}

.system-availability-grid {
  gap: 12px;
}

.system-availability-grid label {
  min-height: 88px;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-color: #d9e3e0;
  border-radius: 14px;
  box-shadow: 0 2px 7px rgba(20, 36, 43, 0.025);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.system-availability-grid label:not(.system-required):hover {
  border-color: #b9cfca;
  box-shadow: 0 6px 16px rgba(20, 46, 40, 0.055);
  transform: translateY(-1px);
}

.system-availability-grid label:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 58%, #c7d8d3);
  background: color-mix(in srgb, var(--primary) 4%, #ffffff);
  box-shadow: 0 5px 15px rgba(36, 117, 33, 0.055);
}

.system-availability-grid span strong {
  color: var(--text);
  font-size: .94rem;
  line-height: 1.2;
}

.system-availability-grid small {
  color: #667873;
  font-size: .78rem;
  line-height: 1.35;
}

.system-availability-grid .system-required {
  border-color: #d7dfdd;
  background: #F3F7F7;
  box-shadow: none;
}

.system-availability-grid .system-required input:disabled {
  opacity: .72;
}

@media (max-width: 1100px) and (min-width: 761px) {
  .system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .system-card span {
    min-height: 132px;
    padding: 16px 46px 15px 16px;
  }

  .system-card span::after {
    top: 14px;
    right: 14px;
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
}


/* flexible Produktzuordnung und kompakte Mehrsystem Auswahl */
.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.35;
}
.product-system-compatibility {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fbfa;
}
.product-system-compatibility > div:first-child {
  display: grid;
  gap: 4px;
}
.product-system-compatibility small { color: var(--muted); line-height: 1.4; }
.product-system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.product-system-choice {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid #d8e4e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.product-system-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 55%, #d8e4e0);
  background: color-mix(in srgb, var(--primary) 6%, #fff);
}
.product-system-choice.primary-system { cursor: default; }
.product-system-choice input {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 13px;
  min-width: 13px;
  height: 13px;
  min-height: 13px;
  margin: 0;
  padding: 0 !important;
  border: 1.5px solid #bfd0cb;
  border-radius: 5px;
  background: #fff;
  display: grid;
  place-items: center;
}
.product-system-choice input::after {
  content: "";
  width: 5px;
  height: 3px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
}
.product-system-choice input:checked { background: var(--primary); border-color: var(--primary); }
.product-system-choice input:checked::after { transform: rotate(-45deg) scale(1); }
.product-system-choice input:disabled { opacity: .78; }
.product-system-choice span { display: grid; gap: 2px; min-width: 0; }
.product-system-choice strong { font-size: .76rem; line-height: 1.18; }
.product-system-choice small { font-size: .64rem; line-height: 1.18; }
.product-role-heading {
  display: flex !important;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.product-role-heading em {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: .65rem;
  font-style: normal;
  font-weight: 800;
}
@media (max-width: 900px) {
  .product-system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .product-system-grid { grid-template-columns: 1fr; }
  .product-role-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}


/* V49 Projektabschluss und technische Dokumentation */
.shpExportModal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(9,22,19,.68);z-index:10050;padding:24px}.shpExportModal.open{display:flex}.shpExportShell{width:min(980px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:0 26px 80px rgba(0,0,0,.25);padding:24px}.shpExportShell header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:18px}.shpExportShell header h2{margin:4px 0 6px}.shpExportShell header p{margin:0;color:var(--muted)}.shpExportShell header small{font-weight:900;color:var(--primary-dark);text-transform:uppercase;letter-spacing:.08em}.shpPresetRow{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0}.shpPresetRow button,.shpExportShell footer button{border:1px solid var(--line);border-radius:10px;padding:10px 14px;background:#fff}.shpPresetRow button.primary,.shpExportShell footer button.primary{background:var(--primary);color:#fff;border-color:var(--primary)}.shpExportSections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;padding:16px;background:#f7faf9;border:1px solid var(--line);border-radius:14px}.shpExportSections label{display:flex;grid-template-columns:none;align-items:center;gap:9px;font-weight:700}.shpExportSections input{width:auto}.shpTemplateTools{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:14px}.shpTemplateTools>div{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}.shpExportShell footer{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.spiInlineCodeInput{width:150px!important;display:inline-block!important;padding:5px 7px!important;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:800}.spiMasterCodeSettings{margin-bottom:14px;padding:10px;border:1px solid #dce7e3;border-radius:12px;background:#f8fbfa}.spiCodeSettingsGrid{display:grid;gap:7px;margin:12px 0}.spiCodeSettingRow{display:grid;grid-template-columns:150px 110px minmax(220px,1fr);gap:8px;align-items:end;padding:8px;border-bottom:1px solid #e8efed}.spiCodeSettingRow label{font-size:.75rem}.spiCodeSettingRow input{padding:7px 8px}
@media(max-width:760px){.shpExportSections{grid-template-columns:1fr}.spiCodeSettingRow{grid-template-columns:1fr}.shpExportShell header{display:block}.shpExportShell header button{margin-top:12px}}


/* Seitenleiste im Master Studio Stil */
.app { grid-template-columns: 292px minmax(0,1fr); }
.sidebar {
  padding: 18px 14px 16px;
  background:
    radial-gradient(circle at 10% 0, rgba(85,176,65,.10), transparent 18rem),
    linear-gradient(180deg,#11262d 0%,#14282e 54%,#102329 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(150,185,175,.32) transparent;
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(150,185,175,.28); border-radius: 99px; }
.sidebar-brand-card.brand {
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 17px;
  border: 1px solid rgba(255,255,255,.62);
  background: linear-gradient(145deg,#fff,#f8fbfa);
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
}
.sidebar-brand-card .brand-logo { max-width: 225px; margin: 0 auto; }
.sidebar-brand-card .brand-copy { padding: 1px 2px 2px; }
.sidebar-brand-card .brand-copy strong { font-size: 1rem; }
.sidebar-brand-card .brand-copy small { font-size: .73rem; margin-top: 3px; }
.sidebar-brand-card .edition-badge { margin-top: 8px; padding: 5px 9px; font-size: .67rem; }
.sidebar-progress-card {
  margin-bottom: 14px;
  padding: 11px 12px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.sidebar-progress-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; color:#a9bfba; font-size:.66rem; font-weight:850; text-transform:uppercase; letter-spacing:.06em; }
.sidebar-progress-head strong { color:#eff7f4; font-size:.72rem; letter-spacing:0; }
.sidebar-progress-card .progress { margin:0; }
.sidebar-progress-card .progress-track { height:6px; background:rgba(255,255,255,.10); }
.sidebar-progress-card .progress-meta { margin-top:7px; color:#91aaa4; font-size:.66rem; }
.sidebar-section-label { margin: 11px 10px 7px; color:#72978d; font-size:.62rem; font-weight:950; letter-spacing:.11em; text-transform:uppercase; }
.sidebar-tools-label { margin-top: 15px; }
.sidebar-workflow.step-nav { gap:5px; }
.sidebar-workflow.step-nav button {
  display:grid;
  grid-template-columns:36px minmax(0,1fr) 16px;
  gap:9px;
  align-items:center;
  min-height:55px;
  padding:8px 9px;
  border:1px solid transparent;
  border-radius:13px;
  color:#d7e5e1;
  background:transparent;
  transition: background .16s ease,border-color .16s ease,transform .16s ease;
}
.sidebar-workflow.step-nav button:hover { background:rgba(255,255,255,.055); transform:translateX(1px); }
.sidebar-workflow.step-nav button.active {
  color:#fff;
  border-color:rgba(123,205,91,.19);
  background:linear-gradient(135deg,rgba(85,177,65,.23),rgba(255,255,255,.075));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.015),0 7px 16px rgba(0,0,0,.06);
}
.sidebar-workflow.step-nav button span { width:auto; height:auto; border:0; border-radius:0; display:block; }
.sidebar-workflow .step-number {
  width:34px !important; height:34px !important; display:grid !important; place-items:center;
  border:1px solid rgba(255,255,255,.19) !important; border-radius:10px !important;
  background:rgba(255,255,255,.045); color:#bed0cb; font-size:.76rem; font-weight:950;
}
.sidebar-workflow button.active .step-number { border-color:transparent !important; background:linear-gradient(135deg,var(--lime),color-mix(in srgb,var(--lime) 78%,white)); color:var(--primary-dark); box-shadow:0 6px 15px color-mix(in srgb,var(--lime) 22%,transparent); }
.sidebar-workflow .step-copy { min-width:0; }
.sidebar-workflow .step-copy strong { display:block; color:inherit; font-size:.82rem; font-weight:850; line-height:1.15; }
.sidebar-workflow .step-copy small { display:block; margin-top:3px; color:#829c95; font-size:.62rem; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-workflow button.active .step-copy small { color:#a9c2ba; }
.sidebar-workflow .step-chevron { color:#6f8d85; font-size:1rem; text-align:center; }
.sidebar-workflow button.active .step-chevron { color:var(--lime); }
.sidebar-master-card {
  width:100%; margin-top:11px; display:grid; grid-template-columns:42px minmax(0,1fr) 18px; gap:10px; align-items:center;
  padding:11px; border:1px solid rgba(118,201,83,.32); border-radius:15px;
  color:#f5fbf3; text-align:left;
  background:linear-gradient(135deg,rgba(58,154,48,.27),rgba(105,184,65,.10));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 12px 25px rgba(0,0,0,.08);
}
.sidebar-master-card:hover { border-color:rgba(126,213,91,.52); background:linear-gradient(135deg,rgba(64,171,52,.36),rgba(117,196,70,.14)); }
.sidebar-master-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:12px; color:#8fda61; background:rgba(255,255,255,.07); }
.sidebar-master-icon svg { width:21px; height:21px; }
.sidebar-master-copy { min-width:0; }
.sidebar-master-copy small { display:block; color:#91ba9a; font-size:.58rem; font-weight:900; text-transform:uppercase; letter-spacing:.065em; }
.sidebar-master-copy strong { display:block; margin-top:2px; color:#fff; font-size:.87rem; }
.sidebar-master-copy em { display:block; margin-top:3px; color:#a9beb8; font-size:.61rem; font-style:normal; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-master-arrow { color:#8fd263; font-size:1.15rem; }
.side-actions.sidebar-action-groups { display:grid; gap:7px; margin-top:0; }
.sidebar-toolbox {
  border:1px solid rgba(255,255,255,.085); border-radius:14px; background:rgba(255,255,255,.025); overflow:hidden;
}
.sidebar-toolbox summary {
  list-style:none; display:grid; grid-template-columns:34px minmax(0,1fr) 18px; gap:9px; align-items:center;
  padding:10px; cursor:pointer; user-select:none; color:#e3eeeb;
}
.sidebar-toolbox summary::-webkit-details-marker { display:none; }
.sidebar-toolbox summary:hover { background:rgba(255,255,255,.035); }
.sidebar-summary-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; background:rgba(255,255,255,.055); color:#86c76e; }
.sidebar-summary-icon svg { width:17px; height:17px; }
.sidebar-summary-copy { min-width:0; }
.sidebar-summary-copy strong { display:block; font-size:.75rem; line-height:1.15; }
.sidebar-summary-copy small { display:block; margin-top:3px; color:#809b94; font-size:.58rem; line-height:1.2; }
.sidebar-summary-chevron { color:#759088; text-align:center; font-size:.84rem; transition:transform .16s ease; }
.sidebar-toolbox[open] .sidebar-summary-chevron { transform:rotate(180deg); }
.sidebar-toolbox-body { display:grid; gap:5px; padding:0 7px 7px; }
.side-actions .sidebar-action-row,
.side-actions a.sidebar-action-row {
  display:grid; grid-template-columns:31px minmax(0,1fr); gap:9px; align-items:center;
  width:100%; min-height:48px; padding:7px 8px; border:1px solid transparent; border-radius:10px;
  background:transparent; color:#dce9e5; text-align:left; text-decoration:none;
}
.side-actions .sidebar-action-row:hover,
.side-actions a.sidebar-action-row:hover { border-color:rgba(255,255,255,.075); background:rgba(255,255,255,.05); }
.sidebar-action-icon { width:29px; height:29px; display:grid; place-items:center; border-radius:8px; color:#86c76e; background:rgba(255,255,255,.05); }
.sidebar-action-icon svg { width:16px; height:16px; }
.sidebar-action-row > span:last-child { min-width:0; }
.sidebar-action-row strong { display:block; color:#e9f2ef; font-size:.69rem; line-height:1.18; }
.sidebar-action-row small { display:block; margin-top:2px; color:#77928b; font-size:.56rem; line-height:1.18; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-data-status.master-data-status {
  display:flex; align-items:center; gap:8px; margin:2px 4px 3px; padding:7px 9px;
  border:1px solid rgba(119,193,94,.13); border-radius:9px; background:rgba(87,163,66,.07); color:#9cc79e; font-size:.59rem; font-weight:800;
}
.sidebar-status-dot { width:7px; height:7px; border-radius:50%; background:#72ce49; box-shadow:0 0 0 3px rgba(114,206,73,.10); }
.side-actions .sidebar-new-project {
  display:grid; grid-template-columns:31px minmax(0,1fr); gap:9px; align-items:center; width:100%; min-height:49px; padding:8px 10px;
  border:1px solid rgba(255,255,255,.10); border-radius:13px; background:rgba(255,255,255,.025); color:#dde9e6; text-align:left;
}
.side-actions .sidebar-new-project:hover { border-color:rgba(238,161,64,.25); background:rgba(238,161,64,.06); }
.sidebar-new-project .sidebar-action-icon { color:#e8b05f; }
.sidebar-new-project strong { display:block; color:#f0f5f3; font-size:.72rem; }
.sidebar-new-project small { display:block; margin-top:2px; color:#7b9690; font-size:.57rem; }
.sidebar-copyright { display:grid; gap:3px; margin:12px 7px 0; padding-top:10px; border-top:1px solid rgba(255,255,255,.055); color:#719b90; font-size:.61rem; }
.sidebar-copyright small { color:#587a72; font-size:.56rem; font-weight:700; }

@media (max-width: 1100px) {
  .app { grid-template-columns: 252px minmax(0,1fr); }
  .sidebar-workflow .step-copy small,
  .sidebar-summary-copy small,
  .sidebar-action-row small,
  .sidebar-new-project small,
  .sidebar-master-copy em { display:none; }
}
@media (max-width: 760px) {
  .app { display:block; }
  .sidebar { position:static; height:auto; padding:12px; }
  .sidebar-brand-card.brand { grid-template-columns:minmax(0,190px) minmax(0,1fr); align-items:center; }
  .sidebar-brand-card .brand-logo { max-width:175px; }
  .sidebar-progress-card { margin-bottom:10px; }
  .sidebar-section-label { margin-top:9px; }
  .sidebar-workflow.step-nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .sidebar-workflow.step-nav button { min-height:52px; padding:6px; display:grid; grid-template-columns:1fr; place-items:center; gap:4px; }
  .sidebar-workflow .step-number { width:31px !important; height:31px !important; }
  .sidebar-workflow .step-copy strong { font-size:.62rem; text-align:center; }
  .sidebar-workflow .step-copy small,.sidebar-workflow .step-chevron { display:none; }
  .sidebar-workflow.step-nav button:not(.active) { color:#c9d9d4; }
  .sidebar-action-groups.side-actions { grid-template-columns:1fr; }
  .sidebar-master-card { margin-top:8px; }
  .sidebar-copyright { margin-bottom:4px; }
}



/* Sidebar refinement and company settings */
.sidebar-workflow.step-nav button { position:relative; overflow:hidden; }
.sidebar-workflow.step-nav button.active {
  color:#f4faf7 !important;
  border-color:rgba(126,205,94,.28) !important;
  background:linear-gradient(135deg,rgba(255,255,255,.075),rgba(76,149,65,.095)) !important;
  box-shadow:0 9px 22px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.035) !important;
  transform:none !important;
}
.sidebar-workflow.step-nav button.active::before {
  content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:0 8px 8px 0;
  background:linear-gradient(180deg,#97db60,#5eb846); box-shadow:0 0 14px rgba(116,202,78,.28);
}
/* Neutralize the legacy rule that painted every span bright green. */
.sidebar-workflow.step-nav button.active > span {
  background:transparent !important; color:inherit !important; box-shadow:none !important;
}
.sidebar-workflow .step-number {
  border-radius:50% !important;
  background:rgba(255,255,255,.035) !important;
  border-color:rgba(255,255,255,.16) !important;
  color:#b8cbc5 !important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease;
}
.sidebar-workflow button.active .step-number {
  background:rgba(113,196,78,.13) !important;
  border-color:rgba(143,218,96,.48) !important;
  color:#9dde6e !important;
  box-shadow:0 0 0 4px rgba(112,194,79,.055) !important;
}
.sidebar-workflow button.step-complete .step-number {
  border-color:rgba(112,184,86,.27) !important; color:#83c969 !important; background:rgba(102,174,77,.065) !important;
}
.sidebar-workflow button.active .step-copy,
.sidebar-workflow button.active .step-copy strong,
.sidebar-workflow button.active .step-copy small,
.sidebar-workflow button.active .step-chevron { background:transparent !important; }
.sidebar-workflow button.active .step-copy strong { color:#fff !important; }
.sidebar-workflow button.active .step-copy small { color:#9db4ad !important; }
.sidebar-workflow .step-chevron {
  width:24px !important; height:24px !important; display:grid !important; place-items:center; border-radius:50% !important;
  border:1px solid transparent !important; background:transparent !important;
}
.sidebar-workflow button.active .step-chevron {
  border-color:rgba(126,205,94,.18) !important; color:#8fd263 !important; background:rgba(106,184,78,.06) !important;
}
.sidebar-inline-label { margin:12px 8px 5px; color:#6e9088; font-size:.59rem; font-weight:950; letter-spacing:.11em; text-transform:uppercase; }
.sidebar-settings-card {
  width:100%; display:grid; grid-template-columns:38px minmax(0,1fr) 18px; gap:10px; align-items:center;
  min-height:61px; padding:9px 10px; border:1px solid rgba(255,255,255,.085); border-radius:14px;
  background:linear-gradient(135deg,rgba(255,255,255,.045),rgba(255,255,255,.018)); color:#e8f1ee; text-align:left;
  transition:border-color .16s ease,background .16s ease,transform .16s ease;
}
.sidebar-settings-card:hover { transform:translateY(-1px); border-color:rgba(134,201,107,.24); background:linear-gradient(135deg,rgba(255,255,255,.07),rgba(102,172,80,.045)); }
.sidebar-settings-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:#8bcf6e; background:rgba(255,255,255,.05); }
.sidebar-settings-icon svg { width:19px; height:19px; }
.sidebar-settings-copy { min-width:0; }
.sidebar-settings-copy small { display:block; color:#78978f; font-size:.56rem; font-weight:900; text-transform:uppercase; letter-spacing:.065em; }
.sidebar-settings-copy strong { display:block; margin-top:2px; color:#eef6f3; font-size:.75rem; line-height:1.15; }
.sidebar-settings-copy em { display:block; margin-top:3px; color:#76918a; font-size:.57rem; line-height:1.16; font-style:normal; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-settings-arrow { color:#76968d; text-align:center; font-size:1.05rem; }

.branding-settings-dialog { width:min(1120px,calc(100vw - 36px)); max-height:calc(100vh - 36px); padding:0; border:0; border-radius:22px; background:transparent; color:var(--text); overflow:visible; }
.branding-settings-dialog::backdrop { background:rgba(7,20,18,.66); backdrop-filter:blur(7px); }
.branding-settings-shell { max-height:calc(100vh - 36px); display:flex; flex-direction:column; overflow:hidden; border:1px solid rgba(255,255,255,.72); border-radius:22px; background:var(--surface); box-shadow:0 30px 90px rgba(4,20,16,.28); }
.branding-settings-head { display:flex; justify-content:space-between; align-items:flex-start; gap:22px; padding:24px 26px 20px; border-bottom:1px solid var(--line); background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 5%,white),white 48%,color-mix(in srgb,var(--soft) 80%,white)); }
.branding-settings-kicker { display:block; margin-bottom:5px; color:var(--primary-dark); font-size:.69rem; font-weight:950; text-transform:uppercase; letter-spacing:.075em; }
.branding-settings-heading h2 { margin:0; font-size:1.45rem; }
.branding-settings-heading p { max-width:720px; margin:7px 0 0; color:var(--muted); line-height:1.45; }
.branding-settings-close { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; padding:0; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--text); font-size:1.35rem; line-height:1; }
.branding-settings-close:hover { border-color:color-mix(in srgb,var(--primary) 35%,var(--line)); background:var(--soft); }
.branding-settings-content { overflow:auto; padding:22px 26px 26px; }
.branding-settings-content .branding-editor { margin:0; border:0; box-shadow:none; background:transparent; }
.branding-settings-content .branding-logo-panel { border-radius:17px; background:linear-gradient(180deg,#fff,var(--soft)); border:1px solid var(--line); padding:16px; }
.branding-settings-content .company-print-fields { padding:0; }
.branding-settings-content .theme-settings { margin-top:5px; border-radius:16px; }

.page-head-actions { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
.context-help-button {
  display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:8px 13px;
  border:1px solid var(--primary); border-radius:10px; color:#fff; background:var(--primary);
  font-size:.78rem; font-weight:900; line-height:1; text-decoration:none; box-shadow:0 5px 14px rgba(7,150,127,.16);
}
.context-help-button:hover { border-color:var(--primary-dark); background:var(--primary-dark); color:#fff; }
.branding-settings-footer { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 26px; border-top:1px solid var(--line); background:#fbfcfc; }
.branding-settings-note { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:.76rem; }
.branding-settings-note span { width:8px; height:8px; border-radius:50%; background:var(--lime); box-shadow:0 0 0 4px color-mix(in srgb,var(--lime) 14%,transparent); }
@media (max-width:760px) {
  .branding-settings-dialog { width:calc(100vw - 16px); max-height:calc(100vh - 16px); }
  .branding-settings-shell { max-height:calc(100vh - 16px); border-radius:17px; }
  .branding-settings-head { padding:18px; }
  .branding-settings-content { padding:16px 18px 20px; }
  .branding-settings-footer { padding:12px 18px; }
}



/* Firmenstammdaten */
body[data-app-edition="endcustomer-free"] .firm-data-only,
body[data-app-edition="endcustomer-pro"] .firm-data-only,
body[data-app-edition="electrician-free"] .firm-data-only { display:none !important; }
body:not([data-app-edition="electrician-master"]) .master-exclusive { display:none !important; }
.firm-data-protection-note{display:grid;gap:5px;padding:10px 11px;border:1px solid rgba(136,197,63,.24);border-radius:11px;background:rgba(136,197,63,.07);font-size:.72rem;color:#bcd0ca;line-height:1.35}.firm-data-protection-note strong{color:#eef8f3;font-size:.76rem}.firm-data-protection-note span{display:block}.firm-data-protection-note b{color:#91d45b;font-weight:800;margin-right:4px}

/* Raumfilter und Projektdokumentation */
.spiRoomMask { pointer-events:none; }
.shpExportConfigGrid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.85fr);gap:16px;margin-top:14px}.shpExportConfigGrid>section{border:1px solid var(--line);border-radius:14px;background:#f8fbfa;padding:15px}.shpExportConfigGrid h3{margin:0 0 10px;font-size:.92rem}.shpExportMiniOptions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px}.shpExportMiniOptions+ h3{margin-top:18px}.shpExportMiniOptions label{display:flex;align-items:center;gap:8px;padding:8px 9px;border:1px solid #dfe8e4;border-radius:9px;background:#fff;font-weight:700;font-size:.82rem}.shpExportMiniOptions input{width:auto}.shpExportSections{grid-template-columns:repeat(2,minmax(0,1fr))}.shpSavedTemplate{display:inline-flex;gap:4px;margin:3px 4px 3px 0}@media(max-width:900px){.shpExportConfigGrid{grid-template-columns:1fr}.shpExportMiniOptions,.shpExportSections{grid-template-columns:1fr}}
/* Projektabschluss Status */
.shpExportStatus{margin:12px 0 0;padding:11px 13px;border:1px solid #d7e2df;border-radius:12px;background:#f6f9f8;color:#5c6e68;font-size:.82rem;font-weight:650}
.shpExportStatus.working{background:#f7f8ed;border-color:#e1db9f;color:#746a18}
.shpExportStatus.success{background:#eef8ec;border-color:#c7e5c3;color:#2c7726}
.shpExportStatus.error{background:#fff1ef;border-color:#f2c4bd;color:#a23c30}

/* */
.form-grid.five{grid-template-columns:repeat(5,minmax(0,1fr));}
@media(max-width:1200px){.form-grid.five{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:720px){.form-grid.five{grid-template-columns:1fr;}}

/* Flächenquelle klar kommunizieren */
.area-source-field{display:flex;flex-direction:column;gap:6px}.area-source-hint{font-size:11px;line-height:1.35;color:#6e7d79;font-weight:500}.area-source-hint.active{color:#2b7c2d}.calculated-field{background:#eef7ee!important;border-color:#a8d2a8!important;color:#235d28!important;font-weight:700}.calculated-field:focus{box-shadow:none!important}

.endcustomer-planvalue-note{position:relative;margin:22px 0 8px;padding:18px 20px 18px 62px;border:1px solid color-mix(in srgb,var(--primary) 22%,var(--line));border-left:5px solid var(--primary);background:linear-gradient(135deg,#fff 0%,color-mix(in srgb,var(--primary) 7%,#fff) 100%);border-radius:16px;display:grid;gap:5px;color:var(--text);box-shadow:0 8px 24px rgba(20,46,40,.06)}.endcustomer-planvalue-note::before{content:"i";position:absolute;left:20px;top:20px;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--primary);color:#fff;font:800 15px/1 Arial}.endcustomer-planvalue-note strong{font-size:15px;color:var(--primary-dark)}.endcustomer-planvalue-note span{font-size:13px;line-height:1.55;color:var(--muted)}.logic-manual-note{display:block;margin-top:4px;font-size:11px;color:#667b74;font-weight:500}.logic-table th,.logic-table td{vertical-align:middle}.logic-table input{height:40px}

/* form alignment */
.form-grid>label{align-self:start}.form-grid>label>input,.form-grid>label>select{min-height:42px;box-sizing:border-box}.area-source-field{align-self:start}.area-source-field>input{height:42px;box-sizing:border-box}


/* field row alignment */
.form-grid.five.top-gap > label{display:grid;grid-template-rows:20px 46px auto;align-content:start;gap:5px}.form-grid.five.top-gap > label > input,.form-grid.five.top-gap > label > select{height:46px;box-sizing:border-box}.form-grid.five.top-gap > label > small{min-height:32px;line-height:1.35}

/* System und Preise */
.system-price-collapsible{display:block!important;padding:0;overflow:hidden}
.system-price-collapsible-summary{width:100%;border:0;border-radius:0;padding:18px 20px;background:#fff;color:var(--text);display:flex;align-items:center;justify-content:space-between;text-align:left}
.system-price-collapsible-summary span{display:grid;gap:3px}.system-price-collapsible-summary strong{font-size:18px}.system-price-collapsible-summary small{color:var(--muted);font-weight:650}.system-price-collapsible-summary b{min-width:88px;text-align:right;font-size:14px;color:var(--primary);transition:none}
.system-price-collapsible-body{padding:0 20px 20px}.system-price-collapsible.is-collapsed .system-price-collapsible-body{display:none}
