/* Prototyp-Ergänzungen — Tokens und Komponentenklassen kommen aus sigeassist.css */

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--t1);
  background: var(--bg);
}

.proto-input,
.proto-select,
.proto-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--t1) 22%, var(--bd));
  background: color-mix(in srgb, var(--t1) 4.5%, var(--surface));
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--t1);
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.proto-textarea { height: auto; min-height: 88px; resize: vertical; line-height: 1.45; }
.proto-input:hover,
.proto-select:hover,
.proto-textarea:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--bd));
}
.proto-input:focus,
.proto-select:focus,
.proto-textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.proto-input::placeholder,
.proto-textarea::placeholder { color: var(--t3); }

.proto-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.proto-form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .proto-form-grid { grid-template-columns: 1fr; }
  .proto-form-grid .span-2 { grid-column: auto; }
}

.proto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.proto-btn svg { width: 16px; height: 16px; }
.proto-btn-primary {
  background: #2f6fed;
  color: #fff;
}
.proto-btn-primary:hover { filter: brightness(1.05); }
.proto-btn-grad {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--sh-accent);
}
.proto-btn-ghost {
  background: var(--surface);
  color: var(--t2);
  border-color: var(--bd);
}
.proto-btn-ghost:hover { background: var(--surface-2); }
.proto-btn-danger {
  background: transparent;
  color: var(--red);
  border-color: transparent;
}
.proto-btn-danger:hover { background: var(--red-bg); }
.proto-btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

.proto-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.proto-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--t3);
  margin-bottom: 6px;
}
.proto-crumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.proto-crumb a:hover { text-decoration: underline; }
.proto-crumb span { color: var(--t4); }

.proto-tree {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.proto-tree-node { display: flex; flex-direction: column; }
.proto-tree-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border: none;
  background: transparent;
  border-radius: 0;
  color: var(--t2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.proto-tree-btn--area {
  font-weight: 400;
}
.proto-tree-btn.is-active {
  background: transparent;
  color: var(--app-nav-active);
}
.proto-tree-btn .ic { width: 16px; height: 16px; flex: none; opacity: .85; }
.proto-tree-btn .proto-tree-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proto-tree-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--t4);
  background: var(--surface-3);
  border-radius: 999px;
  padding: 1px 6px;
}
.proto-tree-empty {
  padding: 10px;
  font-size: 12px;
  color: var(--t4);
  line-height: 1.4;
}

.proto-child-list {
  border: 1px solid var(--bd);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.proto-child-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #f1f2f4;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.proto-child-row:last-child { border-bottom: none; }
.proto-child-row:hover { background: #f9fafb; }
.proto-child-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-faint);
  color: var(--accent);
  flex: none;
}
.proto-child-icon svg { width: 16px; height: 16px; }
.proto-child-body { flex: 1; min-width: 0; }
.proto-child-title { font-weight: 700; font-size: 14px; color: var(--t1); }
.proto-child-meta { font-size: 12.5px; color: var(--t3); margin-top: 2px; }
.proto-child-chevron { color: var(--t4); }

.proto-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--t3);
  font-size: 14px;
}
.proto-empty strong { display: block; color: var(--t1); font-size: 15px; margin-bottom: 4px; }

.proto-catalogs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 720px) { .proto-catalogs { grid-template-columns: 1fr; } }
.proto-cat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.proto-cat:has(input:checked) {
  border-color: var(--accent-pale);
  background: var(--accent-faint);
}
.proto-cat input { margin-top: 2px; accent-color: #2f6fed; }
.proto-cat b { display: block; font-size: 13px; font-weight: 650; }
.proto-cat span { display: block; font-size: 12px; color: var(--t3); margin-top: 2px; }

.proto-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--surface-2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 14px 16px;
  overflow: auto;
  color: var(--t2);
  white-space: pre;
}

.proto-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 20, 34, .38);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.proto-modal {
  width: min(520px, 100%);
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--bd);
  box-shadow: var(--sh3);
  padding: 22px 24px 20px;
}
.proto-modal h2 { margin: 0 0 4px; font-size: 18px; }
.proto-modal p.lead { margin: 0 0 16px; color: var(--t3); font-size: 13.5px; }
.proto-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.proto-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--t1);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 90;
  box-shadow: var(--sh2);
}

.proto-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.proto-spec-table th,
.proto-spec-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--bd);
  vertical-align: top;
}
.proto-spec-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--t4);
  font-weight: 700;
}

#view-root { display: flex; flex-direction: column; gap: 1.5rem; }
.eh-betrieb-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}
.eh-betrieb-card-title svg { color: var(--accent); }
.eh-betrieb-card-title .proto-btn-primary svg,
.proto-btn-primary svg { color: #fff; }
.eh-page-toolbar .app-page-header p { margin: 6px 0 0; color: var(--t3); font-size: 14.5px; line-height: 1.45; }
.eh-page-toolbar h1 { margin: 0; }

.proto-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.proto-status--none { background: var(--surface-3); color: var(--t3); }
.proto-status--draft { background: var(--yellow-bg); color: var(--yellow); }
.proto-status--ok { background: var(--green-bg); color: var(--green); }

.app-main-rail-footer { margin-top: auto; padding: 10px 10px 14px; }
.app-main-rail-kicker {
  font-size: 11px;
  font-weight: 700;
  color: var(--t4);
  letter-spacing: .06em;
  padding: 8px 10px 6px;
}

/* —— Strukturbaum collapsible —— */
.proto-tree-toolbar {
  display: flex;
  gap: 4px;
  margin: 0 0 8px;
}
.proto-tree-toolbar .proto-btn { flex: 1; }
.proto-tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 -10px;
  padding: 0 10px;
}
.proto-tree-kids .proto-tree-row { padding-left: 22px; }
.proto-tree-kids .proto-tree-kids .proto-tree-row { padding-left: 34px; }
.proto-tree-kids-inner > .proto-tree-node:nth-child(even) > .proto-tree-row {
  background: color-mix(in srgb, var(--t1) 5.2%, transparent);
}
.proto-tree-kids-inner > .proto-tree-node:nth-child(even) > .proto-tree-row:hover {
  background: var(--surface-2);
}
.proto-tree-kids-inner > .proto-tree-node:nth-child(even) > .proto-tree-row:has(.proto-tree-btn.is-active) {
  background: var(--app-nav-active-bg);
}
.proto-tree-row:hover { background: var(--surface-2); }
.proto-tree-row:has(.proto-tree-btn.is-active) {
  background: var(--app-nav-active-bg);
}
.proto-tree-row .proto-tree-btn {
  flex: 1;
  width: auto;
  min-width: 0;
}
.proto-tree-toggle {
  flex: none;
  width: 22px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--t4);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.proto-tree-toggle:hover { background: var(--surface-2); color: var(--t2); }
.proto-tree-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .16s ease;
}
.proto-tree-toggle.is-collapsed svg { transform: rotate(-90deg); }
.proto-tree-toggle.is-leaf { visibility: hidden; pointer-events: none; }
.proto-tree-kids {
  padding-left: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .18s ease, opacity .18s ease;
  opacity: 1;
}
.proto-tree-kids > .proto-tree-kids-inner { min-height: 0; }
.proto-tree-kids.is-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

