/* DSK GW-Durchlauf – Designsystem. Sachlich, dicht, eine Akzentfarbe. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fa; --line: #e3e6ea; --line-2: #cdd2d8;
  --ink: #111418; --ink-2: #3b414a; --muted: #697180; --accent: #0e5a4a; --accent-2: #0b4a3d; --accent-soft: #e5efec;
  --a: #0e5a4a; --a-soft: #e5efec; --b: #8a5600; --b-soft: #f7efe1; --c: #3a4d8c; --c-soft: #e9ecf6;
  --danger: #b42318; --danger-soft: #fdecea; --warn: #9a5b06; --warn-soft: #fbf1e0; --ok: #12704a; --ok-soft: #e6f3ec;
  --info: #2c5597; --info-soft: #e8eef8; --focus: #1d6fd1;
  --radius: 7px; --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114; --surface: #171a1f; --surface-2: #1c2026; --line: #2a2f37; --line-2: #3a414b;
    --ink: #eceef1; --ink-2: #c3c8cf; --muted: #8d95a1; --accent: #3fae94; --accent-2: #5cc4aa; --accent-soft: #15302a;
    --a: #4fb79d; --a-soft: #15302a; --b: #d7a24a; --b-soft: #30260f; --c: #8fa3e6; --c-soft: #1e2440;
    --danger: #f0766b; --danger-soft: #3a1714; --warn: #e0a64c; --warn-soft: #33250c; --ok: #5cc48e; --ok-soft: #12291d;
    --info: #86a9e8; --info-soft: #17223a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { font-size: 14px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.45 var(--font); font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.02rem; } h3 { font-size: .92rem; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Layout */
.app { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; gap: 9px; align-items: center; padding: 4px 8px 16px; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 .72rem/1 var(--font); letter-spacing: .02em; }
.brand b { display: block; font-size: .95rem; } .brand span { font-size: .76rem; color: var(--muted); }
.nav-group { margin: 10px 0 4px; padding: 0 8px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 6px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .count { font-size: .74rem; background: var(--danger); color: #fff; border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 10px 8px 0; font-size: .85rem; }
.side-foot .role { color: var(--muted); font-size: .78rem; }
.main { min-width: 0; }
.topbar { display: flex; gap: 12px; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 1.12rem; flex: 0 0 auto; }
.topbar .search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.topbar .search input { width: 100%; padding-left: 30px; }
.topbar .search::before { content: ""; position: absolute; left: 10px; top: 50%; width: 10px; height: 10px; border: 1.6px solid var(--muted); border-radius: 50%; transform: translateY(-62%); }
.topbar .search::after { content: ""; position: absolute; left: 19px; top: 58%; width: 5px; height: 1.6px; background: var(--muted); transform: rotate(45deg); }
.kbd { font: 500 .72rem var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--muted); }
.content { padding: 20px 24px 48px; max-width: 1560px; }
.demo-banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); padding: 5px 24px; font-size: .82rem; font-weight: 600; }

