/* SchnurPlan Desktop-Simulator — Theme exakt nach app/resources/styles.qss (Teal-Akzent),
   Layout/Details 1:1 nach den Referenz-Screenshots shots/*.webp. */

:root {
  /* Flächen / Text */
  --bg: #eaf0f6;
  --ink: #0d1420;
  --ink-2: #1c2532;
  --ink-3: #1f2b3f;
  --muted: #93a6bc;
  --muted-2: #7c8a9c;
  --card: #ffffff;
  --card-grad-b: #f4f8fb;
  --hair: #d5dee7;
  --hair-2: #e2e9f0;
  --field-border: #cdd3db;
  /* Teal-Akzent */
  --teal: #0aa892;
  --teal-h1: #0a9d8a;
  --teal-h2: #0a8f7e;
  --teal-press: #077e6c;
  --teal-lite: #0cc0ab;
  --teal-lite2: #34e7ce;
  --teal-soft-bd: #6ff0dc;
  --teal-soft-bg: #e9fdf9;
  --teal-soft-bg2: #f3f7fb;
  /* Signal */
  --orange: #ff7a3c;
  --orange-2: #ff9d68;
  --amber: #f5c518;
  --red: #e0432a;
  --violet: #8b5cf6;
  --green: #2fae66;
  --blue: #2f6bd8;
  --magenta: #d81b60;
  /* ===== SchnurSolutions Marken-Identität (Duotone: Grün = Marke/Live, Cyan = Interaktion) ===== */
  --brand: #4bc429;         /* echtes Marken-Grün des Kunden */
  --brand-lite: #5fd93f;
  --brand-deep: #37a01c;
  --brand-glow: rgba(75, 196, 41, .45);
  --brand-soft: rgba(75, 196, 41, .12);
  /* Graphit-Grund (Premium-Chrome) */
  --gr-1: #070b12;
  --gr-2: #0a0e16;
  --gr-3: #0d1420;
  --on-dark: #eaf1f9;
  --on-dark-mut: #9fb2c6;
  --hair-w: rgba(255, 255, 255, .07);
  --hair-w2: rgba(255, 255, 255, .13);
  /* Radien / Schatten */
  --r-btn: 11px;
  --r-tab: 9px;
  --r-field: 8px;
  --r-card: 11px;
  --shadow-1: 0 1px 2px rgba(20, 40, 70, .06);
  --shadow-2: 0 6px 20px rgba(20, 40, 70, .12);
  --shadow-pop: 0 18px 50px rgba(10, 20, 40, .28), 0 4px 14px rgba(10, 20, 40, .14);
  /* mehrschichtige, weiche Premium-Tiefe */
  --shadow-soft: 0 1px 2px rgba(8, 14, 24, .06), 0 10px 28px rgba(8, 14, 24, .10);
  --shadow-glass: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 30px rgba(6, 10, 18, .38);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* Basisschrift wächst sanft mit dem iframe (größerer Sim-Rahmen auf der
     Demo-Seite), bleibt aber im App-Look: 12.5px (schmal) … 14.5px (sehr breit).
     Buttons/Felder erben (font-size: inherit) und skalieren mit. */
  --fs: clamp(12.5px, 0.35vw + 9.5px, 14.5px);
  --font: "Segoe UI", Roboto, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
.app-root { height: 100%; }
.ico { display: inline-flex; align-items: center; justify-content: center; }
.ico svg { width: 1.15em; height: 1.15em; display: block; }
.muted { color: var(--muted); }
.spacer { flex: 1 1 auto; }

/* Icon-Farbklassen (bunte Ribbon-/Panel-Icons wie echte App) */
.ic-teal { color: var(--teal-h1); }
.ic-blue { color: var(--blue); }
.ic-amber { color: #dfa011; }
.ic-magenta { color: var(--magenta); }
.ic-red { color: var(--red); }
.ic-slate { color: #3f4e60; }
.ic-green { color: var(--green); }
.ic-orange { color: var(--orange); }

/* ===================================================== Shell-Layout */
.app-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  /* Spur darf NIE breiter als der Rahmen werden (sonst Seiten-Overflow) */
  grid-template-columns: minmax(0, 1fr);
  background: var(--bg);
  position: relative;
  min-width: 0;
}
.app-shell > * { min-width: 0; }

/* ===================================================== Titelzeile — Premium Graphit-Glas */
.titlebar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #101826 0%, var(--gr-3) 46%, var(--gr-2) 100%);
  border-bottom: 1px solid var(--hair-w);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 26px rgba(6, 10, 18, .30);
  position: relative; z-index: 20;
}
/* feine Marken-Duotone-Hairline unter der Titelleiste */
.titlebar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--brand) 0%, rgba(52, 231, 206, .55) 42%, transparent 78%); opacity: .55; pointer-events: none; }
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* Firmenlogo: die grüne SchnurSolutions-Bildmarke, prominent links neben „SchnurPlan" */
.tb-logo { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex: none; position: relative;
  background: radial-gradient(120% 120% at 30% 20%, #16202f, #0b1220) center/cover;
  background-image: url("/brand/schnur_solutions_mark_on_dark.png");
  background-size: 74%; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(75, 196, 41, .38), inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 14px rgba(75, 196, 41, .22);
}
/* sanfter Marken-Glow am „Molekül-S": statisch (kein Dauer-Pulsieren → keine Endlos-Composite-Last) */
.tb-logo::after { content: ""; position: absolute; inset: -2px; border-radius: 12px; box-shadow: 0 0 12px 1px var(--brand-glow); opacity: .42; pointer-events: none; }
.tb-logo-mark { display: none; }
.tb-title { font-weight: 800; font-size: 16px; color: var(--on-dark); letter-spacing: .3px; margin-right: 2px; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); position: relative; }
/* dezente Marken-Wortmarke als Eyebrow */
.tb-title::after { content: "SchnurSolutions"; position: absolute; left: 1px; top: 100%; margin-top: 1px; font-size: 8px; line-height: 1; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--brand-lite); text-shadow: none; white-space: nowrap; }
.tb-tools { display: flex; gap: 2px; margin: 0 6px; }
.tb-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--on-dark-mut); border-radius: 8px; transition: background .18s var(--ease), color .18s var(--ease); }
.tb-icon:hover { background: rgba(52, 231, 206, .14); color: var(--teal-lite2); }
.tb-icon svg { width: 18px; height: 18px; }
.tb-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tb-dot.g { background: var(--brand-lite); box-shadow: 0 0 8px var(--brand-glow); }
.tb-dot.o { background: var(--orange); box-shadow: 0 0 8px rgba(255, 122, 60, .5); }
.tb-dot.n { background: var(--on-dark-mut); }
.tb-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: 12px; border: 1px solid var(--hair-w2); background: rgba(255, 255, 255, .045); color: var(--on-dark); white-space: nowrap; }
.tb-pill.ok { border-color: rgba(75, 196, 41, .5); }
.tb-pill.warn { border-color: rgba(255, 122, 60, .5); }
.tb-center { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; padding: 0 8px; }
.tb-search { display: flex; align-items: center; gap: 8px; width: min(520px, 100%); padding: 8px 13px; background: rgba(255, 255, 255, .05); border: 1px solid var(--hair-w2); border-radius: 10px; color: var(--on-dark-mut); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); transition: border-color .18s var(--ease); }
.tb-search:hover { border-color: rgba(52, 231, 206, .4); }
.tb-search svg { width: 15px; height: 15px; color: var(--teal-lite2); }
.tb-search-ph { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.tb-avatar-wrap { position: relative; flex: none; display: inline-flex; }
.tb-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(150deg, #e0576f, #b8324c); color: #fff; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .4); }
.tb-presence { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-lite); border: 2px solid var(--gr-2); box-shadow: 0 0 6px var(--brand-glow); }
.tb-guard { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--hair-w2); background: rgba(255, 255, 255, .045); font-size: 12px; font-weight: 600; color: var(--on-dark); white-space: nowrap; }
.tb-account { display: flex; flex-direction: column; line-height: 1.15; padding: 3px 12px; border: 1px solid var(--hair-w2); border-radius: 9px; background: rgba(255, 255, 255, .045); }
.tb-acc-top { font-size: 10px; color: var(--on-dark-mut); }
.tb-acc-name { font-size: 12px; font-weight: 700; color: var(--on-dark); }
.tb-theme { display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 9px; border: 1px solid var(--hair-w2); background: rgba(255, 255, 255, .045); color: var(--on-dark); font-size: 12px; font-weight: 600; transition: border-color .18s var(--ease), background .18s var(--ease); }
.tb-theme:hover { border-color: rgba(52, 231, 206, .45); background: rgba(52, 231, 206, .12); }

/* Sprach-Umschalter (Flaggen als SVG — Windows kennt keine Emoji-Flaggen) */
.lang-switch { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 9px; border: 1px solid var(--hair-w2); background: rgba(255, 255, 255, .045); transition: border-color .18s var(--ease), background .18s var(--ease); }
.lang-btn:hover { border-color: rgba(52, 231, 206, .45); background: rgba(52, 231, 206, .12); }
.lang-flag { display: inline-flex; }
.lang-flag svg { width: 21px; height: 14px; border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.lang-code { font-weight: 700; font-size: 12px; color: var(--on-dark); }
.lang-caret svg { width: 13px; height: 13px; color: var(--on-dark-mut); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--hair); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 5px; z-index: 60; min-width: 132px; }
.lang-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: none; background: transparent; border-radius: 7px; font-weight: 600; color: var(--ink-3); }
.lang-item:hover { background: var(--teal-soft-bg); color: var(--teal-press); }
.lang-item.on { background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; }