/* —— 2D Struktur-Map —— */
.mm-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.mm-stage {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid var(--bd);
  overflow: hidden;
  cursor: default;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, #dce8f8 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 80% 80%, #d4f3ee 0%, transparent 50%),
    var(--bg);
  box-shadow: inset 0 1px 0 #fff, var(--sh1);
  user-select: none;
}
.dark .mm-stage {
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, #1b4f9b44 0%, transparent 58%),
    var(--surface-2);
}
.mm-stage.is-dragging { cursor: grabbing; }
.mm-stage.is-overflow-x { overflow-x: auto; }
.mm-stage.is-overflow-y { overflow-y: auto; }
.mm-stage.is-overflow-x,
.mm-stage.is-overflow-y {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--t4) 55%, transparent) transparent;
}
.mm-scene {
  position: absolute;
  top: 0;
  left: 0;
}
.mm-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.mm-links path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2.2;
}
.mm-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.mm-node:hover,
.mm-node.is-focus {
  transform: translate(-50%, -50%) scale(1.04);
  z-index: 4;
  filter: brightness(1.03);
}
.mm-node--company {
  min-width: 168px;
  max-width: 220px;
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 28px rgba(27, 79, 155, .28), 0 2px 0 rgba(255,255,255,.18) inset;
}
.mm-node--company .mm-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
}
.mm-node--company .mm-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-top: 2px;
  line-height: 1.2;
}
.mm-node--company .mm-meta { font-size: 12px; opacity: .88; margin-top: 4px; }
.mm-node--dept {
  min-width: 132px;
  max-width: 168px;
  padding: 11px 13px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--bd);
  box-shadow: 0 12px 24px rgba(14, 20, 34, .12), 0 1px 0 #fff inset;
}
.mm-node--dept .mm-kicker { font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-2-dk); }
.mm-node--dept .mm-title { font-size: 13.5px; font-weight: 750; color: var(--t1); margin-top: 2px; line-height: 1.25; }
.mm-node--dept .mm-meta { font-size: 11px; color: var(--t3); margin-top: 3px; }
.mm-node--area {
  min-width: 138px;
  max-width: 188px;
  padding: 8px 11px 9px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--bd);
  box-shadow: 0 8px 16px rgba(14, 20, 34, .1);
}
.mm-node--area .mm-kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--t4);
}
.mm-node--area .mm-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mm-node--area .mm-meta { font-size: 10.5px; color: var(--t3); margin-top: 2px; }
.mm-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid color-mix(in srgb, var(--t1) 8%, transparent);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .01em;
  color: var(--t4);
  line-height: 1.25;
}
.mm-stats span:not(:last-child)::after {
  content: "·";
  margin: 0 4px;
  font-weight: 500;
  opacity: .4;
}
.mm-node--area.is-ok { border-color: #bbf7d0; background: #f0fdf4; }
.mm-node--area.is-draft { border-color: #fde68a; background: var(--yellow-bg); }
.mm-hint {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 5;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--bd);
  border-radius: 999px;
  padding: 6px 12px;
  pointer-events: none;
}
.mm-tools {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
  display: flex;
  gap: 6px;
}

.mm-add {
  position: absolute;
  left: 50%;
  right: auto;
  top: auto;
  bottom: -13px;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #2f6fed;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(47, 111, 237, .35);
  z-index: 6;
  padding: 0;
}
.mm-node--company .mm-add {
  background: #fff;
  color: #1b4f9b;
  border-color: rgba(255,255,255,.9);
}
.mm-add:hover { filter: brightness(1.08); transform: translateX(-50%) scale(1.08); }
.mm-add:active,
.mm-stage.is-spawn .mm-add { cursor: grabbing; }
.mm-add svg { width: 13px; height: 13px; pointer-events: none; }

.mm-del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--surface);
  color: var(--t3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(14, 20, 34, .12);
  z-index: 7;
}
.mm-del svg { width: 11px; height: 11px; pointer-events: none; }
.mm-del:hover {
  background: var(--red);
  color: #fff;
  border-color: #fff;
}
.mm-del.is-blocked {
  color: var(--t4);
  background: var(--surface-2, var(--surface));
  cursor: help;
}
.mm-del.is-blocked:hover {
  background: var(--surface-2, var(--surface));
  color: var(--t3);
}
.se-icon-btn.is-blocked {
  color: var(--t4);
  cursor: help;
}
.se-icon-btn.is-blocked:hover {
  background: transparent;
  color: var(--t4);
}

.mm-ghost {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px dashed #2f6fed;
  background: rgba(255,255,255,.92);
  color: var(--t1);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  z-index: 8;
  box-shadow: 0 10px 24px rgba(27, 79, 155, .18);
}
.mm-ghost span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.mm-stage.is-spawn { cursor: grabbing; }
.mm-stage.is-spawn .mm-scene { transition: none; }

#mm-prompt-host {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}
.mm-prompt {
  position: absolute;
  z-index: 12;
  pointer-events: auto;
  transform: translate(-50%, -10px);
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: var(--sh3);
  padding: 10px;
  width: 240px;
}
.mm-prompt p {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--t3);
}
.mm-prompt form { display: flex; gap: 6px; }
.mm-prompt .proto-input { height: 36px; flex: 1; }
.mm-prompt .proto-btn { height: 36px; padding: 0 12px; }

.dash-select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: var(--surface);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  min-width: 220px;
}

.proto-modal--wide { width: min(560px, 100%); }
.se-bulk { min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }

.se-card { padding: 14px 16px 12px; }
.se-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.se-hint {
  flex: 1;
  margin: 0;
  font-size: 12.5px;
  color: var(--t3);
  font-weight: 600;
  min-width: 180px;
}
.se-filter {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--surface);
}
.se-filter:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.se-filter-ico {
  display: inline-flex;
  color: var(--t4);
  flex: none;
}
.se-filter-ico svg { width: 15px; height: 15px; }
.se-filter-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t1);
  outline: none;
}
.se-filter-input::placeholder { color: var(--t4); font-weight: 500; }
.se-toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.se-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--t3);
  cursor: pointer;
}
.se-toggle-btn svg { width: 14px; height: 14px; }
.se-toggle-btn.is-active {
  background: var(--surface);
  color: var(--t1);
  box-shadow: 0 1px 3px rgba(14, 20, 34, .08);
}
.se-editor { display: flex; flex-direction: column; gap: 8px; }
.se-block {
  border: 1px solid var(--bd);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.se-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  min-height: 42px;
}
.se-row--dept { background: var(--surface-2); }
.se-row--area { padding-left: 8px; }
.se-row--area:nth-child(even) {
  background: color-mix(in srgb, var(--t1) 6.5%, transparent);
}
.se-editor > .se-block:nth-child(even) {
  background: color-mix(in srgb, var(--t1) 4.5%, var(--surface));
}
.se-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--t2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
}
.se-chip svg { width: 13px; height: 13px; color: var(--accent); }
.se-chip:hover {
  border-color: var(--accent);
  background: var(--accent-faint);
  color: var(--accent);
}
.se-chip--static {
  cursor: default;
  font-weight: 650;
}
.se-chip--static:hover {
  border-color: var(--bd);
  background: var(--surface-2);
  color: var(--t2);
}
.se-chip.is-empty,
.se-chip--static.is-empty {
  color: var(--t4);
  font-weight: 650;
}
.se-chip.is-empty svg,
.se-chip--static.is-empty svg { color: var(--t4); }
.se-ma {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px 0 7px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--surface-2);
  flex: none;
  min-width: 86px;
}
.se-ma-ico {
  display: inline-flex;
  color: var(--t3);
}
.se-ma-ico svg { width: 13px; height: 13px; }
.se-input--ma {
  flex: 1;
  min-width: 28px;
  max-width: 44px;
  height: 24px;
  padding: 0;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  border: 0;
  background: transparent;
  appearance: textfield;
}
.se-input--ma::-webkit-outer-spin-button,
.se-input--ma::-webkit-inner-spin-button { appearance: none; margin: 0; }
.se-input--ma:hover,
.se-input--ma:focus {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.se-ma:focus-within {
  border-color: var(--accent);
  background: var(--surface);
}
.se-ma-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--t4);
}
.se-row--composer { background: transparent; }
.se-row--dept-add {
  border: 1px dashed var(--bd);
  border-radius: 12px;
  background: var(--surface);
}
.se-indent {
  width: 18px;
  flex: none;
  height: 1px;
  background: var(--bd);
  margin-left: 10px;
}
.se-ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: none;
  display: inline-flex;
}
.se-ico svg { width: 16px; height: 16px; }
.se-ico--muted { color: var(--t4); }
.se-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
  font-size: 14px;
  color: var(--t1);
}
.se-input--dept { font-weight: 700; }
.se-input--meta { max-width: 240px; color: var(--t2); font-size: 13px; }
.se-input:hover { background: var(--surface); border-color: var(--bd); }
.se-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.se-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--t4);
  white-space: nowrap;
}
.se-ghost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.se-ghost:hover { background: var(--accent-faint); }
.se-ghost svg { width: 12px; height: 12px; }
.se-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--t4);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  flex: none;
}
.se-icon-btn:hover { background: var(--red-bg); color: var(--red); }
.se-empty {
  padding: 18px 12px 8px;
  font-size: 13.5px;
  color: var(--t3);
  line-height: 1.45;
}

.app-shell-body--no-subnav .app-module-subnav {
  display: none !important;
  width: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.mod-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--bd);
}
.mod-tabs {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.mod-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--t3);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  border-radius: 8px;
  cursor: pointer;
}
.mod-tab svg { width: 15px; height: 15px; }
.mod-tab:hover { color: var(--t1); background: var(--surface); }
.mod-tab.is-active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  font-weight: 750;
}
.mod-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.mod-topbar-actions .dash-select {
  height: 36px;
  min-width: 200px;
}
.mod-topbar-actions .proto-btn {
  height: 36px;
}