/* Controls */
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 9px; min-height: 34px; }
textarea { min-height: 70px; resize: vertical; width: 100%; }
input[type=checkbox], input[type=radio] { min-height: auto; width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
label { font-size: .82rem; color: var(--ink-2); font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; }
.field .hint { font-size: .76rem; color: var(--muted); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; font: 600 .88rem/1 var(--font); padding: 0 12px; height: 34px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line-2)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 28px; padding: 0 9px; font-size: .8rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: .95rem; }
.panel-head .aside { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 14px; }
.panel-body.tight { padding: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.empty { padding: 18px 14px; color: var(--muted); font-size: .9rem; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpi { padding: 12px 14px; border-right: 1px solid var(--line); display: block; }
.kpi:last-child { border-right: 0; }
.kpi:hover { background: var(--surface-2); }
.kpi .v { font-size: 1.6rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.kpi .l { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.kpi.a .v { color: var(--a); } .kpi.b .v { color: var(--b); } .kpi.c .v { color: var(--c); } .kpi.warn .v { color: var(--warn); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
table.grid th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 600; font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th a:hover { color: var(--ink); }
table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover td { background: var(--surface-2); }
table.grid tr.prio td:first-child { box-shadow: inset 3px 0 var(--danger); }
table.grid .sel { width: 28px; }
table.kv { border-collapse: collapse; width: 100%; }
table.kv td { padding: 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv td:first-child { color: var(--muted); width: 44%; padding-right: 10px; font-size: .86rem; }
table.kv tr:last-child td { border-bottom: 0; }

/* Pills & tags */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.way-A { background: var(--a-soft); color: var(--a); border-color: transparent; }
.pill.way-B { background: var(--b-soft); color: var(--b); border-color: transparent; }
.pill.way-C { background: var(--c-soft); color: var(--c); border-color: transparent; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.unknown { color: var(--muted); font-style: italic; }

/* Flash */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.flash.conflict { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: var(--radius); padding: 12px 14px; }
.callout.warn { border-left-color: var(--warn); } .callout.danger { border-left-color: var(--danger); }

/* Dashboard */
.widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
.wlist { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.wlist li { display: flex; gap: 10px; align-items: baseline; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.wlist li:last-child { border-bottom: 0; }
.wlist li:hover { background: var(--surface-2); }
.wlist .grow { flex: 1; min-width: 0; }
.wlist .t { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlist .s { font-size: .82rem; color: var(--muted); }
.badge-n { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 7px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 13px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.vcard:hover { border-color: var(--line-2); }
.vcard.prio { border-left: 3px solid var(--danger); }
.vcard .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.vcard .title { font-weight: 650; font-size: 1rem; }
.vcard .next { font-size: .86rem; background: var(--surface-2); border-radius: 5px; padding: 6px 8px; }
.vcard .next b { color: var(--accent); font-weight: 600; }
.vcard .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: .8rem; }
.vcard .meta div span { display: block; color: var(--muted); font-size: .72rem; }
.vcard .meta div b { font-weight: 600; }
.vcard .foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--muted); }
.vcard a.cover { position: absolute; inset: 0; }

/* Filter editor */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg a, .seg button { padding: 0 11px; height: 32px; display: inline-flex; align-items: center; font-size: .85rem; font-weight: 550; color: var(--ink-2); border: 0; background: none; border-right: 1px solid var(--line); cursor: pointer; }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--accent-soft); color: var(--accent); }
.filter-editor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.filter-editor .rows { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.filter-editor .frow { display: grid; grid-template-columns: 56px minmax(160px, 1.2fr) minmax(130px, 1fr) minmax(160px, 1.4fr) 34px; gap: 6px; align-items: center; }
.filter-editor .frow .logic { font-size: .78rem; font-weight: 700; color: var(--muted); text-align: right; padding-right: 4px; }
.filter-summary { font-size: .86rem; color: var(--ink-2); }
.filter-summary b { font-weight: 600; }

/* Case detail */
.case-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.case-head .ids { display: flex; gap: 14px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-top: 4px; }
.case-head .ids b { color: var(--ink); font-weight: 600; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.metric { padding: 11px 14px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric .l { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.metric .v { font-size: 1.15rem; font-weight: 650; margin-top: 2px; }
.metric .s { font-size: .78rem; color: var(--muted); }
.next-action { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--accent-soft); color: var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-weight: 600; flex-wrap: wrap; }
.next-action .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; opacity: .8; display: block; }
.next-action .txt { font-size: 1.05rem; }
.steps { width: 100%; border-collapse: collapse; }
.steps td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.steps tr:last-child td { border-bottom: 0; }
.steps .st { width: 128px; }
.stepform { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.stepform select, .stepform input { min-height: 30px; padding: 3px 7px; font-size: .86rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: .8rem; }
.timeline .rev { text-decoration: line-through; color: var(--muted); }
.timeline .prog { color: var(--ok); font-weight: 700; font-size: .72rem; margin-left: 6px; }
details.act { border-bottom: 1px solid var(--line); }
details.act:last-child { border-bottom: 0; }
details.act > summary { list-style: none; cursor: pointer; padding: 10px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
details.act > summary::-webkit-details-marker { display: none; }
details.act > summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.1rem; }
details.act[open] > summary::after { content: "–"; }
details.act > summary .cur { margin-left: auto; font-weight: 400; color: var(--muted); font-size: .84rem; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.act > .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 9px; }
.note { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note .by { font-size: .78rem; color: var(--muted); margin-bottom: 3px; }
.note .body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Racks */
.racks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rack { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rack h3 { padding: 9px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.rack ul { list-style: none; margin: 0; padding: 0; }
.rack li { padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: .86rem; display: flex; gap: 8px; align-items: center; }
.rack li:last-child { border-bottom: 0; }
.season { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
.season.sommer { background: #d18a00; } .season.winter { background: #3a74c4; } .season.ganzjahres { background: #4c8f5a; } .season.unbekannt { background: var(--line-2); }

/* Order form */
.workgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.workgroup { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.workgroup h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: .92rem; color: var(--ink); font-weight: 450; cursor: pointer; }
.check input { margin-top: 2px; }

/* Bars (Controlling, rein tabellarisch mit Anteilsbalken) */
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .box { width: 100%; max-width: 360px; }
.login .box .panel-body { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 2px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 4px 8px; } .nav-group { display: none; } .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; gap: 8px; align-items: center; }
  .nav { display: contents; }
  .topbar { position: static; padding: 10px 14px; flex-wrap: wrap; } .content { padding: 14px; }
  .filter-editor .frow { grid-template-columns: 1fr 1fr; } .filter-editor .frow .logic { text-align: left; }
}
@media print { .side, .topbar, .no-print { display: none !important; } .app { display: block; } }
table.grid td .mono, .vcard .top .mono { white-space: nowrap; }
table.grid td a b { white-space: nowrap; }
.stepform .lbl { font-size: .72rem; color: var(--muted); }
/* Breite Tabellen über alle Spalten; Aktionsspalte kompakt */
.grid-cols > .span-all { grid-column: 1 / -1; }
table.grid td.row-actions { white-space: nowrap; }
table.grid td.row-actions form { display: inline-block; margin: 0 2px; }
.deadline-grid td { vertical-align: middle; }
.deadline-grid select { min-width: 130px; }

/* Katalog (Standardarbeiten) */
.catalog-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.catalog-cols > .panel { min-width: 0; }
ol.catalog { list-style: none; margin: 0; padding: 0; }
ol.catalog > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
ol.catalog > li:last-child { border-bottom: 0; }
ol.catalog > li.muted .t { color: var(--muted); text-decoration: line-through; }
ol.catalog .pos { width: 22px; color: var(--muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
ol.catalog .grow { flex: 1; min-width: 160px; }
ol.catalog .t { font-weight: 550; }
ol.catalog .s { font-size: .8rem; color: var(--muted); }
ol.catalog .moves { display: flex; }
ol.catalog .moves form { display: inline; }
ol.catalog details.edit > summary { list-style: none; }
ol.catalog details.edit > summary::-webkit-details-marker { display: none; }
ol.catalog details.edit[open] { flex-basis: 100%; }
ol.catalog .edit-body { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 8px; padding: 10px; background: var(--surface-2); border-radius: 6px; }

/* Master: Ansicht wechseln */
.view-switch { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.view-switch select { min-height: 28px; padding: 2px 6px; font-size: .82rem; flex: 1; min-width: 0; }
.view-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--info-soft); color: var(--info); border-bottom: 1px solid var(--line); padding: 6px 24px; font-size: .86rem; }
.view-banner form { margin-left: auto; }
ol.catalog details.edit[open] > summary { display: flex; width: max-content; margin-left: auto; }

.danger-text { color: var(--danger) !important; font-weight: 600; }
input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
[hidden] { display: none !important; }

/* Überschriften der Kacheln farbig hinterlegt */
.panel > .panel-head, .panel > details > .panel-head { background: var(--accent-soft); border-radius: var(--radius) var(--radius) 0 0; }
.panel > .panel-head h2, .panel > details > .panel-head h2 { color: var(--accent); }
details.fold > summary.panel-head { cursor: pointer; list-style: none; border-bottom: 0; border-radius: var(--radius); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary.panel-head::after { content: "+"; color: var(--accent); font-size: 1.1rem; margin-left: 8px; }
details.fold[open] > summary.panel-head { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
details.fold[open] > summary.panel-head::after { content: "–"; }

/* Live-Suche */
.live-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; max-height: 70vh; overflow-y: auto; }
.live-results a { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.live-results a:last-child { border-bottom: 0; }
.live-results a:hover, .live-results a.on { background: var(--accent-soft); }
.live-results .lr-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.live-results .lr-gamis { font-size: .8rem; color: var(--accent); white-space: nowrap; }
.live-results .lr-sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-results .lr-all { color: var(--accent); font-weight: 600; font-size: .85rem; text-align: center; }
.live-results .lr-empty { padding: 10px 12px; color: var(--muted); font-size: .88rem; }

/* Arbeitsschritte: Ein-Klick-Knöpfe */
.step-quick { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.step-quick form { display: inline; }
.step-more[open] { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-end; }
.step-more > summary { list-style: none; } .step-more > summary::-webkit-details-marker { display: none; }
.step-more-body { margin-top: 6px; padding: 8px; background: var(--surface-2); border-radius: 6px; }
.pill.muted { opacity: .6; text-decoration: line-through; }
.rack li form { display: inline; }

.note-actions { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; flex-wrap: wrap; }
.note-actions details { flex: 1; } .note-actions details[open] { flex-basis: 100%; }
.note-actions summary { list-style: none; display: inline-flex; } .note-actions summary::-webkit-details-marker { display: none; }