/* ===================================================== Ribbon */
.ribbon { position: relative; background: linear-gradient(#ffffff, #eef3f8); border-bottom: none; box-shadow: 0 6px 16px rgba(20, 40, 70, .06); }
/* Marken-Duotone-Akzent (Grün → Cyan) statt flacher Teal-Linie */
.ribbon::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-lite) 14%, var(--teal-lite) 46%, var(--teal) 100%); }
.ribbon-tabbar { display: flex; align-items: center; gap: 8px; padding: 4px 10px 0; }
.ribbon-tabs { display: flex; gap: 2px; overflow: hidden; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.ribbon-tab { position: relative; padding: 7px 13px; border: none; background: transparent; border-radius: var(--r-tab) var(--r-tab) 0 0; color: var(--ink-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: flex-start; gap: 3px; }
.ribbon-tab > span:first-child { padding-top: 1px; }
.ribbon-tab:hover { background: var(--teal-soft-bg); color: var(--teal-press); }
.ribbon-tab.active { color: var(--teal-press); background: var(--teal-soft-bg); box-shadow: inset 0 -2px 0 var(--teal); }
.tab-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; transform: translateY(-4px); }
.ribbon-collapse { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; margin-bottom: 3px; border-radius: 999px; border: 1px solid transparent; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; font-size: 11.5px; font-weight: 600; flex: none; }
.ribbon-collapse:hover { background: linear-gradient(var(--teal-lite), var(--teal-h1)); }
.ribbon-collapse svg { width: 12px; height: 12px; }
.ribbon-collapse .collapse-ico { transition: transform .18s ease; }
.ribbon-collapse.collapsed .collapse-ico { transform: rotate(180deg); }

.ribbon-groups { display: flex; gap: 3px; padding: 8px 12px 10px; align-items: stretch; overflow-x: auto; scrollbar-width: none; position: relative; }
.ribbon-groups::-webkit-scrollbar { display: none; }
.ribbon-groups.slide > .rgroup { animation: slidein .22s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rgroup { display: flex; flex-direction: column; padding: 2px 7px 0; border-right: 1px solid var(--hair-2); }
.rgroup:last-of-type { border-right: none; }
.rgroup-body { display: flex; gap: 4px; flex: 1; align-items: stretch; padding-bottom: 3px; }
.rgroup-title { text-align: center; font-size: 10px; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; padding-top: 3px; white-space: nowrap; }
.ribbon-more { align-self: center; color: var(--muted); margin-left: auto; padding-left: 6px; flex: none; position: sticky; right: 0; background: linear-gradient(90deg, transparent, #f3f6fa 35%); }
.ribbon-more svg { width: 15px; height: 15px; }

.rbtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--hair); background: linear-gradient(#ffffff, #f4f8fb); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(20, 40, 70, .05); border-radius: var(--r-btn); color: var(--ink-3); padding: 8px 9px; min-width: 62px; transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease); }
.rbtn:hover { background: linear-gradient(#ffffff, var(--teal-soft-bg)); border-color: var(--teal-soft-bd); color: var(--teal-press); box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(10, 168, 146, .14); transform: translateY(-1px); }
/* Aktives Werkzeug (wie „Auswählen" im Screenshot): Teal-Umrandung + heller Verlauf */
.rbtn.active { border: 2px solid var(--teal); background: linear-gradient(#ffffff, var(--teal-soft-bg)); color: var(--ink-3); box-shadow: inset 0 1px 0 #fff; padding: 7px 8px; }
.rbtn.disabled, .rbtn:disabled { opacity: .45; }
.rbtn.big { min-width: 56px; padding-left: 5px; padding-right: 5px; }
.rbtn.big .rbtn-ico svg { width: 26px; height: 26px; }
.rbtn-ico svg { width: 24px; height: 24px; }
.rbtn-lbl { font-size: 10.5px; text-align: center; line-height: 1.15; max-width: 86px; }
.rbtn.sm { flex-direction: row; min-width: 0; padding: 4px 8px; gap: 7px; justify-content: flex-start; border-color: transparent; background: transparent; box-shadow: none; }
.rbtn.sm:hover { border-color: var(--teal-soft-bd); background: var(--teal-soft-bg); }
.rbtn-ico-sm svg { width: 15px; height: 15px; }
.rbtn-lbl-sm { font-size: 11.5px; white-space: nowrap; }
.rstack { display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.rstack3 { display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.rbtn.highlight { position: relative; border-color: var(--teal-soft-bd); background: linear-gradient(#ffffff, var(--teal-soft-bg)); }
.rbtn.highlight:hover { box-shadow: 0 0 0 2px var(--teal-soft-bd); }
.hl-badge { position: absolute; top: -6px; right: -6px; background: var(--amber); color: #4a3a00; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }

/* Schrift-Gruppe */
.rfont { display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.rfont-row { display: flex; gap: 4px; align-items: center; }
.rcombo { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 100px; padding: 5px 8px; background: #fff; border: 1px solid var(--field-border); border-radius: var(--r-field); color: var(--ink-3); }
.rcombo.lstyle { min-width: 84px; }
.rcombo-caret svg { width: 13px; height: 13px; color: var(--muted); }
.rstepper { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 60px; padding: 5px 8px; background: #fff; border: 1px solid var(--field-border); border-radius: var(--r-field); }
.rstep-txt { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.rstepper-btns svg { width: 13px; height: 13px; color: var(--muted); }
.fbtn { min-width: 24px; height: 25px; padding: 0 4px; border: 1px solid transparent; background: transparent; border-radius: 6px; color: var(--ink-2); font-size: 13px; }
.fbtn:hover { border-color: var(--teal-soft-bd); background: var(--teal-soft-bg); color: var(--teal-press); }
.fbtn.strong { font-weight: 800; } .fbtn.ital { font-style: italic; } .fbtn.und { text-decoration: underline; }
.fbtn.strike { text-decoration: line-through; }
.fbtn.hl { box-shadow: inset 0 -3px 0 #ff5a3c; font-weight: 600; }
.fbtn.col { box-shadow: inset 0 -3px 0 var(--teal); font-weight: 700; }

/* Objekt-Gruppe */
.robj { display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.robj-row { display: flex; align-items: center; gap: 4px; }
.robj-ico svg { width: 16px; height: 16px; }
.robj .rstepper { min-width: 0; }
.linestyles { display: flex; gap: 3px; align-items: center; }
.line-sample { width: 22px; height: 22px; border: 1px solid transparent; border-radius: 6px; background: transparent; position: relative; }
.line-sample::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 0; border-top: 2px solid var(--ink-3); }
.line-sample.ls-dash::after { border-top-style: dashed; }
.line-sample.ls-dot::after { border-top-style: dotted; }
.line-sample.ls-dashdot::after { border-image: none; border-top-style: dashed; }
.line-sample.active { border-color: var(--teal); background: #fff; width: 30px; }

/* ===================================================== Projekt-Kopfzeile */
.project-header { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--hair-2); }
.ph-field { display: flex; align-items: center; gap: 8px; }
.ph-field.grow { flex: 1 1 auto; min-width: 0; }
.ph-label { font-weight: 700; color: var(--ink-3); font-size: 13px; }
.combo { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 7px 11px; background: #fff; border: 1px solid var(--field-border); border-radius: var(--r-field); min-width: 190px; max-width: 320px; color: var(--ink-3); }
.ph-field.grow .combo { width: 100%; max-width: none; }
.combo-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.combo-caret svg { width: 14px; height: 14px; color: var(--muted); }
.combo.select { padding-right: 8px; }
.combo-native { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }

.backbar-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 10px; border: 1px solid var(--teal-soft-bd); background: var(--teal-soft-bg); color: var(--teal-press); font-weight: 700; }
.backbar-btn:hover { background: #ddfcf5; }
.backbar-btn svg { width: 15px; height: 15px; }

/* ===================================================== Workbench / Baum */
.workbench { display: flex; min-height: 0; overflow: hidden; }
.tree-panel { width: 236px; flex: none; background: linear-gradient(#ffffff, #fbfdff); border-right: 1px solid var(--hair); display: flex; flex-direction: column; overflow: hidden; }
.tree-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--hair-2); }
.tree-title { font-weight: 700; color: var(--ink-3); }
.tree-head-icons { display: flex; gap: 2px; }
.tree-hicon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--muted); border-radius: 6px; }
.tree-hicon:hover { background: var(--teal-soft-bg); color: var(--teal-press); }
.tree-hicon svg { width: 14px; height: 14px; }
.tree-crumb { display: flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--teal-press); font-weight: 700; }
.crumb-back svg { width: 15px; height: 15px; }
.tree-body { flex: 1; overflow-y: auto; padding: 4px 6px 12px; }
.tree-row { display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 7px; color: var(--ink-2); user-select: none; }
.tree-row:hover { background: var(--teal-soft-bg2); }
.tree-row.active { background: var(--teal-soft-bg); color: var(--teal-press); font-weight: 600; }
.tree-caret { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: transform .16s ease; flex: none; }
.tree-caret.open { transform: rotate(90deg); }
.tree-caret svg { width: 13px; height: 13px; }
.tree-caret-sp { width: 16px; flex: none; }
.tree-ficon { color: #e8a33d; flex: none; }
.tree-ficon svg { width: 16px; height: 16px; }
.tree-ficon.pin { color: var(--orange); }
.tree-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-kids { margin-left: 14px; border-left: 1px solid var(--hair-2); padding-left: 2px; }
.tree-row.leaf.file .tree-ficon { color: var(--teal-h1); }
.tree-ficon.ficon-trash { color: var(--red); }
.tree-ficon.ficon-db { color: #4a7dbd; }
.tree-ficon.ficon-doc { color: var(--muted-2); }
.tree-ficon.ficon-plan { color: var(--teal-h1); }

/* ===================================================== Main-Spalte */
.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.main-area { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; }
.plan-area { gap: 0; }
.full-area { overflow: auto; padding: 0; }
.card { background: linear-gradient(#ffffff, var(--card-grad-b)); border: 1px solid var(--hair); border-radius: var(--r-card); box-shadow: var(--shadow-1); }

/* Canvas — flache Zeichenfläche mit Blatt-Schatten (wie QGraphicsView) */
.canvas-host { flex: 1 1 auto; min-width: 0; position: relative; }
/* Blueprint-Arbeitsfläche: feines Raster + weiche Vignette (wirkt wie ein echtes CAD-Fenster) */
.canvas-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(140% 140% at 50% 120%, rgba(10, 20, 40, .10), transparent 55%),
    linear-gradient(0deg, rgba(75, 196, 41, .028), rgba(75, 196, 41, .028)),
    linear-gradient(#eef3f9, #dfe6ef);
}
/* Raster-Ebene (dekorativ, unter dem Blatt) */
.canvas-viewport::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(52, 231, 206, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 231, 206, .10) 1px, transparent 1px),
    linear-gradient(rgba(20, 40, 70, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 40, 70, .05) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
}
/* dezentes Marken-Wasserzeichen (grünes „S") unten rechts */
.canvas-viewport::after { content: ""; position: absolute; right: 18px; bottom: 30px; width: 116px; height: 116px; z-index: 0; pointer-events: none; opacity: .06;
  background: url("/brand/schnur_solutions_mark_on_light.png") center/contain no-repeat; }
.canvas-viewport[data-tool="hand"] { cursor: grab; }
.canvas-viewport[data-tool="pin"] { cursor: crosshair; }
.canvas-viewport[data-tool="loupe"] { cursor: zoom-in; }
.canvas-viewport.grabbing { cursor: grabbing; }
.canvas-sheet { position: absolute; left: 0; top: 0; transform-origin: 0 0; z-index: 1; background: #fff;
  box-shadow: 0 1px 1px rgba(20, 40, 70, .10), 0 8px 22px rgba(20, 40, 70, .16), 0 26px 60px rgba(15, 30, 55, .20), 0 0 0 1px rgba(20, 40, 70, .07); }
.plan-svg { width: 100%; height: 100%; display: block; }
.plan-image { user-select: none; -webkit-user-drag: none; }
.canvas-pins { position: absolute; inset: 0; pointer-events: none; }
.canvas-preview-banner { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; background: rgba(13,20,32,.86); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 600; z-index: 5; box-shadow: var(--shadow-2); }
.canvas-preview-banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
/* dekorative Scrollbalken (nur Optik) */
.canvas-scroll { position: absolute; pointer-events: none; z-index: 4; }
.canvas-scroll.v { top: 2px; right: 2px; bottom: 14px; width: 9px; }
.canvas-scroll.h { left: 2px; right: 14px; bottom: 2px; height: 9px; }
.canvas-scroll-thumb { position: absolute; background: #c3ceda; border-radius: 999px; }
.canvas-scroll.v .canvas-scroll-thumb { width: 100%; left: 0; }
.canvas-scroll.h .canvas-scroll-thumb { height: 100%; top: 0; }

/* Pins — orangefarbener Label-Chip mit Zeigespitze und Glüh-Halo (wie echte App) */
.pin-marker { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; border: none; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.pin-marker .pin-label { white-space: nowrap; background: linear-gradient(var(--pin, #f5a623), #e8940d); color: #fff; font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 10px; border: 1px solid rgba(160, 96, 0, .55); box-shadow: 0 0 0 3px rgba(245, 166, 35, .28), 0 3px 7px rgba(20, 40, 70, .3); text-shadow: 0 1px 1px rgba(120, 70, 0, .35); }
.pin-marker .pin-tail { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 10px solid #e8940d; margin-top: -1px; filter: drop-shadow(0 2px 2px rgba(20,40,70,.25)); }
.pin-marker.has-pano .pin-label { box-shadow: 0 0 0 3px rgba(10, 168, 146, .35), 0 3px 7px rgba(20, 40, 70, .3); }
.pin-marker.sel .pin-label { box-shadow: 0 0 0 4px rgba(245, 166, 35, .5), 0 0 18px 4px rgba(245, 166, 35, .45), 0 3px 7px rgba(20,40,70,.3); }
.pin-marker:hover { z-index: 6; }
.pin-marker:hover .pin-label { box-shadow: 0 0 0 4px rgba(245, 166, 35, .45), 0 3px 9px rgba(20,40,70,.35); }
.pin-marker:focus-visible { outline: none; }
.pin-marker:focus-visible .pin-label { box-shadow: 0 0 0 4px rgba(10,168,146,.5); }
.pin-marker.dropping { animation: pindrop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pindrop { 0% { transform: translate(-50%, -180%); opacity: 0; } 60% { transform: translate(-50%, -92%); opacity: 1; } 80% { transform: translate(-50%, -104%); } 100% { transform: translate(-50%, -100%); } }

/* ===================================================== Kontext-Panel: To-do erstellen */
.ctx-panel { width: 322px; flex: none; background: linear-gradient(#ffffff, var(--card-grad-b)); border-left: 1px solid var(--hair); display: flex; flex-direction: column; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid var(--hair-2); }
.panel-head h3 { margin: 0; font-size: 15px; color: var(--ink-3); }
.panel-head .panel-title-teal { color: var(--teal-h1); }
.panel-chevron { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.panel-chevron svg { width: 14px; height: 14px; }
.panel-scroll { flex: 1; overflow-y: auto; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 11px; }
.form-row { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 9px; }
.form-row:has(.task-wrap) { align-items: start; }
.form-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.form-controls { display: flex; align-items: center; gap: 6px; min-width: 0; }
.form-controls .fld-combo { flex: 1 1 auto; min-width: 0; }
.fld-select, .fld-area { width: 100%; padding: 7px 9px; border: 1px solid var(--field-border); border-radius: var(--r-field); background: #fff; color: var(--ink-3); font-family: inherit; font-size: 12px; }
.fld-area { resize: none; }
.fld-area.big { min-height: 108px; }
.task-wrap { position: relative; display: flex; }
.task-wrap .mini-ico-btn { position: absolute; right: 4px; top: 4px; }
/* Fake-Combo (sieht aus wie natives Select; Attrappe) */
.fld-combo { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 9px; border: 1px solid var(--field-border); border-radius: var(--r-field); background: #fff; color: var(--ink-3); font-size: 12px; cursor: pointer; }
.fld-combo:hover { border-color: var(--teal-soft-bd); }
.fld-combo-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fld-combo-caret svg { width: 13px; height: 13px; color: var(--muted); }
.fld-combo.date { width: auto; min-width: 104px; flex: none; }
.fld-combo.mini { padding: 4px 7px; font-size: 11.5px; }
.fld-combo.sm { width: auto; min-width: 88px; }
.fld-combo.grow { flex: 1 1 0; width: auto; }
.mini-ico-btn { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--hair); background: #fff; color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mini-ico-btn:hover { border-color: var(--teal-soft-bd); background: var(--teal-soft-bg); }
.mini-ico-btn svg { width: 14px; height: 14px; }
.ico-cluster { display: inline-flex; gap: 4px; flex: none; }
.due-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.due-txt { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chk { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--field-border); background: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chk.on { background: linear-gradient(var(--teal-h1), var(--teal-h2)); border-color: transparent; color: #fff; }
.chk svg { width: 12px; height: 12px; }
.chk-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); cursor: pointer; }
.risk-head { margin: 5px 0 0; font-size: 13px; color: var(--teal-h1); }
.attach-head { margin: 5px 0 0; font-size: 13px; color: var(--ink-2); }
/* Anhänge-Ablagefeld: gefüllte, gestrichelte Dropzone statt leerer weißer Fläche */
.attach-box { min-height: 96px; border: 1.5px dashed var(--field-border); border-radius: 9px; background: linear-gradient(#ffffff, var(--teal-soft-bg2)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center; }
.attach-box .attach-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-soft-bg); color: var(--teal-h1); display: inline-flex; align-items: center; justify-content: center; }
.attach-box .attach-ico svg { width: 18px; height: 18px; }
.attach-box .attach-hint { font-size: 12px; color: var(--muted-2); font-weight: 600; line-height: 1.35; }
.attach-box .attach-types { display: inline-flex; gap: 5px; margin-top: 1px; }
.attach-box .attach-chip { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--muted-2); border: 1px solid var(--hair); border-radius: 999px; padding: 2px 8px; background: #fff; }
.attach-row { display: flex; align-items: center; gap: 6px; }
.btn-ghost { padding: 8px 12px; border-radius: 9px; border: 1px solid var(--hair); background: #fff; color: var(--ink-3); font-weight: 600; display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.btn-ghost:hover { border-color: var(--teal-soft-bd); background: var(--teal-soft-bg); color: var(--teal-press); }
.btn-ghost svg { width: 15px; height: 15px; }
.btn-ghost.sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost.grow { flex: 1 1 auto; min-width: 0; }
.btn-ghost.strong { font-weight: 700; padding: 10px 12px; }
.btn-primary { padding: 10px 14px; border-radius: 10px; border: none; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; font-weight: 700; }
.btn-primary:hover { background: linear-gradient(var(--teal-lite), var(--teal-h1)); }
.wide { width: 100%; }
.btn-teal { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: none; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; font-weight: 700; }
.btn-teal:hover { background: linear-gradient(var(--teal-lite), var(--teal-h1)); }
.btn-teal svg { width: 15px; height: 15px; }
.audio-hint { text-align: right; font-size: 11.5px; color: var(--ink-2); padding-top: 2px; }

/* Attrappen-Kennzeichnung (dezent) */
.is-dummy { cursor: pointer; }

/* ===================================================== Pin-Detail */
.pin-area { gap: 0; }
.pin-card { width: 300px; flex: none; border-right: 1px solid var(--hair); background: linear-gradient(#ffffff, var(--card-grad-b)); padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; }
.pin-card-head { display: flex; align-items: center; gap: 10px; }
.pin-card-head h3 { margin: 0; font-size: 16px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.round-btn { width: 34px; height: 34px; border-radius: 50%; border: none; display: inline-flex; align-items: center; justify-content: center; background: #eef2f7; color: var(--ink-3); flex: none; }
.round-btn.teal { background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; }
.round-btn.sm { width: 26px; height: 26px; }
.round-btn svg { width: 16px; height: 16px; }
.collapse { border: 1px solid var(--hair); border-radius: 10px; padding: 10px; background: #fff; }
.collapse-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; }
.collapse-head.slim { margin-bottom: 0; cursor: pointer; }
.note-block .note-text { margin: 10px 0 0; color: var(--ink-2); line-height: 1.5; }
.note-chev svg { transition: transform .16s ease; }
.note-chev { transform: rotate(90deg); }
.note-chev.collapsed { transform: rotate(0deg); }
.mini-plan { position: relative; height: 148px; border-radius: 8px; overflow: hidden; border: 1px solid var(--hair-2); background: #f7f9fc; }
.mini-plan svg { width: 100%; height: 100%; }
.mini-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--pin, #f5a623); border: 2px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(245,166,35,.3), 0 1px 4px rgba(20,40,70,.3); }
.mini-tools { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.mini-tool { width: 36px; height: 30px; border-radius: 8px; border: 1px solid var(--hair); background: #fff; color: var(--teal-h1); display: inline-flex; align-items: center; justify-content: center; }
.mini-tool:hover { border-color: var(--teal-soft-bd); color: var(--teal-press); background: var(--teal-soft-bg); }
.mini-tool svg { width: 15px; height: 15px; }
.pin-nav-row { display: flex; gap: 6px; }
.pin-nav-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--hair); background: #fff; color: var(--ink-3); font-weight: 600; font-size: 12px; min-width: 0; flex: 1 1 0; justify-content: center; }
.pin-nav-btn:hover { border-color: var(--teal-soft-bd); background: var(--teal-soft-bg); color: var(--teal-press); }
.pin-nav-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 64px; }
.pin-nav-arrow { flex: none; }
/* Medien-Typ-Tabelle */
.typ-table { border: 1px solid var(--hair-2); border-radius: 9px; overflow: hidden; background: #fff; }
.typ-row { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--hair-2); min-height: 34px; }
.typ-row:last-child { border-bottom: none; }
.typ-head { background: #eef2f6; color: var(--muted-2); font-weight: 700; font-size: 12px; }
.typ-c1 { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.typ-c2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.typ-a { font-weight: 700; color: #dfa011; font-size: 15px; padding-left: 2px; }
.typ-caret svg { width: 12px; height: 12px; color: var(--muted); }
.typ-thumb { width: 52px; height: 34px; border-radius: 5px; display: block; }
.src-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.src-btn { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 9px; border: 1px solid var(--teal-soft-bd); background: var(--teal-soft-bg2); color: var(--ink-3); font-weight: 600; min-width: 0; }
.src-btn > span:not(.ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-btn:hover { background: var(--teal-soft-bg); color: var(--teal-press); }
.src-btn svg { width: 17px; height: 17px; }
.src-btn .src-caret { margin-left: auto; }
.src-btn .src-caret svg { width: 13px; height: 13px; color: var(--muted); }
.pin-mini-row { display: flex; gap: 6px; }
.pin-mini-row .mini-ico-btn { width: 44px; height: 30px; }
/* Verlaufs-Button teal→blau (wie echte App) */
.todo-overview-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; border: none; background: linear-gradient(90deg, #0a9d8a, #2f6bd8); color: #fff; font-weight: 700; font-size: 14px; margin-top: auto; }
.todo-overview-btn:hover { filter: brightness(1.07); }
.todo-overview-btn svg { width: 16px; height: 16px; }

.pin-center { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.gallery { display: flex; flex-direction: column; gap: 8px; }
.gallery-main { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--hair); background: #fff; box-shadow: var(--shadow-1); }
.gallery-img { width: 100%; height: 380px; cursor: zoom-in; position: relative; }
.gallery-img .photo-canvas, .gallery-img .photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-empty { height: 380px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.gallery-cap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: linear-gradient(#ffffff, var(--card-grad-b)); border-top: 1px solid var(--hair-2); }
.gallery-cap > span { font-weight: 600; color: var(--ink-3); }
.gallery-cap-actions { display: flex; gap: 8px; }
.cap-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--hair); background: #fff; color: var(--ink-3); font-weight: 600; }
.cap-btn:hover { border-color: var(--teal-soft-bd); color: var(--teal-press); background: var(--teal-soft-bg); }
.cap-btn svg { width: 15px; height: 15px; }
.cap-btn.primary { background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; border-color: transparent; }
.cap-btn.primary svg { color: #fff; }
.preview-tag { position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(13,20,32,.82); color: #fff; font-size: 11px; font-weight: 600; }
.gallery-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 96px; height: 62px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #fff; padding: 0; }
.thumb.sel { border-color: var(--teal); }
.thumb .photo-canvas, .thumb .photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.todo-section { border: 1px solid var(--hair); border-radius: 12px; background: #fff; padding: 12px; box-shadow: var(--shadow-1); }
.todo-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.todo-sec-head h3 { margin: 0; font-size: 19px; color: var(--ink-3); font-weight: 800; }
.open-pill { background: var(--orange); color: #fff; font-weight: 700; padding: 7px 13px; border-radius: 9px; font-size: 13px; white-space: nowrap; }
.open-pill.big { font-size: 14px; padding: 8px 14px; }
.empty-hint { color: var(--muted); padding: 18px; text-align: center; }

/* To-do-Tabellen (Pin + Zentrale) — horizontal scrollbar wie echte App, nichts wird geclippt */
.todo-table, .tz-table { display: flex; flex-direction: column; font-size: 13px; overflow-x: auto; }
.todo-table > .tt-row { min-width: 640px; }
.tz-table > .tzt-row { min-width: 660px; }
.todo-table::-webkit-scrollbar, .tz-table::-webkit-scrollbar { height: 10px; }
.tt-row, .tzt-row { display: grid; grid-template-columns: 44px 64px 104px 100px 104px 148px 1fr; align-items: center; gap: 8px; padding: 8px 8px; border-bottom: 1px solid var(--hair-2); }
.tt-head, .tzt-head { color: var(--muted-2); font-weight: 700; font-size: 12px; background: #eef2f6; border-radius: 8px 8px 0 0; }
.tt-row:not(.tt-head):not(.filter-row):hover, .tzt-row:not(.tzt-head):not(.filter-row):hover { background: var(--teal-soft-bg2); }
.tt-row.rowopen, .tzt-row.rowopen { box-shadow: inset 3px 0 0 var(--orange); }
.tt-row.rowdone, .tzt-row.rowdone { box-shadow: inset 3px 0 0 var(--green); }
/* Filterzeile: Eingabe + „Alle"-Dropdowns */
.filter-row { background: #fbfcfe; padding-top: 5px; padding-bottom: 5px; }
.flt-input { display: block; height: 26px; border: 1px solid var(--field-border); border-radius: 7px; background: #fff; cursor: text; }
.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-high { background: var(--orange); } .pill-normal { background: var(--teal-h1); } .pill-low { background: #9aa6b3; }
.pill-check { background: #2492c9; } .pill-rework { background: var(--violet); } .pill-defect { background: #d92b2b; } .pill-general { background: #6b7a8c; }
/* Personen-Pille: solide Farbe, weiße Schrift (wie todos@2x) */
.person-pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--pc, var(--teal-h1)); color: #fff; font-weight: 700; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================================================== To-do-Zentrale */
.tz-view { padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: min-content; }
.tz-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tz-title { margin: 0; font-size: 26px; color: var(--ink); font-weight: 800; }
.tz-search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; padding: 9px 13px; background: #fff; border: 1px solid var(--field-border); border-radius: 10px; color: var(--muted); }
.tz-search svg { width: 15px; height: 15px; }
.tz-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.tz-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--hair); font-weight: 600; color: var(--ink-3); }
.tz-chip:hover { border-color: var(--teal-soft-bd); background: var(--teal-soft-bg); }
.tz-chip-n { color: var(--muted); font-weight: 700; }
.tz-mid { display: flex; gap: 14px; align-items: flex-start; }
.tz-tablecard { flex: 1 1 auto; min-width: 0; overflow: hidden; padding: 6px; }
.tz-mid .ctx-panel { border-radius: var(--r-card); border: 1px solid var(--hair); }
.tzt-row { grid-template-columns: 44px 64px 104px 100px 110px 158px 1fr; }
.stats-block { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.stats-head { display: flex; align-items: center; gap: 10px; }
.stats-head h3 { margin: 0; color: var(--ink-3); font-size: 17px; }
.stats-summary { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.stats-filter { display: flex; align-items: center; gap: 10px; }
.stats-filter-lbl { font-weight: 700; color: var(--ink-3); flex: none; }
.stats-range { display: flex; align-items: center; gap: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { border: 1px solid var(--hair); border-left-width: 4px; border-radius: 10px; padding: 12px 14px; background: #fff; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-card.span2 { grid-column: span 2; }
.stat-label { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--ink); }
.stat-value.md { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat-sub.up-red { color: var(--red); }
.stat-sub.up-green { color: var(--green); }
.stat-card.t-teal { border-left-color: var(--teal); } .stat-card.t-teal .stat-value { color: var(--teal-press); }
.stat-card.t-green { border-left-color: var(--green); } .stat-card.t-green .stat-value { color: var(--green); }
.stat-card.t-orange { border-left-color: var(--orange); } .stat-card.t-orange .stat-value { color: #c75415; }
.stat-card.t-amber { border-left-color: var(--amber); }
.stat-card.t-violet { border-left-color: var(--violet); } .stat-card.t-violet .stat-value { color: var(--violet); }
.stat-card.t-red { border-left-color: var(--red); } .stat-card.t-red .stat-value { color: var(--red); }
/* Fälligkeits-Zeitleiste */
.tz-timeline { display: flex; flex-direction: column; gap: 8px; }
.stats-strip-head { display: flex; align-items: center; gap: 10px; }
.tz-subhead { margin: 6px 0 0; font-size: 13.5px; color: var(--teal-press); }
.tl-row { display: flex; align-items: center; gap: 10px; }
.tl-label { width: 150px; flex: none; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; flex: 1; height: 44px; }
.tl-ticks { position: absolute; inset: 0 0 auto 0; height: 16px; }
.tl-tick { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.tl-tick:nth-child(2n) { display: none; }
.tl-lane { position: absolute; left: 0; right: 0; top: 26px; height: 2px; background: var(--hair-2); }
.tl-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 9px; height: 9px; border-radius: 50%; }
.tl-dot.open { background: #d9534f; }
.tl-dot.done { background: var(--green); }
.tl-today { position: absolute; top: -12px; bottom: -8px; width: 0; border-left: 2px dashed #d9534f; }
.tz-legend { display: flex; align-items: center; gap: 7px; }
.tz-leg-dot { width: 9px; height: 9px; border-radius: 50%; }
.tz-leg-dot.teal { background: var(--teal); }
.tz-leg-dot.green { background: var(--green); }
.tz-leg-txt { font-size: 11.5px; color: var(--muted-2); margin-right: 8px; }

/* ===================================================== Dock-Panels (Chat / Kalender) */
.dock-panel { flex: none; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--hair); background: var(--bg); overflow: hidden; }
.chat-dock { width: clamp(420px, 42vw, 620px); }
.cal-dock { width: clamp(460px, 54vw, 800px); }
.dock-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--hair-2); background: var(--bg); }
.dock-title { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.dock-hicon { width: 24px; height: 24px; border: none; background: transparent; color: var(--muted); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.dock-hicon:hover { background: var(--teal-soft-bg); color: var(--teal-press); }
.dock-hicon svg { width: 13px; height: 13px; }
.dock-body { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; }

/* ===================================================== Chat (im Dock) */
.chat-cols { display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; background: #fff; }
.chat-left { width: 252px; flex: none; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--hair-2); }
.chat-left-head { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 19px; padding: 12px 14px 6px; color: var(--ink); }
.chat-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.chat-search { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--field-border); color: var(--muted); margin-bottom: 6px; font-size: 12px; }
.chat-search svg { width: 14px; height: 14px; flex: none; }
.chat-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sec { display: flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; padding: 10px 4px 4px; }
.chat-sec-caret svg { width: 11px; height: 11px; }
.conv-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: none; background: transparent; width: 100%; text-align: left; }
.conv-item:hover { background: var(--teal-soft-bg2); }
.conv-item.active { background: var(--teal-soft-bg); }
.avatar { border-radius: 50%; background: var(--pc, var(--teal-h1)); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar.xs { width: 26px; height: 26px; font-size: 10px; }
.avatar.hash { background: #8a97a6; }
.conv-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv-name { font-weight: 700; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-prev { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.chat-list-sp { flex: 1 1 auto; }
.chat-archive { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: none; background: transparent; border-radius: 9px; color: var(--muted-2); font-weight: 600; width: 100%; text-align: left; }
.chat-archive:hover { background: var(--teal-soft-bg2); color: var(--ink-3); }
.chat-archive svg { width: 15px; height: 15px; }
.chat-right { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--hair-2); }
.thread-head strong { color: var(--ink-3); font-size: 15px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent; color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn:hover { background: var(--teal-soft-bg); color: var(--teal-press); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.thread-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.day-sep { align-self: center; background: #eef2f6; color: var(--muted-2); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 8px; }
.msg { display: flex; gap: 8px; max-width: 78%; }
.msg.theirs { align-self: flex-start; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg.mine .msg-meta { flex-direction: row-reverse; }
.msg-who { font-weight: 700; font-size: 12px; color: var(--ink-3); }
.msg-time { font-size: 11px; color: var(--muted); }
.bubble { padding: 10px 13px; border-radius: 14px; line-height: 1.45; background: #eef2f6; color: var(--ink-2); }
.msg.mine .bubble { background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs .bubble { border-bottom-left-radius: 4px; }
.chan-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.chan-empty svg { width: 34px; height: 34px; color: var(--teal-soft-bd); }
.thread-input { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--hair-2); }
.input-fake { padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--field-border); color: var(--muted); cursor: text; }
.thread-input-actions { display: flex; align-items: center; gap: 2px; }
.send-btn { width: 38px; height: 38px; border-radius: 50%; border: none; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.send-btn:hover { background: linear-gradient(var(--teal-lite), var(--teal-h1)); }
.send-btn svg { width: 17px; height: 17px; }

/* ===================================================== Kalender (im Dock) */
.cal-view { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; padding: 10px 12px 12px; gap: 10px; background: #fff; }
.cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-range { font-size: 17px; font-weight: 800; color: var(--ink); margin-left: 2px; white-space: nowrap; }
.cal-views { display: flex; gap: 2px; }
.cal-vbtn { padding: 7px 10px; border-radius: 8px; border: none; background: transparent; color: var(--muted-2); font-weight: 600; white-space: nowrap; }
.cal-vbtn:hover { background: var(--teal-soft-bg2); color: var(--ink-3); }
.cal-vbtn.active { color: #b58900; font-weight: 700; }
.cal-scroll { flex: 1; overflow: auto; min-height: 0; }
.cal-grid { min-width: 520px; }
.cal-bodygrid { display: grid; grid-template-columns: 52px repeat(7, 1fr); }
.cal-timecol { display: flex; flex-direction: column; position: relative; }
.cal-time { font-size: 11px; color: var(--muted); text-align: right; padding: 0 8px 0 0; border-right: 1px solid var(--hair-2); transform: translateY(-6px); flex: none; }
.cal-now-label { position: absolute; right: 8px; transform: translateY(-14px); color: #e03e3e; font-size: 11px; font-weight: 700; background: #fff; }
.cal-daycol { position: relative; border-right: 1px solid var(--hair-2); }
.cal-daycol:last-child { border-right: none; }
.cal-slot { border-bottom: 1px solid var(--hair-2); }
.cal-event { position: absolute; left: 3px; right: 3px; border-radius: 9px; padding: 7px 9px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; box-shadow: var(--shadow-1); border-left: 4px solid; cursor: pointer; }
.cal-ev-title { font-size: 12px; font-weight: 700; line-height: 1.25; }
.cal-ev-time { font-size: 11px; opacity: .85; }
.cal-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #e03e3e; z-index: 2; }
.cal-now-dot { position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #e03e3e; }
.tone-teal { background: #e2f7f2; border-left-color: var(--teal); color: #0a6f60; }
.tone-green { background: #e6f6ec; border-left-color: var(--green); color: #1f7a48; }
.tone-mint { background: #e9fdf9; border-left-color: var(--teal-lite); color: #0a6f60; }
.tone-orange { background: #fdeedd; border-left-color: #e8963c; color: #9c5c14; }
.tone-red { background: #fbe4e6; border-left-color: #e06c75; color: #a33440; }
.tone-violet { background: #f0ebfd; border-left-color: var(--violet); color: #6b46c1; }

/* ===================================================== Placeholder */
.placeholder-view { display: flex; align-items: center; justify-content: center; padding: 40px; height: 100%; }
.placeholder-card { max-width: 420px; text-align: center; padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ph-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--teal-soft-bg); color: var(--teal-h1); display: inline-flex; align-items: center; justify-content: center; }
.ph-icon svg { width: 32px; height: 32px; }
.placeholder-card h2 { margin: 0; color: var(--ink); }
.placeholder-card p { margin: 0; color: var(--muted-2); line-height: 1.55; }
.ph-badge { padding: 6px 14px; border-radius: 999px; background: var(--amber); color: #4a3a00; font-weight: 700; font-size: 12px; }

/* ===================================================== Statusleiste — Graphit-Bookend */
.statusbar { position: relative; display: flex; align-items: center; justify-content: center; padding: 7px 14px; background: linear-gradient(180deg, var(--gr-2), var(--gr-1)); border-top: 1px solid var(--hair-w); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 -6px 20px rgba(6, 10, 18, .22); font-size: 12px; color: var(--on-dark-mut); overflow: hidden; z-index: 20; }
.sb-center { display: flex; align-items: center; gap: 16px; min-width: 0; overflow: hidden; padding-right: 170px; }
.sb-seg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.sb-path { color: rgba(159, 178, 198, .68); max-width: 300px; flex: 0 1 auto; }
.sb-local { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--on-dark); background: transparent; }
.sb-local-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-lite); box-shadow: 0 0 8px var(--brand-glow); }

/* ===================================================== Demo-Badge + Aktionen */
.demo-badge { position: absolute; left: 14px; bottom: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: linear-gradient(180deg, rgba(16, 24, 38, .92), rgba(10, 14, 22, .92)); color: #fff; font-size: 11px; letter-spacing: .3px; border: 1px solid var(--hair-w2); box-shadow: var(--shadow-glass); z-index: 40; pointer-events: none; }
.demo-badge strong { font-weight: 800; letter-spacing: 1px; }
.demo-badge-sub { color: var(--brand-lite); font-weight: 600; }
.demo-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-lite); box-shadow: 0 0 8px var(--brand-glow); }
.demo-actions { position: absolute; right: 16px; bottom: 40px; display: flex; gap: 10px; z-index: 40; }
.demo-reset { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--hair); background: rgba(255,255,255,.96); color: var(--ink-3); font-weight: 600; box-shadow: var(--shadow-soft); transition: border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
.demo-reset:hover { border-color: var(--teal-soft-bd); color: var(--teal-press); transform: translateY(-1px); }
.demo-reset svg { width: 15px; height: 15px; }
/* Primärer Conversion-CTA = Marken-Moment: Grün → Cyan Duotone mit Marken-Glow */
.demo-cta { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: 999px; border: none; background: linear-gradient(120deg, var(--brand) 0%, var(--brand-lite) 32%, var(--teal-lite) 100%); color: #04140a; font-weight: 800; box-shadow: 0 8px 24px rgba(75, 196, 41, .4), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease); }
.demo-cta:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 12px 30px rgba(75, 196, 41, .5), inset 0 1px 0 rgba(255, 255, 255, .4); }
.demo-cta svg { width: 15px; height: 15px; }

/* ===================================================== Toast / vf-Popover / Modal / Lightbox */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; }
.toast { display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 12px; background: rgba(13,20,32,.94); color: #fff; box-shadow: var(--shadow-pop); font-weight: 600; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; max-width: 90vw; }
.toast.in { opacity: 1; transform: none; }
.toast svg { width: 16px; height: 16px; }
.toast-ok svg { color: var(--teal-lite2); }

.vf-pop { position: fixed; z-index: 210; width: 268px; background: #fff; border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 14px; opacity: 0; transform: scale(.96); transition: opacity .16s, transform .16s; }
.vf-pop.in { opacity: 1; transform: none; }
.vf-row { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.vf-ico { color: var(--teal-h1); } .vf-ico svg { width: 18px; height: 18px; }
.vf-sub { margin: 8px 0 12px; color: var(--muted-2); font-size: 12px; line-height: 1.5; }
.vf-cta { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 9px; border: none; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; font-weight: 700; }
.vf-cta svg { width: 14px; height: 14px; }

.sheet-overlay, .lb-overlay, .pano-overlay, .sample-overlay, .ob-layer { position: fixed; inset: 0; z-index: 300; }
.sheet-overlay { background: rgba(13,20,32,.42); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .18s; }
.sheet-overlay.in { opacity: 1; }
.sheet-card { width: min(440px, 92vw); background: #fff; border-radius: 16px; box-shadow: var(--shadow-pop); padding: 22px; transform: scale(.96); transition: transform .18s; }
.sheet-overlay.in .sheet-card { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--teal-soft-bg); color: var(--teal-h1); display: inline-flex; align-items: center; justify-content: center; }
.sheet-head h3 { margin: 0; color: var(--ink); }
.sheet-body { color: var(--muted-2); line-height: 1.55; margin: 0 0 16px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; }
.sheet-btn { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--hair); background: #fff; color: var(--ink-3); font-weight: 600; }
.sheet-btn:hover { border-color: var(--teal-soft-bd); color: var(--teal-press); }
.sheet-btn.primary { background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; border-color: transparent; }

.lb-overlay { background: rgba(8,12,20,.9); display: flex; flex-direction: column; opacity: 0; transition: opacity .2s; }
.lb-overlay.in { opacity: 1; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; color: #fff; }
.lb-cap { font-weight: 600; }
.lb-actions { display: flex; gap: 8px; }
.lb-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-weight: 600; }
.lb-btn.primary { background: linear-gradient(var(--teal-h1), var(--teal-h2)); border-color: transparent; }
.lb-btn svg { width: 16px; height: 16px; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 24px 24px; min-height: 0; }
.lb-img, .lb-canvas { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: var(--shadow-pop); }
.lb-preview { position: absolute; left: 24px; bottom: 24px; padding: 6px 12px; border-radius: 999px; background: rgba(13,20,32,.8); color: #fff; font-size: 12px; }

/* ===================================================== Pano-Overlay */
.pano-overlay { background: #0b1018; display: flex; flex-direction: column; opacity: 0; transition: opacity .2s; }
.pano-overlay.in { opacity: 1; }
.pano-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; color: #fff; background: linear-gradient(rgba(0,0,0,.4), transparent); position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.pano-title { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.pano-title svg { width: 20px; height: 20px; color: var(--teal-lite2); }
.pano-sub { font-weight: 500; color: rgba(255,255,255,.7); margin-left: 6px; font-size: 13px; }
.pano-tools { display: flex; gap: 8px; }
.pano-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pano-btn:hover { background: rgba(255,255,255,.16); }
.pano-btn.on { background: linear-gradient(var(--teal-h1), var(--teal-h2)); border-color: transparent; }
.pano-btn svg { width: 18px; height: 18px; }
.pano-stage { flex: 1; position: relative; min-height: 0; }
.pano-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.pano-canvas:active { cursor: grabbing; }
.pano-measures { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.meas-line { stroke: #ff5a4d; stroke-width: 2.4; }
.meas-dot { fill: #ff5a4d; }
.meas-bg { fill: rgba(13,20,32,.85); }
.meas-text { fill: #fff; font-size: 12px; font-weight: 700; text-anchor: middle; font-family: var(--font); }
.pano-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: rgba(255,255,255,.82); background: rgba(0,0,0,.35); padding: 7px 14px; border-radius: 999px; font-size: 12px; }
.pano-preview-tag { position: absolute; left: 16px; bottom: 18px; color: #fff; background: rgba(13,20,32,.75); padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.pano-fallback { color: #fff; display: flex; align-items: center; justify-content: center; height: 100%; }

/* ===================================================== Sample-Overlay */
.sample-overlay { background: rgba(8,12,20,.92); display: flex; flex-direction: column; opacity: 0; transition: opacity .2s; }
.sample-overlay.in { opacity: 1; }
.sample-header { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: #fff; }
.sample-title { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.sample-title svg { width: 20px; height: 20px; color: var(--teal-lite2); }
.sample-badge { background: var(--amber); color: #4a3a00; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.sample-note { color: rgba(255,255,255,.7); font-size: 13px; flex: 1; }
.sample-stage { flex: 1; margin: 0 16px 16px; background: #fff; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; }
.sample-frame { width: 100%; height: 100%; border: none; }
.sample-missing { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted-2); padding: 40px; text-align: center; }
.sample-missing .big svg { width: 44px; height: 44px; color: var(--teal-soft-bd); }
.sample-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--hair); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================== Onboarding */
.ob-layer { z-index: 320; opacity: 0; transition: opacity .22s; }
.ob-layer.in { opacity: 1; }
.ob-backdrop { position: absolute; inset: 0; background: rgba(8,14,24,.58); }
.ob-ring { position: absolute; border: 2px solid var(--brand-lite); border-radius: 12px; box-shadow: 0 0 0 4000px rgba(8,14,24,.58), 0 0 18px 2px var(--brand-glow); transition: all .25s var(--ease); pointer-events: none; }
.ob-card { position: absolute; width: 320px; background: linear-gradient(180deg, #ffffff, #f6faff); border: 1px solid var(--hair); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 18px; }
/* Marken-Akzentkante oben am Karten-Kopf */
.ob-card::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--brand), var(--teal-lite)); }
.ob-card.center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
/* zartes Marken-Wasserzeichen auf der Willkommens-Karte */
.ob-card.center::after { content: ""; position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; opacity: .16; background: url("/brand/schnur_solutions_mark_on_light.png") center/contain no-repeat; }
.ob-step { font-size: 12px; font-weight: 800; letter-spacing: .4px; color: var(--brand-deep); text-transform: uppercase; }
.ob-title { margin: 4px 0 6px; color: var(--ink); font-size: 18px; }
.ob-desc { margin: 0 0 14px; color: var(--muted-2); line-height: 1.55; }
.ob-actions { display: flex; align-items: center; justify-content: space-between; }
.ob-skip { border: none; background: transparent; color: var(--muted); font-weight: 600; padding: 6px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hair); transition: background .2s var(--ease), transform .2s var(--ease); }
.ob-dot.on { background: var(--brand); transform: scale(1.15); box-shadow: 0 0 6px var(--brand-glow); }
.ob-next { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; border-radius: 9px; border: none; background: linear-gradient(120deg, var(--brand), var(--brand-lite) 60%, var(--teal-lite)); color: #04140a; font-weight: 800; box-shadow: 0 6px 16px rgba(75, 196, 41, .34); transition: transform .18s var(--ease), filter .18s var(--ease); }
.ob-next:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ob-next svg { width: 14px; height: 14px; }

/* ===================================================== Fokus / Scrollbars */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.tree-body::-webkit-scrollbar, .panel-scroll::-webkit-scrollbar, .pin-center::-webkit-scrollbar, .chat-list::-webkit-scrollbar, .thread-body::-webkit-scrollbar, .cal-scroll::-webkit-scrollbar, .full-area::-webkit-scrollbar, .pin-card::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c7d2de; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #aab8c8; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================================================== Responsive (schmaler Laptop-Rahmen) */
@media (max-width: 1240px) {
  .chat-left { width: 224px; }
  .ctx-panel { width: 292px; }
}
@media (max-width: 1180px) {
  .ctx-panel, .tz-mid .ctx-panel { width: 280px; }
  .tree-panel { width: 200px; }
  .pin-card { width: 268px; }
  .chat-left { width: 200px; }
  .tb-guard, .tb-account { display: none; }
}
@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .tz-mid { flex-direction: column; }
  .tz-mid .ctx-panel { width: 100%; }
  .tb-pill { display: none; }
}

/* ===================================================== Mobil (Handy / schmales iframe)
   Der Desktop-Simulator wird zum vertikalen, sauber gestapelten Dokument: nichts wird
   geclippt, alles ist scroll-/zoombar, Ribbon/Baum/Canvas bleiben ganz. GPU-composited,
   keine Dauer-Paints, keine scroll-gekoppelten Effekte. */
@media (max-width: 820px) {
  /* Ganze App als vertikal scrollendes Dokument — kein starres 100%-Gitter mehr */
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .app-root { height: auto; min-height: 100%; }
  .app-shell { height: auto; min-height: 100%; grid-template-rows: auto auto auto auto; }

  /* Titelzeile: kompakt & umbrechend, nur Wesentliches (Logo, Titel, Konto, Sprache) */
  .titlebar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .tb-center, .tb-tools, .tb-guard, .tb-account, .tb-theme, .tb-pill { display: none; }
  .tb-left { flex: 1 1 auto; }
  .tb-title { font-size: 15px; }

  /* Ribbon: Tabs scrollen horizontal (app-typisch) statt zu zerbrechen */
  .ribbon-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ribbon-tabs::-webkit-scrollbar { display: none; }
  .ribbon-tab { flex: none; }
  .ribbon-collapse { display: none; }
  .ribbon-groups { padding: 8px 10px 10px; }

  /* Projektkopf: umbrechen, Combos dürfen schmal werden (kein Überlauf) */
  .project-header { flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; }
  .project-header .ph-field { min-width: 0; }
  .project-header .combo { min-width: 0; max-width: none; width: 100%; }
  .project-header .ph-field.grow { flex: 1 1 100%; }

  /* Baum · Arbeitsfläche · Panels untereinander statt nebeneinander */
  .workbench { flex-direction: column; overflow: visible; min-height: 0; }
  .tree-panel { width: auto; max-height: 30vh; border-right: none; border-bottom: 1px solid var(--hair); }
  .main-col { width: auto; overflow: visible; }

  /* Canvas braucht feste Höhe, da die Elternhöhe jetzt inhaltsbasiert ist */
  .main-area.plan-area { flex: 0 0 auto; height: 56vh; min-height: 300px; }
  .canvas-host { min-height: 300px; }

  /* To-do-Zentrale / Platzhalter: natürlich mitwachsen und die Seite scrollen lassen.
     display:block, damit das Kind auf Viewport-Breite bleibt (ein Flex-Item würde wegen
     min-width:auto nicht unter seine Inhaltsbreite schrumpfen → Seiten-Overflow). */
  .main-area.full-area { display: block; flex: 0 0 auto; height: auto; overflow: visible; }
  .full-area > * { min-width: 0; }
  .placeholder-view { height: auto; min-height: 60vh; padding: 28px 18px; }
  .tz-view { padding: 12px; min-width: 0; }
  .tz-title { font-size: 21px; }
  /* SchnurCut auf schmalen Screens: gestapelt, Kennzahlen 2-spaltig */
  .cut-view { padding: 12px; }
  .cut-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cut-header { gap: 10px; }
  .cut-material { display: none; }
  .cut-title { font-size: 18px; }
  /* Tabellenkarte + Statistik gestapelt und auf Viewport-Breite; breite Tabellen scrollen intern */
  .tz-mid { align-items: stretch; }
  .tz-tablecard { width: 100%; min-width: 0; }
  .stats-block { padding: 12px; }
  .stats-filter, .stats-range { flex-wrap: wrap; }
  .stats-filter .fld-combo.grow { min-width: 0; }

  /* Pin-Detail: drei Spalten → gestapelt, volle Breite, nichts abgeschnitten */
  .main-area.pin-area { flex: 0 0 auto; height: auto; flex-direction: column; overflow: visible; }
  .pin-card { width: auto; border-right: none; border-bottom: 1px solid var(--hair); overflow: visible; }
  .pin-center { min-height: 0; overflow: visible; }
  .pin-area .ctx-panel { width: auto; border-left: none; border-top: 1px solid var(--hair); }
  .gallery-img, .gallery-empty { height: 300px; }

  /* Kontext-Panel (To-do erstellen) volle Breite */
  .ctx-panel { width: auto; }

  /* Docks (Chat/Kalender): volle Breite, Inhalt gestapelt, eigener Innen-Scroll */
  .dock-panel, .chat-dock, .cal-dock { width: auto; height: 68vh; border-left: none; border-top: 1px solid var(--hair); }
  .chat-cols { flex-direction: column; }
  .chat-left { width: auto; max-height: 34%; border-right: none; border-bottom: 1px solid var(--hair-2); }

  /* Statusleiste entschlacken */
  .statusbar { padding: 6px 12px; }
  .sb-path, .sb-pos { display: none; }
  .sb-center { padding-right: 128px; }

  /* Demo-Badge/CTA: fest sichtbar über der scrollenden Fläche */
  .demo-badge { display: none; }
  .demo-actions { position: fixed; right: 10px; bottom: 12px; gap: 8px; }
  .demo-reset { padding: 8px 12px; }
  .demo-cta { padding: 9px 15px; }
  .toast-host { bottom: 66px; }

  /* Onboarding-Karte in schmalen Viewport einpassen */
  .ob-card { width: min(300px, calc(100vw - 26px)); }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-value { font-size: 22px; }
  .tz-header { gap: 8px; }
  /* Sekundär-Buttons der To-do-Zentrale auf dem Handy ausblenden (Kernaussage bleibt) */
  .tz-header .btn-ghost { display: none; }
  .ribbon-tab { padding: 7px 10px; }
  .titlebar .tb-avatar-wrap { display: none; }
  .demo-reset span { display: none; }
  .demo-reset { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
}

/* ===================================================== Anmerkungs-Ebene (Zeichnen) */
.canvas-viewport[data-tool="measure"],
.canvas-viewport[data-tool="line"],
.canvas-viewport[data-tool="arrow"],
.canvas-viewport[data-tool="rect"],
.canvas-viewport[data-tool="text"] { cursor: crosshair; }
.canvas-anno { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.anno-shape { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.anno-head { stroke: none; }
.anno-dot { stroke: #fff; stroke-width: 1.2; }
.anno-text { font-family: var(--font); font-size: 15px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.anno-meas { font-family: var(--font); font-size: 12px; font-weight: 800; fill: #0d1420; stroke: #fff; stroke-width: 3px; paint-order: stroke; text-anchor: middle; }
.anno.sel .anno-shape { stroke-width: 3.6; filter: drop-shadow(0 0 3px rgba(10,168,146,.95)); }
.anno.sel .anno-text, .anno.sel .anno-head, .anno.sel .anno-meas { filter: drop-shadow(0 0 3px rgba(10,168,146,.95)); }
.anno.draft .anno-shape { stroke-dasharray: 7 5; }
.anno-hit { fill: none; stroke: transparent; stroke-width: 16; }
.canvas-anno.interactive .anno-hit { cursor: pointer; }
.pin-marker.moving { cursor: grabbing; z-index: 7; }
.pin-marker.moving .pin-label { box-shadow: 0 0 0 4px rgba(10,168,146,.45), 0 6px 14px rgba(20,40,70,.4); }

/* Ribbon-Farbwahl (Anmerkungen) */
.rcolors { display: flex; gap: 5px; align-items: center; padding: 4px 2px 0; }
.rswatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(13,20,32,.16); background: var(--sw); padding: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.rswatch:hover { transform: translateY(-1px); }
.rswatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--teal); }

/* Pin-Farbwahl (Pin-Detail) */
.pin-color-row { display: flex; align-items: center; gap: 8px; }
.pin-color-row > .ico { flex: none; }
.pin-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.pin-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(13,20,32,.18); background: var(--sw); padding: 0; }
.pin-swatch:hover { transform: translateY(-1px); }
.pin-swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--teal); }

/* Tagesnotizen & Dateien im Pin-Detail */
.collapse-head.static { cursor: default; margin-bottom: 8px; }
.daynotes { display: flex; flex-direction: column; gap: 8px; }
.daynote { display: flex; gap: 10px; padding: 8px 10px; background: var(--teal-soft-bg2); border-radius: 8px; }
.daynote-date { font-weight: 700; color: var(--teal-press); font-size: 12px; flex: none; }
.daynote-txt { color: var(--ink-2); font-size: 12.5px; line-height: 1.42; }
.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 8px; background: #fff; width: 100%; text-align: left; color: var(--ink-2); font-weight: 600; }
.file-item:hover { border-color: var(--teal-soft-bd); background: var(--teal-soft-bg); }
.file-item svg { width: 16px; height: 16px; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Eingabe-Blatt / Farbwähler-Popover */
.prompt-label { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin: 0 0 6px; }
.prompt-field { width: 100%; padding: 10px 12px; border: 1px solid var(--field-border); border-radius: 10px; font-family: inherit; font-size: 14px; color: var(--ink-3); background: #fff; margin-bottom: 16px; }
.prompt-field:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft-bg); }
.prompt-field.area { resize: vertical; min-height: 96px; line-height: 1.5; }
.color-pop { position: fixed; z-index: 260; display: flex; gap: 6px; padding: 8px; background: #fff; border: 1px solid var(--hair); border-radius: 10px; box-shadow: var(--shadow-pop); opacity: 0; transform: scale(.96); transition: opacity .14s, transform .14s; }
.color-pop.in { opacity: 1; transform: none; }
.color-swatch { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(13,20,32,.18); background: var(--sw); padding: 0; }
.color-swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--teal); }

/* ===================================================== Bericht-Vorschau (erzeugt aus Live-Daten) */
.demo-cta.sm { padding: 8px 14px; box-shadow: none; font-size: 12px; font-weight: 700; }
.report-overlay .sample-header { align-items: center; }
.rep-stage { flex: 1; overflow: auto; padding: 4px 16px 24px; display: flex; justify-content: center; min-height: 0; }
.rep-paper { width: min(840px, 100%); background: #fff; border-radius: 8px; box-shadow: var(--shadow-pop); padding: 34px 40px 40px; margin: 0 auto; height: max-content; color: var(--ink); }
.rep-head { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 16px; border-bottom: 2px solid var(--teal); }
.rep-logo svg { width: 40px; height: 40px; display: block; border-radius: 9px; }
.rep-head-txt { flex: 1 1 auto; min-width: 0; }
.rep-title { margin: 0; font-size: 24px; color: var(--ink); letter-spacing: .2px; }
.rep-sub { color: var(--muted-2); font-size: 13px; }
.rep-head-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.rep-badge { background: var(--amber); color: #4a3a00; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.rep-gen { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.rep-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 6px; }
.rep-metric { border: 1px solid var(--hair); border-left-width: 4px; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rep-metric-v { font-size: 26px; font-weight: 800; color: var(--ink); }
.rep-metric-l { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2); font-weight: 700; }
.rep-metric.teal { border-left-color: var(--teal); } .rep-metric.teal .rep-metric-v { color: var(--teal-press); }
.rep-metric.blue { border-left-color: var(--blue); } .rep-metric.blue .rep-metric-v { color: var(--blue); }
.rep-metric.orange { border-left-color: var(--orange); } .rep-metric.orange .rep-metric-v { color: #c75415; }
.rep-metric.green { border-left-color: var(--green); } .rep-metric.green .rep-metric-v { color: var(--green); }
.rep-h3 { margin: 22px 0 10px; font-size: 15px; color: var(--teal-press); border-bottom: 1px solid var(--hair-2); padding-bottom: 6px; }
.rep-plans { display: flex; flex-direction: column; gap: 4px; }
.rep-plan-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; background: var(--teal-soft-bg2); }
.rep-plan-nr { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rep-plan-name { flex: 1 1 auto; font-weight: 600; color: var(--ink-2); }
.rep-plan-meta { color: var(--muted-2); font-size: 12px; }
.rep-pinplan { margin-bottom: 12px; }
.rep-pinplan-title { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.rep-pin { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hair-2); }
.rep-pin-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc, #f5a623); flex: none; margin-top: 3px; box-shadow: 0 0 0 3px rgba(245,166,35,.22); }
.rep-pin-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rep-pin-name { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.rep-pin-note { color: var(--muted-2); font-size: 12.5px; line-height: 1.45; }
.rep-todos { display: flex; flex-direction: column; }
.rep-td-row { display: grid; grid-template-columns: 32px 1fr 96px 130px 96px; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--hair-2); align-items: center; font-size: 12.5px; color: var(--ink-2); }
.rep-td-head { background: #eef2f6; color: var(--muted-2); font-weight: 700; border-radius: 6px 6px 0 0; }
.rep-td-task { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-td-lbl, .rep-td-who, .rep-td-due { color: var(--muted-2); }
.rep-footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--hair-2); color: var(--muted); font-size: 11.5px; text-align: center; }
@media (max-width: 720px) {
  .rep-metrics { grid-template-columns: repeat(2, 1fr); }
  .rep-paper { padding: 22px 20px 28px; }
  .rep-td-row { grid-template-columns: 26px 1fr 84px; }
  .rep-td-who, .rep-td-due { display: none; }
}

/* ===================================================== SchnurCut (visualisierte Schnittliste) */
.cut-view { padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: min-content; }
.cut-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cut-title-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cut-title { margin: 0; font-size: 22px; color: var(--ink); font-weight: 800; display: flex; align-items: center; gap: 9px; min-width: 0; }
.cut-title-ico svg { width: 22px; height: 22px; }
.cut-badge { background: var(--amber); color: #4a3a00; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; flex: none; }
.cut-sub { margin: 0; color: var(--muted-2); font-size: 12.5px; }
.cut-material { display: flex; align-items: center; gap: 8px; }
.cut-mat-combo { width: auto; min-width: 200px; }
.cut-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.cut-mid { display: flex; gap: 14px; align-items: flex-start; }
.cut-boards { flex: 1.3 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cut-board { padding: 10px 12px 12px; }
.cut-board-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.cut-board-nr { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(var(--teal-h1), var(--teal-h2)); color: #fff; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cut-board-head strong { color: var(--ink-3); }
.cut-board-meta { color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.cut-svg { width: 100%; height: auto; display: block; }
.cut-svg text { font-family: var(--font); }
.cut-dim { fill: var(--muted-2); font-size: 15px; text-anchor: middle; }
.cut-code { font-size: 22px; font-weight: 800; text-anchor: middle; }
.cut-size { fill: var(--muted-2); font-size: 14px; text-anchor: middle; }
.cut-rest-lbl { fill: #8a97a6; font-size: 15px; font-weight: 700; text-anchor: middle; letter-spacing: .6px; }
.cut-open-lbl { fill: #c75415; font-size: 12.5px; font-weight: 700; text-anchor: middle; }
/* Teil ↔ Zeile: gemeinsames Aufleuchten (nur GPU-günstige Effekte, keine Layout-Änderung) */
.cut-part { cursor: pointer; outline: none; }
.cut-part .cut-part-rect { transition: stroke-width .15s var(--ease), fill-opacity .15s var(--ease); }
.cut-part.hot .cut-part-rect, .cut-part.lock .cut-part-rect, .cut-part:focus-visible .cut-part-rect { stroke-width: 4; }
.cut-part.lock .cut-part-rect { filter: drop-shadow(0 0 4px rgba(10, 168, 146, .55)); }
.cut-list { flex: 1 1 0; min-width: 320px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cut-list-head { display: flex; align-items: center; gap: 10px; }
.cut-list-head h3 { margin: 0; font-size: 17px; color: var(--ink-3); font-weight: 800; }
.cut-table { display: flex; flex-direction: column; font-size: 12.5px; overflow-x: auto; }
.cut-row { display: grid; grid-template-columns: 34px minmax(150px, 1fr) 96px 38px 52px 72px; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--hair-2); min-width: 480px; cursor: pointer; }
.cut-row-head { background: #eef2f6; color: var(--muted-2); font-weight: 700; font-size: 12px; border-radius: 8px 8px 0 0; cursor: default; }
.cut-row:not(.cut-row-head):hover, .cut-row.hot { background: var(--teal-soft-bg2); }
.cut-row.lock { background: var(--teal-soft-bg); box-shadow: inset 3px 0 0 var(--teal); }
.cut-row:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.c-pos { color: var(--muted-2); }
.c-part { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cut-dot { width: 11px; height: 11px; border-radius: 4px; background: var(--ct, var(--teal)); flex: none; box-shadow: inset 0 0 0 1px rgba(13, 20, 32, .12); }
.c-part-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.c-part-txt b { color: var(--ink-3); }
.c-part-name { color: var(--muted-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-size, .c-qty, .c-board, .c-area { color: var(--ink-2); white-space: nowrap; }
.cut-hint { margin: 0; color: var(--muted-2); font-size: 11.5px; }
.cut-note { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--teal-soft-bd); border-radius: 10px; background: var(--teal-soft-bg2); color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.cut-note .ico { flex: none; }
.cut-note-cta { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; border: none; background: linear-gradient(120deg, var(--brand), var(--brand-lite) 60%, var(--teal-lite)); color: #04140a; font-weight: 800; font-size: 12px; }
.cut-note-cta:hover { filter: brightness(1.05); }
.cut-note-cta svg { width: 13px; height: 13px; }
@media (max-width: 1240px) {
  .cut-stats { grid-template-columns: repeat(3, 1fr); }
  .cut-mid { flex-direction: column; }
  .cut-list { width: 100%; min-width: 0; }
}

/* ===================================================== Bauteildetails (bd-view) */
.bd-sub { font-size: 12.5px; }
.bd-mid { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.bd-tablecard { flex: 1 1 auto; min-width: 0; padding: 6px; display: flex; flex-direction: column; font-size: 13px; overflow-x: auto; }
.bd-row { display: grid; grid-template-columns: 52px minmax(170px, 1.4fr) 96px minmax(110px, 1fr) 44px 104px; align-items: center; gap: 8px; padding: 9px 8px; border-bottom: 1px solid var(--hair-2); min-width: 620px; cursor: pointer; }
.bd-row.bd-head { background: #eef2f6; color: var(--muted-2); font-weight: 700; font-size: 12px; border-radius: 8px 8px 0 0; cursor: default; }
.bd-row:not(.bd-head):hover { background: var(--teal-soft-bg2); }
.bd-row.on { background: var(--teal-soft-bg); box-shadow: inset 3px 0 0 var(--teal); }
.bd-row:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.bd-pos { color: var(--muted-2); font-weight: 700; }
.bd-name { color: var(--ink-3); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-size { color: var(--ink-2); white-space: nowrap; }
.bd-status { display: inline-flex; align-items: center; justify-content: center; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--teal-soft-bg); color: var(--teal-press); }
.bd-status.tone-green { background: #e6f6e9; color: #1e7a35; }
.bd-status.tone-orange { background: #fdf0e3; color: #c75415; }
.bd-status.tone-red { background: #fde9e7; color: #b3261e; }
.bd-status.tone-violet { background: #f0eafb; color: #6a3fc4; }
.bd-detail { flex: 0 0 330px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bd-dhead { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.bd-dpos { font-weight: 800; font-size: 12px; color: var(--teal-press); background: var(--teal-soft-bg); border: 1px solid var(--teal-soft-bd); border-radius: 8px; padding: 3px 8px; }
.bd-dtitle { margin: 0; font-size: 15px; color: var(--ink-3); flex: 1 1 100%; }
.bd-props { display: flex; flex-direction: column; border: 1px solid var(--hair-2); border-radius: 10px; overflow: hidden; }
.bd-kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 11px; border-bottom: 1px solid var(--hair-2); font-size: 12.5px; }
.bd-kv:last-child { border-bottom: none; }
.bd-k { color: var(--muted-2); font-weight: 600; }
.bd-v { color: var(--ink-2); text-align: right; }
.bd-notehead { font-size: 11.5px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.bd-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.bd-openpin { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.bd-openpin svg { width: 15px; height: 15px; }
@media (max-width: 1240px) {
  .bd-mid { flex-direction: column; }
  .bd-detail { flex: none; width: 100%; }
}

/* ===================================================== Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .ob-ring { transition: none; }
}