.se-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.se-workspace--solo {
  grid-template-columns: minmax(0, 1fr);
}
.se-tree-panel {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 12px 10px 14px;
  min-height: 280px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  position: sticky;
  top: 8px;
}
.se-tree-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 6;
  touch-action: none;
}
.se-tree-resizer::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 3px;
  width: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--bd) 90%, transparent);
}
.se-tree-resizer:hover::after,
.se-tree-resizer.is-drag::after {
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}
body.is-col-resize {
  cursor: col-resize;
  user-select: none;
}
body.is-col-resize * { cursor: col-resize !important; }
.se-tree-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0 4px 0 8px;
}
.se-tree-kicker {
  font-size: 11px;
  font-weight: 700;
  color: var(--t4);
  letter-spacing: .04em;
  padding: 0;
  flex: 1;
  min-width: 0;
}
.se-tree-head-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: none;
}
.se-tree-icon-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--t3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.se-tree-icon-btn svg { width: 14px; height: 14px; }
.se-tree-icon-btn:hover { background: var(--surface-2); color: var(--accent); }
.se-tree-panel .proto-tree-toolbar { margin: 0 4px 8px; }
.se-workspace-main { min-width: 0; }

@media (max-width: 980px) {
  .se-workspace {
    grid-template-columns: 1fr;
  }
  .se-tree-panel {
    position: static;
    max-height: 280px;
    min-height: 0;
  }
}

/* —— Kompakte Cursor-artige Sidebar —— */
.app-sidebar {
  --app-sidebar-w: 196px;
  position: relative;
  flex: none;
  width: var(--app-sidebar-w);
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--app-shell-bd);
  color: var(--t1);
  z-index: 20;
  transition: width .16s ease;
}
.app-sidebar.is-collapsed {
  width: 52px;
}
.app-sidebar.is-resizing {
  transition: none;
}
.app-sidebar-toggle {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--t1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.app-sidebar-toggle:hover {
  background: color-mix(in srgb, var(--t1) 7%, transparent);
}
.app-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  scrollbar-width: thin;
}
.app-sidebar-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--t2);
  padding: 5px 8px 3px;
  white-space: nowrap;
}
.app-sidebar-section + .app-sidebar-section {
  margin-top: auto;
  padding-top: 10px;
}
.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 24px;
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--t1);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  line-height: calc(1.25em - .2em);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.app-sidebar-link:hover {
  background: color-mix(in srgb, var(--t1) 6.5%, transparent);
  color: var(--t1);
}
.app-sidebar-link.is-active {
  background: color-mix(in srgb, var(--t1) 9%, transparent);
  color: var(--t1);
  font-weight: 650;
}
.app-sidebar-link-icon {
  flex: none;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--t1);
  opacity: .88;
}
.app-sidebar-link-icon svg {
  width: 16px;
  height: 16px;
}
.app-sidebar-link.is-active .app-sidebar-link-icon {
  opacity: 1;
}
.app-sidebar-company {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-height: 28px;
  padding: 0 2px 0 8px;
  border-radius: 6px;
  color: var(--t1);
}
.app-sidebar-company:hover {
  background: color-mix(in srgb, var(--t1) 6.5%, transparent);
}
.app-sidebar-company.is-active {
  background: color-mix(in srgb, var(--t1) 9%, transparent);
}
.app-sidebar-company-icon {
  flex: none;
  width: 22px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.app-sidebar-company-home {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  height: 28px;
  margin: 0;
  padding: 0 4px 0 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}
.app-sidebar-company-home:hover {
  background: color-mix(in srgb, var(--t1) 5%, transparent);
}
.app-sidebar-company-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
  color: var(--t1);
}
.app-sidebar-company.is-active .app-sidebar-company-name {
  font-weight: 650;
}
.app-sidebar-company-caret {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--t2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.app-sidebar-company-caret:hover {
  background: color-mix(in srgb, var(--t1) 8%, transparent);
  color: var(--t1);
}
.app-sidebar-company-caret svg {
  width: 14px;
  height: 14px;
  transition: transform .15s ease;
}
.app-sidebar-company.is-open .app-sidebar-company-caret svg {
  transform: rotate(180deg);
}
.app-company-drop {
  position: fixed;
  z-index: 60;
  box-sizing: border-box;
  width: min(300px, calc(100vw - 16px));
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--t1) 10%, var(--bd));
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 18px 48px rgba(27, 79, 155, .16);
  color: var(--t1);
  font-family: var(--font);
}
.app-company-drop *,
.app-company-drop *::before,
.app-company-drop *::after { box-sizing: border-box; }
.app-company-drop[hidden] { display: none !important; }
.app-company-drop-head {
  padding: 14px 14px 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--bd);
}
.app-company-drop-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.app-company-drop-lead {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
}
.app-company-drop-list {
  padding: 8px;
  max-height: min(320px, 50vh);
  overflow: auto;
}
.app-company-empty {
  padding: 16px 12px;
  font-size: 13px;
  color: var(--t3);
  text-align: center;
}
.app-company-item {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--t1);
  font-family: inherit;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.app-company-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}
.app-company-item.is-current {
  background: var(--accent-faint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.app-company-avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 6px 14px rgba(27, 79, 155, .22);
}
.app-company-avatar--add {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--accent);
  box-shadow: none;
}
.app-company-avatar--add svg {
  width: 16px;
  height: 16px;
}
.app-company-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-company-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  color: var(--t1);
}
.app-company-item-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--t3);
}
.app-company-item-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
}
.app-company-item-check svg {
  width: 12px;
  height: 12px;
}
.app-company-item--new {
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--bd));
  background: color-mix(in srgb, var(--accent-2) 6%, var(--surface));
}
.app-company-item--new:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--bd));
}
.app-company-item--new .app-company-item-name { color: var(--accent); }
.dark .app-company-drop {
  box-shadow: 0 18px 48px rgba(0, 0, 0, .4);
}
.app-sidebar.is-collapsed .app-sidebar-company-name,
.app-sidebar.is-collapsed .app-sidebar-company-caret {
  display: none;
}
.app-sidebar.is-collapsed .app-sidebar-company-home {
  justify-content: center;
  padding: 0;
}
.app-sidebar.is-collapsed .app-sidebar-company {
  justify-content: center;
  padding: 6px 0;
}
.app-sidebar-link-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t4);
}
.app-sidebar-dot--ok { background: var(--green, #2f9e62); }
.app-sidebar-dot--draft { background: #b8894a; }
.app-sidebar.is-collapsed .app-sidebar-kicker,
.app-sidebar.is-collapsed .app-sidebar-link-label,
.app-sidebar.is-collapsed .app-sidebar-dot {
  display: none;
}
.app-sidebar.is-collapsed .app-sidebar-nav {
  padding: 4px 6px 12px;
  align-items: stretch;
}
.app-sidebar.is-collapsed .app-sidebar-link {
  justify-content: center;
  padding: 6px 0;
  gap: 0;
}
.app-sidebar-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 6;
  touch-action: none;
}
.app-sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 3px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}
.app-sidebar-resizer:hover::after,
.app-sidebar-resizer.is-drag::after {
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}
.app-sidebar-scrim {
  display: none;
}
.app-topbar-sidebar-btn {
  display: none;
}

.app-topbar {
  gap: 16px;
}
.app-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.app-topnav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.app-topnav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--t2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.app-topnav-link:hover { color: var(--t1); background: var(--surface-2); }
.app-topnav-link.is-active {
  color: var(--accent);
  background: var(--accent-faint);
  font-weight: 750;
}
.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-company-wrap {
  flex: none;
  min-width: 0;
}
.app-company-select {
  width: auto;
  min-width: 176px;
  max-width: min(280px, 38vw);
  height: 34px;
  padding: 0 28px 0 10px;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
}
.app-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--t2);
  font: inherit;
  cursor: pointer;
}
.app-account-trigger:hover { background: var(--surface-2); color: var(--t1); }
.app-account-trigger.is-active {
  color: var(--accent);
  background: var(--accent-faint);
}
.app-account-avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  color: var(--accent);
}
.app-account-trigger.is-active .app-account-avatar {
  background: var(--accent);
  color: #fff;
}
.app-account-label {
  font-size: 12.5px;
  font-weight: 700;
  padding-right: 4px;
}
.app-account-drop[hidden] {
  display: none !important;
}
.app-account { position: relative; }
.app-account-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 196px;
  max-width: min(320px, 80vw);
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: var(--sh3, 0 12px 32px rgba(15, 23, 42, .12));
  z-index: 40;
}
.app-account-drop a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--t1);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-account-drop a:hover { background: var(--surface-2); }
.app-account-drop a.is-active { color: var(--accent); background: var(--accent-faint); }
.app-account-empty {
  display: block;
  padding: 8px 10px;
  color: var(--t4);
  font-size: 13px;
}

.app-shell-body .eh-layout-content { padding: 8px 14px 12px !important; }
.app-shell-body .eh-layout-main,
.app-shell-body .app-module-layout,
.app-shell-body .expert-module-layout { padding: 0 !important; margin: 0 !important; }
.app-shell-body #view-root { gap: 4px; }
.app-shell-body .eh-module-panel {
  padding: 0 !important;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.app-shell-body .app-module { gap: 4px !important; }
.app-shell-body #view-root.space-y-6 > :not(:last-child) {
  margin-block-end: 0;
}
.app-shell-body .mod-head + .eh-betrieb-card,
.app-shell-body .mod-head + .se-workspace .eh-betrieb-card {
  margin-top: 0;
}

@media (max-width: 820px) {
  .app-topbar-sidebar-btn { display: inline-flex; }
  .app-sidebar-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: color-mix(in srgb, var(--t1) 28%, transparent);
  }
  .app-sidebar {
    position: fixed;
    top: var(--app-topbar-h);
    left: 0;
    bottom: 0;
    height: auto;
    z-index: 36;
    transform: translateX(-105%);
    transition: transform .18s ease, width .16s ease;
    box-shadow: none;
  }
  .app-sidebar.is-collapsed {
    width: var(--app-sidebar-w);
  }
  .app-sidebar.is-collapsed .app-sidebar-kicker,
  .app-sidebar.is-collapsed .app-sidebar-link-label,
  .app-sidebar.is-collapsed .app-sidebar-dot {
    display: block;
  }
  .app-sidebar.is-collapsed .app-sidebar-link-label { display: block; }
  .app-sidebar.is-collapsed .app-sidebar-dot { display: block; }
  .app-sidebar-toggle { display: none; }
  .app-sidebar.is-collapsed .app-sidebar-nav { padding: 8px 8px 14px; }
  .app-sidebar.is-collapsed .app-sidebar-company-name,
  .app-sidebar.is-collapsed .app-sidebar-company-caret {
    display: flex;
  }
  .app-sidebar.is-collapsed .app-sidebar-company-name { display: block; }
  .app-sidebar.is-collapsed .app-sidebar-company-home {
    justify-content: flex-start;
  }
  .app-sidebar.is-collapsed .app-sidebar-company {
    justify-content: flex-start;
    padding: 4px 2px 4px 8px;
  }
  .app-sidebar.is-collapsed .app-sidebar-link {
    justify-content: flex-start;
    padding: 4px 8px;
    gap: 8px;
  }
  body.is-sidebar-open .app-sidebar {
    transform: translateX(0);
    box-shadow: 12px 0 32px rgba(14, 20, 34, .12);
  }
  body.is-sidebar-open .app-sidebar-scrim {
    display: block;
  }
  .app-sidebar-resizer { display: none; }
}

.mod-head {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  min-height: 40px;
}
.mod-head-meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mod-head .mod-tabs { margin-right: auto; }
.mod-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.mod-head .dash-select {
  height: 34px;
  min-width: 168px;
  font-size: 13.5px;
  font-weight: 700;
}
.mod-head .mod-tab { height: 32px; padding: 0 11px; font-size: 13px; }
.mod-head .proto-btn { height: 32px; padding: 0 11px; font-size: 13px; }
.mod-topbar {
  margin: 0;
  padding: 0;
  border: 0;
}

.se-tree-panel { max-height: calc(100vh - 148px); }
.se-workspace--solo:has(.mm-wrap) {
  align-items: stretch;
  height: calc(100vh - 96px);
  max-height: calc(100vh - 96px);
}
.se-workspace-main:has(.mm-wrap) {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 6px;
}
.se-workspace-main:has(.mm-wrap) .se-toolbar {
  flex: none;
}

.proto-placeholder {
  max-width: 640px;
  margin: 24px auto;
  text-align: center;
  padding: 36px 28px;
}
.proto-placeholder h1 {
  margin: 0 0 8px;
  font-size: 22px;
}
.proto-placeholder p {
  margin: 0;
  color: var(--t3);
  font-size: 14.5px;
  line-height: 1.5;
}

.kb-page {
  max-width: 720px;
  margin: 18px auto 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 8px 24px;
}
.kb-page h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  color: var(--t1);
}
.kb-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--t3);
}
.kb-lead {
  margin: 0;
  color: var(--t3);
  font-size: 14.5px;
  line-height: 1.5;
}
.kb-lead--tight { margin: 0 0 12px; }
.kb-lead strong { color: var(--t1); font-weight: 650; }
.kb-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kb-card { padding: 18px 18px 16px; }
.kb-card-title {
  margin: 4px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--t1);
}
.kb-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.branche-combo-wrap { position: relative; }
.branche-combo { position: relative; }
.branche-combo-input { width: 100%; }
.branche-combo-drop {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--t1) 12%, transparent);
}
.branche-combo-list {
  list-style: none;
  margin: 0;
  padding: 4px;
}
.branche-combo-list li[hidden] { display: none; }
.branche-combo-opt {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--t1);
  cursor: pointer;
}
.branche-combo-opt:hover,
.branche-combo-opt:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}
.kb-logo-field { margin-top: 2px; }
.kb-logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: color-mix(in srgb, var(--t1) 3%, var(--surface));
}
.kb-logo-preview-wrap {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--bd) 80%, var(--t1));
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}
.kb-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.kb-logo-placeholder {
  color: var(--t4);
  opacity: .55;
}
.kb-logo-placeholder svg { width: 28px; height: 28px; }
.kb-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.kb-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kb-modal-fields { margin-top: 16px; }
.kb-choice {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 104px;
  padding: 16px 16px 14px;
  border: 1.5px solid var(--bd);
  border-radius: 16px;
  background: var(--surface);
  color: var(--t1);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.kb-choice strong {
  font-size: 15px;
  font-weight: 750;
  color: var(--t1);
}
.kb-choice span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--t3);
}
.kb-choice:hover {
  background: color-mix(in srgb, var(--t1) 4%, var(--surface));
}
.kb-choice.is-on,
.kb-choice:has(input:checked) {
  border-color: color-mix(in srgb, #1b4f9b 55%, var(--bd));
  background: color-mix(in srgb, #1b4f9b 6%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, #2fbfad 28%, transparent);
}
.kb-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 640px) {
  .kb-choices { grid-template-columns: 1fr; }
}

.doku-workspace.doku-workspace--flat {
  grid-template-columns: minmax(0, 1fr);
}
.doku-workspace.doku-workspace--flat.is-detail {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.doku-toolbar { margin-bottom: 10px; }
.doku-workspace {
  align-items: stretch;
  grid-template-columns: var(--doku-tree-w, 260px) minmax(0, 1fr);
}
.doku-workspace .se-tree-panel,
.doku-workspace .doku-main {
  min-height: calc(100vh - 100px);
  max-height: calc(100vh - 100px);
  box-sizing: border-box;
}
.doku-workspace .se-tree-panel {
  position: relative;
  height: 100%;
}
.doku-workspace .doku-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}
.doku-toolbar,
.doku-legal { flex: none; }
.doku-main .doku-table-wrap {
  flex: 1;
  min-height: 0;
}
.doku-table-wrap {
  overflow: auto;
  border: 1px solid var(--bd);
  border-radius: 12px;
}
.doku-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.doku-table th,
.doku-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--t1) 8%, transparent);
  vertical-align: middle;
  white-space: nowrap;
}
.doku-table th:nth-child(2),
.doku-table td:nth-child(2) { white-space: normal; }
.doku-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--t4);
  font-weight: 700;
  background: var(--surface-2);
  position: sticky;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--t1) 12%, transparent);
}
.doku-table tbody tr { cursor: pointer; }
.doku-activity-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.doku-cell-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doku-row-edit {
  flex: none;
  width: 26px;
  height: 26px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, background .12s ease;
}
.doku-row-edit svg { width: 15px; height: 15px; }
.doku-table tbody tr:hover .doku-row-edit,
.doku-table tbody tr.is-active .doku-row-edit,
.doku-row-edit:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.doku-row-edit:hover,
.doku-row-edit:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.doku-th-actions,
.doku-td-actions {
  width: 1%;
  padding: 6px 10px 6px 8px;
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}
.doku-th-actions {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--t4);
  text-transform: uppercase;
}
.doku-td-actions {
  cursor: default;
}
.doku-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--t1) 4%, var(--surface));
  border: 1px solid var(--bd);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
}
.doku-row-action {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--bd) 85%, var(--t1));
  border-radius: 6px;
  background: var(--surface);
  color: var(--t2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 1px color-mix(in srgb, var(--t1) 8%, transparent);
  transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.doku-row-action svg {
  width: 14px;
  height: 14px;
}
.doku-row-action:hover,
.doku-row-action:focus-visible {
  background: color-mix(in srgb, var(--t1) 6%, var(--surface));
  color: var(--t1);
  border-color: color-mix(in srgb, var(--t1) 18%, var(--bd));
}
.doku-row-action--primary {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 22%, var(--bd));
}
.doku-row-action--primary:hover,
.doku-row-action--primary:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--bd));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 12%, transparent);
}
.doku-table-hint {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--t4);
}
.area-gbu-table .doku-th-actions,
.area-gbu-table .doku-td-actions {
  width: 1%;
}
.doku-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--t1) 6.5%, transparent);
}
.doku-table tbody tr:hover td { background: var(--accent-faint); }
.doku-table tbody tr.is-active td {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  box-shadow: none;
  border-bottom-color: color-mix(in srgb, var(--accent) 22%, transparent);
}
.doku-table tbody tr.is-active:hover td {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
}
.doku-table tbody tr:last-child td { border-bottom: 0; }
.doku-empty { padding: 28px 16px; text-align: center; }
.doku-legal {
  margin: 12px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--t4);
}
.doku-workspace.is-detail {
  grid-template-columns: var(--doku-tree-w, 260px) minmax(0, 1fr) minmax(300px, 360px);
}
.doku-workspace .doku-detail {
  min-height: calc(100vh - 100px);
  max-height: calc(100vh - 100px);
  box-sizing: border-box;
}
.doku-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 12px;
}
.doku-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--bd);
  flex: none;
}
.doku-detail-head > div { min-width: 0; flex: 1; }
.doku-detail-head strong {
  display: block;
  font-size: 14px;
  font-weight: 750;
  color: var(--t1);
  line-height: 1.3;
  margin-top: 2px;
}
.doku-detail-form {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doku-field { display: block; min-width: 0; }
.doku-detail .gbu-fields--area,
.doku-detail .gbu-fields--company {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doku-detail .gbu-fields--area[hidden],
.doku-detail .gbu-fields--company[hidden] {
  display: none !important;
}
.doku-field .app-form-label {
  display: block;
  margin-bottom: 5px;
  color: var(--t3);
}
.doku-detail .proto-input,
.doku-detail .proto-select {
  height: 34px;
  font-size: 13px;
  padding: 6px 10px;
  background: var(--bg);
  border-color: color-mix(in srgb, var(--t1) 24%, var(--bd));
}
.doku-detail .proto-textarea {
  min-height: 52px;
  font-size: 13px;
  padding: 8px 10px;
  background: var(--bg);
  border-color: color-mix(in srgb, var(--t1) 24%, var(--bd));
}
.doku-detail .proto-input:focus,
.doku-detail .proto-select:focus,
.doku-detail .proto-textarea:focus {
  background: var(--surface);
}
.doku-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--t1);
  cursor: pointer;
  user-select: none;
}
.doku-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: none;
}
.doku-field-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--t4);
}
.doku-detail-sec {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--t4);
  margin: 6px 0 0;
}
.doku-detail-sec--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.doku-doc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: var(--surface-2);
}
.doku-doc-link {
  display: flex;
  align-items: center;
  gap: 4px;
}
.doku-doc-link .proto-input { flex: 1; min-width: 0; }
.doku-detail-foot {
  flex: none;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--bd);
  background: var(--surface);
}
.doku-detail-foot .proto-btn {
  width: 100%;
}
@media (max-width: 1180px) {
  .doku-workspace.is-detail {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }
  .doku-workspace.is-detail .se-tree-panel { display: none; }
}
@media (max-width: 980px) {
  .doku-workspace.is-detail {
    grid-template-columns: 1fr;
  }
  .doku-workspace.is-detail .doku-detail {
    min-height: 0;
    max-height: none;
  }
}
.doku-scope {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.doku-scope-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--bd);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 650;
  color: var(--t2);
  cursor: pointer;
}
.doku-scope-opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-faint);
  color: var(--accent);
}
.doku-scope-opt input { accent-color: var(--accent); }
.proto-tree-kids-inner > .proto-tree-node--cross > .proto-tree-row {
  background: color-mix(in srgb, var(--accent-2) 11%, transparent);
}
.proto-tree-kids-inner > .proto-tree-node--cross > .proto-tree-row:hover {
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
}
.proto-tree-kids-inner > .proto-tree-node--cross > .proto-tree-row:has(.proto-tree-btn.is-active) {
  background: color-mix(in srgb, var(--accent-2) 20%, transparent);
}
.proto-tree-kids-inner > .proto-tree-node--cross .proto-tree-btn {
  color: color-mix(in srgb, var(--accent-2) 42%, var(--t1));
}
.proto-tree-kids-inner > .proto-tree-node--cross .proto-tree-btn.is-active {
  color: var(--accent-2);
}
.proto-tree-node--cross .proto-tree-count {
  background: color-mix(in srgb, var(--accent-2) 22%, transparent);
  color: color-mix(in srgb, var(--accent-2) 50%, var(--t1));
}

body.is-gbu-editor { overflow: hidden; }
body.is-gbu-editor .app-topbar { display: none; }
body.is-gbu-editor .app-sidebar,
body.is-gbu-editor .app-sidebar-resizer,
body.is-gbu-editor .app-sidebar-scrim {
  display: none !important;
}
body.is-gbu-editor .app-shell-main {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body.is-gbu-editor .app-module-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.is-gbu-editor .eh-layout,
body.is-gbu-editor .eh-layout-main,
body.is-gbu-editor .eh-layout-content,
body.is-gbu-editor .eh-module-panel,
body.is-gbu-editor #view-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.is-gbu-editor .gbu-editor {
  position: relative;
  inset: auto;
  z-index: 1;
  flex: 1;
  min-height: 0;
}
body.is-gbu-editor.is-ai-dock .gbu-editor-scroll {
  scroll-padding-bottom: 12rem;
}
body.is-gbu-editor.is-ai-dock .gb-guide {
  padding-bottom: 11rem;
}
body.is-gbu-editor .ai-root {
  position: relative;
  flex: none;
  z-index: 30;
  margin-top: auto;
  padding: 8px 18px max(14px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 78%, color-mix(in srgb, var(--bg) 55%, transparent));
  border-top: 1px solid color-mix(in srgb, var(--t1) 8%, var(--bd));
}
body.is-gbu-editor .ai-root .ai-dock {
  max-width: 720px;
}
body.is-gbu-editor.is-ai-review .app-module-layout {
  visibility: visible;
}
body.is-gbu-editor.is-ai-review .ai-root {
  position: fixed;
  inset: 58px 0 0;
  z-index: 220;
  margin-top: 0;
  padding: 12px 16px 16px;
  background: var(--bg);
  border-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.is-gbu-editor.is-ai-review .ai-root.is-review {
  padding: 10px 14px 14px;
}
body.is-gbu-editor.is-ai-review .ai-thinking {
  flex: 1;
}
.ai-gbu-lead {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--bd));
  color: var(--t1);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.ai-root--gbu-editor .ai-gbu-lead {
  font-size: 13.5px;
}
.ai-sim-block {
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface);
}
.ai-sim-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 750;
  color: var(--t1);
}
.ai-sim-block p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--t2);
}
.ai-sim-list {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  color: var(--t2);
  font-size: 13px;
  line-height: 1.45;
}
.ai-sim-ctx {
  margin: 0 20px 4px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--t3);
}
.ai-sim-disclaimer {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--t3);
  line-height: 1.45;
}
.ai-review--sim .ai-review-body {
  gap: 10px;
}
.gbu-editor {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.gbu-editor-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--bd);
  background: var(--surface);
}
.gbu-editor-bar [data-gbu-editor-close] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.gbu-editor-bar [data-gbu-editor-close] svg {
  transform: rotate(180deg);
}
.gbu-editor-heading {
  min-width: 0;
  flex: 1;
}
.gbu-editor-heading strong {
  display: block;
  font-size: 16px;
  font-weight: 750;
  color: var(--t1);
  line-height: 1.25;
}
.gbu-editor-sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  margin-top: 1px;
}
.gbu-editor-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.gbu-editor-saved {
  font-size: 12px;
  font-weight: 650;
  color: var(--t4);
}
.gbu-editor-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}
.gbu-editor-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
  border-right: 1px solid var(--bd);
  background: var(--surface);
  overflow: auto;
}
.gbu-editor-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 10px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.gbu-editor-step:hover { background: var(--surface-2); }
.gbu-editor-step.is-active {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.gbu-editor-step-nr {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--t3);
}
.gbu-editor-step.is-active .gbu-editor-step-nr {
  background: var(--accent);
  color: #fff;
}
.gbu-editor-step-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gbu-editor-step-text strong {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--t1);
}
.gbu-editor-step-text span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t4);
  line-height: 1.3;
}
.gbu-editor-main {
  min-width: 0;
  overflow: auto;
  padding: 22px 28px 40px;
}
.gbu-editor-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  max-width: 880px;
}
.gbu-editor-form .doku-field--full,
.gbu-editor-form .doku-doc-row {
  grid-column: 1 / -1;
}
.gbu-editor-form .gbu-fields--area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.gbu-editor-form .gbu-fields--area[hidden],
.gbu-editor-form .gbu-fields--company[hidden] {
  display: none !important;
}
.gbu-editor-soon {
  max-width: 560px;
  padding: 28px 8px;
}
.gbu-editor-soon-nr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}
.gbu-editor-soon h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.gbu-editor-soon p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--t3);
}
@media (max-width: 780px) {
  .gbu-editor-body { grid-template-columns: 1fr; }
  .gbu-editor-nav {
    flex-direction: row;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--bd);
    padding: 8px;
  }
  .gbu-editor-step { min-width: 160px; }
  .gbu-editor-form,
  .gbu-editor-form .gbu-fields--area { grid-template-columns: 1fr; }
  .gbu-blatt { grid-template-columns: 1fr; }
  .gbu-blatt-catalog { border-right: 0; border-bottom: 1px solid var(--bd); max-height: 42vh; }
}

.gbu-editor-body.is-blatt { grid-template-columns: 210px minmax(0, 1fr); }
.gbu-editor-main.is-blatt {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gbu-blatt {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
}
.gbu-blatt.is-list-off { grid-template-columns: 1fr; }
.gbu-blatt.is-list-off .gbu-blatt-catalog { display: none; }
.gbu-blatt-catalog {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 14px;
  border-right: 1px solid var(--bd);
  background: var(--surface);
  overflow: auto;
}
.gbu-hints {
  flex: none;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.gbu-hints-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}
.gbu-hints-ico {
  display: inline-flex;
  color: var(--accent);
}
.gbu-hints-toggle strong {
  flex: 1;
  font-size: 13px;
  font-weight: 750;
  color: var(--t1);
}
.gbu-hints-chev {
  display: inline-flex;
  color: var(--t4);
  transition: transform .15s ease;
}
.gbu-hints.is-open .gbu-hints-chev { transform: rotate(180deg); }
.gbu-hints-body {
  display: none;
  padding: 0 12px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--t3);
}
.gbu-hints-body p { margin: 0 0 8px; }
.gbu-hints-body p:last-child { margin-bottom: 0; }
.gbu-hints.is-open .gbu-hints-body { display: block; }
.gbu-blatt-navhead {
  padding: 4px 4px 0;
}
.gbu-blatt-navhead strong {
  display: block;
  font-size: 13.5px;
  font-weight: 750;
  color: var(--t1);
  line-height: 1.3;
}
.gbu-cat-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 4px 4px;
  margin: 0 0 2px;
  cursor: pointer;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
}
.gbu-cat-back svg { transform: rotate(180deg); }
.gbu-cat-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--t4);
  padding: 0 4px;
}
.gbu-cat-context {
  margin: 0;
  padding: 0 4px 4px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--t3);
  line-height: 1.35;
}
.gbu-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gbu-cat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 8px 8px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.gbu-cat-item:hover { background: var(--surface-2); }
.gbu-cat-item.is-active {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--t1);
}
.gbu-cat-item.is-dragging { opacity: .45; }
.gbu-cat-item--hazard { cursor: grab; }
.gbu-cat-nr {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--accent);
}
.gbu-cat-item.is-active .gbu-cat-nr {
  background: var(--accent);
  color: #fff;
}
.gbu-cat-mark {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 2px;
  background: color-mix(in srgb, #c2410c 80%, var(--accent));
}
.gbu-cat-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gbu-cat-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.3;
}
.gbu-cat-text span {
  font-size: 11px;
  font-weight: 600;
  color: var(--t4);
}
.gbu-blatt-sheet {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.gbu-blatt-sheet.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}
.gbu-blatt-toolbar {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bd);
  background: var(--surface);
}
.gbu-blatt-meta {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--bd);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  font-size: 12.5px;
  color: var(--t2);
}
.gbu-blatt-meta b {
  font-weight: 750;
  color: var(--t4);
  margin-right: 6px;
}
.gbu-blatt-table {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0 24px;
}
.gbu-blatt-empty {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, #f59e0b 16%, var(--surface));
  color: var(--t2);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}
.gbu-blatt-empty-ico {
  display: inline-flex;
  color: #c2410c;
  margin-top: 1px;
}
.gbu-sheet-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}
.gbu-sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--t1);
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  border-bottom: 1px solid var(--bd);
}
.gbu-sheet-table.is-head-off thead { display: none; }
.gbu-sheet-group th {
  padding: 8px 12px 6px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  text-align: left;
  border-bottom: 1px solid var(--bd);
}
.gbu-sheet-table td {
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--bd);
  background: var(--surface);
}
.gbu-sheet-hazard {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.gbu-sheet-hazard strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.35;
}
.gbu-sheet-risk {
  white-space: nowrap;
}
.gbu-sheet-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--t2);
  margin-bottom: 6px;
}
.gbu-sheet-check:last-child { margin-bottom: 0; }
.gbu-sheet-note {
  min-width: 180px;
  min-height: 52px;
  resize: vertical;
}
.gbu-sheet-dates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.gbu-sheet-dates label {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--t4);
}
.gbu-sheet-dates .proto-input { min-width: 0; }

/* Geführte Gefährdungsbeurteilung (Checkliste) */
.gbu-editor-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.gb-guide {
  --blue: #1B4F9B;
  --blue-pale: #ddeafc;
  --blue-faint: #f0f5ff;
  --teal: #2FBFAD;
  --teal-dk: #1e9e8e;
  --teal-pale: #cdf0ec;
  --teal-faint: #f0fdfb;
  --green: #15803d;
  --green-bg: #f0fdf4;
  --green-bd: #86efac;
  --yellow: #b45309;
  --yellow-bg: #fefce8;
  --yellow-bd: #fcd34d;
  --red: #b91c1c;
  --red-bg: #fff1f2;
  --red-bd: #fca5a5;
  --r8: 8px;
  --r12: 12px;
  --r16: 16px;
  --r18: 18px;
  --r20: 20px;
  --gb-grad: linear-gradient(135deg, #1B4F9B 0%, #2FBFAD 100%);
  --gb-sh: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --gb-sh-blue: 0 4px 16px rgba(27, 79, 155, .22);
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 1.4rem 1.2rem 4rem;
  box-sizing: border-box;
}
.gb-guide * { box-sizing: border-box; }
.gb-guide .pg-hd { margin-bottom: 1.1rem; }
.gb-guide .pg-hd h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 .25rem;
  color: var(--t1);
}
@media (min-width: 900px) {
  .gb-guide .pg-hd h1 { font-size: 1.75rem; }
}
.gb-guide .pg-hd p {
  font-size: .86rem;
  color: var(--t3);
  line-height: 1.6;
  margin: 0;
}
.gb-mode-select {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 1rem;
}
.gb-mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.gb-mode-opt:hover,
.gb-mode-opt:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--bd));
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}
.gb-mode-opt.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.gb-mode-ico {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}
.gb-mode-ico svg { width: 16px; height: 16px; }
.gb-mode-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gb-mode-copy strong {
  font-size: .82rem;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.25;
}
.gb-mode-copy span {
  font-size: .72rem;
  color: var(--t4);
  line-height: 1.35;
}
.gb-mode-panel {
  margin-bottom: 1.1rem;
  padding: 14px;
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  background: var(--surface);
}
.gb-mode-lead {
  margin: 0 0 12px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--t3);
}
.gb-photo-zone {
  border: 1px dashed color-mix(in srgb, var(--accent) 28%, var(--bd));
  border-radius: var(--r12);
  padding: 14px;
  background: color-mix(in srgb, var(--accent) 3%, var(--surface));
}
.gb-photo-zone.has-preview { border-style: solid; }
.gb-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  color: var(--t4);
  font-size: .82rem;
}
.gb-photo-placeholder svg { width: 28px; height: 28px; opacity: .55; }
.gb-photo-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.gb-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.gb-branche-field {
  display: block;
  margin-bottom: 12px;
}
.gb-ki-result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bd);
}
.gb-ki-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .8rem;
  color: var(--t3);
}
.gb-ki-result-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--t1);
  font-size: .85rem;
}
.gb-ki-findings,
.gb-branche-cluster ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gb-ki-finding {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--bd);
  background: var(--surface-2, #f6f7fa);
  font-size: .78rem;
  line-height: 1.45;
}
.gb-ki-finding--green { border-color: var(--green-bd); background: var(--green-bg); }
.gb-ki-finding--yellow { border-color: var(--yellow-bd); background: var(--yellow-bg); }
.gb-ki-finding--red { border-color: var(--red-bd); background: var(--red-bg); }
.gb-ki-finding p { margin: 4px 0 0; color: var(--t2); }
.gb-ki-finding-m { color: var(--teal-dk) !important; font-weight: 500; }
.gb-ki-finding-rw { font-size: .7rem; color: var(--t4) !important; font-style: italic; }
.gb-ki-finding-amp { flex: none; font-size: 1rem; line-height: 1; }
.gb-ki-hint {
  margin: 12px 0 10px;
  font-size: .75rem;
  color: var(--t4);
  line-height: 1.45;
}
.gb-branche-clusters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}
.gb-branche-cluster {
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--surface);
}
.gb-branche-cluster summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--t1);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gb-branche-cluster summary::-webkit-details-marker { display: none; }
.gb-branche-cluster ul { padding: 0 12px 12px; }
.gb-branche-nr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
}
.gb-branche-count {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 600;
  color: var(--t4);
}
@media (max-width: 860px) {
  .gb-mode-select { grid-template-columns: 1fr; }
}
.gb-guide .disclaimer {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-bd);
  border-radius: var(--r12);
  padding: .7rem .95rem;
  font-size: .79rem;
  color: var(--yellow);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.gb-guide .fortschritt {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--r12);
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--gb-sh);
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}
.gb-guide .ft-bar {
  flex: 1;
  min-width: 80px;
  height: 6px;
  background: var(--surface-2, #eef0f4);
  border-radius: 3px;
  overflow: hidden;
}
.gb-guide .ft-fill {
  height: 100%;
  background: var(--gb-grad);
  border-radius: 3px;
  transition: width .4s;
}
.gb-guide .ft-txt {
  font-size: .75rem;
  font-weight: 600;
  color: var(--t3);
  white-space: nowrap;
}
.gb-guide .ft-chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.gb-guide .ft-chip {
  font-size: .68rem;
  font-weight: 600;
  padding: .14rem .48rem;
  border-radius: 50px;
}
.gb-guide .fc-g { background: var(--green-bg); color: var(--green); }
.gb-guide .fc-y { background: var(--yellow-bg); color: var(--yellow); }
.gb-guide .fc-r { background: var(--red-bg); color: var(--red); }
.gb-guide .fc-0 { background: var(--surface-2, #eef0f4); color: var(--t4); }
.gb-guide .sektion {
  background: var(--surface);
  border: 1.5px solid var(--bd);
  border-radius: var(--r20);
  margin-bottom: .75rem;
  overflow: hidden;
  box-shadow: var(--gb-sh);
  transition: border-color .2s;
}
.gb-guide .sektion.hat-rot { border-color: var(--red-bd); }
.gb-guide .sektion.hat-gelb { border-color: var(--yellow-bd); }
.gb-guide .sektion.komplett { border-color: var(--green-bd); }
.gb-guide .sek-hd {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1rem;
  cursor: pointer;
  user-select: none;
  background: var(--surface);
}
.gb-guide .sek-hd:active { background: var(--surface-2); }
.gb-guide .sek-num {
  font-size: .65rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--t4);
  border: 1px solid var(--bd);
  padding: .14rem .42rem;
  border-radius: var(--r8);
  flex-shrink: 0;
}
.gb-guide .sek-titel {
  font-size: .9rem;
  font-weight: 700;
  color: var(--t1);
  flex: 1;
  line-height: 1.3;
}
.gb-guide .sek-status {
  display: flex;
  gap: .25rem;
  align-items: center;
  flex-shrink: 0;
}
.gb-guide .sek-dot { width: 8px; height: 8px; border-radius: 50%; }
.gb-guide .sek-chv {
  color: var(--t4);
  font-size: .9rem;
  flex-shrink: 0;
  transition: transform .25s;
}
.gb-guide .sek-chv.open { transform: rotate(180deg); }
.gb-guide .sek-body { display: none; border-top: 1px solid var(--bd); }
.gb-guide .sek-body.open { display: block; }
.gb-guide .pp-kat {
  background: var(--surface-2);
  padding: .45rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--bd);
}
.gb-guide .pp { border-bottom: 1px solid var(--bd); }
.gb-guide .pp:last-child { border-bottom: none; }
.gb-guide .pp-summary {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1rem;
  cursor: pointer;
  user-select: none;
}
.gb-guide .pp-summary:active { background: var(--surface-2); }
.gb-guide .pp-amp {
  display: flex;
  gap: .28rem;
  flex-shrink: 0;
}
.gb-guide .a-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  cursor: pointer;
  transition: all .18s;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  font-family: inherit;
}
.gb-guide .a-btn.g { background: var(--green-bg); border-color: var(--green-bd); }
.gb-guide .a-btn.g.sel { background: var(--green); border-color: var(--green); }
.gb-guide .a-btn.y { background: var(--yellow-bg); border-color: var(--yellow-bd); }
.gb-guide .a-btn.y.sel { background: var(--yellow); border-color: var(--yellow); }
.gb-guide .a-btn.r { background: var(--red-bg); border-color: var(--red-bd); }
.gb-guide .a-btn.r.sel { background: var(--red); border-color: var(--red); }
.gb-guide .a-btn:active { transform: scale(.9); }
.gb-guide .pp-summary-txt {
  flex: 1;
  font-size: .83rem;
  font-weight: 600;
  color: var(--t2);
  line-height: 1.5;
  outline: none;
  border-bottom: 1.5px dashed transparent;
  cursor: text;
  min-width: 0;
  word-break: break-word;
}
.gb-guide .pp-summary-txt:hover { border-color: var(--bd); }
.gb-guide .pp-summary-txt:focus { border-color: var(--teal); }
.gb-guide .pp-summary-chv {
  color: var(--t4);
  font-size: .8rem;
  transition: transform .2s;
  flex-shrink: 0;
}
.gb-guide .pp-summary-chv.open { transform: rotate(180deg); }
.gb-guide .pp-detail { display: none; padding: .2rem 1rem .9rem; border-top: 1px solid var(--bd); }
.gb-guide .pp-detail.open { display: block; }
.gb-guide .pp.green .pp-summary { background: var(--green-bg); }
.gb-guide .pp.yellow .pp-summary { background: var(--yellow-bg); }
.gb-guide .pp.red .pp-summary { background: var(--red-bg); }
.gb-guide .pp-rw {
  font-size: .7rem;
  color: var(--t4);
  margin: .4rem 0 .5rem;
  font-style: italic;
}
.gb-guide .pp-mass-box {
  background: linear-gradient(135deg, var(--teal-faint), var(--blue-faint));
  border: 1px solid var(--teal-pale);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r12) var(--r12) 0;
  padding: .65rem .9rem;
  margin-bottom: .7rem;
}
.gb-guide .pp-mass-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: .28rem;
}
.gb-guide .pp-mass-lbl {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--teal-dk);
  margin-bottom: 0;
}
.gb-guide .pp-mass-ai {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--bd));
  border-radius: 6px;
  background: var(--surface);
  color: var(--teal-dk);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 1px color-mix(in srgb, var(--teal) 10%, transparent);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.gb-guide .pp-mass-ai svg {
  width: 14px;
  height: 14px;
}
.gb-guide .pp-mass-ai:hover,
.gb-guide .pp-mass-ai:focus-visible {
  background: color-mix(in srgb, var(--teal) 12%, var(--surface));
  border-color: var(--teal);
  color: var(--teal-dk);
}
.gb-mass-ai-modal .gb-mass-ai-current {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--teal) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--teal) 18%, var(--bd));
}
.gb-mass-ai-modal .gb-mass-ai-current p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--t2);
}
.gb-guide .pp-mass-ta {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .83rem;
  color: var(--t1);
  resize: none;
  min-height: 52px;
  line-height: 1.55;
}
.gb-guide .pp-mass-ta:focus { outline: none; }
.gb-guide .pp-mass-ta::placeholder { color: var(--t4); }
.gb-guide .pp-fdate-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .6rem .8rem;
  background: var(--surface-2);
  border-radius: var(--r8);
  border: 1px solid var(--bd);
  margin-bottom: .7rem;
}
.gb-guide .pp-fl { font-size: .72rem; font-weight: 500; color: var(--t4); }
.gb-guide .pp-fd,
.gb-guide .pp-resp {
  font-size: .8rem;
  font-weight: 600;
  color: var(--t1);
  border: none;
  border-bottom: 1.5px dashed var(--bd);
  background: transparent;
  padding: .03rem 0;
  font-family: inherit;
}
.gb-guide .pp-resp { width: 140px; }
.gb-guide .pp-fd:focus,
.gb-guide .pp-resp:focus { outline: none; border-color: var(--teal); }
.gb-guide .gb-finish {
  display: flex;
  width: 100%;
  margin-top: .5rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .78rem 1.5rem;
  border: none;
  border-radius: var(--r18);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--gb-grad);
  box-shadow: 0 4px 16px rgba(47, 191, 173, .28);
}
.gb-guide .gb-finish:hover { filter: brightness(1.05); }
@media (max-width: 640px) {
  .gb-guide { padding: 1.1rem 1rem 3.5rem; }
}

/* —— KI-Assistent (Claude-artig, Modul Unternehmen) —— */
.app-shell-main {
  position: relative;
}
.ai-root {
  flex: none;
  z-index: 26;
  padding: 0 18px 14px;
}
.ai-root[hidden] { display: none !important; }
.ai-dock {
  max-width: 720px;
  margin: 0 auto;
}
.ai-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
}
.ai-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: var(--surface);
  color: var(--t1);
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.ai-chip:hover {
  background: color-mix(in srgb, var(--t1) 5%, var(--surface));
  border-color: color-mix(in srgb, var(--t1) 18%, var(--bd));
}
.ai-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--t1) 10%, var(--bd));
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(14, 20, 34, .08);
}
.ai-composer-mark {
  flex: none;
  width: 32px;
  height: 32px;
  margin-bottom: 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--t1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ai-composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 28px;
  max-height: 120px;
  margin: 4px 0;
  padding: 0;
  border: 0;
  resize: none;
  background: transparent;
  color: var(--t1);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  outline: none;
}
.ai-composer textarea::placeholder { color: var(--t3); }
.ai-composer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-bottom: 1px;
}
.ai-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--t1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ai-icon-btn:hover { background: color-mix(in srgb, var(--t1) 6%, transparent); }
.ai-icon-btn.is-live {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.ai-send {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2f6fed;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(47, 111, 237, .28);
}
.ai-send:hover { filter: brightness(1.05); }
.ai-send:disabled {
  opacity: .35;
  cursor: default;
  filter: none;
}
.ai-root.is-review {
  position: absolute;
  inset: 0;
  padding: 16px 20px 18px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ai-review {
  flex: 1;
  min-height: 0;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(14, 20, 34, .08);
  overflow: hidden;
}
.ai-review-head {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--bd);
}
.ai-review-head-ico {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad);
  color: #fff;
}
.ai-review-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  color: var(--t1);
  letter-spacing: -.02em;
}
.ai-review-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--t3);
  line-height: 1.4;
}
.ai-review-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--t2);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.ai-review-close:hover { background: var(--surface-2); }
.ai-quote {
  margin: 0 20px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--t1) 4%, var(--surface-2));
  color: var(--t1);
  font-size: 13.5px;
  line-height: 1.45;
}
.ai-review-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-plan-card {
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 12px 14px 10px;
  background: var(--surface);
}
.ai-plan-card.is-off { opacity: .45; }
.ai-plan-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-plan-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--t1);
}
.ai-plan-name {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  background: color-mix(in srgb, var(--t1) 4%, var(--surface-2));
  color: var(--t1);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}
.ai-plan-name:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-faint);
}
.ai-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--t2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px 8px;
}
.ai-badge--ki {
  color: var(--accent);
  background: var(--accent-faint);
}
.ai-badge--exist {
  color: var(--green, #2f9e62);
  background: var(--green-bg, #e7f6ee);
}
.ai-areas {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0 24px;
}
.ai-area-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-area-row .ai-plan-name { font-weight: 550; height: 32px; font-size: 13.5px; }
.ai-ma {
  width: 72px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  background: color-mix(in srgb, var(--t1) 4%, var(--surface-2));
  color: var(--t1);
  font: inherit;
  font-size: 13px;
  text-align: right;
}
.ai-ma:focus { outline: none; box-shadow: 0 0 0 2px var(--accent-faint); }
.ai-add-line {
  margin: 6px 0 0 24px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.ai-add-line:hover { text-decoration: underline; }
.ai-note label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
  margin: 4px 0 6px;
}
.ai-note textarea {
  width: 100%;
  min-height: 72px;
  box-sizing: border-box;
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--t1) 3.5%, var(--surface));
  color: var(--t1);
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}
.ai-note textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.ai-review-foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--bd);
}
.ai-review-foot .proto-btn { height: 38px; }
.ai-review-foot .ai-apply { margin-left: auto; }
.ai-thinking {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--t1);
}
.ai-thinking strong { font-size: 16px; }
.ai-thinking span { font-size: 13px; color: var(--t3); }
.ai-dots {
  display: flex;
  gap: 6px;
}
.ai-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--t1);
  animation: ai-dot 1s ease-in-out infinite;
}
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
body.is-ai-dock .se-workspace--solo:has(.mm-wrap) {
  height: calc(100vh - 204px);
  max-height: calc(100vh - 204px);
}
body.is-ai-dock .doku-workspace .se-tree-panel,
body.is-ai-dock .doku-workspace .doku-main {
  min-height: calc(100vh - 220px);
  max-height: calc(100vh - 220px);
}
body.is-ai-review .app-module-layout {
  visibility: hidden;
}
.ai-simple-lead {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
}
.ai-picks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 1.5px solid var(--bd);
  border-radius: 16px;
  background: var(--surface);
  color: var(--t1);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ai-pick:hover { background: color-mix(in srgb, var(--t1) 4%, var(--surface)); }
.ai-pick.is-on {
  border-color: var(--t1);
  background: color-mix(in srgb, var(--t1) 6%, var(--surface));
}
.ai-pick-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--t2);
  position: relative;
}
.ai-pick.is-on .ai-pick-check {
  background: var(--t1);
  border-color: var(--t1);
}
.ai-pick.is-on .ai-pick-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ai-pick-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ai-pick-body strong {
  font-size: 15px;
  font-weight: 700;
}
.ai-pick-body span {
  font-size: 13px;
  color: var(--t2);
}
.ai-review--simple .ai-note label span {
  font-weight: 500;
  color: var(--t3);
}
.ai-review--simple .ai-review-foot .proto-btn {
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
}
.ai-root--gbu .ai-chip {
  height: 40px;
  padding: 0 16px;
  font-size: 13.5px;
}
.ai-root--gbu .ai-icon-btn,
.ai-root--gbu .ai-send {
  width: 42px;
  height: 42px;
}
.ai-root--gbu .ai-composer {
  padding: 12px 12px 12px 14px;
  border-radius: 24px;
}
.ai-root--gbu .ai-composer textarea { font-size: 16px; }
@media (max-width: 720px) {
  .ai-root { padding: 0 10px 10px; }
  .ai-root.is-review { padding: 8px; }
  .ai-chip { height: 40px; font-size: 13px; }
  .ai-review-foot .ai-apply { margin-left: 0; width: 100%; }
  .ai-review--simple .ai-review-foot {
    flex-direction: column-reverse;
  }
  .ai-review--simple .ai-review-foot .proto-btn { width: 100%; }
}

